9ec6d13d25bd614908a4b093bd273a3e6762a735
[kivitendo-erp.git] / templates / webpages / requirement_spec_order / _assignment_form.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%]
2 [% SET style="width: 400px" %]
3
4 <form id="quotations_and_orders_form">
5  <table>
6   [% IF for_new %]
7   <tr>
8    <td>[% LxERP.t8("Record type to create") %]:</td>
9    <td>[% L.select_tag('quotation', [ [ 1, LxERP.t8('Sales quotation') ], [ 0, LxERP.t8('Sales Order') ] ], style=style, no_id=1) %]</td>
10   </tr>
11
12   <tr>
13    <td>[% LxERP.t8("Customer") %]:</td>
14    <td>[% L.select_tag('customer_id', SELF.all_customers, default=SELF.requirement_spec.customer_id, title_key='name', style=style, no_id=1) %]</td>
15   </tr>
16   [% END %]
17
18   <tr>
19    <td>[% LxERP.t8("Assign the following article to all sections") %]:</td>
20    <td data-unit="[% HTML.escape(SELF.section_order_part.unit) %]">
21     [% P.part.picker('quotations_and_orders_dummy', SELF.section_order_part.id, id='quotations_and_orders_order_id', style=style) %]
22     [% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %]
23    </td>
24   </tr>
25  </table>
26
27  <table style="width: 100%">
28   <thead>
29    <tr class="listheading">
30     <th>[% LxERP.t8("Number") %]</th>
31     <th>[% LxERP.t8("Title") %]</th>
32     <th>[% LxERP.t8("Description") %]</th>
33     <th>[% LxERP.t8("Article") %]</th>
34     <th>[% LxERP.t8("Unit") %]</th>
35     <th>[% LxERP.t8("Position type in quotation/order") %]</th>
36    </tr>
37   </thead>
38
39   <tbody>
40    [% FOREACH section = SELF.requirement_spec.sections_sorted %]
41    <tr class="listrow">
42     [% L.hidden_tag("sections[+].id", section.id, no_id=1) %]
43     <td>[% HTML.escape(section.fb_number) %]</td>
44     <td>[% HTML.escape(section.title) %]</td>
45     <td>[% HTML.escape(P.truncate(section.description_as_stripped_html)) %]</td>
46     <td>[% P.part.picker('sections[].order_part_id', section.order_part_id, id='quotations_and_orders_sections_order_pard_id_' _ loop.count, style=style) %]</td>
47     <td data-unit-column=1>[% HTML.escape(section.order_part.unit) %]</td>
48     <td data-position-type-column=1>
49      [% IF section.order_part_id && section.order_part.unit_obj.is_time_based %]
50       [% LxERP.t8("time and effort based position") %]
51      [% ELSIF section.order_part_id %]
52       [% LxERP.t8("flat-rate position") %]
53      [% END %]
54     </td>
55    </tr>
56    [% END %]
57   </tbody>
58  </table>
59
60  <p>
61   [% L.button_tag("kivi.requirement_spec.standard_quotation_order_ajax_call('" _ (for_new ? 'create' : 'save_assignment') _ "')", for_new ? LxERP.t8('Create') : LxERP.t8('Save')) %]
62  </p>
63 </form>