Fix für Bug 1130.
}
sub get_delivery {
- $main::lxdebug->enter_sub();
+ $::lxdebug->enter_sub;
- $main::auth->assert('customer_vendor_edit');
- $main::auth->assert('sales_all_edit');
+ $::auth->assert('customer_vendor_edit');
+ $::auth->assert('sales_all_edit');
- my $form = $main::form;
- my %myconfig = %main::myconfig;
+ CT->get_delivery(\%::myconfig, $::form );
- CT->get_delivery(\%myconfig, \%$form );
- $form->{IS_CUSTOMER} = $form->{db} eq 'customer';
-
- print $form->ajax_response_header(), $form->parse_html_template('ct/get_delivery');
+ print $::form->ajax_response_header,
+ $::form->parse_html_template('ct/get_delivery', {
+ is_customer => $::form->{db} eq 'customer',
+ });
- $main::lxdebug->leave_sub();
+ $::lxdebug->leave_sub;
}
sub delete_shipto {
<th class="listheading">Beschreibung</th>
<th class="listheading">Menge</th>
<th class="listheading">Einheit</th>
+[%- IF is_customer %]
<th class="listheading">Verkaufspreis</th>
+[%- ELSE %]
+ <th class="listheading">Einkaufspreis</th>
+[%- END %]
</tr>
[%- FOREACH row = DELIVERY %]
<tr class="listrow[% loop.count % 2 %]">
<td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %] </td>
- <td>[% IF row.id %]<a href='[% IF IS_CUSTOMER %]is[% ELSE %]ir[% END %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
- <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=sales_order&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %]</a>[% END %]</td>
+ <td>[% IF row.id %]<a href='[% IF is_customer %]is[% ELSE %]ir[% END %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
+ <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=[% IF is_customer %]sales_order[% ELSE %]purchase_order[% END %]&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %]</a>[% END %]</td>
<td>[% HTML.escape(row.transdate) || ' ' %]</td>
<td>[% HTML.escape(row.description) || ' ' %]</td>
<td>[% HTML.escape(row.qty) || ' ' %]</td>
<th class="listheading"><translate>Description</translate></th>
<th class="listheading"><translate>Qty</translate></th>
<th class="listheading"><translate>Unit</translate></th>
+[%- IF is_customer %]
<th class="listheading"><translate>Sell Price</translate></th>
+[%- ELSE %]
+ <th class="listheading"><translate>Last Cost</translate></th>
+[%- END %]
</tr>
[%- FOREACH row = DELIVERY %]
<tr class="listrow[% loop.count % 2 %]">
<td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %] </td>
- <td>[% IF row.id %]<a href='[% IF IS_CUSTOMER %]is[% ELSE %]ir[% END %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
- <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=sales_order&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %]</a>[% END %]</td>
+ <td>[% IF row.id %]<a href='[% IF is_customer %]is[% ELSE %]ir[% END %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
+ <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=[% IF is_customer %]sales_order[% ELSE %]purchase_order[% END %]&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %]</a>[% END %]</td>
<td>[% HTML.escape(row.transdate) || ' ' %]</td>
<td>[% HTML.escape(row.description) || ' ' %]</td>
<td>[% HTML.escape(row.qty) || ' ' %]</td>