X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/20bb56c1d57dde9492fef150edbfe0149a07ff08..e1cb00366d40cc3a1b07e065b51ad39c84baf7e6:/SL/DO.pm diff --git a/SL/DO.pm b/SL/DO.pm index e555dc273..48baa7a87 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -41,6 +41,7 @@ use SL::Common; use SL::CVar; use SL::DBUtils; use SL::RecordLinks; +use SL::IC; sub transactions { $main::lxdebug->enter_sub(); @@ -108,7 +109,8 @@ sub transactions { push @values, '%' . $form->{$item} . '%'; } - if (!($form->{open} && $form->{closed})) { + if (($form->{open} || $form->{closed}) && + ($form->{open} ne $form->{closed})) { push @where, ($form->{open} ? "NOT " : "") . "COALESCE(dord.closed, FALSE)"; } @@ -658,7 +660,7 @@ sub retrieve { 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) @@ -776,12 +778,17 @@ sub order_details { my $ic_cvar_configs = CVar->get_configs(module => 'IC'); + $form->{TEMPLATE_ARRAYS} = { }; + IC->prepare_parts_for_printing(); + my @arrays = qw(runningnumber number description longdescription qty unit partnotes serialnumber reqdate projectnumber si_runningnumber si_number si_description si_warehouse si_bin si_chargenumber si_qty si_unit); + map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays, @tax_arrays); + push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs }; my $sameitem = "";