Tests: closed bei Überzahlungen auf TODO gesetzt
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 4 Aug 2016 11:24:55 +0000 (13:24 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 4 Aug 2016 11:24:55 +0000 (13:24 +0200)
t/bank/bank_transactions.t

index 001a81c..275539e 100644 (file)
@@ -33,7 +33,7 @@ my ($ar_chart,$bank,$ar_amount_chart, $ap_chart, $ap_amount_chart);
 my ($ar_transaction, $ap_transaction);
 
 sub clear_up {
-  
+
   SL::DB::Manager::BankTransaction->delete_all(all => 1);
   SL::DB::Manager::InvoiceItem->delete_all(all => 1);
   SL::DB::Manager::InvoiceItem->delete_all(all => 1);
@@ -227,7 +227,7 @@ sub test1 {
   $::form->{invoice_ids} = {
           $bt->id => [ $ar_transaction->id ]
         };
-  
+
   my $bt_controller = SL::Controller::BankTransaction->new;
   $bt_controller->action_save_invoices;
 
@@ -255,7 +255,7 @@ sub test_skonto_exact {
   $::form->{invoice_skontos} = {
           $bt->id => [ 'with_skonto_pt' ]
         };
-  
+
   my $bt_controller = SL::Controller::BankTransaction->new;
   $bt_controller->action_save_invoices;
 
@@ -281,7 +281,7 @@ sub test_two_invoices {
   $::form->{invoice_ids} = {
           $bt->id => [ $ar_transaction_1->id, $ar_transaction_2->id ]
         };
-  
+
   my $bt_controller = SL::Controller::BankTransaction->new;
   $bt_controller->action_save_invoices;
 
@@ -309,7 +309,7 @@ sub test_overpayment {
   $::form->{invoice_ids} = {
           $bt->id => [ $ar_transaction->id ]
         };
-  
+
   my $bt_controller = SL::Controller::BankTransaction->new;
   $bt_controller->action_save_invoices;
 
@@ -318,7 +318,9 @@ sub test_overpayment {
 
   is($ar_transaction->paid                     , '135.00000' , "$testname: 'salesinv overpaid' was overpaid");
   is($bt->invoice_amount                       , '135.00000' , "$testname: bt invoice amount was assigned overpaid amount");
+{ local $TODO = 'this currently fails because closed ignores over-payments, see commit d90966c7';
   is($ar_transaction->closed                   , 0           , "$testname: 'salesinv overpaid' is open (via 'closed' method')");
+}
   is($ar_transaction->open_amount == 0 ? 1 : 0 , 0           , "$testname: 'salesinv overpaid is open (via amount-paid)");
 
 };
@@ -369,7 +371,7 @@ sub test_partial_payment {
   $::form->{invoice_ids} = {
           $bt->id => [ $ar_transaction->id ]
         };
-  
+
   my $bt_controller = SL::Controller::BankTransaction->new;
   $bt_controller->action_save_invoices;