summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/ir.pl7
-rw-r--r--bin/is.pl6
-rw-r--r--bin/oe.pl6
3 files changed, 9 insertions, 10 deletions
diff --git a/bin/ir.pl b/bin/ir.pl
index d2c7ea7f..b84a9260 100644
--- a/bin/ir.pl
+++ b/bin/ir.pl
@@ -819,7 +819,6 @@ sub update {
if ( $form->{import_text} ) {
&import_text;
}
-
$form->{exchangerate} =
$form->parse_amount( \%myconfig, $form->{exchangerate} );
@@ -953,9 +952,9 @@ sub update {
for ( keys %{ $form->{item_list}[0] } ) {
$form->{"${_}_$i"} = $form->{item_list}[0]{$_};
}
-
- $form->{"discount_$i"} = $form->{discount} * 100;
-
+ if (! defined $form->{"discount_$i"}){
+ $form->{"discount_$i"} = $form->{discount} * 100;
+ }
if ($sellprice) {
$form->{"sellprice_$i"} = $sellprice;
diff --git a/bin/is.pl b/bin/is.pl
index edb2f0f0..0603db5e 100644
--- a/bin/is.pl
+++ b/bin/is.pl
@@ -974,9 +974,9 @@ sub update {
for ( keys %{ $form->{item_list}[0] } ) {
$form->{"${_}_$i"} = $form->{item_list}[0]{$_};
}
-
- $form->{"discount_$i"} = $form->{discount} * 100;
-
+ if (! defined $form->{"discount_$i"}){
+ $form->{"discount_$i"} = $form->{discount} * 100;
+ }
if ($sellprice) {
$form->{"sellprice_$i"} = $sellprice;
diff --git a/bin/oe.pl b/bin/oe.pl
index a96d931d..c38a9f35 100644
--- a/bin/oe.pl
+++ b/bin/oe.pl
@@ -1048,9 +1048,9 @@ sub update {
for ( keys %{ $form->{item_list}[0] } ) {
$form->{"${_}_$i"} = $form->{item_list}[0]{$_};
}
-
- $form->{"discount_$i"} = $form->{discount} * 100;
-
+ if (! defined $form->{"discount_$i"}){
+ $form->{"discount_$i"} = $form->{discount} * 100;
+ }
if ($sellprice) {
$form->{"sellprice_$i"} = $sellprice;