From ec440a833155673f0ca453a8ed3079dd78a54fab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 20 Sep 2021 19:08:58 +0200 Subject: [PATCH] DeliveryOrder: Template Anpassungen --- .../delivery_order/tabs/_item_input.html | 9 +- .../webpages/delivery_order/tabs/_row.html | 50 -------- .../delivery_order/tabs/_second_row.html | 21 ---- .../delivery_order/tabs/basic_data.html | 107 +++++------------- 4 files changed, 29 insertions(+), 158 deletions(-) diff --git a/templates/webpages/delivery_order/tabs/_item_input.html b/templates/webpages/delivery_order/tabs/_item_input.html index 255d4f89d..ab62bd925 100644 --- a/templates/webpages/delivery_order/tabs/_item_input.html +++ b/templates/webpages/delivery_order/tabs/_item_input.html @@ -9,15 +9,13 @@ [%- 'Part' | $T8 %] [%- 'Description' | $T8 %] [%- 'Qty' | $T8 %] - [%- 'Price' | $T8 %] - [%- 'Discount' | $T8 %] - [% SET type_options = [[ 'part', LxERP.t8('Part') ], [ 'assembly', LxERP.t8('Assembly') ], [ 'service', LxERP.t8('Service') ] ] %] + [% SET type_options = [[ 'part', LxERP.t8('Part') ], [ 'assembly', LxERP.t8('Assembly') ]] %] [%- IF INSTANCE_CONF.get_feature_experimental_assortment %] [%- type_options.push([ 'assortment', LxERP.t8('Assortment')]) %] [%- END %] @@ -26,7 +24,7 @@ [% L.input_tag('add_item.position', '', size = 5, class="add_item_input numeric") %] - [%- SET PARAM_KEY = SELF.cv == "customer" ? 'with_customer_partnumber' : 'with_makemodel' -%] + [%- SET PARAM_KEY = SELF.type_data.properties('is_customer') ? 'with_customer_partnumber' : 'with_makemodel' -%] [%- SET PARAM_VAL = SELF.search_cvpartnumber -%] [% P.part.picker('add_item.parts_id', SELF.created_part, style='width: 300px', class="add_item_input", fat_set_item=1, @@ -39,9 +37,6 @@ [% L.input_tag('add_item.qty_as_number', '', size = 5, class="add_item_input numeric") %] [% L.hidden_tag('add_item.unit', SELF.created_part.unit, class="add_item_input") %] - [%- SET price = LxERP.format_amount(((SELF.type == 'sales_quotation' || SELF.type == 'sales_order') ? SELF.created_part.sellprice : SELF.created_part.lastcost), -2) -%] - [% L.input_tag('add_item.sellprice_as_number', price, size = 10, class="add_item_input numeric") %] - [% L.input_tag('add_item.discount_as_percent', '', size = 5, class="add_item_input numeric") %] [% L.button_tag('kivi.DeliveryOrder.add_item()', LxERP.t8('Add part')) %] diff --git a/templates/webpages/delivery_order/tabs/_row.html b/templates/webpages/delivery_order/tabs/_row.html index c93d18c6c..be552e71e 100644 --- a/templates/webpages/delivery_order/tabs/_row.html +++ b/templates/webpages/delivery_order/tabs/_row.html @@ -77,13 +77,6 @@ [%- L.hidden_tag("formula[+]", ITEM.part.formel) -%] [%- END -%] - - [%- L.select_tag("order.orderitems[].price_factor_id", - SELF.all_price_factors, - default = ITEM.price_factor_id, - title_key = 'description', - with_empty = 1) %] - [%- L.select_tag("order.orderitems[].unit", ITEM.part.available_units, @@ -92,49 +85,6 @@ value_key = 'name', class = 'unitselect') %] - [% SET RIGHT_TO_EDIT_PRICES = 0 %] - [% IF (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") %] - [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('purchase_edit_prices', 1) %] - [% END %] - - [%- SET EDIT_PRICE = (RIGHT_TO_EDIT_PRICES) %] -
- [%- L.input_tag("order.orderitems[].sellprice_as_number", - ITEM.sellprice_as_number, - size = 10, - disabled=(EDIT_PRICE? '' : 1), - class="reformat_number numeric") %] -
-
- [%- L.div_tag(ITEM.sellprice_as_number, name="sellprice_text", class="numeric") %] - [%- L.hidden_tag("order.orderitems[].sellprice_as_number", - ITEM.sellprice_as_number, - disabled=(EDIT_PRICE? 1 : '')) %] -
- - - [%- SET EDIT_DISCOUNT = (RIGHT_TO_EDIT_PRICES) %] -
- [%- L.input_tag("order.orderitems[].discount_as_percent", - ITEM.discount_as_percent, - size = 5, - disabled=(EDIT_DISCOUNT? '' : 1), - class="reformat_number numeric") %] -
-
- [%- L.div_tag(ITEM.discount_as_percent, name="discount_text", class="numeric") %] - [%- L.hidden_tag("order.orderitems[].discount_as_percent", - ITEM.discount_as_percent, - disabled=(EDIT_DISCOUNT? 1 : '')) %] -
- - - [%- L.div_tag(LxERP.format_amount(ITEM.linetotal, 2, 0), name="linetotal") %] - - diff --git a/templates/webpages/delivery_order/tabs/_second_row.html b/templates/webpages/delivery_order/tabs/_second_row.html index 8b4d83ad6..6b140ac9c 100644 --- a/templates/webpages/delivery_order/tabs/_second_row.html +++ b/templates/webpages/delivery_order/tabs/_second_row.html @@ -16,31 +16,10 @@ [%- 'Reqdate' | $T8 %]  [% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %]  [%- END %] - [%- 'Subtotal' | $T8 %]  - [% L.yes_no_tag("order.orderitems[].subtotal", ITEM.subtotal) %]  - [%- IF (TYPE == "sales_order" || TYPE == "sales_quotation") %] - [%- 'Ertrag' | $T8 %]  - - - [%- LxERP.format_amount(ITEM.marge_total, 2, 0) %]   - [%- LxERP.format_amount(ITEM.marge_percent, 2, 0) %]% - -   - [%- 'LP' | $T8 %]  - [%- LxERP.format_amount(ITEM.part.listprice, 2, 0) %]  - [%- 'EK' | $T8 %]  - [%- L.input_tag("order.orderitems[].lastcost_as_number", - ITEM.lastcost_as_number, - size = 5, - class="recalc reformat_number numeric") %]  - [%- END %] [%- 'On Hand' | $T8 %]  [%- ITEM.part.onhand_as_number -%] [%- ITEM.part.unit -%]   - [%- 'Optional' | $T8 %]  - [%- L.yes_no_tag("order.orderitems[].optional", ITEM.optional - class="recalc") %]  diff --git a/templates/webpages/delivery_order/tabs/basic_data.html b/templates/webpages/delivery_order/tabs/basic_data.html index 1f53f895d..15cc83af4 100644 --- a/templates/webpages/delivery_order/tabs/basic_data.html +++ b/templates/webpages/delivery_order/tabs/basic_data.html @@ -53,26 +53,6 @@ [%- PROCESS delivery_order/tabs/_business_info_row.html SELF=SELF %] - - [% 'Steuersatz' | $T8 %] - [% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', style='width: 300px', class='recalc') %] - - - [% SET currency_id = SELF.order.currency_id || INSTANCE_CONF.get_currency_id # use default currency for new order %] - - [% 'Currency' | $T8 %] - [% L.select_tag('order.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name') %] - - - [% 'Exchangerate' | $T8 %] - 1 [% SELF.order.currency.name %] = - [% L.input_tag('order.exchangerate_as_null_number', SELF.order.exchangerate_as_null_number, size="15", class="reformat_number_as_null_number numeric") %] - [% INSTANCE_CONF.default_currency %] - [% L.hidden_tag('old_currency_id', currency_id) %] - [% L.hidden_tag('old_exchangerate', SELF.order.exchangerate_as_null_number) %] - - - [%- IF SELF.all_languages.size %] [% 'Language' | $T8 %] @@ -120,10 +100,25 @@ [%- IF SELF.order.id %] - - [% L.yes_no_tag('order.delivered', SELF.order.delivered) %] - - [% L.yes_no_tag('order.closed', SELF.order.closed) %] + [%- IF SELF.order.delivered %] + [%- IF is_customer %] + [% 'transferred out' | $T8 %] + [%- ELSE %] + [% 'transferred in' | $T8 %] + [%- END %] + [%- ELSE %] + [%- IF is_customer %] + [% 'not transferred out yet' | $T8 %] + [%- ELSE %] + [% 'not transferred in yet' | $T8 %] + [%- END %] + [%- END %] + ; + [%- IF SEF.order.closed %] + [% 'Closed' | $T8 %] + [%- ELSE %] + [% 'Open' | $T8 %] + [%- END %] [%- END %] @@ -146,79 +141,35 @@ [% END %] - [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%] - [% 'Order Number' | $T8 %] - [% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.DeliveryOrder.set_number_in_title(this)') %] + [% 'Delivery Order Number' | $T8 %] + [% L.input_tag('order.donumber', SELF.order.donumber, size = 11, onchange='kivi.DeliveryOrder.set_number_in_title(this)') %] - [%- END -%] - [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%] - [%- SET quo_nr_txt = 'Quotation Number' -%] - [%- ELSE -%] - [%- SET quo_nr_txt = 'RFQ Number' -%] - [%- END -%] - [% quo_nr_txt | $T8 %] - [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%] - [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %] - [%- ELSE -%] - [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.DeliveryOrder.set_number_in_title(this)') %] - [%- END -%] + [% 'Order Number' | $T8 %] + [% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11) %] - [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%] - [% 'Customer Order Number' | $T8 %] + [% IF SELF.type_data.properties('is_customer') %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %] [% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %] - [%- END -%] - - [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%] - [%- SET transdate_txt = 'Order Date' -%] - [%- ELSIF SELF.type == "sales_quotation" -%] - [%- SET transdate_txt = 'Quotation Date' -%] - [%- ELSE -%] - [%- SET transdate_txt = 'RFQ Date' -%] - [%- END -%] - - [% transdate_txt | $T8 %] - [% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %] - - [% 'Tax point' | $T8 %] - [% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class="recalc") %] + [% 'Delivery Order Date' | $T8 %] + [% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %] - [%- IF (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 = '' -%] - [%- ELSE -%] - [%- SET reqdate_txt = 'Required by'; SET reqdate_class = 'recalc' -%] - [%- END -%] - [% reqdate_txt | $T8 %] + [% 'Reqdate' | $T8 %] [% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class=reqdate_class) %] - [%- IF SELF.type == "sales_quotation" -%] - - [% 'Order probability' | $T8 %] - [%- L.select_tag('order.order_probability', SELF.order_probabilities, title='title', default=SELF.order.order_probability) %]% - - - [% 'Expected billing date' | $T8 %] - [%- L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_as_date) %] - - [%- END %] - [% 'Insert Date' | $T8 %] [% SELF.order.itime_as_date %] - @@ -270,11 +221,7 @@ [%- 'Delivered' | $T8 %] [%- END -%] [%- 'Qty' | $T8 %] - [%- 'Price Factor' | $T8 %] [%- 'Unit' | $T8 %] - [%- 'Price' | $T8 %] - [%- 'Discount' | $T8 %] - [%- 'Extended' | $T8 %] -- 2.20.1