From: Bernd Bleßmann Date: Wed, 8 Dec 2021 15:37:25 +0000 (+0100) Subject: Anzahlungs-Rg.: Workaround f. fxselprice/PTC beim Ermitteln der Steuern X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~217^2~24 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9c668ab9a0ab84634a7f6861939b9ee8ca427d3e;p=kivitendo-erp.git Anzahlungs-Rg.: Workaround f. fxselprice/PTC beim Ermitteln der Steuern --- diff --git a/SL/IS.pm b/SL/IS.pm index 1b8534e65..edb5dd9ae 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -578,6 +578,10 @@ sub invoice_details { $form->{$_} = $form->format_amount($myconfig, $form->{$_}, 2) for @separate_totals; foreach my $invoice_for_advance_payment (@{$self->_get_invoices_for_advance_payment($form->{convert_from_ar_ids} || $form->{id})}) { + # Collect VAT of invoices for advance payment. + # Set sellprices to fxsellprices for items, because + # the PriceTaxCalculator sets fxsellprice from sellprice before calculating. + $_->sellprice($_->fxsellprice) for @{$invoice_for_advance_payment->items}; my %pat = $invoice_for_advance_payment->calculate_prices_and_taxes; my $taxamount = sum0 values %{ $pat{taxes_by_tax_id} };