File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -593,17 +593,20 @@ class Invoice(SQLModel, table=True):
593
593
@property
594
594
def sum (self ) -> Decimal :
595
595
"""Sum over all invoice items."""
596
- return sum ([item .subtotal for item in self .items ])
596
+ s = sum ([item .subtotal for item in self .items ])
597
+ return Decimal (s )
597
598
598
599
@property
599
600
def VAT_total (self ) -> Decimal :
600
601
"""Sum of VAT over all invoice items."""
601
- return sum (item .VAT for item in self .items )
602
+ s = sum (item .VAT for item in self .items )
603
+ return Decimal (s )
602
604
603
605
@property
604
606
def total (self ) -> Decimal :
605
607
"""Total invoiced amount."""
606
- return self .sum + self .VAT_total
608
+ t = self .sum + self .VAT_total
609
+ return Decimal (t )
607
610
608
611
def generate_number (self , pattern = None , counter = None ) -> str :
609
612
"""Generate an invoice number"""
You can’t perform that action at this time.
0 commit comments