return '';
}
+ AM->retrieve_all_units();
+
my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in';
my $sinfo = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_${i}"});
my $content = $form->format_amount_units('amount' => $sum * 1,
'part_unit' => $form->{"partunit_$i"},
- 'amount_unit' => $units->{$form->{"partunit_$i"}}->{base_unit},
+ 'amount_unit' => $all_units->{$form->{"partunit_$i"}}->{base_unit},
'conv_units' => 'convertible_not_smaller',
'max_places' => 2);
$content .= qq| <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|;
$stock_in_out_title = $locale->text('Transfer To Stock');
$stock_in_out = 'in';
}
+
+ retrieve_partunits();
}
# column_index
push @hidden_vars, "stock_${stock_in_out}_sum_qty", "stock_${stock_in_out}";
}
- push @hidden_vars, qw(partunit) if ($is_purchase);
-
my @HIDDENS = map { value => $_}, (
$cgi->hidden("-name" => "unit_old_$i", "-value" => $form->{"selected_unit_$i"}),
$cgi->hidden("-name" => "price_new_$i", "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"})),