Revision 85b0c4ab
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
488 | 488 |
my @values; |
489 | 489 |
|
490 | 490 |
my $query = |
491 |
qq|SELECT DISTINCT a.id, a.invnumber, a.ordnumber, a.transdate, | . |
|
491 |
qq|SELECT DISTINCT a.id, a.invnumber, a.ordnumber, a.cusordnumber, a.transdate, | .
|
|
492 | 492 |
qq| a.duedate, a.netamount, a.amount, a.paid, | . |
493 | 493 |
qq| a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, | . |
494 | 494 |
qq| a.shippingpoint, a.storno, a.storno_id, a.globalproject_id, | . |
... | ... | |
550 | 550 |
$where .= " AND d.description ILIKE ?"; |
551 | 551 |
push(@values, $department); |
552 | 552 |
} |
553 |
foreach my $column (qw(invnumber ordnumber notes transaction_description)) { |
|
553 |
foreach my $column (qw(invnumber ordnumber cusordnumber notes transaction_description)) {
|
|
554 | 554 |
if ($form->{$column}) { |
555 | 555 |
$where .= " AND a.$column ILIKE ?"; |
556 | 556 |
push(@values, $form->like($form->{$column})); |
... | ... | |
603 | 603 |
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; |
604 | 604 |
my $sortorder = join(', ', map { "$_ $sortdir" } @a); |
605 | 605 |
|
606 |
if (grep({ $_ eq $form->{sort} } qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description))) { |
|
606 |
if (grep({ $_ eq $form->{sort} } qw(id transdate duedate invnumber ordnumber cusordnumber name datepaid employee shippingpoint shipvia transaction_description))) {
|
|
607 | 607 |
$sortorder = $form->{sort} . " $sortdir"; |
608 | 608 |
} |
609 | 609 |
|
bin/mozilla/ar.pl | ||
---|---|---|
902 | 902 |
my $report = SL::ReportGenerator->new(\%myconfig, $form); |
903 | 903 |
|
904 | 904 |
@columns = |
905 |
qw(transdate id type invnumber ordnumber name netamount tax amount paid |
|
905 |
qw(transdate id type invnumber ordnumber cusordnumber name netamount tax amount paid
|
|
906 | 906 |
datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia |
907 | 907 |
marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms charts customertype); |
908 | 908 |
|
909 | 909 |
my @hidden_variables = map { "l_${_}" } @columns; |
910 |
push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber transaction_description notes project_id transdatefrom transdateto employee_id salesman_id business_id); |
|
910 |
push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto employee_id salesman_id business_id);
|
|
911 | 911 |
|
912 | 912 |
$href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables); |
913 | 913 |
|
... | ... | |
917 | 917 |
'type' => { 'text' => $locale->text('Type'), }, |
918 | 918 |
'invnumber' => { 'text' => $locale->text('Invoice'), }, |
919 | 919 |
'ordnumber' => { 'text' => $locale->text('Order'), }, |
920 |
'cusordnumber' => { 'text' => $locale->text('Customer Order Number'), }, |
|
920 | 921 |
'name' => { 'text' => $locale->text('Customer'), }, |
921 | 922 |
'netamount' => { 'text' => $locale->text('Amount'), }, |
922 | 923 |
'tax' => { 'text' => $locale->text('Tax'), }, |
... | ... | |
943 | 944 |
'customertype' => { 'text' => $locale->text('Customer type'), }, |
944 | 945 |
); |
945 | 946 |
|
946 |
foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description)) { |
|
947 |
foreach my $name (qw(id transdate duedate invnumber ordnumber cusordnumber name datepaid employee shippingpoint shipvia transaction_description)) {
|
|
947 | 948 |
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; |
948 | 949 |
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; |
949 | 950 |
} |
... | ... | |
977 | 978 |
if ($form->{ordnumber}) { |
978 | 979 |
push @options, $locale->text('Order Number') . " : $form->{ordnumber}"; |
979 | 980 |
} |
981 |
if ($form->{cusordnumber}) { |
|
982 |
push @options, $locale->text('Customer Order Number') . " : $form->{cusordnumber}"; |
|
983 |
} |
|
980 | 984 |
if ($form->{notes}) { |
981 | 985 |
push @options, $locale->text('Notes') . " : $form->{notes}"; |
982 | 986 |
} |
templates/webpages/ar/search.html | ||
---|---|---|
50 | 50 |
<th align=right nowrap>[% 'Order Number' | $T8 %]</th> |
51 | 51 |
<td colspan=3><input name=ordnumber size=20></td> |
52 | 52 |
</tr> |
53 |
<tr> |
|
54 |
<th align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th> |
|
55 |
<td colspan=3><input name="cusordnumber" size="20"></td> |
|
56 |
</tr> |
|
53 | 57 |
<tr> |
54 | 58 |
<th align="right">[% 'Employee' | $T8 %]</th> |
55 | 59 |
<td>[% L.select_tag('employee_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, style = 'width:250px') %]</td> |
... | ... | |
132 | 136 |
<td nowrap>[% 'Invoice Number' | $T8 %]</td> |
133 | 137 |
<td align=right><input name="l_ordnumber" class=checkbox type=checkbox value=Y></td> |
134 | 138 |
<td nowrap>[% 'Order Number' | $T8 %]</td> |
135 |
<td align=right><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
|
|
136 |
<td nowrap>[% 'Invoice Date' | $T8 %]</td>
|
|
139 |
<td align=right><input name="l_cusordnumber" class=checkbox type=checkbox value=Y checked></td>
|
|
140 |
<td nowrap>[% 'Customer Order Number' | $T8 %]</td>
|
|
137 | 141 |
</tr> |
138 | 142 |
<tr> |
143 |
<td align=right><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td> |
|
144 |
<td nowrap>[% 'Invoice Date' | $T8 %]</td> |
|
139 | 145 |
<td align=right><input name="l_name" class=checkbox type=checkbox value=Y checked></td> |
140 | 146 |
<td nowrap>[% 'Customer' | $T8 %]</td> |
141 | 147 |
<td align=right><input name="l_customernumber" class=checkbox type=checkbox value=Y></td> |
Auch abrufbar als: Unified diff
Berichte Verkaufsrechnungen: Bestellnummer des Kunden anzeigen/danach filtern