]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Helper/Payment.pm
Task-Server: Mandantenfähigkeit
[mfinanz.git] / SL / DB / Helper / Payment.pm
index baa23668ef71d8e66b202d042b1ff3bf5c4594f5..ad776ca9c80d1f96efc42ae0435c678d380560fb 100644 (file)
@@ -551,13 +551,14 @@ sub get_payment_select_options_for_bank_transaction {
 
   my @options;
   if ( $open_amount &&                   # invoice amount not 0
 
   my @options;
   if ( $open_amount &&                   # invoice amount not 0
+       $self->skonto_date &&             # check whether skonto applies
        abs(abs($self->amount_less_skonto) - abs($bt->amount)) < 0.01 &&
        $self->check_skonto_configuration) {
          if ( $self->within_skonto_period($bt->transdate) ) {
            push(@options, { payment_type => 'without_skonto', display => t8('without skonto') });
            push(@options, { payment_type => 'with_skonto_pt', display => t8('with skonto acc. to pt'), selected => 1 });
          } else {
        abs(abs($self->amount_less_skonto) - abs($bt->amount)) < 0.01 &&
        $self->check_skonto_configuration) {
          if ( $self->within_skonto_period($bt->transdate) ) {
            push(@options, { payment_type => 'without_skonto', display => t8('without skonto') });
            push(@options, { payment_type => 'with_skonto_pt', display => t8('with skonto acc. to pt'), selected => 1 });
          } else {
-           push(@options, { payment_type => 'without_skonto', display => t8('without skonto') }, selected => 1 );
+           push(@options, { payment_type => 'without_skonto', display => t8('without skonto') , selected => 1 });
            push(@options, { payment_type => 'with_skonto_pt', display => t8('with skonto acc. to pt')});
          };
   };
            push(@options, { payment_type => 'with_skonto_pt', display => t8('with skonto acc. to pt')});
          };
   };