Revision e8966d20
Von Bernd Bleßmann vor mehr als 9 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
69 | 69 |
dord.transdate, dord.reqdate, |
70 | 70 |
ct.${vc}number, ct.name, dord.${vc}_id, dord.globalproject_id, |
71 | 71 |
dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia, |
72 |
dord.transaction_description, |
|
72 |
dord.transaction_description, dord.itime::DATE AS insertdate,
|
|
73 | 73 |
pr.projectnumber AS globalprojectnumber, |
74 | 74 |
dep.description AS department, |
75 | 75 |
e.name AS employee, |
... | ... | |
163 | 163 |
push @values, conv_date($form->{reqdateto}); |
164 | 164 |
} |
165 | 165 |
|
166 |
if($form->{insertdatefrom}) { |
|
167 |
push @where, qq|dord.itime::DATE >= ?|; |
|
168 |
push@values, conv_date($form->{insertdatefrom}); |
|
169 |
} |
|
170 |
|
|
171 |
if($form->{insertdateto}) { |
|
172 |
push @where, qq|dord.itime::DATE <= ?|; |
|
173 |
push @values, conv_date($form->{insertdateto}); |
|
174 |
} |
|
175 |
|
|
166 | 176 |
if (@where) { |
167 | 177 |
$query .= " WHERE " . join(" AND ", map { "($_)" } @where); |
168 | 178 |
} |
... | ... | |
179 | 189 |
"shipvia" => "dord.shipvia", |
180 | 190 |
"transaction_description" => "dord.transaction_description", |
181 | 191 |
"department" => "lower(dep.description)", |
192 |
"insertdate" => "dord.itime", |
|
182 | 193 |
); |
183 | 194 |
|
184 | 195 |
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; |
... | ... | |
673 | 684 |
dord.shipto_id, |
674 | 685 |
dord.globalproject_id, dord.delivered, dord.transaction_description, |
675 | 686 |
dord.taxzone_id, dord.taxincluded, dord.terms, (SELECT cu.name FROM currencies cu WHERE cu.id=dord.currency_id) AS currency, |
676 |
dord.delivery_term_id |
|
687 |
dord.delivery_term_id, dord.itime::DATE AS insertdate
|
|
677 | 688 |
FROM delivery_orders dord |
678 | 689 |
JOIN ${vc} cv ON (dord.${vc}_id = cv.id) |
679 | 690 |
LEFT JOIN employee e ON (dord.employee_id = e.id) |
bin/mozilla/do.pl | ||
---|---|---|
369 | 369 |
|
370 | 370 |
set_headings($form->{"id"} ? "edit" : "add"); |
371 | 371 |
|
372 |
$form->{insertdate} = SL::DB::DeliveryOrder->new(id => $form->{id})->load->itime_as_date if $form->{id}; |
|
373 |
|
|
372 | 374 |
$form->{update} = 1; |
373 | 375 |
|
374 | 376 |
my $payment_id; |
... | ... | |
532 | 534 |
shipvia globalprojectnumber |
533 | 535 |
transaction_description department |
534 | 536 |
open delivered |
537 |
insertdate |
|
535 | 538 |
); |
536 | 539 |
|
537 | 540 |
$form->{l_open} = $form->{l_closed} = "Y" if ($form->{open} && $form->{closed}); |
... | ... | |
546 | 549 |
my @hidden_variables = map { "l_${_}" } @columns; |
547 | 550 |
push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber cusordnumber |
548 | 551 |
transaction_description transdatefrom transdateto reqdatefrom reqdateto |
549 |
type vc employee_id salesman_id project_id); |
|
552 |
type vc employee_id salesman_id project_id |
|
553 |
insertdatefrom insertdateto); |
|
550 | 554 |
|
551 | 555 |
my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables); |
552 | 556 |
|
... | ... | |
568 | 572 |
'open' => { 'text' => $locale->text('Open'), }, |
569 | 573 |
'delivered' => { 'text' => $locale->text('Delivered'), }, |
570 | 574 |
'department' => { 'text' => $locale->text('Department'), }, |
575 |
'insertdate' => { 'text' => $locale->text('Insert Date'), }, |
|
571 | 576 |
); |
572 | 577 |
|
573 |
foreach my $name (qw(id transdate reqdate donumber ordnumber name employee salesman shipvia transaction_description department)) { |
|
578 |
foreach my $name (qw(id transdate reqdate donumber ordnumber name employee salesman shipvia transaction_description department insertdate)) {
|
|
574 | 579 |
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; |
575 | 580 |
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; |
576 | 581 |
} |
... | ... | |
621 | 626 |
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{reqdatefrom}, 1) if $form->{reqdatefrom}; |
622 | 627 |
push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{reqdateto}, 1) if $form->{reqdateto}; |
623 | 628 |
}; |
629 |
if ( $form->{insertdatefrom} or $form->{insertdateto} ) { |
|
630 |
push @options, $locale->text('Insert Date'); |
|
631 |
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{insertdatefrom}, 1) if $form->{insertdatefrom}; |
|
632 |
push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{insertdateto}, 1) if $form->{insertdateto}; |
|
633 |
}; |
|
624 | 634 |
if ($form->{open}) { |
625 | 635 |
push @options, $locale->text('Open'); |
626 | 636 |
} |
templates/webpages/do/form_header.html | ||
---|---|---|
314 | 314 |
</td> |
315 | 315 |
</tr> |
316 | 316 |
|
317 |
[%- IF is_customer %] |
|
318 |
<tr> |
|
319 |
<th align="right" nowrap>[% 'Insert Date' | $T8 %]</th> |
|
320 |
<td>[% insertdate %]</td> |
|
321 |
</tr> |
|
322 |
[%- END %] |
|
323 |
|
|
317 | 324 |
<tr> |
318 | 325 |
<th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th> |
319 | 326 |
<td> |
templates/webpages/do/search.html | ||
---|---|---|
130 | 130 |
</td> |
131 | 131 |
</tr> |
132 | 132 |
|
133 |
[%- IF is_customer %] |
|
134 |
<tr> |
|
135 |
<th align="right">[% 'Insert Date' | $T8 %] [% 'From' | $T8 %]</th> |
|
136 |
<td> |
|
137 |
[% L.date_tag('insertdatefrom') %] |
|
138 |
</td> |
|
139 |
<th align="right">[% 'Bis' | $T8 %]</th> |
|
140 |
<td> |
|
141 |
[% L.date_tag('insertdateto') %] |
|
142 |
</td> |
|
143 |
</tr> |
|
144 |
[%- END %] |
|
145 |
|
|
133 | 146 |
<tr> |
134 | 147 |
<th align="right">[% 'Include in Report' | $T8 %]</th> |
135 | 148 |
<td colspan="5"> |
... | ... | |
188 | 201 |
<input name="l_reqdate" id="l_reqdate" class="checkbox" type="checkbox" value="Y" checked> |
189 | 202 |
<label for="l_reqdate">[% 'Reqdate' | $T8 %]</label> |
190 | 203 |
</td> |
204 |
[% IF is_customer %] |
|
205 |
<td> |
|
206 |
<input name="l_insertdate" id="l_insertdate" class="checkbox" type="checkbox" value="Y"> |
|
207 |
<label for="l_insertdate">[% 'Insert Date' | $T8 %]</label> |
|
208 |
</td> |
|
209 |
[%- END %] |
|
191 | 210 |
</tr> |
192 | 211 |
|
193 | 212 |
<tr> |
Auch abrufbar als: Unified diff
Erfassungsdatum bei Verkaufs-Lieferscheinen.
In der Maske anzeigen; im Bericht anzeigen und danach filtern.
Übernahme aus Kundenprojekt.