Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 04e282bb

Von Jan Büren vor fast 2 Jahren hinzugefügt

  • ID 04e282bbc55baa91048fddcd607303af6054b546
  • Vorgänger e8a7f983

Unscharfes Skonto in Vorschlagsliste bis 20 Cent erlauben

Unterschiede anzeigen:

SL/Controller/BankTransaction.pm
} else {
$payment_type = 'without_skonto';
}
if ($payment_type eq 'free_skonto') {
# hack payment type use free_skonto for with_fuzzy_skonto
if ($payment_type eq 'with_fuzzy_skonto_pt') {
$free_skonto_amount = abs($invoice->open_amount - abs($bank_transaction->not_assigned_amount));
die "Invalid state for fuzzy skonto amount" unless $free_skonto_amount > 0;
$payment_type = 'free_skonto'; # we have a valid free_skonto amount, therefore go ...
} elsif ($payment_type eq 'free_skonto') {
# parse user input > 0
if ($::form->parse_amount(\%::myconfig, $::form->{"free_skonto_amount"}->{"$bt_id"}{$invoice->id}) > 0) {
$free_skonto_amount = $::form->parse_amount(\%::myconfig, $::form->{"free_skonto_amount"}->{"$bt_id"}{$invoice->id});
SL/DB/BankTransaction.pm
payment_within_30_days => 1,
remote_account_number => 3,
skonto_exact_amount => 5,
skonto_fuzzy_amount => 3,
wrong_sign => -4,
sepa_export_item => 5,
batch_sepa_transaction => 20,
......
$agreement += $points{skonto_exact_amount};
$rule_matches .= 'skonto_exact_amount(' . $points{'skonto_exact_amount'} . ') ';
$invoice->{skonto_type} = 'with_skonto_pt';
} elsif ( $invoice->skonto_date && abs(abs($invoice->amount_less_skonto) - abs($self->amount)) < 0.2) {
$agreement += $points{skonto_fuzzy_amount};
$rule_matches .= 'skonto_fuzzy_amount(' . $points{'skonto_fuzzy_amount'} . ') ';
$invoice->{skonto_type} = 'with_fuzzy_skonto_pt';
}
#search invoice number in purpose

Auch abrufbar als: Unified diff