Revision 89689ddb
Von Bernd Bleßmann vor mehr als 5 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
791 | 791 |
|
792 | 792 |
my $item_id = join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000); |
793 | 793 |
my $row_as_html = $self->p->render('order/tabs/_row', |
794 |
ITEM => $item, |
|
795 |
ID => $item_id, |
|
796 |
TYPE => $self->type, |
|
797 |
ALL_PRICE_FACTORS => $self->all_price_factors, |
|
798 |
SEARCH_CVPARTNUMBER => $self->search_cvpartnumber, |
|
799 |
SHOW_UPDATE_BUTTON => $self->show_update_button, |
|
794 |
ITEM => $item, |
|
795 |
ID => $item_id, |
|
796 |
SELF => $self, |
|
800 | 797 |
); |
801 | 798 |
|
802 | 799 |
$self->js |
... | ... | |
820 | 817 |
$self->get_item_cvpartnumber($item); |
821 | 818 |
my $item_id = join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000); |
822 | 819 |
my $row_as_html = $self->p->render('order/tabs/_row', |
823 |
ITEM => $item, |
|
824 |
ID => $item_id, |
|
825 |
TYPE => $self->type, |
|
826 |
ALL_PRICE_FACTORS => $self->all_price_factors, |
|
827 |
SEARCH_CVPARTNUMBER => $self->search_cvpartnumber, |
|
828 |
SHOW_UPDATE_BUTTON => $self->show_update_button, |
|
820 |
ITEM => $item, |
|
821 |
ID => $item_id, |
|
822 |
SELF => $self, |
|
829 | 823 |
); |
830 | 824 |
$self->js |
831 | 825 |
->append('#row_table_id', $row_as_html); |
... | ... | |
904 | 898 |
$self->get_item_cvpartnumber($item); |
905 | 899 |
my $item_id = join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000); |
906 | 900 |
my $row_as_html = $self->p->render('order/tabs/_row', |
907 |
ITEM => $item, |
|
908 |
ID => $item_id, |
|
909 |
TYPE => $self->type, |
|
910 |
ALL_PRICE_FACTORS => $self->all_price_factors, |
|
911 |
SEARCH_CVPARTNUMBER => $self->search_cvpartnumber, |
|
912 |
SHOW_UPDATE_BUTTON => $self->show_update_button, |
|
901 |
ITEM => $item, |
|
902 |
ID => $item_id, |
|
903 |
SELF => $self, |
|
913 | 904 |
); |
914 | 905 |
|
915 | 906 |
$self->js->append('#row_table_id', $row_as_html); |
templates/webpages/order/tabs/_row.html | ||
---|---|---|
32 | 32 |
LxERP.t8("X"), |
33 | 33 |
confirm=LxERP.t8("Are you sure?")) %] |
34 | 34 |
</td> |
35 |
[%- IF SHOW_UPDATE_BUTTON -%]
|
|
35 |
[%- IF SELF.show_update_button -%]
|
|
36 | 36 |
<td align="center"> |
37 | 37 |
[%- L.img_tag(src="image/rotate_cw.svg", |
38 | 38 |
alt=LxERP.t8('Update from master data'), |
... | ... | |
44 | 44 |
<td> |
45 | 45 |
<div name="partnumber">[% HTML.escape(ITEM.part.partnumber) %]</div> |
46 | 46 |
</td> |
47 |
[%- IF SEARCH_CVPARTNUMBER -%]
|
|
47 |
[%- IF SELF.search_cvpartnumber -%]
|
|
48 | 48 |
<td> |
49 | 49 |
<div name="cvpartnumber">[% HTML.escape(ITEM.cvpartnumber) %]</div> |
50 | 50 |
</td> |
... | ... | |
62 | 62 |
[%- END -%] |
63 | 63 |
[%- L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L")) %] |
64 | 64 |
</td> |
65 |
[%- IF (TYPE == "sales_order" || TYPE == "purchase_order") -%]
|
|
65 |
[%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
|
66 | 66 |
<td nowrap> |
67 | 67 |
[%- L.div_tag(LxERP.format_amount(ITEM.shipped_qty, 2, 0) _ ' ' _ ITEM.unit, name="shipped_qty", class="numeric") %] |
68 | 68 |
</td> |
... | ... | |
79 | 79 |
</td> |
80 | 80 |
<td> |
81 | 81 |
[%- L.select_tag("order.orderitems[].price_factor_id", |
82 |
ALL_PRICE_FACTORS,
|
|
82 |
SELF.all_price_factors,
|
|
83 | 83 |
default = ITEM.price_factor_id, |
84 | 84 |
title_key = 'description', |
85 | 85 |
with_empty = 1, |
... | ... | |
142 | 142 |
<td colspan="100%"> |
143 | 143 |
[%- IF MYCONFIG.show_form_details || ITEM.render_second_row %] |
144 | 144 |
<div name="second_row" data-loaded="1"> |
145 |
[%- PROCESS order/tabs/_second_row.html ITEM=ITEM TYPE=TYPE %]
|
|
145 |
[%- PROCESS order/tabs/_second_row.html ITEM=ITEM TYPE=SELF.type %]
|
|
146 | 146 |
</div> |
147 | 147 |
[%- ELSE %] |
148 | 148 |
<div name="second_row" id="second_row_[% ID %]"> |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
242 | 242 |
</thead> |
243 | 243 |
|
244 | 244 |
[%- FOREACH item = SELF.order.items_sorted %] |
245 |
[%- PROCESS order/tabs/_row.html |
|
246 |
ITEM=item |
|
247 |
ID=(item.id||item.new_fake_id) |
|
248 |
TYPE=SELF.type |
|
249 |
ALL_PRICE_FACTORS=SELF.all_price_factors |
|
250 |
SEARCH_CVPARTNUMBER=SELF.search_cvpartnumber |
|
251 |
SHOW_UPDATE_BUTTON=SELF.show_update_button |
|
252 |
-%] |
|
245 |
[%- PROCESS order/tabs/_row.html ITEM=item ID=(item.id||item.new_fake_id) -%] |
|
253 | 246 |
[%- END %] |
254 | 247 |
|
255 | 248 |
</table> |
Auch abrufbar als: Unified diff
Auftrags-Controller: self an _row-Template übergeben …
… und nicht einzelne Variablen aus self, die dort abgefragt werden.