Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 566608b7

Von Philip Reetz vor fast 18 Jahren hinzugefügt

  • ID 566608b739ced48d1ca22dfa85a4ab4590e67c75
  • Vorgänger 07810068
  • Nachfolger 68efe1a8

Skontobetraege wurden faelschlicherweise vom Nettobetrag berechnet

Unterschiede anzeigen:

SL/Form.pm
1136 1136
  
1137 1137
    ($self->{terms_netto}, $self->{terms_skonto}, $self->{percent_skonto}, $self->{payment_terms}) = $sth->fetchrow_array;
1138 1138

  
1139
    if ($transdate eq "") {
1140
      if ($self->{invdate}) {
1141
        $transdate = $self->{invdate};
1142
      } else {
1143
        $transdate = $self->{transdate};
1144
      }
1145
    }
1146

  
1139 1147
    $sth->finish;
1140 1148
    my $query = qq|SELECT date '$transdate' + $self->{terms_netto} AS netto_date,date '$transdate' + $self->{terms_skonto} AS skonto_date  FROM payment_terms
1141 1149
                  LIMIT 1|;
......
1144 1152
    ($self->{netto_date}, $self->{skonto_date}) = $sth->fetchrow_array;
1145 1153
    $sth->finish;
1146 1154

  
1147
    $self->{skonto_amount} = $self->format_amount($myconfig, ($self->parse_amount($myconfig, $self->{subtotal}) * $self->{percent_skonto}), 2);
1155
    my $total = ($self->{invtotal}) ? $self->{invtotal} : $self->{ordtotal};
1156

  
1157
    $self->{skonto_amount} = $self->format_amount($myconfig, ($self->parse_amount($myconfig, $total) * $self->{percent_skonto}), 2);
1148 1158

  
1149 1159
    $self->{payment_terms} =~ s/<%netto_date%>/$self->{netto_date}/g;
1150 1160
    $self->{payment_terms} =~ s/<%skonto_date%>/$self->{skonto_date}/g;

Auch abrufbar als: Unified diff