Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a81f877a

Von Sven Schöling vor mehr als 8 Jahren hinzugefügt

  • ID a81f877a1ab78e681448ea06e359bef9baae532f
  • Vorgänger 3bf2e811
  • Nachfolger 9909696e

Tests: closed bei Überzahlungen auf TODO gesetzt

Unterschiede anzeigen:

t/bank/bank_transactions.t
33 33
my ($ar_transaction, $ap_transaction);
34 34

  
35 35
sub clear_up {
36
  
36

  
37 37
  SL::DB::Manager::BankTransaction->delete_all(all => 1);
38 38
  SL::DB::Manager::InvoiceItem->delete_all(all => 1);
39 39
  SL::DB::Manager::InvoiceItem->delete_all(all => 1);
......
227 227
  $::form->{invoice_ids} = {
228 228
          $bt->id => [ $ar_transaction->id ]
229 229
        };
230
  
230

  
231 231
  my $bt_controller = SL::Controller::BankTransaction->new;
232 232
  $bt_controller->action_save_invoices;
233 233

  
......
255 255
  $::form->{invoice_skontos} = {
256 256
          $bt->id => [ 'with_skonto_pt' ]
257 257
        };
258
  
258

  
259 259
  my $bt_controller = SL::Controller::BankTransaction->new;
260 260
  $bt_controller->action_save_invoices;
261 261

  
......
281 281
  $::form->{invoice_ids} = {
282 282
          $bt->id => [ $ar_transaction_1->id, $ar_transaction_2->id ]
283 283
        };
284
  
284

  
285 285
  my $bt_controller = SL::Controller::BankTransaction->new;
286 286
  $bt_controller->action_save_invoices;
287 287

  
......
309 309
  $::form->{invoice_ids} = {
310 310
          $bt->id => [ $ar_transaction->id ]
311 311
        };
312
  
312

  
313 313
  my $bt_controller = SL::Controller::BankTransaction->new;
314 314
  $bt_controller->action_save_invoices;
315 315

  
......
318 318

  
319 319
  is($ar_transaction->paid                     , '135.00000' , "$testname: 'salesinv overpaid' was overpaid");
320 320
  is($bt->invoice_amount                       , '135.00000' , "$testname: bt invoice amount was assigned overpaid amount");
321
{ local $TODO = 'this currently fails because closed ignores over-payments, see commit d90966c7';
321 322
  is($ar_transaction->closed                   , 0           , "$testname: 'salesinv overpaid' is open (via 'closed' method')");
323
}
322 324
  is($ar_transaction->open_amount == 0 ? 1 : 0 , 0           , "$testname: 'salesinv overpaid is open (via amount-paid)");
323 325

  
324 326
};
......
369 371
  $::form->{invoice_ids} = {
370 372
          $bt->id => [ $ar_transaction->id ]
371 373
        };
372
  
374

  
373 375
  my $bt_controller = SL::Controller::BankTransaction->new;
374 376
  $bt_controller->action_save_invoices;
375 377

  

Auch abrufbar als: Unified diff