Revision 2d3ef003
Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
my $text = $self->type eq SALES_ORDER_INTAKE_TYPE() ? $::locale->text('The order intake has been deleted')
|
||
: $self->type eq SALES_ORDER_TYPE() ? $::locale->text('The order confirmation has been deleted')
|
||
: $self->type eq PURCHASE_ORDER_TYPE() ? $::locale->text('The order has been deleted')
|
||
: $self->type eq PURCHASE_ORDER_CONFIRMATION_TYPE() ? $::locale->text('The order confirmation has been deleted')
|
||
: $self->type eq SALES_QUOTATION_TYPE() ? $::locale->text('The quotation has been deleted')
|
||
: $self->type eq REQUEST_QUOTATION_TYPE() ? $::locale->text('The rfq has been deleted')
|
||
: $self->type eq PURCHASE_QUOTATION_INTAKE_TYPE() ? $::locale->text('The quotation intake has been deleted')
|
||
... | ... | |
id => \@converted_from_oe_ids,
|
||
or => [ record_type => SALES_QUOTATION_TYPE(),
|
||
record_type => REQUEST_QUOTATION_TYPE(),
|
||
(record_type => PURCHASE_QUOTATION_INTAKE_TYPE()) x $self->order->is_type(PURCHASE_ORDER_TYPE()) ]
|
||
(record_type => PURCHASE_QUOTATION_INTAKE_TYPE()) x $self->order->is_type(PURCHASE_ORDER_TYPE()),
|
||
(record_type => PURCHASE_ORDER_TYPE()) x $self->order->is_type(PURCHASE_ORDER_CONFIRMATION_TYPE()) ]
|
||
])
|
||
: undef;
|
||
|
||
... | ... | |
$item->active_discount_source($price_source->discount_from_source($item->active_discount_source));
|
||
}
|
||
|
||
if (any { $self->type eq $_ } (SALES_ORDER_INTAKE_TYPE(), SALES_ORDER_TYPE(), PURCHASE_ORDER_TYPE())) {
|
||
if (any { $self->type eq $_ } (SALES_ORDER_INTAKE_TYPE(), SALES_ORDER_TYPE(), PURCHASE_ORDER_TYPE(), PURCHASE_ORDER_CONFIRMATION_TYPE())) {
|
||
# Calculate shipped qtys here to prevent calling calculate for every item via the items method.
|
||
# Do not use write_to_objects to prevent order->delivered to be set, because this should be
|
||
# the value from db, which can be set manually or is set when linked delivery orders are saved.
|
||
... | ... | |
only_if => $self->type_data->show_menu('save_and_purchase_order'),
|
||
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
|
||
],
|
||
action => [
|
||
t8('Save and Purchase Order Confirmation'),
|
||
call => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => PURCHASE_ORDER_CONFIRMATION_TYPE() } ],
|
||
checks => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
|
||
only_if => $self->type_data->show_menu('save_and_purchase_order_confirmation'),
|
||
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
|
||
],
|
||
action => [
|
||
t8('Save and Sales Delivery Order'),
|
||
call => [ 'kivi.Order.save', {
|
js/kivi.Order.js | ||
---|---|---|
var type = $('#type').val();
|
||
|
||
var number_info = '';
|
||
if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order') {
|
||
if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order' || $('#type').val() == 'purchase_order_confirmation') {
|
||
number_info = $('#order_ordnumber').val();
|
||
} else if ($('#type').val() == 'sales_quotation' || $('#type').val() == 'request_quotation' || $('#type').val() == 'purchase_quotation_intake') {
|
||
number_info = $('#order_quonumber').val();
|
||
... | ... | |
var name_info = '';
|
||
if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
|
||
name_info = $('#order_customer_id_name').val();
|
||
} else if ($('#type').val() == 'purchase_order' || $('#type').val() == 'request_quotation' || $('#type').val() == 'purchase_quotation_intake') {
|
||
} else if ($('#type').val() == 'purchase_order' || $('#type').val() == 'purchase_order_confirmation' || $('#type').val() == 'request_quotation' || $('#type').val() == 'purchase_quotation_intake') {
|
||
name_info = $('#order_vendor_id_name').val();
|
||
}
|
||
|
templates/webpages/order/tabs/_price_sources_dialog.html | ||
---|---|---|
[% IF (FORM.type == "sales_order" || FORM.type == "sales_order_intake" || FORM.type == "sales_quotation") %]
|
||
[% SET price_editable = AUTH.assert('sales_edit_prices', 1) %]
|
||
[% END %]
|
||
[% IF (FORM.type == "purchase_order" || FORM.type == "request_quotation" || FORM.type == "purchase_quotation_intake") %]
|
||
[% IF (FORM.type == "purchase_order" || FORM.type == "purchase_order_confirmation" || FORM.type == "request_quotation" || FORM.type == "purchase_quotation_intake") %]
|
||
[% SET price_editable = AUTH.assert('purchase_edit_prices', 1) %]
|
||
[% END %]
|
||
[% SET exfactor = price_source.record.exchangerate ? 1 / price_source.record.exchangerate : 1 %]
|
templates/webpages/order/tabs/_row.html | ||
---|---|---|
[%- L.hidden_tag("order.orderitems[].longdescription", ITEM.longdescription) %]
|
||
[%- L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L")) %]
|
||
</td>
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
|
||
<td nowrap>
|
||
[%- L.div_tag(LxERP.format_amount(ITEM.shipped_qty, 2, 0) _ ' ' _ ITEM.unit, name="shipped_qty", class="numeric") %]
|
||
</td>
|
||
... | ... | |
[% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") %]
|
||
[% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('sales_edit_prices', 1) %]
|
||
[% END %]
|
||
[% IF (SELF.type == "purchase_order" || SELF.type == "request_quotation" || SELF.type == "purchase_quotation_intake") %]
|
||
[% IF (SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation" || SELF.type == "request_quotation" || SELF.type == "purchase_quotation_intake") %]
|
||
[% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('purchase_edit_prices', 1) %]
|
||
[% END %]
|
||
<td>
|
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
</tr>
|
||
[% END %]
|
||
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
|
||
<tr>
|
||
<th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
|
||
<td>
|
||
... | ... | |
<tr>
|
||
<th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
|
||
<td>
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
|
||
[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]
|
||
[%- ELSIF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
|
||
[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]
|
||
... | ... | |
</td>
|
||
</tr>
|
||
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
|
||
<tr>
|
||
<th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
|
||
<td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
|
||
</tr>
|
||
[%- END -%]
|
||
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
|
||
[%- SET transdate_txt = 'Order Date' -%]
|
||
[%- ELSIF (SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") -%]
|
||
[%- SET transdate_txt = 'Quotation Date' -%]
|
||
... | ... | |
<td>[% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class="recalc") %]</td>
|
||
</tr>
|
||
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
|
||
[%- SET reqdate_txt = 'Reqdate'; SET reqdate_class = 'recalc' -%]
|
||
[%- ELSIF SELF.type == "sales_quotation" -%]
|
||
[%- SET reqdate_txt = 'Valid until'; SET reqdate_class = '' -%]
|
||
... | ... | |
[%- END -%]
|
||
<th id="partclass_header_id" class="listheading" nowrap width="2">[%- 'Type' | $T8 %]</th>
|
||
<th id="description_header_id" class="listheading" nowrap ><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
|
||
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
|
||
<th id="shipped_qty_header_id" class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("shipped_qty")'>[%- 'Delivered' | $T8 %]</a></th>
|
||
[%- END -%]
|
||
<th id="qty_header_id" class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'> [%- 'Qty' | $T8 %]</a></th>
|
Auch abrufbar als: Unified diff
Lieferantenauftragsbestätigung: Controller/Maske