doi.reqdate, doi.project_id, doi.serialnumber, doi.lastcost,
doi.ordnumber, doi.transdate, doi.cusordnumber, doi.longdescription,
doi.price_factor_id, doi.price_factor, doi.marge_price_factor,
- pr.projectnumber,
+ pr.projectnumber, dord.transdate AS dord_transdate,
pg.partsgroup
FROM delivery_order_items doi
JOIN parts p ON (doi.parts_id = p.id)
$form->{rowcount} = 0;
foreach my $ref (@{ $form->{form_details} }) {
$form->{rowcount}++;
+ $ref->{reqdate} ||= $ref->{dord_transdate}; # copy transdates into each invoice row
map { $form->{"${_}_$form->{rowcount}"} = $ref->{$_} } keys %{ $ref };
map { $form->{"${_}_$form->{rowcount}"} = $form->format_amount(\%myconfig, $ref->{$_}) } qw(qty sellprice discount lastcost);
}