X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIS.pm;h=f546b51078036e56789b0f11d09c5b27debdca39;hb=2b664a1f4dd6615a44d6b6aeafca35dc7c6c7984;hp=1a36e2c9acf1a6aabcb075e7a16e508000a15380;hpb=d416d4c43db74a0812d74834d078df9e0d2921a6;p=kivitendo-erp.git diff --git a/SL/IS.pm b/SL/IS.pm index 1a36e2c9a..f546b5107 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -103,7 +103,7 @@ sub invoice_details { $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"}); - if ($form->{"qty_$i"} != 0) { + if ($form->{"id_$i"} != 0) { # add number, description and qty to $form->{number}, if ($form->{"subtotal_$i"} && !$subtotal_header) { @@ -357,9 +357,10 @@ sub invoice_details { ($form->{taxincluded}) ? $form->{total} : $form->{total} + $tax; $form->{total} = $form->format_amount($myconfig, $form->{invtotal} - $form->{paid}, 2); + $form->{invtotal} = $form->format_amount($myconfig, $form->{invtotal}, 2); - $form->set_payment_options($myconfig, $form->{invdate}); $form->{paid} = $form->format_amount($myconfig, $form->{paid}, 2); + $form->set_payment_options($myconfig, $form->{invdate}); $form->{username} = $myconfig->{name}; @@ -551,7 +552,7 @@ sub post_invoice { $form->{"qty_$i"} *= -1; } - if ($form->{"qty_$i"} != 0) { + if ($form->{"id_$i"}) { # get item baseunit $query = qq|SELECT p.unit