mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 20:09:25 +00:00
improve counter dump admin
This commit is contained in:
@ -279,6 +279,14 @@ class AccountDump(models.Model):
|
||||
status = "ongoing" if self.dump_operation is None else "finished"
|
||||
return f"{self.customer} - {status}"
|
||||
|
||||
@cached_property
|
||||
def amount(self):
|
||||
return (
|
||||
self.dump_operation.unit_price
|
||||
if self.dump_operation
|
||||
else self.customer.amount
|
||||
)
|
||||
|
||||
|
||||
class ProductType(models.Model):
|
||||
"""A product type.
|
||||
|
Reference in New Issue
Block a user