Show correct period start and period end in invoice list

Previously, we used to take the first element in the bill line
item, for invoice start and end date. However, it can be faulty in
cases where the first item does not represent a VM itself (which
we are sure has a monthly subscription and a correct start and end
dates)
This commit is contained in:
PCoder 2019-04-22 11:08:53 +02:00
commit 965cc3adf9
3 changed files with 9 additions and 2 deletions

View file

@ -521,6 +521,7 @@ class HostingBillLineItem(AssignPermissionsMixin, models.Model):
)
return item_detail
class VMDetail(models.Model):
user = models.ForeignKey(CustomUser)
vm_id = models.IntegerField(default=0)