From: Sven Schöling Date: Fri, 4 Jan 2008 17:02:44 +0000 (+0000) Subject: ct->get_delivery auf template umgestellt X-Git-Tag: release-2.6.0beta1~378 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ab1df08bfae3ef3361c7b5e4e16d91ae3cb34961;p=kivitendo-erp.git ct->get_delivery auf template umgestellt --- diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index b8451f9ff..9e5e18869 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -542,85 +542,9 @@ sub get_delivery { CT->get_delivery(\%myconfig, \%$form ); - @column_index = - $form->sort_columns(shiptoname, - invnumber, - ordnumber, - transdate, - description, - qty, - unit, - sellprice); - - - - $column_header{shiptoname} = - qq|| . $locale->text('Shipping Address') . qq||; - $column_header{invnumber} = - qq||. $locale->text('Invoice'). qq||; - $column_header{ordnumber} = - qq||. $locale->text('Order'). qq||; - $column_header{transdate} = - qq|| . $locale->text('Invdate') . qq||; - $column_header{description} = - qq|| . $locale->text('Description') . qq||; - $column_header{qty} = - qq|| . $locale->text('Qty') . qq||; - $column_header{unit} = - qq|| . $locale->text('Unit') . qq||; - $column_header{sellprice} = - qq|| . $locale->text('Sell Price') . qq||; - $result .= qq| - - - -
- - -|; - - map { $result .= "$column_header{$_}\n" } @column_index; - - $result .= qq| - -|; - - - foreach $ref (@{ $form->{DELIVERY} }) { - - if ($ref->{shiptoname} eq $sameshiptoname) { - map { $column_data{$_} = "" } @column_index; - $column_data{shiptoname} = ""; - } else { - map { $column_data{$_} = "" } @column_index; - } - $column_data{sellprice} = ""; - $i++; - $i %= 2; - $result .= " - -"; - - map { $result .= "$column_data{$_}\n" } @column_index; - - $result .= qq| - -|; - - $sameshiptoname = $ref->{shiptoname}; - - } - - $result .= qq| -
$ref->{$_}  $ref->{$_} ". $form->format_amount(\%myconfig,$ref->{sellprice},2)." 
-|; - - - 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}); } diff --git a/templates/webpages/ct/get_delivery_de.html b/templates/webpages/ct/get_delivery_de.html new file mode 100644 index 000000000..9f723f7f4 --- /dev/null +++ b/templates/webpages/ct/get_delivery_de.html @@ -0,0 +1,30 @@ +[% USE LxERP %] + + +
+ + + + + + + + + + + +[%- FOREACH row = DELIVERY %] + + + + + + + + + + + +[%- END %] + +
LieferadresseRechnungAuftragRechnungsdatumBeschreibungMengeEinheitVerkaufspreis
[% row.shiptoname UNLESS loop.prev.shiptoname == row.shiptoname %] [% row.invnumber %] [% row.ordnumber %] [% row.transdate %] [% row.description %] [% row.qty %] [% row.unit %] [% LxERP.format_amount(row.sellprice, 2) %] 
diff --git a/templates/webpages/ct/get_delivery_master.html b/templates/webpages/ct/get_delivery_master.html new file mode 100644 index 000000000..772b83ba4 --- /dev/null +++ b/templates/webpages/ct/get_delivery_master.html @@ -0,0 +1,30 @@ +[% USE LxERP %] + + +
+ + + + + + + + + + + +[%- FOREACH row = DELIVERY %] + + + + + + + + + + + +[%- END %] + +
Shipping AddressInvoiceOrderInvdateDescriptionQtyUnitSell Price
[% row.shiptoname UNLESS loop.prev.shiptoname == row.shiptoname %] [% row.invnumber %] [% row.ordnumber %] [% row.transdate %] [% row.description %] [% row.qty %] [% row.unit %] [% LxERP.format_amount(row.sellprice, 2) %]