diff options
-rwxr-xr-x | LedgerSMB/Form.pm | 4 | ||||
-rwxr-xr-x | bin/io.pl | 2 |
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 @@ -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;
|