Revision a669a530
Von Bernd Bleßmann vor 12 Monaten hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
836 | 836 |
} |
837 | 837 |
} |
838 | 838 |
|
839 |
sub preceding_purchase_orders { |
|
840 |
my ($self) = @_; |
|
841 |
|
|
842 |
my @lrs = (); |
|
843 |
if ($self->id) { |
|
844 |
@lrs = grep { $_->record_type eq PURCHASE_ORDER_TYPE() } @{$self->linked_records(from => 'SL::DB::Order')}; |
|
845 |
} else { |
|
846 |
if ('SL::DB::Order' eq $self->{RECORD_TYPE_REF()}) { |
|
847 |
my $order = SL::DB::Order->load_cached($self->{RECORD_ID()}); |
|
848 |
push @lrs, $order if $order->record_type eq PURCHASE_ORDER_TYPE(); |
|
849 |
} |
|
850 |
} |
|
851 |
|
|
852 |
return \@lrs; |
|
853 |
} |
|
854 |
|
|
839 | 855 |
sub type_data { |
840 | 856 |
SL::DB::Helper::TypeDataProxy->new(ref $_[0], $_[0]->type); |
841 | 857 |
} |
templates/design40_webpages/order/tabs/basic_data.html | ||
---|---|---|
232 | 232 |
[% END %] |
233 | 233 |
[% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") %] |
234 | 234 |
<tr> |
235 |
<th>[% 'Order Number' | $T8 %]</th>
|
|
235 |
<th>[% IF SELF.type == "purchase_order_confirmation" %][% 'Order Confirmation Number' | $T8 %][% ELSE %][% 'Order Number' | $T8 %][% END %]</th>
|
|
236 | 236 |
<td> |
237 | 237 |
[%- IF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %] |
238 | 238 |
[% L.input_tag('order.ordnumber', SELF.order.ordnumber, onchange='kivi.Order.set_number_in_title(this)', class='wi-normal') %] |
... | ... | |
245 | 245 |
</td> |
246 | 246 |
</tr> |
247 | 247 |
[% END %] |
248 |
|
|
249 |
[% IF SELF.type == "purchase_order_confirmation" %] |
|
250 |
<tr> |
|
251 |
<th>[% 'Order Number' | $T8 %]</th> |
|
252 |
[%- |
|
253 |
numbers = []; |
|
254 |
FOREACH p = SELF.order.preceding_purchase_orders(); |
|
255 |
numbers.push(p.ordnumber); |
|
256 |
END; |
|
257 |
%] |
|
258 |
<td><span class="data wi-normal">[% numbers.join(', ') %]</span></td> |
|
259 |
</tr> |
|
260 |
[% END %] |
|
261 |
|
|
248 | 262 |
[% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") %] |
249 | 263 |
[% SET quo_nr_txt = 'Quotation Number' %] |
250 | 264 |
[% ELSE %] |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
178 | 178 |
|
179 | 179 |
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%] |
180 | 180 |
<tr> |
181 |
<th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
|
|
181 |
<th width="70%" align="right" nowrap>[% IF SELF.type == "purchase_order_confirmation" %][% 'Order Confirmation Number' | $T8 %][% ELSE %][% 'Order Number' | $T8 %][% END %]</th>
|
|
182 | 182 |
<td> |
183 | 183 |
[%- IF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %] |
184 | 184 |
[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %] |
... | ... | |
192 | 192 |
</tr> |
193 | 193 |
[%- END -%] |
194 | 194 |
|
195 |
[% IF SELF.type == "purchase_order_confirmation" %] |
|
196 |
<tr> |
|
197 |
<th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th> |
|
198 |
[%- |
|
199 |
numbers = []; |
|
200 |
FOREACH p = SELF.order.preceding_purchase_orders(); |
|
201 |
numbers.push(p.ordnumber); |
|
202 |
END; |
|
203 |
%] |
|
204 |
<td>[% numbers.join(', ') %]</td> |
|
205 |
</tr> |
|
206 |
[% END %] |
|
207 |
|
|
195 | 208 |
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") -%] |
196 | 209 |
[%- SET quo_nr_txt = 'Quotation Number' -%] |
197 | 210 |
[%- ELSE -%] |
Auch abrufbar als: Unified diff
Lieferantenauftragsbestätigung: Nummernbezeichnung in Makse geändert.
Und Anzeige der Vorgänger-Auftragsnummer