From f058158efb8dae52129bd78526a62af6ed69c2a1 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sat, 12 Jan 2008 06:23:30 +0000 Subject: Fixing 1812792, (discount box blank after part lookup in ir.pl) and similar bugs in is.pl and oe.pl git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@2041 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/ir.pl | 7 +++---- bin/is.pl | 6 +++--- bin/oe.pl | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'bin') 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; -- cgit v1.2.3