From 38847844fb27d97e3d00d3bf102a4d2c42fad482 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 7 Oct 2019 14:02:40 +0200 Subject: [PATCH] display label on all rows in accounting export --- app/services/accounting_export_service.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/services/accounting_export_service.rb b/app/services/accounting_export_service.rb index 0fc6e9ada..209ec65f6 100644 --- a/app/services/accounting_export_service.rb +++ b/app/services/accounting_export_service.rb @@ -97,7 +97,8 @@ class AccountingExportService invoice, account(invoice, :reservation), account(invoice, :reservation, type: :label), - item.net_amount / 100.00 + item.net_amount / 100.00, + line_label: label(invoice) ) end @@ -108,7 +109,8 @@ class AccountingExportService invoice, account(invoice, :subscription), account(invoice, :subscription, type: :label), - subscription_item.net_amount / 100.00 + subscription_item.net_amount / 100.00, + line_label: label(invoice) ) end @@ -119,7 +121,8 @@ class AccountingExportService invoice, account(invoice, :wallet), account(invoice, :wallet, type: :label), - invoice.invoice_items.first.net_amount / 100.00 + invoice.invoice_items.first.net_amount / 100.00, + line_label: label(invoice) ) end @@ -133,7 +136,8 @@ class AccountingExportService invoice, account(invoice, :vat), account(invoice, :vat, type: :label), - invoice.invoice_items.map(&:vat).map(&:to_i).reduce(:+) / 100.00 + invoice.invoice_items.map(&:vat).map(&:to_i).reduce(:+) / 100.00, + line_label: label(invoice) ) end