Revision b47574cb
Von Bernd Bleßmann vor fast 9 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
137 | 137 |
$self->js->hide('#shipto_row'); |
138 | 138 |
} |
139 | 139 |
|
140 |
$self->order->payment_id($self->order->$cv_method->payment_id); |
|
141 |
$self->order->delivery_term_id($self->order->$cv_method->delivery_term_id); |
|
142 |
|
|
140 | 143 |
$self->js |
141 | 144 |
->replaceWith('#order_cp_id', $self->build_contact_select) |
142 | 145 |
->replaceWith('#order_shipto_id', $self->build_shipto_select) |
143 | 146 |
->val('#order_taxzone_id', $self->order->taxzone_id) |
147 |
->val('#order_payment_id', $self->order->payment_id) |
|
148 |
->val('#order_delivery_term_id', $self->order->delivery_term_id) |
|
144 | 149 |
->focus('#order_' . $self->cv . '_id') |
145 | 150 |
->render($self); |
146 | 151 |
} |
... | ... | |
400 | 405 |
sub _pre_render { |
401 | 406 |
my ($self) = @_; |
402 | 407 |
|
403 |
$self->{all_taxzones} = SL::DB::Manager::TaxZone->get_all_sorted(); |
|
404 |
$self->{all_employees} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id, |
|
405 |
deleted => 0 ] ], |
|
406 |
sort_by => 'name'); |
|
407 |
$self->{all_salesmen} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->salesman_id, |
|
408 |
deleted => 0 ] ], |
|
409 |
sort_by => 'name'); |
|
410 |
$self->{all_projects} = SL::DB::Manager::Project->get_all(where => [ or => [ id => $self->order->globalproject_id, |
|
411 |
active => 1 ] ], |
|
412 |
sort_by => 'projectnumber'); |
|
408 |
$self->{all_taxzones} = SL::DB::Manager::TaxZone->get_all_sorted(); |
|
409 |
$self->{all_employees} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id, |
|
410 |
deleted => 0 ] ], |
|
411 |
sort_by => 'name'); |
|
412 |
$self->{all_salesmen} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->salesman_id, |
|
413 |
deleted => 0 ] ], |
|
414 |
sort_by => 'name'); |
|
415 |
$self->{all_projects} = SL::DB::Manager::Project->get_all(where => [ or => [ id => $self->order->globalproject_id, |
|
416 |
active => 1 ] ], |
|
417 |
sort_by => 'projectnumber'); |
|
418 |
$self->{all_payment_terms} = SL::DB::Manager::PaymentTerm->get_all_sorted(); |
|
419 |
$self->{all_delivery_terms} = SL::DB::Manager::DeliveryTerm->get_all_sorted(); |
|
413 | 420 |
|
414 | 421 |
$self->{current_employee_id} = SL::DB::Manager::Employee->current->id; |
415 | 422 |
} |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
165 | 165 |
</tr> |
166 | 166 |
|
167 | 167 |
<tr> |
168 |
<td align="right"> |
|
169 |
<table> |
|
170 |
[%- IF NOT taxincluded %] |
|
168 |
<td colspan="100%" width="100%"> |
|
169 |
<table width="100%"> |
|
171 | 170 |
<tr> |
172 |
<th align="right">[%- 'Subtotal' | $T8 %]</th> |
|
173 |
<td align="right"> |
|
174 |
[%- L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %] |
|
171 |
<td> |
|
172 |
<table> |
|
173 |
<tr> |
|
174 |
<th align="right">[% 'Payment Terms' | $T8 %]</th> |
|
175 |
<td>[% L.select_tag('order.payment_id', |
|
176 |
SELF.all_payment_terms, |
|
177 |
default = SELF.order.payment_id, |
|
178 |
with_empty = 1, |
|
179 |
title_key = 'description', |
|
180 |
style = 'width: 250px') %]</td> |
|
181 |
</tr> |
|
182 |
<tr> |
|
183 |
<th align="right">[% 'Delivery Terms' | $T8 %]</th> |
|
184 |
<td>[% L.select_tag('order.delivery_term_id', |
|
185 |
SELF.all_delivery_terms, |
|
186 |
default = SELF.order.delivery_term_id, |
|
187 |
with_empty = 1, |
|
188 |
title_key = 'description', |
|
189 |
style = 'width: 250px') %]</td> |
|
190 |
</tr> |
|
191 |
</table> |
|
175 | 192 |
</td> |
176 |
</tr> |
|
177 |
[%- END %] |
|
178 |
[%- FOREACH tax = SELF.taxes %] |
|
179 |
[%- PROCESS order/tabs/_tax_row.html TAX=tax %] |
|
180 |
[%- END %] |
|
181 |
<tr id="amount_row_id"> |
|
182 |
<th align="right">[%- 'Total' | $T8 %]</th> |
|
193 |
|
|
183 | 194 |
<td align="right"> |
184 | 195 |
<table> |
185 | 196 |
[%- IF NOT taxincluded %] |
Auch abrufbar als: Unified diff
Auftrags-Controller: Zahlungs- und Lieferbedingungen