fix nil when not separate_deposits

This commit is contained in:
viehlieb 2023-10-20 10:02:01 +02:00
parent c3d56cdf3b
commit f979face11
2 changed files with 13 additions and 10 deletions

View file

@ -252,6 +252,8 @@ class GroupOrderInvoicePdf < RenderPdf
tmp_sum << number_to_currency(tax_hash_fc[key])
sum << tmp_sum
if separate_deposits
tmp_sum = [nil, "Pfand mit #{key}%", number_to_currency(tax_hash_deposit_net[key])]
if marge <= 0
tmp_sum.unshift(nil)
@ -263,6 +265,7 @@ class GroupOrderInvoicePdf < RenderPdf
tmp_sum << number_to_currency(tax_hash_deposit_fc[key])
sum << tmp_sum
end
end
total_deposit_gross ||= 0
sum << [nil, nil, nil, nil, I18n.t('documents.group_order_invoice_pdf.sum_to_pay_gross'), number_to_currency(total_gross + total_deposit_gross)]

View file

@ -34,7 +34,7 @@ nkn_supplier = Supplier.create!(
name: "Naturgut Süd",
address: "Somewhere in Hamburg, maybe St. Pauli?",
phone: "0123434789",
email: "foodsoft@local-it.org",
email: "foodsoft@test.org",
supplier_category: supplier_category
)