Revision ab1df08b
Von Sven Schöling vor fast 17 Jahren hinzugefügt
bin/mozilla/ct.pl | ||
---|---|---|
542 | 542 |
|
543 | 543 |
CT->get_delivery(\%myconfig, \%$form ); |
544 | 544 |
|
545 |
@column_index = |
|
546 |
$form->sort_columns(shiptoname, |
|
547 |
invnumber, |
|
548 |
ordnumber, |
|
549 |
transdate, |
|
550 |
description, |
|
551 |
qty, |
|
552 |
unit, |
|
553 |
sellprice); |
|
554 |
|
|
555 |
|
|
556 |
|
|
557 |
$column_header{shiptoname} = |
|
558 |
qq|<th class=listheading>| . $locale->text('Shipping Address') . qq|</th>|; |
|
559 |
$column_header{invnumber} = |
|
560 |
qq|<th class=listheading>|. $locale->text('Invoice'). qq|</th>|; |
|
561 |
$column_header{ordnumber} = |
|
562 |
qq|<th class=listheading>|. $locale->text('Order'). qq|</th>|; |
|
563 |
$column_header{transdate} = |
|
564 |
qq|<th class=listheading>| . $locale->text('Invdate') . qq|</th>|; |
|
565 |
$column_header{description} = |
|
566 |
qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|; |
|
567 |
$column_header{qty} = |
|
568 |
qq|<th class=listheading>| . $locale->text('Qty') . qq|</th>|; |
|
569 |
$column_header{unit} = |
|
570 |
qq|<th class=listheading>| . $locale->text('Unit') . qq|</th>|; |
|
571 |
$column_header{sellprice} = |
|
572 |
qq|<th class=listheading>| . $locale->text('Sell Price') . qq|</th>|; |
|
573 |
$result .= qq| |
|
574 |
|
|
575 |
<table width=100%> |
|
576 |
<tr> |
|
577 |
<td> |
|
578 |
<table width=100%> |
|
579 |
<tr class=listheading> |
|
580 |
|; |
|
581 |
|
|
582 |
map { $result .= "$column_header{$_}\n" } @column_index; |
|
583 |
|
|
584 |
$result .= qq| |
|
585 |
</tr> |
|
586 |
|; |
|
587 |
|
|
588 |
|
|
589 |
foreach $ref (@{ $form->{DELIVERY} }) { |
|
590 |
|
|
591 |
if ($ref->{shiptoname} eq $sameshiptoname) { |
|
592 |
map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index; |
|
593 |
$column_data{shiptoname} = "<td> </td>"; |
|
594 |
} else { |
|
595 |
map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index; |
|
596 |
} |
|
597 |
$column_data{sellprice} = "<td>". $form->format_amount(\%myconfig,$ref->{sellprice},2)." </td>"; |
|
598 |
$i++; |
|
599 |
$i %= 2; |
|
600 |
$result .= " |
|
601 |
<tr class=listrow$i> |
|
602 |
"; |
|
603 |
|
|
604 |
map { $result .= "$column_data{$_}\n" } @column_index; |
|
605 |
|
|
606 |
$result .= qq| |
|
607 |
</tr> |
|
608 |
|; |
|
609 |
|
|
610 |
$sameshiptoname = $ref->{shiptoname}; |
|
611 |
|
|
612 |
} |
|
613 |
|
|
614 |
$result .= qq| |
|
615 |
</table> |
|
616 |
|; |
|
617 |
|
|
618 |
|
|
619 |
my $q = new CGI; |
|
620 |
print $q->header(); |
|
621 |
print $result; |
|
545 |
print CGI->new->header(); |
|
546 |
print $form->parse_html_template('ct/get_delivery'); |
|
622 | 547 |
$lxdebug->leave_sub(); |
623 |
|
|
624 | 548 |
} |
625 | 549 |
|
626 | 550 |
sub continue { call_sub($form->{nextsub}); } |
templates/webpages/ct/get_delivery_de.html | ||
---|---|---|
1 |
[% USE LxERP %] |
|
2 |
<table width=100%> |
|
3 |
<tr> |
|
4 |
<td> |
|
5 |
<table width=100%> |
|
6 |
<tr class=listheading> |
|
7 |
<th class=listheading>Lieferadresse</th> |
|
8 |
<th class=listheading>Rechnung</th> |
|
9 |
<th class=listheading>Auftrag</th> |
|
10 |
<th class=listheading>Rechnungsdatum</th> |
|
11 |
<th class=listheading>Beschreibung</th> |
|
12 |
<th class=listheading>Menge</th> |
|
13 |
<th class=listheading>Einheit</th> |
|
14 |
<th class=listheading>Verkaufspreis</th> |
|
15 |
</tr> |
|
16 |
[%- FOREACH row = DELIVERY %] |
|
17 |
<tr class=listrow[% loop.count % 2 %]> |
|
18 |
|
|
19 |
<td>[% row.shiptoname UNLESS loop.prev.shiptoname == row.shiptoname %] </td> |
|
20 |
<td>[% row.invnumber %] </td> |
|
21 |
<td>[% row.ordnumber %] </td> |
|
22 |
<td>[% row.transdate %] </td> |
|
23 |
<td>[% row.description %] </td> |
|
24 |
<td>[% row.qty %] </td> |
|
25 |
<td>[% row.unit %] </td> |
|
26 |
<td>[% LxERP.format_amount(row.sellprice, 2) %] </td> |
|
27 |
</tr> |
|
28 |
[%- END %] |
|
29 |
|
|
30 |
</table> |
templates/webpages/ct/get_delivery_master.html | ||
---|---|---|
1 |
[% USE LxERP %] |
|
2 |
<table width=100%> |
|
3 |
<tr> |
|
4 |
<td> |
|
5 |
<table width=100%> |
|
6 |
<tr class=listheading> |
|
7 |
<th class=listheading><translate>Shipping Address</translate></th> |
|
8 |
<th class=listheading><translate>Invoice</translate></th> |
|
9 |
<th class=listheading><translate>Order</translate></th> |
|
10 |
<th class=listheading><translate>Invdate</translate></th> |
|
11 |
<th class=listheading><translate>Description</translate></th> |
|
12 |
<th class=listheading><translate>Qty</translate></th> |
|
13 |
<th class=listheading><translate>Unit</translate></th> |
|
14 |
<th class=listheading><translate>Sell Price</translate></th> |
|
15 |
</tr> |
|
16 |
[%- FOREACH row = DELIVERY %] |
|
17 |
<tr class=listrow[% loop.count % 2 %]> |
|
18 |
|
|
19 |
<td>[% row.shiptoname UNLESS loop.prev.shiptoname == row.shiptoname %] </td> |
|
20 |
<td>[% row.invnumber %] </td> |
|
21 |
<td>[% row.ordnumber %] </td> |
|
22 |
<td>[% row.transdate %] </td> |
|
23 |
<td>[% row.description %] </td> |
|
24 |
<td>[% row.qty %] </td> |
|
25 |
<td>[% row.unit %] </td> |
|
26 |
<td>[% LxERP.format_amount(row.sellprice, 2) %] </td> |
|
27 |
</tr> |
|
28 |
[%- END %] |
|
29 |
|
|
30 |
</table> |
Auch abrufbar als: Unified diff
ct->get_delivery auf template umgestellt