Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 47b2bb2b

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

  • ID 47b2bb2b25f10ba97bb24ab3aba6e18e3e58c0a3
  • Vorgänger eaf9e172
  • Nachfolger 1ced201d

Auftrags-Eingang: Controller

Unterschiede anzeigen:

SL/Controller/Order.pm
my ($self) = @_;
$self->order->transdate(DateTime->now_local());
my $extra_days = $self->type eq sales_quotation_type() ? $::instance_conf->get_reqdate_interval :
$self->type eq sales_order_type() ? $::instance_conf->get_delivery_date_interval : 1;
my $extra_days = $self->type eq sales_quotation_type() ? $::instance_conf->get_reqdate_interval :
$self->type eq sales_order_type() ? $::instance_conf->get_delivery_date_interval :
$self->type eq sales_order_intake_type() ? $::instance_conf->get_delivery_date_interval : 1;
if ( ($self->type eq sales_order_type() && $::instance_conf->get_deliverydate_on)
if (($self->type eq sales_order_intake_type() && $::instance_conf->get_deliverydate_on)
|| ($self->type eq sales_order_type() && $::instance_conf->get_deliverydate_on)
|| ($self->type eq sales_quotation_type() && $::instance_conf->get_reqdate_on)
&& (!$self->order->reqdate)) {
$self->order->reqdate(DateTime->today_local->next_workday(extra_days => $extra_days));
......
return $self->js->render();
}
my $text = $self->type eq sales_order_type() ? $::locale->text('The order has been deleted')
: $self->type eq purchase_order_type() ? $::locale->text('The order 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')
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 sales_quotation_type() ? $::locale->text('The quotation has been deleted')
: $self->type eq request_quotation_type() ? $::locale->text('The rfq has been deleted')
: '';
flash_later('info', $text);
......
return $self->js->render();
}
my $text = $self->type eq sales_order_type() ? $::locale->text('The order has been saved')
: $self->type eq purchase_order_type() ? $::locale->text('The order has been saved')
: $self->type eq sales_quotation_type() ? $::locale->text('The quotation has been saved')
: $self->type eq request_quotation_type() ? $::locale->text('The rfq has been saved')
my $text = $self->type eq sales_order_intake_type() ? $::locale->text('The order intake has been saved')
: $self->type eq sales_order_type() ? $::locale->text('The order confirmation has been saved')
: $self->type eq purchase_order_type() ? $::locale->text('The order has been saved')
: $self->type eq sales_quotation_type() ? $::locale->text('The quotation has been saved')
: $self->type eq request_quotation_type() ? $::locale->text('The rfq has been saved')
: '';
flash_later('info', $text);
......
# Set new reqdate unless changed if it is enabled in client config
if ($order->reqdate == $saved_order->reqdate) {
my $extra_days = $self->type eq sales_quotation_type() ? $::instance_conf->get_reqdate_interval :
$self->type eq sales_order_type() ? $::instance_conf->get_delivery_date_interval : 1;
my $extra_days = $self->type eq sales_quotation_type() ? $::instance_conf->get_reqdate_interval :
$self->type eq sales_order_type() ? $::instance_conf->get_delivery_date_interval :
$self->type eq sales_order_intake_type() ? $::instance_conf->get_delivery_date_interval : 1;
if ( ($self->type eq sales_order_type() && !$::instance_conf->get_deliverydate_on)
|| ($self->type eq sales_quotation_type() && !$::instance_conf->get_reqdate_on)) {
if ( ($self->type eq sales_order_intake_type() && !$::instance_conf->get_deliverydate_on)
|| ($self->type eq sales_order_type() && !$::instance_conf->get_deliverydate_on)
|| ($self->type eq sales_quotation_type() && !$::instance_conf->get_reqdate_on)) {
$new_attrs{reqdate} = '';
} else {
$new_attrs{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days);
......
my $destination_type = $::form->{to_type} ? $::form->{to_type} : '';
my $from_side = $self->order->is_sales ? 'sales' : 'purchase';
my $to_side = (any { $destination_type eq $_ } (sales_order_type(), sales_quotation_type())) ? 'sales' : 'purchase';
my $to_side = (any { $destination_type eq $_ } (sales_order_intake_type(), sales_order_type(), sales_quotation_type())) ? 'sales' : 'purchase';
# check for direct delivery
# copy shipto in custom shipto (custom shipto will be copied by new_from() in case)
......
#
sub init_valid_types {
[ sales_order_type(), purchase_order_type(), sales_quotation_type(), request_quotation_type() ];
[ sales_order_intake_type(), sales_order_type(), purchase_order_type(), sales_quotation_type(), request_quotation_type() ];
}
sub init_type {
......
sub init_cv {
my ($self) = @_;
my $cv = (any { $self->type eq $_ } (sales_order_type(), sales_quotation_type())) ? 'customer'
: (any { $self->type eq $_ } (purchase_order_type(), request_quotation_type())) ? 'vendor'
my $cv = (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), sales_quotation_type())) ? 'customer'
: (any { $self->type eq $_ } (purchase_order_type(), request_quotation_type())) ? 'vendor'
: die "Not a valid type for order";
return $cv;
......
my ($self) = @_;
my $right_for = { map { $_ => $_.'_edit' . ' | ' . $_.'_view' } @{$self->valid_types} };
$right_for->{ sales_order_intake_type() } = 'sales_order_edit | sales_order_view';
my $right = $right_for->{ $self->type };
$right ||= 'DOES_NOT_EXIST';
......
my ($self) = @_;
my $right_for = { map { $_ => $_.'_edit' } @{$self->valid_types} };
$right_for->{ sales_order_intake_type() } = 'sales_order_edit';
my $right = $right_for->{ $self->type };
$right ||= 'DOES_NOT_EXIST';
......
$order = SL::DB::Order->new(id => $::form->{id})->load(with => [ 'orderitems', 'orderitems.part' ]) if $::form->{id};
$order ||= SL::DB::Order->new(orderitems => [],
quotation => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type())),
intake => (any { $self->type eq $_ } (sales_order_intake_type())),
currency_id => $::instance_conf->get_currency_id(),);
my $cv_id_method = $self->cv . '_id';
......
$item->active_discount_source($price_source->discount_from_source($item->active_discount_source));
}
if (any { $self->type eq $_ } (sales_order_type(), purchase_order_type())) {
if (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), purchase_order_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.
......
} } @all_objects;
}
if ( (any { $self->type eq $_ } (sales_quotation_type(), sales_order_type()))
if ( (any { $self->type eq $_ } (sales_quotation_type(), sales_order_intake_type(), sales_order_type()))
&& $::instance_conf->get_transport_cost_reminder_article_number_id ) {
$self->{template_args}->{transport_cost_reminder_article} = SL::DB::Part->new(id => $::instance_conf->get_transport_cost_reminder_article_number_id)->load;
}
......
my ($self, %params) = @_;
my $deletion_allowed = (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type()))
|| (($self->type eq sales_order_type()) && $::instance_conf->get_sales_order_show_delete)
|| (($self->type eq purchase_order_type()) && $::instance_conf->get_purchase_order_show_delete);
|| (($self->type eq sales_order_type()) && $::instance_conf->get_sales_order_show_delete)
|| (($self->type eq sales_order_intake_type()) && $::instance_conf->get_sales_order_show_delete)
|| (($self->type eq purchase_order_type()) && $::instance_conf->get_purchase_order_show_delete);
my @req_trans_cost_art = qw(kivi.Order.check_transport_cost_article_presence) x!!$::instance_conf->get_transport_cost_reminder_article_number_id;
my @req_cusordnumber = qw(kivi.Order.check_cusordnumber_presence) x($self->type eq sales_order_type() && $::instance_conf->get_order_warn_no_cusordnumber);
my @req_cusordnumber = qw(kivi.Order.check_cusordnumber_presence) x(( any {$self->type eq $_} (sales_order_intake_type(), sales_order_type()) ) && $::instance_conf->get_order_warn_no_cusordnumber);
my $has_invoice_for_advance_payment;
if ($self->order->id && $self->type eq sales_order_type()) {
......
}
my $right_for = { map { $_ => $_.'_edit' } @{$self->valid_types} };
$right_for->{ sales_order_intake_type() } = 'sales_order_edit';
my $right = $right_for->{ $self->type };
$right ||= 'DOES_NOT_EXIST';
my $may_edit_create = $::auth->assert($right, 'may fail');
......
t8('Save and Quotation'),
call => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_quotation_type()), '#order_form' ],
checks => [ @req_trans_cost_art, @req_cusordnumber ],
only_if => (any { $self->type eq $_ } (sales_order_type(), request_quotation_type())),
only_if => (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), request_quotation_type())),
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
],
action => [
t8('Save and RFQ'),
call => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => request_quotation_type() } ],
only_if => (any { $self->type eq $_ } (sales_order_type(), sales_quotation_type(), purchase_order_type())),
only_if => (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), sales_quotation_type(), purchase_order_type())),
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
],
action => [
t8('Save and Sales Order'),
t8('Save and Sales Order Intake'),
call => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_order_intake_type()), '#order_form' ],
only_if => (any { $self->type eq $_ } (sales_quotation_type())),
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
],
action => [
t8('Save and Sales Order Confirmation'),
call => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_order_type()), '#order_form' ],
checks => [ @req_trans_cost_art ],
only_if => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type(), purchase_order_type())),
only_if => (any { $self->type eq $_ } (sales_quotation_type(), sales_order_intake_type(), request_quotation_type(), purchase_order_type())),
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
],
action => [
t8('Save and Purchase Order'),
call => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => purchase_order_type() } ],
checks => [ @req_trans_cost_art, @req_cusordnumber ],
only_if => (any { $self->type eq $_ } (sales_order_type(), request_quotation_type())),
only_if => (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), request_quotation_type())),
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
],
action => [
......
@req_trans_cost_art, @req_cusordnumber,
],
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
not_if => (any { $self->type eq $_ } (sales_order_intake_type())),
],
action => [
($has_invoice_for_advance_payment ? t8('Save and Further Invoice for Advance Payment') : t8('Save and Invoice for Advance Payment')),
......
return '' if none { lc($action)} qw(add edit);
# for locales:
# $::locale->text("Add Sales Order Intake");
# $::locale->text("Add Sales Order");
# $::locale->text("Add Purchase Order");
# $::locale->text("Add Quotation");
# $::locale->text("Add Request for Quotation");
# $::locale->text("Edit Sales Order Intake");
# $::locale->text("Edit Sales Order");
# $::locale->text("Edit Purchase Order");
# $::locale->text("Edit Quotation");
# $::locale->text("Edit Request for Quotation");
$action = ucfirst(lc($action));
return $self->type eq sales_order_type() ? $::locale->text("$action Sales Order")
: $self->type eq purchase_order_type() ? $::locale->text("$action Purchase Order")
: $self->type eq sales_quotation_type() ? $::locale->text("$action Quotation")
: $self->type eq request_quotation_type() ? $::locale->text("$action Request for Quotation")
return $self->type eq sales_order_intake_type() ? $::locale->text("$action Sales Order Intake")
: $self->type eq sales_order_type() ? $::locale->text("$action Sales Order")
: $self->type eq purchase_order_type() ? $::locale->text("$action Purchase Order")
: $self->type eq sales_quotation_type() ? $::locale->text("$action Quotation")
: $self->type eq request_quotation_type() ? $::locale->text("$action Request for Quotation")
: '';
}
......
return ($price_src, $discount_src);
}
sub sales_order_intake_type {
'sales_order_intake';
}
sub sales_order_type {
'sales_order';
}
......
}
sub nr_key {
return $_[0]->type eq sales_order_type() ? 'ordnumber'
: $_[0]->type eq purchase_order_type() ? 'ordnumber'
: $_[0]->type eq sales_quotation_type() ? 'quonumber'
: $_[0]->type eq request_quotation_type() ? 'quonumber'
return $_[0]->type eq sales_order_intake_type() ? 'ordnumber'
: $_[0]->type eq sales_order_type() ? 'ordnumber'
: $_[0]->type eq purchase_order_type() ? 'ordnumber'
: $_[0]->type eq sales_quotation_type() ? 'quonumber'
: $_[0]->type eq request_quotation_type() ? 'quonumber'
: '';
}
......
return $self->js->render();
}
my $text = $self->type eq sales_order_type() ? $::locale->text('The order has been saved')
: $self->type eq purchase_order_type() ? $::locale->text('The order has been saved')
: $self->type eq sales_quotation_type() ? $::locale->text('The quotation has been saved')
: $self->type eq request_quotation_type() ? $::locale->text('The rfq has been saved')
my $text = $self->type eq sales_order_intake_type() ? $::locale->text('The order intake has been saved')
: $self->type eq sales_order_type() ? $::locale->text('The order confirmation has been saved')
: $self->type eq purchase_order_type() ? $::locale->text('The order has been saved')
: $self->type eq sales_quotation_type() ? $::locale->text('The quotation has been saved')
: $self->type eq request_quotation_type() ? $::locale->text('The rfq has been saved')
: '';
flash_later('info', $text);
SL/DB/Order.pm
sub type {
my $self = shift;
return 'sales_order' if $self->customer_id && ! $self->quotation;
return 'purchase_order' if $self->vendor_id && ! $self->quotation;
return 'sales_quotation' if $self->customer_id && $self->quotation;
return 'request_quotation' if $self->vendor_id && $self->quotation;
return 'sales_order_intake' if $self->customer_id && $self->intake;
return 'sales_order' if $self->customer_id && ! $self->quotation;
return 'purchase_order' if $self->vendor_id && ! $self->quotation;
return 'sales_quotation' if $self->customer_id && $self->quotation;
return 'request_quotation' if $self->vendor_id && $self->quotation;
return;
}
js/kivi.Order.js
namespace('kivi.Order', function(ns) {
ns.check_cv = function() {
if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
if ($('#order_customer_id').val() === '') {
alert(kivi.t8('Please select a customer.'));
return false;
......
var vc;
var vc_id;
var title;
if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
vc = 'customer';
vc_id = $('#order_customer_id').val();
title = kivi.t8('Customer details');
......
ns.purchase_check_for_direct_delivery = function(params) {
const to_type = params.to_type;
if ($('#type').val() != 'sales_quotation' && $('#type').val() != 'sales_order') {
if ($('#type').val() != 'sales_quotation' && $('#type').val() != 'sales_order_intake' && $('#type').val() != 'sales_order') {
kivi.submit_ajax_form("controller.pl", '#order_form', {action: 'Order/save_and_order_workflow', to_type: to_type});
return;
}
......
var type = $('#type').val();
var number_info = '';
if ($('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order') {
if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order') {
number_info = $('#order_ordnumber').val();
} else if ($('#type').val() == 'sales_quotation' || $('#type').val() == 'request_quotation') {
number_info = $('#order_quonumber').val();
}
var name_info = '';
if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
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') {
name_info = $('#order_vendor_id_name').val();
......
});
$(function() {
if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
$('#order_customer_id').change(kivi.Order.reload_cv_dependent_selections);
} else {
$('#order_vendor_id').change(kivi.Order.reload_cv_dependent_selections);
menus/user/90-sales-order-intake.yaml
- parent: ar
id: ar_add_sales_order_intake_experimental
name: Add Sales Order Intake
icon: sales_order_add
order: 290
access: sales_order_edit & client/feature_experimental_order
params:
action: Order/add
type: sales_order_intake
- parent: ar
id: ar_add_sales_order_experimental
name: Add Sales Order Confirmation
templates/webpages/order/tabs/_item_input.html
</td>
[%- SET price = '' %]
[%- IF SELF.created_part %]
[%- SET price = LxERP.format_amount(((SELF.type == 'sales_quotation' || SELF.type == 'sales_order') ? SELF.created_part.sellprice : SELF.created_part.lastcost), -2) -%]
[%- SET price = LxERP.format_amount(((SELF.type == 'sales_quotation' || SELF.type == 'sales_order_intake' || SELF.type == 'sales_order') ? SELF.created_part.sellprice : SELF.created_part.lastcost), -2) -%]
[%- END %]
<td>[% L.input_tag('add_item.sellprice_as_number', price, size = 10, class="add_item_input numeric tooltipster-html") %]</td>
<td>[% L.input_tag('add_item.discount_as_percent', '', size = 5, class="add_item_input numeric tooltipster-html") %]</td>
templates/webpages/order/tabs/_price_sources_dialog.html
[% SET best_price = price_source.best_price %]
[% SET best_discount = price_source.best_discount %]
[% SET price_editable = 0 %]
[% IF (FORM.type == "sales_order" || FORM.type == "sales_quotation") %]
[% 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") %]
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" || SELF.type == "purchase_order") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
<td nowrap>
[%- L.div_tag(LxERP.format_amount(ITEM.shipped_qty, 2, 0) _ ' ' _ ITEM.unit, name="shipped_qty", class="numeric") %]
</td>
......
name = "price_chooser_button") %]
</td>
[% SET RIGHT_TO_EDIT_PRICES = 0 %]
[% IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") %]
[% 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") %]
templates/webpages/order/tabs/_second_row.html
<table>
<tr><td colspan="100%">
[%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
[%- IF (TYPE == "sales_order_intake" || TYPE == "sales_order" || TYPE == "purchase_order") %]
<b>[%- 'Serial No.' | $T8 %]</b>&nbsp;
[%- L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15 "data-validate"="trimmed_whitespaces") %]&nbsp;
[%- END %]
<b>[%- 'Project' | $T8 %]</b>&nbsp;
[% P.project.picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %]&nbsp;
[%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
[%- IF (TYPE == "sales_order_intake" || TYPE == "sales_order" || TYPE == "purchase_order") %]
<b>[%- 'Reqdate' | $T8 %]</b>&nbsp;
[% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %]&nbsp;
[%- END %]
......
<b>[%- 'Recurring billing' | $T8 %]</b>&nbsp;
[% L.select_tag("order.orderitems[].recurring_billing_mode", [[ 'always', LxERP.t8('always') ], [ 'once', LxERP.t8('once') ], [ 'never', LxERP.t8('never') ]], default=ITEM.recurring_billing_mode) %]&nbsp;
[%- END %]
[%- IF (TYPE == "sales_order" || TYPE == "sales_quotation") %]
[%- IF (TYPE == "sales_order_intake" || TYPE == "sales_order" || TYPE == "sales_quotation") %]
<b>[%- 'Ertrag' | $T8 %]</b>&nbsp;
<span name="linemargin">
<span[%- IF ITEM.marge_total < 0 -%] class="plus0"[%- END -%]>
templates/webpages/order/tabs/basic_data.html
</tr>
[% END %]
[%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
<tr>
<th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
<td>
......
</tr>
[%- END -%]
[%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
[%- SET quo_nr_txt = 'Quotation Number' -%]
[%- ELSE -%]
[%- SET quo_nr_txt = 'RFQ Number' -%]
......
<tr>
<th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
<td>
[%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
[% 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" || SELF.type == "purchase_order") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
<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" || SELF.type == "purchase_order") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
[%- SET transdate_txt = 'Order Date' -%]
[%- ELSIF SELF.type == "sales_quotation" -%]
[%- 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" || SELF.type == "purchase_order") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
[%- 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" || SELF.type == "purchase_order") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
<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>
......
</table>
</td>
[%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
[%- SET marge_class = (SELF.order.marge_total < 0) ? 'plus0' : '' -%]
<td>
<table>

Auch abrufbar als: Unified diff