CT->get_delivery(\%myconfig, \%$form );
- @column_index =
- $form->sort_columns(shiptoname,
- invnumber,
- ordnumber,
- transdate,
- description,
- qty,
- unit,
- sellprice);
-
-
-
- $column_header{shiptoname} =
- qq|<th class=listheading>| . $locale->text('Shipping Address') . qq|</th>|;
- $column_header{invnumber} =
- qq|<th class=listheading>|. $locale->text('Invoice'). qq|</th>|;
- $column_header{ordnumber} =
- qq|<th class=listheading>|. $locale->text('Order'). qq|</th>|;
- $column_header{transdate} =
- qq|<th class=listheading>| . $locale->text('Invdate') . qq|</th>|;
- $column_header{description} =
- qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|;
- $column_header{qty} =
- qq|<th class=listheading>| . $locale->text('Qty') . qq|</th>|;
- $column_header{unit} =
- qq|<th class=listheading>| . $locale->text('Unit') . qq|</th>|;
- $column_header{sellprice} =
- qq|<th class=listheading>| . $locale->text('Sell Price') . qq|</th>|;
- $result .= qq|
-
-<table width=100%>
- <tr>
- <td>
- <table width=100%>
- <tr class=listheading>
-|;
-
- map { $result .= "$column_header{$_}\n" } @column_index;
-
- $result .= qq|
- </tr>
-|;
-
-
- foreach $ref (@{ $form->{DELIVERY} }) {
-
- if ($ref->{shiptoname} eq $sameshiptoname) {
- map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;
- $column_data{shiptoname} = "<td> </td>";
- } else {
- map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;
- }
- $column_data{sellprice} = "<td>". $form->format_amount(\%myconfig,$ref->{sellprice},2)." </td>";
- $i++;
- $i %= 2;
- $result .= "
- <tr class=listrow$i>
-";
-
- map { $result .= "$column_data{$_}\n" } @column_index;
-
- $result .= qq|
- </tr>
-|;
-
- $sameshiptoname = $ref->{shiptoname};
-
- }
-
- $result .= qq|
- </table>
-|;
-
-
- my $q = new CGI;
- print $q->header();
- print $result;
+ print CGI->new->header();
+ print $form->parse_html_template('ct/get_delivery');
$lxdebug->leave_sub();
-
}
sub continue { call_sub($form->{nextsub}); }
--- /dev/null
+[% USE LxERP %]
+<table width=100%>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+ <th class=listheading>Lieferadresse</th>
+ <th class=listheading>Rechnung</th>
+ <th class=listheading>Auftrag</th>
+ <th class=listheading>Rechnungsdatum</th>
+ <th class=listheading>Beschreibung</th>
+ <th class=listheading>Menge</th>
+ <th class=listheading>Einheit</th>
+ <th class=listheading>Verkaufspreis</th>
+ </tr>
+[%- FOREACH row = DELIVERY %]
+ <tr class=listrow[% loop.count % 2 %]>
+
+ <td>[% row.shiptoname UNLESS loop.prev.shiptoname == row.shiptoname %] </td>
+ <td>[% row.invnumber %] </td>
+ <td>[% row.ordnumber %] </td>
+ <td>[% row.transdate %] </td>
+ <td>[% row.description %] </td>
+ <td>[% row.qty %] </td>
+ <td>[% row.unit %] </td>
+ <td>[% LxERP.format_amount(row.sellprice, 2) %] </td>
+ </tr>
+[%- END %]
+
+ </table>
--- /dev/null
+[% USE LxERP %]
+<table width=100%>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+ <th class=listheading><translate>Shipping Address</translate></th>
+ <th class=listheading><translate>Invoice</translate></th>
+ <th class=listheading><translate>Order</translate></th>
+ <th class=listheading><translate>Invdate</translate></th>
+ <th class=listheading><translate>Description</translate></th>
+ <th class=listheading><translate>Qty</translate></th>
+ <th class=listheading><translate>Unit</translate></th>
+ <th class=listheading><translate>Sell Price</translate></th>
+ </tr>
+[%- FOREACH row = DELIVERY %]
+ <tr class=listrow[% loop.count % 2 %]>
+
+ <td>[% row.shiptoname UNLESS loop.prev.shiptoname == row.shiptoname %] </td>
+ <td>[% row.invnumber %] </td>
+ <td>[% row.ordnumber %] </td>
+ <td>[% row.transdate %] </td>
+ <td>[% row.description %] </td>
+ <td>[% row.qty %] </td>
+ <td>[% row.unit %] </td>
+ <td>[% LxERP.format_amount(row.sellprice, 2) %] </td>
+ </tr>
+[%- END %]
+
+ </table>