check_do_access();
- $form->{vc} = $form->{type} eq 'purchase_order' ? 'vendor' : 'customer';
+ $form->{vc} = $form->{type} eq 'purchase_delivery_order' ? 'vendor' : 'customer';
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
"all" => 1 },
$lxdebug->enter_sub();
check_do_access();
- $auth->assert($form->{type} eq 'purchase_order' || $form->{type} eq 'request_quotation' ? 'vendor_invoice_edit' : 'invoice_edit');
+ $auth->assert($form->{type} eq 'purchase_delivery_order' ? 'vendor_invoice_edit' : 'invoice_edit');
$form->{deliverydate} = $form->{transdate};
$form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig);
my $stock_info = [];
foreach my $i (1..$form->{rowcount}) {
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
push @{ $stock_info }, { map { $_ => $form->{"${_}_${i}"} } qw(warehouse_id bin_id chargenumber qty unit) };
}
- $main::lxdebug->dump(0, "si", $stock_info);
display_stock_in_form($stock_info);