[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%] [% SET style="width: 400px" %]
[% IF for_new %] [% END %]
[% LxERP.t8("Record type to create") %]: [% L.select_tag('quotation', [ [ 1, LxERP.t8('Sales quotation') ], [ 0, LxERP.t8('Sales Order') ] ], style=style, no_id=1) %]
[% LxERP.t8("Customer") %]: [% L.select_tag('customer_id', SELF.all_customers, default=SELF.requirement_spec.customer_id, title_key='name', style=style, no_id=1) %]
[% LxERP.t8("Assign the following article to all sections") %]: [% P.part.picker('quotations_and_orders_dummy', SELF.section_order_part.id, id='quotations_and_orders_order_id', style=style) %] [% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %]
[% FOREACH section = SELF.requirement_spec.sections_sorted %] [% L.hidden_tag("sections[+].id", section.id, no_id=1) %] [% END %]
[% LxERP.t8("Number") %] [% LxERP.t8("Title") %] [% LxERP.t8("Description") %] [% LxERP.t8("Article") %] [% LxERP.t8("Unit") %] [% LxERP.t8("Position type in quotation/order") %]
[% HTML.escape(section.fb_number) %] [% HTML.escape(section.title) %] [% HTML.escape(P.truncate(section.description_as_stripped_html)) %] [% P.part.picker('sections[].order_part_id', section.order_part_id, id='quotations_and_orders_sections_order_pard_id_' _ loop.count, style=style) %] [% HTML.escape(section.order_part.unit) %] [% IF section.order_part_id && section.order_part.unit_obj.is_time_based %] [% LxERP.t8("time and effort based position") %] [% ELSIF section.order_part_id %] [% LxERP.t8("flat-rate position") %] [% END %]

[% L.button_tag("kivi.requirement_spec.standard_quotation_order_ajax_call('" _ (for_new ? 'create' : 'save_assignment') _ "')", for_new ? LxERP.t8('Create') : LxERP.t8('Save')) %]