X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Foe.pl;h=addf693c5a586d431b214b981d8d17edab806893;hb=1167841707ec8fe4ac5964830cd292f129e9f98d;hp=90efb0e64c74e190ea03817035340326d6bbaa5d;hpb=5494f687372570c9d1c5eb5c6aad73767e50820a;p=kivitendo-erp.git
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index 90efb0e64..addf693c5 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -461,8 +461,8 @@ sub form_footer {
my $introws = max 2, $form->numtextrows($form->{intnotes}, 35, 8);
$rows = max $rows, $introws;
- $TMPL_VAR{notes} = qq||;
- $TMPL_VAR{intnotes} = qq||;
+ $TMPL_VAR{notes} = qq||;
+ $TMPL_VAR{intnotes} = qq||;
if (!$form->{taxincluded}) {
@@ -1301,7 +1301,10 @@ sub invoice {
$form->{quodate} = $form->{transdate};
}
- my $payment_id = $form->{payment_id} if $form->{payment_id};
+ my $payment_id;
+ if ($form->{payment_id}) {
+ $payment_id = $form->{payment_id};
+ }
# if the name changed get new values
if (&check_name($form->{vc})) {
@@ -1763,9 +1766,11 @@ sub poso {
map { delete $form->{$_} } qw(id subject message cc bcc printed emailed queued customer vendor creditlimit creditremaining discount tradediscount oldinvtotal delivered ordnumber);
# if purchase_order was generated from sales_order, use lastcost_$i as sellprice_$i
+ # also reset discounts
if ( $form->{sales_order_to_purchase_order} ) {
for my $i (1 .. $form->{rowcount}) {
$form->{"sellprice_${i}"} = $form->format_amount(\%myconfig,$form->{"lastcost_${i}"});
+ $form->{"discount_${i}"} = 0;
};
};