From 95d27151ac24eba36e0c64d901e8665ddbfc7af9 Mon Sep 17 00:00:00 2001 From: Thomas Burkhalter Date: Fri, 8 Mar 2024 04:20:11 +0100 Subject: [PATCH] Fix synced invoice total_amount --- app/domain/invoicing/small_invoice/invoice_sync.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/domain/invoicing/small_invoice/invoice_sync.rb b/app/domain/invoicing/small_invoice/invoice_sync.rb index ca189c0c..eaec8696 100644 --- a/app/domain/invoicing/small_invoice/invoice_sync.rb +++ b/app/domain/invoicing/small_invoice/invoice_sync.rb @@ -132,7 +132,7 @@ def total_amount_without_vat(item) total -= position_discount(p, total) total -= position_included_vat(p, total) if vat_included total - end + end.sum end def position_discount(p, total)