fix posdetail view when no pos json yet
This commit is contained in:
parent
df10fc89c6
commit
f28858e4a3
|
@ -853,9 +853,10 @@ class PosReport(CampRelatedModel, UUIDModel):
|
||||||
"""Calculate the total HAX sales and number of transactions."""
|
"""Calculate the total HAX sales and number of transactions."""
|
||||||
transactions = 0
|
transactions = 0
|
||||||
total = 0
|
total = 0
|
||||||
for tx in self.pos_json:
|
if self.pos_json:
|
||||||
transactions += 1
|
for tx in self.pos_json:
|
||||||
total += tx["amount"]
|
transactions += 1
|
||||||
|
total += tx["amount"]
|
||||||
return transactions, total
|
return transactions, total
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue