X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Foe.pl;h=addf693c5a586d431b214b981d8d17edab806893;hb=32c9d480547428dc9555539c8f354ab73d616a6e;hp=6b8d30bb08c0ecee84f3333c397fa2b4a3582408;hpb=2e9687c8d57a1609e2936e30c3f97d9366fab61d;p=kivitendo-erp.git
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index 6b8d30bb0..addf693c5 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -298,7 +298,7 @@ sub form_header {
my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $cgi = $main::cgi;
+ my $cgi = $::request->{cgi};
check_oe_access();
@@ -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}) {
@@ -744,7 +744,7 @@ sub orders {
my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $cgi = $main::cgi;
+ my $cgi = $::request->{cgi};
check_oe_access();
@@ -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;
};
};