Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0307fa8a

Von Sven Schöling vor etwa 4 Jahren hinzugefügt

  • ID 0307fa8aa5e0b4e6d19ec60e2d55d0a7fe3efc51
  • Vorgänger e21e2190
  • Nachfolger 31d15c5a

Test: Skonto in Kreditorenbuchungen

Unterschiede anzeigen:

t/bank/bank_transactions.t
1227 1227

  
1228 1228
}
1229 1229

  
1230
sub test_skonto_exact_ap_transaction {
1231

  
1232
  my $testname = 'test_skonto_exact_ap_transaction';
1233

  
1234
  $ap_transaction = test_ap_transaction(invnumber => 'ap transaction skonto',
1235
                                        payment_id => $payment_terms->id,
1236
                                       );
1237

  
1238
  my $bt = create_bank_transaction(record        => $ap_transaction,
1239
                                   bank_chart_id => $bank->id,
1240
                                   transdate     => $dt,
1241
                                   valutadate    => $dt,
1242
                                   amount        => $ap_transaction->amount_less_skonto
1243
                                  ) or die "Couldn't create bank_transaction";
1244

  
1245
  $::form->{invoice_ids} = {
1246
    $bt->id => [ $ap_transaction->id ]
1247
  };
1248
  $::form->{invoice_skontos} = {
1249
    $bt->id => [ 'with_skonto_pt' ]
1250
  };
1251

  
1252
  save_btcontroller_to_string();
1253

  
1254
  $ap_transaction->load;
1255
  $bt->load;
1256
  is($ap_transaction->paid   , '119.00000' , "$testname: ap transaction skonto was paid");
1257
  is($ap_transaction->closed , 1           , "$testname: ap transaction skonto is closed");
1258
  is($bt->invoice_amount     , '113.05000' , "$testname: bt invoice amount was assigned");
1259

  
1260
};
1261

  
1230 1262
1;

Auch abrufbar als: Unified diff