Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ffd3148f

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID ffd3148f9aed8cd1d8bd0f3854bded3d28fe2a21
  • Vorgänger 8ca54430
  • Nachfolger 82a9544a

Bei Gutschriften muss der Ertrag negativ sein.

Unterschiede anzeigen:

bin/mozilla/io.pl
324 324
      $form->{"marge_percent_$i"} = 0;
325 325
    }
326 326

  
327
    $form->{"marge_absolut_$i"}  = ($real_sellprice - $form->{"lastcost_$i"}) * $form->{"qty_$i"};
327
    my $marge_adjust_credit_note = $form->{type} eq 'credit_note' ? -1 : 1;
328
    $form->{"marge_absolut_$i"}  = ($real_sellprice - $form->{"lastcost_$i"}) * $form->{"qty_$i"} * $marge_adjust_credit_note;
328 329
    $form->{"marge_total"}      += $form->{"marge_absolut_$i"};
329 330
    $form->{"lastcost_total"}   += $form->{"lastcost_$i"} * $form->{"qty_$i"};
330 331
    $form->{"sellprice_total"}  += $real_sellprice * $form->{"qty_$i"};

Auch abrufbar als: Unified diff