Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e10fb8ac

Von Jan Büren vor etwa 1 Monat hinzugefügt

  • ID e10fb8ac38aa7fc58e041b2d8a4f2a7607399d5f
  • Vorgänger 6e4892b3
  • Nachfolger 9f93f10d

PH->within_skonto_period refactored. Liefert jetzt undef oder 1 zurück

Unterschiede anzeigen:

t/db_helper/payment.t
1698 1698
  is($invoice2->within_skonto_period(transdate => DateTime->now()->add(days => 1)), 1, "one day after invdate is skontoable");
1699 1699
  is($invoice2->within_skonto_period(transdate => DateTime->now()->add(days => 4)), 1, "four days after invdate is skontoable");
1700 1700

  
1701
  throws_ok{
1702
    $invoice2->within_skonto_period(transdate => DateTime->now()->add(days => 6));
1703
  } qr /The 'transdate' parameter .* to SL::DB::Helper::Payment::within_skonto_period did not pass the 'is within skonto period' callback/, "One day after skonto date throws correct error message";
1701
  is($invoice2->within_skonto_period(transdate => DateTime->now()->add(days => 6)), ''); # not within skonto period
1704 1702

  
1705 1703
}
1706 1704

  

Auch abrufbar als: Unified diff