Revision 5d02d521
Von root vor mehr als 8 Jahren hinzugefügt
SL/DB/BankTransaction.pm | ||
---|---|---|
64 | 64 |
exact_amount => 4, |
65 | 65 |
exact_open_amount => 4, |
66 | 66 |
invnumber_in_purpose => 2, |
67 |
own_invnumber_in_purpose => 5, |
|
67 | 68 |
# overpayment => -1, # either other invoice is more likely, or several invoices paid at once |
68 | 69 |
payment_before_invoice => -2, |
69 | 70 |
payment_within_30_days => 1, |
... | ... | |
114 | 115 |
#search invoice number in purpose |
115 | 116 |
my $invnumber = $invoice->invnumber; |
116 | 117 |
# invnumbernhas to have at least 3 characters |
117 |
if ( length($invnumber) > 2 && $self->purpose =~ /\b$invnumber\b/i ) { |
|
118 |
my $squashed_purpose = $self->purpose; |
|
119 |
$squashed_purpose =~ s/ //g; |
|
120 |
if (length($invnumber) > 4 && $squashed_purpose =~ /$invnumber/ && $invoice->is_sales){ |
|
121 |
$agreement += $points{own_invnumber_in_purpose}; |
|
122 |
$rule_matches .= 'own_invnumber_in_purpose(' . $points{'own_invnumber_in_purpose'} . ') '; |
|
123 |
} elsif (length($invnumber) > 3 && $squashed_purpose =~ /$invnumber/ ) { |
|
118 | 124 |
$agreement += $points{invnumber_in_purpose}; |
119 | 125 |
$rule_matches .= 'invnumber_in_purpose(' . $points{'invnumber_in_purpose'} . ') '; |
120 |
};
|
|
126 |
} |
|
121 | 127 |
|
122 | 128 |
#check sign |
123 | 129 |
if ( $invoice->is_sales && $self->amount < 0 ) { |
Auch abrufbar als: Unified diff
Nur die eigene Rechnungsnummer mit höheren Punkten versehen ...
... bei Lieferantenrechnungen weniger Punkte vergeben, aber mit
derselben Unschärfe wie bei Verkaufsrechnungen arbeiten.
Conflicts:
SL/DB/BankTransaction.pm