summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-01-12 06:24:57 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-01-12 06:24:57 +0000
commit8fd8d152972d6fb853cdb9cd6cd0dcccb7cce600 (patch)
treec16f3ff0443d41c747edc883982f7fa65a9066b2
parentbe948c97547fd7924f4967a3057ccfe0988ae329 (diff)
Merging invoice fixes from branches 1.2
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2042 4979c152-3d1c-0410-bac9-87ea11338e46
-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;