Commit Graph

6 Commits (master)

Author SHA1 Message Date
Hostea dashboard 669a22a004
fix: don't send pre-payment notification email
closes: https://gitea.gna.org/Hostea/dashboard/issues/49
2022-09-12 21:01:21 +05:30
Aravinth Manivannan b12cc044da
fix: Invoice generation must not consider deleted VMs' names for
ci/woodpecker/push/woodpecker Pipeline was successful Details
checking if payment is already fulfilled

DESCRIPTION
    Invoice generation is dependent on instance_name. Deleting a VM
    doesn't delete the corresponding payments record since payment
    receipts should be preserved for accounting purposes.

    But being heavily dependent on instance_name, without taking deleted
    VMs into account produces incorrect behavior under certain
    circumstances: if a VM named 'foo' is paid for and is deleted before
    its billing cycle is competed and a new VM is created with the same
    name, either by the same user or a different user, invoice won't be
    generated for the new VM since a payment record already exists for
    that billing cycle for the VM named 'foo'.

    Marking deleted VMs' payment records unsuitable for checking if a VM
    is already paid for will result in correct behavior.

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/38
2022-07-08 22:28:39 +05:30
Aravinth Manivannan bebf18946a
fix: re-enable billing app tests
ci/woodpecker/push/woodpecker Pipeline was successful Details
Commented out for debugging, forgot to enable(!!)
2022-07-08 19:31:06 +05:30
Aravinth Manivannan 2c8a5909cb
fix: generate absolute URI when attaching links in invoice and payment
ci/woodpecker/push/woodpecker Pipeline was successful Details
notification

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/37
2022-07-08 18:51:04 +05:30
Aravinth Manivannan 438e34f7d6
chore: refactor invoice generation into a util fn 2022-07-08 00:51:11 +05:30
Aravinth Manivannan ec49caa973
feat: payment status checking util 2022-06-25 16:27:43 +05:30