summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/Form.pm4
-rwxr-xr-xbin/io.pl2
2 files changed, 3 insertions, 3 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 65923296..4b30c317 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -471,8 +471,8 @@ sub parse_amount {
my ($self, $myconfig, $amount) = @_;
- if ($amount eq '') {
- return undef;
+ if ($amount eq '' or $amount == undef){
+ return 0;
}
if (UNIVERSAL::isa($amount, 'Math::BigFloat')){ # Amount may not be an object
diff --git a/bin/io.pl b/bin/io.pl
index d6abc10d..46e30120 100755
--- a/bin/io.pl
+++ b/bin/io.pl
@@ -570,7 +570,7 @@ sub new_item {
}
$i = $form->{rowcount};
- for (qw(partnumber description)) { $form->{"${_}_$i"} = $form->quote($form->{"${_}_$i"}) }
+ for (qw(partnumber description sellprice unit)) { $form->{"${_}_$i"} = $form->quote($form->{"${_}_$i"}) }
$form->header;