Revision ea1c5dfb
Von Martin Helmling martin.helmling@octosoft.eu vor etwa 8 Jahren hinzugefügt
SL/Presenter/Part.pm | ||
---|---|---|
7 | 7 |
use SL::Locale::String qw(t8); |
8 | 8 |
|
9 | 9 |
use Exporter qw(import); |
10 |
our @EXPORT = qw(part_picker part select_classification classification_abbreviation type_abbreviation separate_abbreviation); |
|
10 |
our @EXPORT = qw(part_picker part select_classification classification_abbreviation type_abbreviation separate_abbreviation typeclass_abbreviation);
|
|
11 | 11 |
|
12 | 12 |
use Carp; |
13 | 13 |
|
... | ... | |
84 | 84 |
$obj && $obj->abbreviation ? t8($obj->abbreviation) : ''; |
85 | 85 |
} |
86 | 86 |
|
87 |
sub typeclass_abbreviation { |
|
88 |
my ($self, $part) = @_; |
|
89 |
return '' if !$part || !$part->isa('SL::DB::Part'); |
|
90 |
return $self->type_abbreviation($part->part_type).$self->classification_abbreviation($part->classification_id); |
|
91 |
} |
|
92 |
|
|
87 | 93 |
# |
88 | 94 |
# shortcut for article type |
89 | 95 |
# |
templates/webpages/order/tabs/_row.html | ||
---|---|---|
2 | 2 |
[%- USE HTML %] |
3 | 3 |
[%- USE LxERP %] |
4 | 4 |
[%- USE L %] |
5 |
[%- USE P %] |
|
5 | 6 |
|
6 | 7 |
<tbody class="row_entry listrow"[%- IF MYCONFIG.show_form_details -%] data-expanded="1"[%- END -%]> |
7 | 8 |
<tr> |
... | ... | |
33 | 34 |
<td> |
34 | 35 |
<div name="partnumber">[% HTML.escape(ITEM.part.partnumber) %]</div> |
35 | 36 |
</td> |
37 |
<td> |
|
38 |
<div name="partclassification">[% P.typeclass_abbreviation(ITEM.part) %]</div> |
|
39 |
</td> |
|
36 | 40 |
<td> |
37 | 41 |
[% L.input_tag("order.orderitems[].description", |
38 | 42 |
ITEM.description, |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
166 | 166 |
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th> |
167 | 167 |
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th> |
168 | 168 |
<th id="partnumber_header_id" class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Order.reorder_items("partnumber")'> [%- 'Partnumber' | $T8 %]</a></th> |
169 |
<th id="partclass_header_id" class="listheading" nowrap width="2">[%- 'Type' | $T8 %]</th> |
|
169 | 170 |
<th id="description_header_id" class="listheading" nowrap ><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th> |
170 | 171 |
<th id="qty_header_id" class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'> [%- 'Qty' | $T8 %]</a></th> |
171 | 172 |
<th class="listheading" nowrap width="5" >[%- 'Price Factor' | $T8 %] </th> |
Auch abrufbar als: Unified diff
Vereinfachte Abkürzungsmethode "typeclass_abbreviation" im Part Presenter