In der Maske anzeigen; im Bericht anzeigen und danach filtern.
Übernahme aus Kundenprojekt.
dord.transdate, dord.reqdate,
ct.${vc}number, ct.name, dord.${vc}_id, dord.globalproject_id,
dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia,
- dord.transaction_description,
+ dord.transaction_description, dord.itime::DATE AS insertdate,
pr.projectnumber AS globalprojectnumber,
dep.description AS department,
e.name AS employee,
push @values, conv_date($form->{reqdateto});
}
+ if($form->{insertdatefrom}) {
+ push @where, qq|dord.itime::DATE >= ?|;
+ push@values, conv_date($form->{insertdatefrom});
+ }
+
+ if($form->{insertdateto}) {
+ push @where, qq|dord.itime::DATE <= ?|;
+ push @values, conv_date($form->{insertdateto});
+ }
+
if (@where) {
$query .= " WHERE " . join(" AND ", map { "($_)" } @where);
}
"shipvia" => "dord.shipvia",
"transaction_description" => "dord.transaction_description",
"department" => "lower(dep.description)",
+ "insertdate" => "dord.itime",
);
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC';
dord.shipto_id,
dord.globalproject_id, dord.delivered, dord.transaction_description,
dord.taxzone_id, dord.taxincluded, dord.terms, (SELECT cu.name FROM currencies cu WHERE cu.id=dord.currency_id) AS currency,
- dord.delivery_term_id
+ dord.delivery_term_id, dord.itime::DATE AS insertdate
FROM delivery_orders dord
JOIN ${vc} cv ON (dord.${vc}_id = cv.id)
LEFT JOIN employee e ON (dord.employee_id = e.id)
set_headings($form->{"id"} ? "edit" : "add");
+ $form->{insertdate} = SL::DB::DeliveryOrder->new(id => $form->{id})->load->itime_as_date if $form->{id};
+
$form->{update} = 1;
my $payment_id;
shipvia globalprojectnumber
transaction_description department
open delivered
+ insertdate
);
$form->{l_open} = $form->{l_closed} = "Y" if ($form->{open} && $form->{closed});
my @hidden_variables = map { "l_${_}" } @columns;
push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber cusordnumber
transaction_description transdatefrom transdateto reqdatefrom reqdateto
- type vc employee_id salesman_id project_id);
+ type vc employee_id salesman_id project_id
+ insertdatefrom insertdateto);
my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
'open' => { 'text' => $locale->text('Open'), },
'delivered' => { 'text' => $locale->text('Delivered'), },
'department' => { 'text' => $locale->text('Department'), },
+ 'insertdate' => { 'text' => $locale->text('Insert Date'), },
);
- foreach my $name (qw(id transdate reqdate donumber ordnumber name employee salesman shipvia transaction_description department)) {
+ foreach my $name (qw(id transdate reqdate donumber ordnumber name employee salesman shipvia transaction_description department insertdate)) {
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
}
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{reqdatefrom}, 1) if $form->{reqdatefrom};
push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{reqdateto}, 1) if $form->{reqdateto};
};
+ if ( $form->{insertdatefrom} or $form->{insertdateto} ) {
+ push @options, $locale->text('Insert Date');
+ push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{insertdatefrom}, 1) if $form->{insertdatefrom};
+ push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{insertdateto}, 1) if $form->{insertdateto};
+ };
if ($form->{open}) {
push @options, $locale->text('Open');
}
</td>
</tr>
+ [%- IF is_customer %]
+ <tr>
+ <th align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
+ <td>[% insertdate %]</td>
+ </tr>
+ [%- END %]
+
<tr>
<th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th>
<td>
</td>
</tr>
+ [%- IF is_customer %]
+ <tr>
+ <th align="right">[% 'Insert Date' | $T8 %] [% 'From' | $T8 %]</th>
+ <td>
+ [% L.date_tag('insertdatefrom') %]
+ </td>
+ <th align="right">[% 'Bis' | $T8 %]</th>
+ <td>
+ [% L.date_tag('insertdateto') %]
+ </td>
+ </tr>
+ [%- END %]
+
<tr>
<th align="right">[% 'Include in Report' | $T8 %]</th>
<td colspan="5">
<input name="l_reqdate" id="l_reqdate" class="checkbox" type="checkbox" value="Y" checked>
<label for="l_reqdate">[% 'Reqdate' | $T8 %]</label>
</td>
+ [% IF is_customer %]
+ <td>
+ <input name="l_insertdate" id="l_insertdate" class="checkbox" type="checkbox" value="Y">
+ <label for="l_insertdate">[% 'Insert Date' | $T8 %]</label>
+ </td>
+ [%- END %]
</tr>
<tr>