Revision 1422e28a
Von G. Richardson vor mehr als 13 Jahren hinzugefügt
SL/DATEV.pm | ||
---|---|---|
$ref->{is_tax} = 1;
|
||
}
|
||
|
||
if ( !$ref->{invoice}
|
||
&& $ref->{is_tax}
|
||
&& !($prev_ref->{is_tax})
|
||
&& (_sign($ref->{amount}) == _sign($prev_ref->{amount}))) {
|
||
if ( !$ref->{invoice} # we have a non-invoice booking (=gl)
|
||
&& $ref->{is_tax} # that has "is_tax" set
|
||
&& !($prev_ref->{is_tax}) # previous line wasn't is_tax
|
||
&& (_sign($ref->{amount}) == _sign($prev_ref->{amount}))) # and sign same as previous sign
|
||
{
|
||
$trans->[$i - 1]->{tax_amount} = $ref->{amount};
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
|
||
for my $j (0 .. (scalar(@{$trans}) - 1)) {
|
||
if (abs($trans->[$j]->{'amount'}) > abs($absumsatz)) {
|
||
# for gl-bookings no split is allowed and there is no AR/AP account, so we always use the maximum value as a reference
|
||
# for ap/ar bookings we can always search for AR/AP in link and use that
|
||
if ( ( not $trans->[$j]->{'invoice'} and abs($trans->[$j]->{'amount'}) > abs($absumsatz) )
|
||
or ($trans->[$j]->{'invoice'} and ($trans->[$j]->{'link'} eq 'AR' or $trans->[$j]->{'link'} eq 'AP'))) {
|
||
$absumsatz = $trans->[$j]->{'amount'};
|
||
$notsplitindex = $j;
|
||
}
|
Auch abrufbar als: Unified diff
Bug 1676 - DATEV Export bei gemischter Rechnung/Gutschrift schlägt fehl
Bei ar/ap-Rechnungen wird jetzt nicht mehr nach dem größten Betrag gesucht,
sondern nach dem Buchungskonto wo link AR oder AP ist, also das Forderungs-
oder Verbindlichkeitskonto. Damit klappen auch gemischte
Rechnungen/Gutschriften im Export wieder.