sub action_add_multi_items {
my ($self) = @_;
- my @form_attr = grep { $_->{qty} } @{ $::form->{add_multi_items} };
- return unless scalar @form_attr;
+ my @form_attr = grep { $_->{qty_as_number} } @{ $::form->{add_multi_items} };
+ return $self->js->render() unless scalar @form_attr;
my @items;
foreach my $attr (@form_attr) {
<td></td>
<td>
[% L.hidden_tag("add_multi_items[+].parts_id", item.id) %]
- [% L.input_tag("add_multi_items[].qty", '', size = 5, style='text-align:right',
+ [% L.input_tag("add_multi_items[].qty_as_number", '', size = 5, style='text-align:right',
class = 'multi_items_qty', onclick = 'set_qty_to_one(this)') %]
</td>
<td>[% HTML.escape(item.unit) %]</td>
<script type='text/javascript'>
function set_qty_to_one(clicked) {
if ($(clicked).val() == '') {
- $(clicked).val('1,00');
+ $(clicked).val('[%- LxERP.format_amount(1.00, -2) %]');
$(clicked).select();
}
}