summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ir.pl7
-rwxr-xr-xbin/is.pl6
-rwxr-xr-xbin/oe.pl6
3 files changed, 9 insertions, 10 deletions
diff --git a/bin/ir.pl b/bin/ir.pl
index 9d38f5f9..ba3c3524 100755
--- a/bin/ir.pl
+++ b/bin/ir.pl
@@ -798,7 +798,6 @@ sub update {
if ( $form->{import_text} ) {
&import_text;
}
-
$form->{exchangerate} =
$form->parse_amount( \%myconfig, $form->{exchangerate} );
@@ -932,9 +931,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 3338018a..f615a234 100755
--- a/bin/is.pl
+++ b/bin/is.pl
@@ -951,9 +951,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 0d98b5e4..d14167a4 100755
--- 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;