Revision add79c20
Von Jan Büren vor fast 4 Jahren hinzugefügt
SL/DB/BankTransaction.pm | ||
---|---|---|
79 | 79 |
payment_within_30_days => 1, |
80 | 80 |
remote_account_number => 3, |
81 | 81 |
skonto_exact_amount => 5, |
82 |
wrong_sign => -1,
|
|
82 |
wrong_sign => -4,
|
|
83 | 83 |
sepa_export_item => 5, |
84 | 84 |
batch_sepa_transaction => 20, |
85 | 85 |
); |
... | ... | |
162 | 162 |
} |
163 | 163 |
|
164 | 164 |
#check sign |
165 |
if ( $invoice->is_sales && $self->amount < 0 ) { # TODO debit note |
|
165 |
if (( $invoice->is_sales && $invoice->amount > 0 && $self->amount < 0 ) || |
|
166 |
( $invoice->is_sales && $invoice->amount < 0 && $self->amount > 0 ) ) { # sales credit note |
|
166 | 167 |
$agreement += $points{wrong_sign}; |
167 | 168 |
$rule_matches .= 'wrong_sign(' . $points{'wrong_sign'} . ') '; |
168 | 169 |
} |
169 | 170 |
if (( !$invoice->is_sales && $invoice->amount > 0 && $self->amount > 0) || |
170 |
( !$invoice->is_sales && $invoice->amount < 0 && $self->amount < 0) ) { # credit note |
|
171 |
( !$invoice->is_sales && $invoice->amount < 0 && $self->amount < 0) ) { # purchase credit note
|
|
171 | 172 |
$agreement += $points{wrong_sign}; |
172 | 173 |
$rule_matches .= 'wrong_sign(' . $points{'wrong_sign'} . ') '; |
173 | 174 |
} |
Auch abrufbar als: Unified diff
Kontoauszug verbuchen: Verkaufsgutschriften nicht negativ bewerten
Punkte für wrong_sign höher gesetzt und beide Gutschriftentypen
jetzt sauber abgegrenzt (credit_note und negative_ap_transaction)