Revision 78e36cfd
Von Bernd Bleßmann vor fast 7 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
447 | 447 |
my $row_as_html = $self->p->render('order/tabs/_row', |
448 | 448 |
ITEM => $item, |
449 | 449 |
ID => $item_id, |
450 |
TYPE => $self->type, |
|
450 | 451 |
ALL_PRICE_FACTORS => $self->all_price_factors |
451 | 452 |
); |
452 | 453 |
|
... | ... | |
472 | 473 |
my $row_as_html = $self->p->render('order/tabs/_row', |
473 | 474 |
ITEM => $item, |
474 | 475 |
ID => $item_id, |
476 |
TYPE => $self->type, |
|
475 | 477 |
ALL_PRICE_FACTORS => $self->all_price_factors |
476 | 478 |
); |
477 | 479 |
$self->js |
... | ... | |
553 | 555 |
my $row_as_html = $self->p->render('order/tabs/_row', |
554 | 556 |
ITEM => $item, |
555 | 557 |
ID => $item_id, |
558 |
TYPE => $self->type, |
|
556 | 559 |
ALL_PRICE_FACTORS => $self->all_price_factors |
557 | 560 |
); |
558 | 561 |
|
... | ... | |
665 | 668 |
$item->parse_custom_variable_values; |
666 | 669 |
} |
667 | 670 |
|
668 |
my $row_as_html = $self->p->render('order/tabs/_second_row', ITEM => $item); |
|
671 |
my $row_as_html = $self->p->render('order/tabs/_second_row', ITEM => $item, TYPE => $self->type);
|
|
669 | 672 |
|
670 | 673 |
$self->js |
671 | 674 |
->html('.row_entry:has(#item_' . $item_id . ') [name = "second_row"]', $row_as_html) |
templates/webpages/order/tabs/_row.html | ||
---|---|---|
115 | 115 |
<td colspan="100%"> |
116 | 116 |
[%- IF MYCONFIG.show_form_details %] |
117 | 117 |
<div name="second_row" data-loaded="1"> |
118 |
[%- PROCESS order/tabs/_second_row.html ITEM=ITEM %] |
|
118 |
[%- PROCESS order/tabs/_second_row.html ITEM=ITEM TYPE=TYPE %]
|
|
119 | 119 |
</div> |
120 | 120 |
[%- ELSE %] |
121 | 121 |
<div name="second_row"> |
templates/webpages/order/tabs/_second_row.html | ||
---|---|---|
14 | 14 |
[% L.date_tag("order.orderitems[].reqdate", ITEM.reqdate) %] |
15 | 15 |
<b>[%- 'Subtotal' | $T8 %]</b> |
16 | 16 |
[% L.yes_no_tag("order.orderitems[].subtotal", ITEM.subtotal) %] |
17 |
[%- IF ITEM.order.is_sales %]
|
|
17 |
[%- IF TYPE == "sales_order" %]
|
|
18 | 18 |
<b>[%- 'Ertrag' | $T8 %]</b> |
19 | 19 |
<span name="linemargin"> |
20 | 20 |
<span[%- IF ITEM.marge_total < 0 -%] class="plus0"[%- END -%]> |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
180 | 180 |
</thead> |
181 | 181 |
|
182 | 182 |
[%- FOREACH item = SELF.order.items_sorted %] |
183 |
[%- PROCESS order/tabs/_row.html ITEM=item ID=item.id ALL_PRICE_FACTORS=SELF.all_price_factors %] |
|
183 |
[%- PROCESS order/tabs/_row.html ITEM=item ID=item.id TYPE=SELF.type ALL_PRICE_FACTORS=SELF.all_price_factors %]
|
|
184 | 184 |
[%- END %] |
185 | 185 |
|
186 | 186 |
</table> |
Auch abrufbar als: Unified diff
Auftrags-Controller: Fehler bei Anzeige von EK und Marge in 2. Zeile behoben
Wenn das Order-Objekt noch nicht gespeichert ist, kann darauf nicht über
$item->order zugegriffen werden. Darum muss an die 2. Zeile eine weitere
Variable durchgereicht werden, um zu bestimmen, ob wir im Verkauf sind und
EK und Margen angezeigt werden sollen.