X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2Fbank%2Fbank_transactions.t;h=e79429b8ce6d3f6199922e74bf2e675393278faa;hb=d4925a8b60f04674885e30d9316dc0263f8b9a84;hp=4930726b7ac35d9fa30819ac40cc2c3457027cc5;hpb=0307fa8aa5e0b4e6d19ec60e2d55d0a7fe3efc51;p=kivitendo-erp.git diff --git a/t/bank/bank_transactions.t b/t/bank/bank_transactions.t index 4930726b7..e79429b8c 100644 --- a/t/bank/bank_transactions.t +++ b/t/bank/bank_transactions.t @@ -1,4 +1,4 @@ -use Test::More tests => 289; +use Test::More tests => 291; use strict; @@ -541,6 +541,17 @@ sub test_partial_payment { is($ar_transaction->paid , '100.00000' , "$testname: 'salesinv partial payment' was partially paid"); is($bt->invoice_amount , '100.00000' , "$testname: bt invoice amount was assigned partially paid amount"); + # addon test partial payment full point match + my $bt2 = create_bank_transaction(record => $ar_transaction, + bank_chart_id => $bank->id, + transdate => $dt, + valutadate => $dt, + amount => 19 + ) or die "Couldn't create bank_transaction"; + + my ($agreement, $rule_matches) = $bt2->get_agreement_with_invoice($ar_transaction); + is($agreement, 15, "points for exact partial payment ok"); + is($rule_matches, 'remote_account_number(3) exact_open_amount(4) depositor_matches(2) remote_name(2) payment_within_30_days(1) datebonus0(3) ', "rules_matches for exact partial payment ok"); }; sub test_full_workflow_ar_multiple_inv_skonto_reconciliate_and_undo { @@ -711,8 +722,8 @@ sub test_credit_note { transdate => $dt_10, ); my ($agreement, $rule_matches) = $bt->get_agreement_with_invoice($credit_note); - is($agreement, 13, "points for credit note ok"); - is($rule_matches, 'remote_account_number(3) exact_amount(4) wrong_sign(-1) depositor_matches(2) remote_name(2) payment_within_30_days(1) datebonus14(2) ', "rules_matches for credit note ok"); + is($agreement, 14, "points for credit note ok"); + is($rule_matches, 'remote_account_number(3) exact_amount(4) depositor_matches(2) remote_name(2) payment_within_30_days(1) datebonus14(2) ', "rules_matches for credit note ok"); $::form->{invoice_ids} = { $bt->id => [ $credit_note->id ] @@ -764,7 +775,7 @@ sub test_neg_ap_transaction { ); my ($agreement, $rule_matches) = $bt->get_agreement_with_invoice($invoice); - is($agreement, 15, "points for negative ap transaction ok"); + is($agreement, 16, "points for negative ap transaction ok"); $::form->{invoice_ids} = { $bt->id => [ $invoice->id ]