my $rows = scalar @{ $form->{item_list} };
if ($rows) {
- $form->{"qty_$i"} = 1 unless $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+ if( !$form->{"qty_$i"} ) {
+ $form->{"qty_$i"} = 1;
+ }
if ($rows > 1) {
}
if ($rows) {
- $form->{"qty_$i"} = ($form->{"qty_$i"} * 1) ? $form->{"qty_$i"} : 1;
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+ if( !$form->{"qty_$i"} ) {
+ $form->{"qty_$i"} = 1;
+ }
if ($rows > 1) {
$form->{"lastcost_$i"} = $form->parse_amount(\%myconfig, $form->{"lastcost_$i"});
if ($rows) {
- $form->{"qty_$i"} = 1 unless ($form->parse_amount(\%myconfig, $form->{"qty_$i"}));
+
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+ if( !$form->{"qty_$i"} ) {
+ $form->{"qty_$i"} = 1;
+ }
if ($rows > 1) {