Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d7639a6c

Von Hans Peter Schlaepfer vor mehr als 5 Jahren hinzugefügt

  • ID d7639a6c65f6820d41e22d1b684a3bd86591bb5d
  • Vorgänger 9f3acf01
  • Nachfolger da7ea731

Neues kivitendo Design Aenderungen in templates/webpages/order/..

Unterschiede anzeigen:

templates/webpages/order/form.html
1
[%- USE T8 %]
2
[%- USE LxERP %]
3
[%- USE L %]
4
[%- USE HTML %]
5
<h1>[% FORM.title %] <span id='nr_in_title'>[%- SELF.order.number -%]</span></h1>
1
[% USE T8 %]
2
[% USE LxERP %]
3
[% USE L %]
4
[% USE HTML %]
5
<h1>[% FORM.title %] <span id='nr_in_title'>[% SELF.order.number %]</span></h1>
6 6

  
7 7
<div id="print_options" style="display:none">
8 8
  <form method="post" action="controller.pl" id="print_options_form">
9 9
    [% SELF.print_options %]
10 10
    <br>
11 11
    [% L.button_tag('kivi.Order.print()', LxERP.t8('Print')) %]
12
    <a href="#" onclick="$('#print_options').dialog('close');">[% LxERP.t8("Cancel") %]</a>
12
    <a href="#" onclick="$('#print_options').dialog('close');" class="button neutral">[% LxERP.t8("Cancel") %]</a>
13 13
  </form>
14 14
</div>
15 15

  
......
19 19
  [% L.hidden_tag('id',                   SELF.order.id) %]
20 20
  [% L.hidden_tag('converted_from_oe_id', SELF.converted_from_oe_id) %]
21 21

  
22
  [%- INCLUDE 'common/flash.html' %]
22
  [% INCLUDE 'common/flash.html' %]
23 23

  
24
  <div class="tabwidget" id="order_tabs">
25
    <ul>
26
      <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
27
[%- IF INSTANCE_CONF.get_webdav %]
28
      <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
29
[%- END %]
30
[%- IF SELF.order.id AND INSTANCE_CONF.get_doc_storage %]
31
      <li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(FORM.type) %]&object_id=[% HTML.url(SELF.order.id) %]">[% 'Documents' | $T8 %]</a></li>
32
      <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(FORM.type) %]&object_id=[% HTML.url(SELF.order.id) %]">[% 'Attachments' | $T8 %]</a></li>
33
[%- END %]
34
[%- IF SELF.order.id %]
35
      <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Order&object_id=[% HTML.url(SELF.order.id) %]">[% 'Linked Records' | $T8 %]</a></li>
36
[%- END %]
37
    </ul>
24
<div class="tabwidget" id="order_tabs">
38 25

  
39
    [% PROCESS "order/tabs/basic_data.html" %]
40
    [% PROCESS 'webdav/_list.html' %]
41
    <div id="ui-tabs-1">
42
      [%- LxERP.t8("Loading...") %]
43
    </div>
44
  </div>
26
<ul>
27
  <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
28
  [% IF INSTANCE_CONF.get_webdav %]
29
    <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
30
  [% END %]
31
  [% IF SELF.order.id AND INSTANCE_CONF.get_doc_storage %]
32
    <li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(FORM.type) %]&object_id=[% HTML.url(SELF.order.id) %]">[% 'Documents' | $T8 %]</a></li>
33
    <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(FORM.type) %]&object_id=[% HTML.url(SELF.order.id) %]">[% 'Attachments' | $T8 %]</a></li>
34
  [% END %]
35
  [% IF SELF.order.id %]
36
    <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Order&object_id=[% HTML.url(SELF.order.id) %]">[% 'Linked Records' | $T8 %]</a></li>
37
  [% END %]
38
</ul>
39

  
40
[% PROCESS "order/tabs/basic_data.html" %]
41
[% PROCESS 'webdav/_list.html' %]
42
<div id="ui-tabs-1">
43
  [% LxERP.t8("Loading...") %]
44
</div>
45

  
46
</div><!-- /.tabwidget -->
45 47
</form>
templates/webpages/order/tabs/_business_info_row.html
1
[%- USE T8 %][%- USE HTML %]
1
[% USE T8 %]
2
[% USE HTML %]
2 3

  
3
<tr id='business_info_row' [%- IF !SELF.order.customervendor.business_id %]style='display:none'[%- END %]>
4
  <th align="right">[%- IF SELF.cv == 'customer' -%]
5
                      [%- 'Customer type' | $T8 -%]
6
                    [%- ELSE -%]
7
                      [%- 'Vendor type' | $T8 -%]
8
                    [%- END -%]</th>
9
  <td>[% HTML.escape(SELF.order.customervendor.business.description) %]; [% 'Trade Discount' | $T8 %] [% SELF.order.customervendor.business.discount_as_percent %] %</td>
4
<tr id='business_info_row' [% IF !SELF.order.customervendor.business_id %]style='display:none'[% END %]>
5
  <th>
6
    [% IF SELF.cv == 'customer' %]
7
      [% 'Customer type' | $T8 %]
8
    [% ELSE %]
9
      [% 'Vendor type' | $T8 %]
10
    [% END %]
11
  </th>
12
  <td><span class="plain-data wi-lightwide">[% HTML.escape(SELF.order.customervendor.business.description) %] ([% 'Trade Discount' | $T8 %] [% SELF.order.customervendor.business.discount_as_percent %]%)</span></td>
10 13
</tr>
templates/webpages/order/tabs/_item_input.html
1
[%- USE T8 %][%- USE HTML %][%- USE LxERP %][%- USE L %][%- USE P %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5
[% USE P %]
2 6

  
3
 <div>
4
  <table id="input_row_table_id">
5
    <thead>
6
      <tr class="listheading">
7
        <th class="listheading" nowrap >[%- 'Part'         | $T8 %] </th>
8
        <th class="listheading" nowrap >[%- 'Description'  | $T8 %] </th>
9
        <th class="listheading" nowrap width="5" >[%- 'Qty'          | $T8 %] </th>
10
        <th class="listheading" nowrap width="15">[%- 'Price'        | $T8 %] </th>
11
        <th class="listheading" nowrap width="5" >[%- 'Discount'     | $T8 %] </th>
12
        <th></th>
13
      </tr>
14
    </thead>
7
<div class="wrapper">
8
<div class="input-panel control-panel">
9
  <table id="input_row_table_id" class="tbl-plain condensed">
10
    <caption>[% 'Add Parts here!' | $T8 %]</caption>
15 11
    <tbody>
16
      <tr valign="top" class="listrow">
17
        <td>[% P.part.picker('add_item.parts_id', '', fat_set_item=1, style='width: 300px', class="add_item_input") %]</td>
18
        <td>[% L.input_tag('add_item.description', '', class="add_item_input") %]</td>
12
      <tr>
13
        <td>
14
          <span class="label above">[% 'Part' | $T8 %] </span>
15
          [% P.part.picker('add_item.parts_id', '', fat_set_item=1, class="add_item_input wi-normal") %]
16
        </td>
19 17
        <td>
20
          [% L.input_tag('add_item.qty_as_number', '', size = 5, class="add_item_input numeric") %]
18
          <span class="label above">[% 'Description' | $T8 %] </span>
19
          [% L.input_tag('add_item.description', '', class="add_item_input wi-normal") %]
20
        </td>
21
        <td>
22
          <span class="label above">[% 'Qty' | $T8 %]</span>
23
          [% L.input_tag('add_item.qty_as_number', '', class="add_item_input numeric wi-verysmall") %]
21 24
          [% L.hidden_tag('add_item.unit', '', class="add_item_input") %]
22 25
        </td>
23
        <td>[% L.input_tag('add_item.sellprice_as_number', '', size = 10, class="add_item_input numeric") %]</td>
24
        <td>[% L.input_tag('add_item.discount_as_percent', '', size = 5, class="add_item_input numeric") %]</td>
25
        <td>[% L.button_tag('kivi.Order.add_item()', LxERP.t8('Add part')) %]</td>
26
        <td>
27
          <span class="label above">[% 'Price' | $T8 %]</span>
28
          [% L.input_tag('add_item.sellprice_as_number', '', class="add_item_input numeric wi-verysmall") %]
29
        </td>
30
        <td>
31
          <span class="label above">[% 'Discount' | $T8 %]</span>
32
          [% L.input_tag('add_item.discount_as_percent', '', class="add_item_input numeric wi-smallest") %]
33
        </td>
34
        <td style="vertical-align:bottom;">[% L.button_tag('kivi.Order.add_item()', LxERP.t8('Add part'), style='margin:0;') %]</td>
26 35
      </tr>
27 36
    </tbody>
28 37
  </table>
29
 </div>
38
  <div style="clear:both">[% L.button_tag('kivi.Order.show_multi_items_dialog()', LxERP.t8('Add multiple items'), class='neutral') %]</div>
39

  
40
</div><!-- /.entry-panel -->
41
</div><!-- /.wrapper -->
42

  
templates/webpages/order/tabs/_multi_items_dialog.html
1
[%- USE T8 %][%- USE HTML %][%- USE L %][%- USE LxERP %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE L %]
4
[% USE LxERP %]
2 5

  
3 6
<form method="post" id="multi_items_form" method="POST">
4 7

  
5
<table id='multi_items_filter_table'>
6
  <tr>
7
    <th>[%- LxERP.t8("Description") %]/[%- LxERP.t8("Partnumber") %]:</th>
8
    <td>[%- L.input_tag('multi_items.filter.all:substr:multi::ilike', '') %]</td>
9
    <th>[%- LxERP.t8("Partsgroup") %]</th>
10
    <td>[%- L.select_tag('multi_items.filter.partsgroup_id', all_partsgroups, title_key='displayable_name', value_key='id', with_empty=1) %]</td>
11
  <tr>
12
</table>
8
<div class="select-item control-panel">
9
  <table id='multi_items_filter_table' class="tbl-plain">
10
    <tr>
11
      <th>
12
        <span class="label above">[% LxERP.t8("Description") %]/[% LxERP.t8("Partnumber") %]:</span><br>
13
        [% L.input_tag('multi_items.filter.all:substr:multi::ilike', '', class='wi-mediumsmall') %]
14
      </th>
15
      <th>
16
        <span class="label above">[% LxERP.t8("Partsgroup") %]:</span><br>
17
        [% L.select_tag('multi_items.filter.partsgroup_id', all_partsgroups, title_key='displayable_name', value_key='id', with_empty=1, class='wi-mediumsmall') %]
18
      </th>
19
    <tr>
20
  </table>
21
</div>
13 22

  
14
[% L.button_tag('kivi.Order.multi_items_dialog_update_result()', LxERP.t8('Filter')) %]
15
[% L.button_tag('$("#multi_items_form").resetForm()', LxERP.t8('Reset')) %]
23
<div class="buttons">
24
  [% L.button_tag('kivi.Order.multi_items_dialog_update_result()', LxERP.t8('Filter'), class='neutral') %]
25
  [% L.button_tag('$("#multi_items_form").resetForm()', LxERP.t8('Reset'), class='neutral') %]
26
</div>
16 27

  
17
<hr>
18
<div id='multi_items_result'></div>
19
<hr>
20

  
21
[% L.button_tag('kivi.Order.add_multi_items()', LxERP.t8('Continue'), id='multi_items_dialog_continue_button') %]
22
<a href="#" onclick="kivi.Order.close_multi_items_dialog();">[%- LxERP.t8("Cancel") %]</a>
28
<div id='multi_items_result' class="wrapper"></div>
23 29

  
30
<div class="buttons">
31
  [% L.button_tag('kivi.Order.add_multi_items()', LxERP.t8('Continue'), id='multi_items_dialog_continue_button', class="button") %]
32
  <a href="#" onclick="kivi.Order.close_multi_items_dialog();" class="button neutral">[% LxERP.t8("Cancel") %]</a>
33
</div>
24 34

  
25 35
</form>
templates/webpages/order/tabs/_multi_items_result.html
1
[%- USE T8 %][%- USE HTML %][%- USE L %][%- USE LxERP %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE L %]
4
[% USE LxERP %]
2 5

  
3
<table width="100%">
6
<table class="tbl-list wi-moderate">
7
  <thead>
4 8
    <tr>
5
      <td>[% 'for all' | $T8 %]
6
      <td>[% L.input_tag("multi_items.all_qty", '', size = 5, class='numeric') %]</td>
9
      <th>[% 'for all' | $T8 %]</th>
10
      <th>[% L.input_tag("multi_items.all_qty", '', size = 5, class='numeric') %]</td>
11
      <th></th>
12
      <th>[% 'Article No.' | $T8 %]</th>
13
      <th>[% 'Article Name' | $T8 %]</th>
7 14
    </tr>
8
    <tr>
9
      <td colspan="5"><hr></td>
10
    </tr>
11
  [%- FOREACH item = multi_items %]
12
    <tr>
13
      <td></td>
14
      <td>
15
        [% L.hidden_tag("add_multi_items[+].parts_id", item.id) %]
16
        [% L.input_tag("add_multi_items[].qty_as_number", '', size = 5,
17
                       class = 'multi_items_qty numeric', onclick = 'kivi.Order.set_input_to_one(this)') %]
18
      </td>
19
      <td>[% HTML.escape(item.unit) %]</td>
20
      <td>[% HTML.escape(item.partnumber) %]</td>
21
      <td>[% HTML.escape(item.description) %]</td>
22
    </tr>
23
  [%- END %]
15
  </thead>
16
  <tbody>
17
    [% FOREACH item = multi_items %]
18
      <tr>
19
        <td></td>
20
        <td>
21
          [% L.hidden_tag("add_multi_items[+].parts_id", item.id) %]
22
          [% L.input_tag("add_multi_items[].qty_as_number", '', class = 'multi_items_qty numeric wi-verysmall', onclick = 'kivi.Order.set_input_to_one(this)') %]
23
        </td>
24
        <td>[% HTML.escape(item.unit) %]</td>
25
        <td>[% HTML.escape(item.partnumber) %]</td>
26
        <td>[% HTML.escape(item.description) %]</td>
27
      </tr>
28
    [% END %]
29
  </tbody>
24 30
</table>
31

  
32
<script type='text/javascript'>
33
  function set_qty_to_one(clicked) {
34
    if ($(clicked).val() == '') {
35
      $(clicked).val('[% LxERP.format_amount(1.00, -2) %]');
36
    }
37
    $(clicked).select();
38
  }
39

  
40
  $('#multi_items_all_qty').change(function(event){
41
    $('.multi_items_qty').val($(event.target).val());
42
  });
43
</script>
templates/webpages/order/tabs/_price_sources_dialog.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE L %]
4
[%- USE LxERP %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE L %]
4
[% USE LxERP %]
5 5
[% SET best_price = price_source.best_price %]
6 6
[% SET best_discount = price_source.best_discount %]
7 7
[% SET price_editable = AUTH.assert('edit_prices', 1) %]
8
  <h2>[% 'Prices' | $T8 %]</h2>
9 8

  
10
  <table>
11
   <tr class='listheading'>
12
    <th></th>
13
    <th>[% 'Price Source' | $T8 %]</th>
14
    <th>[% 'Price' | $T8 %]</th>
15
    <th>[% 'Best Price' | $T8 %]</th>
16
    <th>[% 'Details' | $T8 %]</th>
17
   </tr>
18
   <tr class='listrow'>
19
[%- IF price_source.record_item.active_price_source %]
20
    <td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
21
[%- ELSE %]
22
    <td><b>[% 'Selected' | $T8 %]</b></td>
23
[%- END %]
24
    <td>[% 'None (PriceSource)' | $T8 %]</td>
25
    <td>-</td>
26
    <td></td>
27
    <td></td>
28
   </tr>
29
   [%- FOREACH price IN price_source.available_prices %]
30
    <tr class='listrow'>
31
[%- IF price_source.record_item.active_price_source != price.source %]
32
     <td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
33
[%- ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %]
34
     <td>[% L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', LxERP.t8('Update Price')) %]</td>
35
[%- ELSE %]
36
    <td><b>[% 'Selected' | $T8 %]</b></td>
37
[% END %]
38
     <td>[% price.source_description | html %]</td>
39
     <td>[% price.price_as_number %]</td>
40
[% IF price.source == best_price.source %]
41
     <td align='center'>&#x2022;</td>
42
[% ELSE %]
43
     <td></td>
44
[% END %]
45
     <td>[% price.description | html %]</td>
9
<h2>[% 'Prices' | $T8 %]</h2>
10

  
11

  
12
<table class="tbl-list">
13
  <thead>
14
    <tr>
15
      <th></th>
16
      <th>[% 'Price Source' | $T8 %]</th>
17
      <th>[% 'Price' | $T8 %]</th>
18
      <th>[% 'Best Price' | $T8 %]</th>
19
      <th>[% 'Details' | $T8 %]</th>
20
    </tr>
21
  </thead>
22
  <tbody>
23
    <tr>
24
      [% IF price_source.record_item.active_price_source %]
25
        <td><!-- PENDENT: a.buttons komplett ueberpruefen und L.button_tag() deaktivieren oder loeschen (3 Stueck hier, siehe weiter unten) -->
26
        <a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '', '[% LxERP.t8('None (PriceSource)') %]' , '', [% price_editable %])">[% LxERP.t8('Select') %] </a>
27
        [% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]
28
        </td>
29
      [% ELSE %]
30
        <td><b>[% 'Selected' | $T8 %]</b></td>
31
      [% END %]
32
      <td>[% 'None (PriceSource)' | $T8 %]</td>
33
      <td>-</td>
34
      <td></td>
35
      <td></td>
46 36
    </tr>
47
   [%- END %]
48
  </table>
37
    [% FOREACH price IN price_source.available_prices %]
38
    <tr>
39
      [% IF price_source.record_item.active_price_source != price.source %]
40
        <td>
41
          <a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '[% price.source %]', '[% price.source_description %]', '[% LxERP.format_amount(price.price, -2) %]', [% price_editable %])">[% LxERP.t8('Select') %] </a>
42
          [% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', ) %]
43
        </td>
44
      [% ELSIF price_source.record_item.sellprice * 1 != price.price * 1 %]
45
        <td>
46
          <a class="button neutral" onclick="kivi.Order.update_price_source('[% FORM.item_id %]', '[% price.source %]', '[% price.source_description %]', '[% LxERP.format_amount(price.price, -2) %]', [% price_editable %])">[% LxERP.t8('Update Price') %] </a>
47
          [% #L.button_tag('kivi.Order.update_price_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ LxERP.format_amount(price.price, -2) _ '\', ' _ price_editable _ ')', LxERP.t8('Update Price')) %]
48
        </td>
49
      [% ELSE %]
50
        <td><b>[% 'Selected' | $T8 %]</b></td>
51
      [% END %]
52
      <td>[% price.source_description | html %]</td>
53
      <td>[% price.price_as_number %]</td>
54
      [% IF price.source == best_price.source %]
55
        <td>&#x2022;</td>
56
      [% ELSE %]
57
        <td></td>
58
      [% END %]
59
      <td>[% price.description | html %]</td>
60
    </tr>
61
    [% END %]
62
  </tbody>
63
</table>
64

  
49 65

  
50
  <h2>[% 'Discounts' | $T8 %]</h2>
66
<h2>[% 'Discounts' | $T8 %]</h2>
51 67

  
52
  <table>
53
   <tr class='listheading'>
54
    <th></th>
55
    <th>[% 'Price Source' | $T8 %]</th>
56
    <th>[% 'Discount' | $T8 %]</th>
57
    <th>[% 'Best Discount' | $T8 %]</th>
58
    <th>[% 'Details' | $T8 %]</th>
59
   </tr>
60
   <tr class='listrow'>
61
[%- IF price_source.record_item.active_discount_source %]
62
    <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
63
[%- ELSE %]
64
    <td><b>[% 'Selected' | $T8 %]</b></td>
65
[%- END %]
66
    <td>[% 'None (PriceSource Discount)' | $T8 %]</td>
67
    <td>-</td>
68
    <td></td>
69
    <td></td>
70
   </tr>
71
   [%- FOREACH price IN price_source.available_discounts %]
72
    <tr class='listrow'>
73
[%- IF price_source.record_item.active_discount_source != price.source %]
74
     <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent _ '\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
75
[%- ELSIF price_source.record_item.discount * 1 != price.discount * 1 %]
76
     <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent  _ '\', ' _ price_editable _ ')', LxERP.t8('Update Discount')) %]</td>
77
[%- ELSE %]
78
    <td><b>[% 'Selected' | $T8 %]</b></td>
79
[% END %]
80
     <td>[% price.source_description | html %]</td>
81
     <td>[% price.discount_as_percent %] %</td>
82
[% IF price.source == best_discount.source %]
83
     <td align='center'>&#x2022;</td>
84
[% ELSE %]
85
     <td></td>
86
[% END %]
87
     <td>[% price.description | html %]</td>
68

  
69
<table class="tbl-list">
70
  <thead>
71
    <tr>
72
      <th></th>
73
      <th>[% 'Price Source' | $T8 %]</th>
74
      <th>[% 'Discount' | $T8 %]</th>
75
      <th>[% 'Best Discount' | $T8 %]</th>
76
      <th>[% 'Details' | $T8 %]</th>
77
    </tr>
78
  </thead>
79
  <tbody>
80
    <tr>
81
      [% IF price_source.record_item.active_discount_source %]
82
        <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'\', \'' _ LxERP.t8('None (PriceSource Discount)') _ '\', \'\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
83
      [% ELSE %]
84
        <td><b>[% 'Selected' | $T8 %]</b></td>
85
      [% END %]
86
      <td>[% 'None (PriceSource Discount)' | $T8 %]</td>
87
      <td>-</td>
88
      <td></td>
89
      <td></td>
88 90
    </tr>
89
   [%- END %]
90
  </table>
91
    [% FOREACH price IN price_source.available_discounts %]
92
    <tr >
93
      [% IF price_source.record_item.active_discount_source != price.source %]
94
        <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent _ '\', ' _ price_editable _ ')', LxERP.t8('Select')) %]</td>
95
      [% ELSIF price_source.record_item.discount * 1 != price.discount * 1 %]
96
        <td>[% L.button_tag('kivi.Order.update_discount_source(\'' _ FORM.item_id _ '\', \'' _ price.source _ '\', \'' _ price.source_description _ '\', \'' _ price.discount_as_percent _ '\', ' _ price_editable _ ')', LxERP.t8('Update Discount')) %]</td>
97
      [% ELSE %]
98
        <td><b>[% 'Selected' | $T8 %]</b></td>
99
      [% END %]
100
      <td>[% price.source_description | html %]</td>
101
      <td>[% price.discount_as_percent %] %</td>
102
      [% IF price.source == best_discount.source %]
103
        <td>&#x2022;</td>
104
      [% ELSE %]
105
        <td></td>
106
      [% END %]
107
      <td>[% price.description | html %]</td>
108
    </tr>
109
    [% END %]
110
  </tbody>
111
</table>
112

  
templates/webpages/order/tabs/_row.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE LxERP %]
4
[%- USE L %]
5
[%- USE P %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5
[% USE P %]
6 6

  
7
<tbody class="row_entry listrow"[%- IF MYCONFIG.show_form_details -%] data-expanded="1"[%- END -%]>
7
<tbody class="row_entry listrow"[% IF MYCONFIG.show_form_details %] data-expanded="1"[% END %]>
8 8
  <tr>
9
    <td align="center">
10
      [%- IF MYCONFIG.show_form_details %]
9
    <td>
10
      [% IF MYCONFIG.show_form_details %]
11 11
        [% L.img_tag(src="image/collapse.svg",
12 12
                     alt=LxERP.t8('Hide details'), title=LxERP.t8('Hide details'), class="expand") %]
13
      [%- ELSE %]
13
      [% ELSE %]
14 14
        [% L.img_tag(src="image/expand.svg",
15 15
                     alt=LxERP.t8('Show details'), title=LxERP.t8('Show details'), class="expand") %]
16
      [%- END %]
16
      [% END %]
17 17
      [% L.hidden_tag("orderitem_ids[+]", ID) %]
18 18
      [% L.hidden_tag("converted_from_orderitems_ids[+]", ITEM.converted_from_orderitems_id) %]
19 19
      [% L.hidden_tag("order.orderitems[+].id", ITEM.id, id='item_' _ ID) %]
20 20
      [% L.hidden_tag("order.orderitems[].parts_id", ITEM.parts_id) %]
21 21
    </td>
22
    <td class="center"><div name="position">[% HTML.escape(ITEM.position) %]</div></td>
23
    <td><img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]" class="dragdrop"></td>
22 24
    <td>
23
      <div name="position" class="numeric">
24
        [% HTML.escape(ITEM.position) %]
25
      </div>
26
    </td>
27
    <td align="center">
28
      <img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop">
29
    </td>
30
    <td align="center">
31
      [%- L.button_tag("kivi.Order.delete_order_item_row(this)",
32
                       LxERP.t8("X"),
33
                       confirm=LxERP.t8("Are you sure?")) %]
34
    </td>
35
    <td>
36
      <div name="partnumber">[% HTML.escape(ITEM.part.partnumber) %]</div>
37
    </td>
38
    <td>
39
      <div name="partclassification">[% ITEM.part.presenter.typeclass_abbreviation %]</div>
40
    </td>
25
      [% # L.button_tag("kivi.Order.delete_order_item_row(this)",
26
      #                "", #LxERP.t8("X"),
27
      #                confirm=LxERP.t8("Are you sure?"),
28
      #                class='button-image delete') %]
29
      [%  L.button_tag("kivi.Order.delete_order_item_row(this)",
30
                      " ", #LxERP.t8("X"),
31
                      confirm=LxERP.t8("Are you sure?"),
32
                      class='button_image delete',
33
                      tag='button') %]
34
      [% #L.link_tag( 'javascript:kivi.Order.delete_order_item_row(this)', '<img src="image/cross.png" alt="Delete">', confirm=>LxERP.t8('Are you sure?'), class=>'button-image delete' ) %]
35
      [% #L.link_tag( "http://google.com", "Go to Google", class=>"button-image delete", target=>"_blank" ) %]X
36
    </td>
37
    <td><div name="partnumber">[% HTML.escape(ITEM.part.partnumber) %]</div></td>
38
    <td><div name="partclassification">[% ITEM.part.presenter.typeclass_abbreviation %]</div></td>
41 39
    <td>
42 40
      [% L.areainput_tag("order.orderitems[].description",
43 41
                     ITEM.description,
44 42
                     size='40',
45
                     style='width: 300px') %]
46
      [%- IF ITEM.render_longdescription -%]
47
        [%- L.hidden_tag("order.orderitems[].longdescription", ITEM.longdescription) %]
48
      [%- END -%]
49
      [%- L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L")) %]
43
                     class='wi-lightwide') %]
44
      [% IF ITEM.render_longdescription %]
45
        [% L.hidden_tag("order.orderitems[].longdescription", ITEM.longdescription) %]
46
      [% END %]
47
      [% L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L"), class="wi-tiny neutral") %]
50 48
    </td>
51 49
    [%- IF (TYPE == "sales_order" || TYPE == "purchase_order") -%]
52
    <td nowrap>
50
    <td>
53 51
      [%- L.div_tag(LxERP.format_amount(ITEM.shipped_qty, 2, 0) _ ' ' _ ITEM.unit, name="shipped_qty", class="numeric") %]
54 52
    </td>
55 53
    [%- END -%]
56
    <td nowrap>
57
      [%- L.input_tag("order.orderitems[].qty_as_number",
54
    <td>
55
      [% L.input_tag("order.orderitems[].qty_as_number",
58 56
                      ITEM.qty_as_number,
59 57
                      size = 5,
60
                      class="recalc reformat_number numeric") %]
61
      [%- IF ITEM.part.formel -%]
62
        [%- L.button_tag("kivi.Order.show_calculate_qty_dialog(this)", LxERP.t8("*/")) %]
63
        [%- L.hidden_tag("formula[+]", ITEM.part.formel) -%]
64
      [%- END -%]
58
                      class="recalc reformat_number numeric wi-verysmall") %]
59
      [% IF ITEM.part.formel %]
60
        [% L.button_tag("kivi.Order.show_calculate_qty_dialog(this)", LxERP.t8("*/"), class="neutral") %]
61
        [% L.hidden_tag("formula[+]", ITEM.part.formel) %]
62
      [% END %]
65 63
    </td>
66 64
    <td>
67
      [%- L.select_tag("order.orderitems[].price_factor_id",
65
      [% L.select_tag("order.orderitems[].price_factor_id",
68 66
                       ALL_PRICE_FACTORS,
69 67
                       default = ITEM.price_factor_id,
70 68
                       title_key = 'description',
71 69
                       with_empty = 1,
72
                       class="recalc") %]
70
                       class="recalc wi-mediumsmall") %]
73 71
    </td>
74
    <td nowrap>
75
      [%- L.select_tag("order.orderitems[].unit",
72
    <td>
73
      [% L.select_tag("order.orderitems[].unit",
76 74
                      ITEM.part.available_units,
77 75
                      default = ITEM.unit,
78 76
                      title_key = 'name',
79 77
                      value_key = 'name',
80
                      class = 'unitselect') %]
78
                      class = 'unitselect wi-mediumsmall') %]
81 79
    </td>
82 80
    <td>
83
      [%- L.button_tag("kivi.Order.price_chooser_item_row(this)",
81
      [% L.button_tag("kivi.Order.price_chooser_item_row(this)",
84 82
                       ITEM.active_price_source.source_description _ ' | ' _ ITEM.active_discount_source.source_description,
85
                       name = "price_chooser_button") %]
83
                       name = "price_chooser_button",
84
                       class = "neutral") %]
86 85
    </td>
87 86
    <td>
88
      [%- L.hidden_tag("order.orderitems[].active_price_source", ITEM.active_price_source.source) %]
89
      [%- SET EDIT_PRICE = (AUTH.assert('edit_prices', 1) && ITEM.active_price_source.source == '') %]
90
      <div name="editable_price" [%- IF !EDIT_PRICE %]style="display:none"[%- END %] class="numeric">
91
        [%- L.input_tag("order.orderitems[].sellprice_as_number",
87
      [% L.hidden_tag("order.orderitems[].active_price_source", ITEM.active_price_source.source) %]
88
      [% SET EDIT_PRICE = (AUTH.assert('edit_prices', 1) && ITEM.active_price_source.source == '') %]
89
      <div name="editable_price" [% IF !EDIT_PRICE %]style="display:none"[% END %] class="numeric">
90
        [% L.input_tag("order.orderitems[].sellprice_as_number",
92 91
                        ITEM.sellprice_as_number,
93 92
                        size = 10,
94 93
                        disabled=(EDIT_PRICE? '' : 1),
95
                        class="recalc reformat_number numeric") %]
94
                        class="recalc reformat_number numeric wi-verysmall") %]
96 95
      </div>
97
      <div name="not_editable_price" [%- IF EDIT_PRICE %]style="display:none"[%- END %]>
98
        [%- L.div_tag(ITEM.sellprice_as_number, name="sellprice_text", class="numeric") %]
99
        [%- L.hidden_tag("order.orderitems[].sellprice_as_number",
96
      <div name="not_editable_price" [% IF EDIT_PRICE %]style="display:none"[% END %]>
97
        [% L.div_tag(ITEM.sellprice_as_number, name="sellprice_text", class="numeric plain-data") %]  <!-- PENDENT: plain-data in DIV noch dem CSS hinzufuegen -->
98
        [% L.hidden_tag("order.orderitems[].sellprice_as_number",
100 99
                         ITEM.sellprice_as_number,
100

  
101 101
                         disabled=(EDIT_PRICE? 1 : '')) %]
102 102
      </div>
103 103
    </td>
104 104
    <td>
105
      [%- L.hidden_tag("order.orderitems[].active_discount_source", ITEM.active_discount_source.source) %]
106
      [%- SET EDIT_DISCOUNT = (AUTH.assert('edit_prices', 1) && ITEM.active_discount_source.source == '') %]
107
      <div name="editable_discount" [%- IF !EDIT_DISCOUNT %]style="display:none"[%- END %] class="numeric">
108
        [%- L.input_tag("order.orderitems[].discount_as_percent",
105
      [% L.hidden_tag("order.orderitems[].active_discount_source", ITEM.active_discount_source.source) %]
106
      [% SET EDIT_DISCOUNT = (AUTH.assert('edit_prices', 1) && ITEM.active_discount_source.source == '') %]
107
      <div name="editable_discount" [% IF !EDIT_DISCOUNT %]style="display:none"[% END %] class="numeric">
108
        [% L.input_tag("order.orderitems[].discount_as_percent",
109 109
                        ITEM.discount_as_percent,
110 110
                        size = 5,
111 111
                        disabled=(EDIT_DISCOUNT? '' : 1),
112 112
                        class="recalc reformat_number numeric") %]
113 113
      </div>
114
      <div name="not_editable_discount" [%- IF EDIT_DISCOUNT %]style="display:none"[%- END %]>
115
        [%- L.div_tag(ITEM.discount_as_percent, name="discount_text", class="numeric") %]
116
        [%- L.hidden_tag("order.orderitems[].discount_as_percent",
114
      <div name="not_editable_discount" [% IF EDIT_DISCOUNT %]style="display:none"[% END %]>
115
        [% L.div_tag(ITEM.discount_as_percent, name="discount_text", class="numeric") %]
116
        [% L.hidden_tag("order.orderitems[].discount_as_percent",
117 117
                         ITEM.discount_as_percent,
118 118
                         disabled=(EDIT_DISCOUNT? 1 : '')) %]
119 119
      </div>
120 120
    </td>
121
    <td align="right">
122
      [%- L.div_tag(LxERP.format_amount(ITEM.linetotal, 2, 0), name="linetotal") %]
123
    </td>
124

  
121
    <td>[% L.div_tag(LxERP.format_amount(ITEM.linetotal, 2, 0), name="linetotal") %]</td>
125 122
  </tr>
126

  
127
  <tr [%- IF !MYCONFIG.show_form_details -%]style="display:none"[%- END -%]>
123
  <tr [% IF !MYCONFIG.show_form_details %]style="display:none"[% END %]>
128 124
    <td colspan="100%">
129
      [%- IF MYCONFIG.show_form_details || ITEM.render_second_row %]
125
      [% IF MYCONFIG.show_form_details || ITEM.render_second_row %]
130 126
        <div name="second_row" data-loaded="1">
131
          [%- PROCESS order/tabs/_second_row.html ITEM=ITEM TYPE=TYPE %]
127
          [% PROCESS order/tabs/_second_row.html ITEM=ITEM TYPE=TYPE %]
132 128
        </div>
133
      [%- ELSE %]
129
      [% ELSE %]
134 130
        <div name="second_row">
135
          [%- LxERP.t8("Loading...") %]
131
          [% LxERP.t8("Loading...") %]
136 132
        </div>
137
      [%- END %]
133
      [% END %]
138 134
    </td>
139 135
  </tr>
140

  
141 136
</tbody>
137

  
templates/webpages/order/tabs/_second_row.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE LxERP %]
4
[%- USE L %]
5
[%- USE P %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5
[% USE P %]
6 6

  
7 7
<table>
8
  <tr><td colspan="100%">
9
    [%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
10
      <b>[%- 'Serial No.' | $T8 %]</b>&nbsp;
11
      [%- L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15) %]&nbsp;
12
    [%- END %]
13
    <b>[%- 'Project' | $T8 %]</b>&nbsp;
14
    [% P.project.picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %]&nbsp;
15
    [%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
16
      <b>[%- 'Reqdate' | $T8 %]</b>&nbsp;
17
      [% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %]&nbsp;
18
    [%- END %]
19
    <b>[%- 'Subtotal' | $T8 %]</b>&nbsp;
20
    [% L.yes_no_tag("order.orderitems[].subtotal", ITEM.subtotal) %]&nbsp;
21
    [%- IF (TYPE == "sales_order" || TYPE == "sales_quotation") %]
22
      <b>[%- 'Ertrag' | $T8 %]</b>&nbsp;
23
        <span name="linemargin">
24
          <span[%- IF ITEM.marge_total < 0 -%] class="plus0"[%- END -%]>
25
            [%- LxERP.format_amount(ITEM.marge_total, 2, 0) %]&nbsp;&nbsp;
26
            [%- LxERP.format_amount(ITEM.marge_percent, 2, 0) %]%
27
          </span>
28
       </span>&nbsp;
29
      <b>[%- 'LP' | $T8 %]</b>&nbsp;
30
      [%- LxERP.format_amount(ITEM.part.listprice, 2, 0) %]&nbsp;
31
      <b>[%- 'EK' | $T8 %]</b>&nbsp;
32
        [%- L.input_tag("order.orderitems[].lastcost_as_number",
33
                        ITEM.lastcost_as_number,
34
                        size = 5,
35
                        class="recalc reformat_number numeric") %]&nbsp;
36
    [%- END %]
37
    <b>[%- 'On Hand' | $T8 %]</b>&nbsp;
38
      <span[%- IF ITEM.part.onhand < ITEM.part.rop -%] class="plus0"[%- END -%]>
39
        [%- LxERP.format_amount(ITEM.part.onhand_as_number, 2, 0) -%]&nbsp;[%- ITEM.part.unit -%]
40
      </span>&nbsp;
41
  </td></tr>
42

  
43 8
  <tr>
44
    [%- SET n = 0 %]
45
    [%- FOREACH var = ITEM.cvars_by_config %]
46
    [%- NEXT UNLESS (var.config.processed_flags.editable && ITEM.part.cvar_by_name(var.config.name).is_valid) %]
47
    [%- SET n = n + 1 %]
48
    <th>
49
      [% var.config.description %]
50
    </th>
51 9
    <td>
52
      [% L.hidden_tag('order.orderitems[].custom_variables[+].config_id', var.config.id) %]
53
      [% L.hidden_tag('order.orderitems[].custom_variables[].id', var.id) %]
54
      [% L.hidden_tag('order.orderitems[].custom_variables[].sub_module', var.sub_module) %]
55
      [% INCLUDE 'common/render_cvar_input.html' var_name='order.orderitems[].custom_variables[].unparsed_value' %]
10
      [% IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
11
        <b>[% 'Serial No.' | $T8 %]</b> [% L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15) %]
12
      [% END %]
13
      <b>[% 'Project' | $T8 %]</b> [% P.project.picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %]
14
      [% IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
15
        <b>[% 'Reqdate' | $T8 %]</b> [% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %] 
16
      [% END %]
17
      <b>[% 'Subtotal' | $T8 %]</b> [% L.yes_no_tag("order.orderitems[].subtotal", ITEM.subtotal) %] 
18
      [% IF (TYPE == "sales_order" || TYPE == "sales_quotation") %]
19
        <b>[% 'Ertrag' | $T8 %]</b> 
20
          <span name="linemargin">
21
            <span[% IF ITEM.marge_total < 0 %] class="plus0"[% END %]>
22
              [% LxERP.format_amount(ITEM.marge_total, 2, 0) %]  
23
              [% LxERP.format_amount(ITEM.marge_percent, 2, 0) %]%
24
            </span>
25
         </span> 
26
        <b> [% 'LP' | $T8 %]</b> 
27
        [% LxERP.format_amount(ITEM.part.listprice, 2, 0) %] 
28
        <b>[% 'EK' | $T8 %]</b> 
29
          [% L.input_tag("order.orderitems[].lastcost_as_number",
30
                          ITEM.lastcost_as_number,
31
                          size = 5,
32
                          class="recalc reformat_number numeric") %] 
33
      [% END %]
34
      <b>[% 'On Hand' | $T8 %]</b> 
35
        <span[% IF ITEM.part.onhand < ITEM.part.rop %] class="plus0"[% END %]>
36
          [% LxERP.format_amount(ITEM.part.onhand_as_number, 2, 0) %] [% ITEM.part.unit %]
37
        </span> 
56 38
    </td>
57
    [%- IF (n % (MYCONFIG.form_cvars_nr_cols || 3)) == 0 %]
58

  
59
  </tr><tr>
60
    [%- END %]
61
    [%- END %]
39
  </tr>
40
  <tr>
41
    [% SET n = 0 %]
42
    [% FOREACH var = ITEM.cvars_by_config %]
43
      [% NEXT UNLESS (var.config.processed_flags.editable && ITEM.part.cvar_by_name(var.config.name).is_valid) %]
44
      [% SET n = n + 1 %]
45
      <td>
46
        [% L.hidden_tag('order.orderitems[].custom_variables[+].config_id', var.config.id) %]
47
        [% L.hidden_tag('order.orderitems[].custom_variables[].id', var.id) %]
48
        [% L.hidden_tag('order.orderitems[].custom_variables[].sub_module', var.sub_module) %]
49
        [% INCLUDE 'common/render_cvar_input.html' var_name='order.orderitems[].custom_variables[].unparsed_value' %]
50
      </td>
51
      [% IF (n % (MYCONFIG.form_cvars_nr_cols || 3)) == 0 %]
52
        </tr><tr>
53
      [% END %]
54
    [% END %]
62 55
  </tr>
63 56
</table>
templates/webpages/order/tabs/_tax_row.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE LxERP %]
4
[%- USE L %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5 5

  
6 6
<tr class="tax_row">
7
  <th align="right">[%- IF TAXINCLUDED %][%- 'Including' | $T8 %]&nbsp;[%- END %][%- TAX.tax.taxdescription %] [% TAX.tax.rate_as_percent %]%</th>
8
  <td align="right">[%- LxERP.format_amount(TAX.amount, 2, 0) %]</td>
7
  <td colspan="10"></td>
8
  <th colspan="3">[% IF TAXINCLUDED %][% 'Including' | $T8 %]&nbsp;[% END %][% TAX.tax.taxdescription %] [% TAX.tax.rate_as_percent %]%</th>
9
  <td class="numeric">[% LxERP.format_amount(TAX.amount, 2, 0) %]</td>
9 10
</tr>
10
[%- IF TAXINCLUDED %]
11
[% IF TAXINCLUDED %]
11 12
<tr class="tax_row">
12
  <th align="right">[%- 'Net amount' | $T8 %]</th>
13
  <td align="right">[%- LxERP.format_amount(TAX.netamount, 2, 0) %]</td>
13
  <td colspan="10"></td>
14
  <th colspan="3">[% 'Net amount' | $T8 %]</th>
15
  <td class="numeric">[% LxERP.format_amount(TAX.netamount, 2, 0) %]</td>
14 16
</tr>
15
[%- END%]
17
[% END%]
templates/webpages/order/tabs/basic_data.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE LxERP %]
4
[%- USE L %]
5
[%- USE P %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5
[% USE P %]
6 6

  
7
[%- INCLUDE 'generic/set_longdescription.html' %]
7
[% INCLUDE 'generic/set_longdescription.html' %]
8 8

  
9 9
<div id="ui-tabs-basic-data">
10
  <table width="100%">
11
    <tr valign="top">
12
      <td>
13
        <table width="100%">
14
          <tr>
15
            <th align="right">[%- SELF.cv == "customer" ? LxERP.t8('Customer') : LxERP.t8('Vendor') -%]</th>
16
            [% SET cv_id = SELF.cv _ '_id' %]
17
            <td>
18
              [% P.customer_vendor.picker("order.${SELF.cv}" _ '_id', SELF.order.$cv_id, type=SELF.cv, style='width: 300px') %]
19
              [% P.button_tag("kivi.Order.show_vc_details_dialog()", LxERP.t8("Details (one letter abbreviation)")) %]
20
            </td>
21
          </tr>
22

  
23
          <tr id='cp_row' [%- IF !SELF.order.${SELF.cv}.contacts.size %]style='display:none'[%- END %]>
24
            <th align="right">[% 'Contact Person' | $T8 %]</th>
25
            <td>[% L.select_tag('order.cp_id',
26
                                SELF.order.${SELF.cv}.contacts,
27
                                default=SELF.order.cp_id,
28
                                title_key='full_name_dep',
29
                                value_key='cp_id',
30
                                with_empty=1,
31
                                style='width: 300px') %]</td>
32
          </tr>
33

  
34
          <tr id='shipto_row' [%- IF !SELF.order.${SELF.cv}.shipto.size %]style='display:none'[%- END %]>
35
            <th align="right">[% 'Shipping Address' | $T8 %]</th>
36
            <td>[% L.select_tag('order.shipto_id',
37
                                SELF.order.${SELF.cv}.shipto,
38
                                default=SELF.order.shipto_id,
39
                                title_key='displayable_id',
40
                                value_key='shipto_id',
41
                                with_empty=1,
42
                                style='width: 300px') %]</td>
43
          </tr>
44

  
45
          [%- PROCESS order/tabs/_business_info_row.html SELF=SELF %]
46

  
47
          <tr>
48
            <th align="right">[% 'Steuersatz' | $T8 %]</th>
49
            <td>[% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', style='width: 300px', class='recalc') %]</td>
50
          </tr>
51

  
52
[%- IF SELF.all_departments.size %]
53
          <tr>
54
            <th align="right">[% 'Department' | $T8 %]</th>
55
            <td>
56
              [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, style='width:300px') %]
57
            </td>
58
          </tr>
59
[%- END %]
60

  
61
          <tr>
62
            <th align="right">[% 'Shipping Point' | $T8 %]</th>
63
            <td>[% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, style='width: 300px') %]</td>
64
          </tr>
65

  
66
          <tr>
67
            <th align="right">[% 'Ship via' | $T8 %]</th>
68
            <td>[% L.input_tag('order.shipvia', SELF.order.shipvia, style='width: 300px') %]</td>
69
          </tr>
70

  
71
          <tr>
72
            <th align="right">[% 'Transaction description' | $T8 %]</th>
73
            <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, style='width: 300px') %]</td>
74
          </tr>
75

  
76
          <tr>
77
            <th align="right">[% 'Project Number' | $T8 %]</th>
78
            <td>[% P.project.picker('order.globalproject_id', SELF.order.globalproject_id, style='width: 300px') %]</td>
79
          </tr>
80

  
81
        </table>
82
      </td>
83

  
84
      <td align="right">
85
        <table>
86

  
87
          <tr>
88
            <td colspan="2" align="center">
89
              [%- IF SELF.order.id %]
90
                <label for="order.delivered">[% 'Delivery Order(s) for full qty created' | $T8 %]</label>
91
                [% L.yes_no_tag('order.delivered', SELF.order.delivered) %]
92
                <label for="order.closed">[% 'Closed' | $T8 %]</label>
93
                [% L.yes_no_tag('order.closed', SELF.order.closed) %]
94
              [%- END %]
95
            </td>
96
          </tr>
97

  
98
          <tr>
99
            <th align="right">[% 'Employee' | $T8 %]</th>
100
            <td>[% L.select_tag('order.employee_id',
101
              SELF.all_employees,
102
              default=(SELF.order.employee_id ? SELF.order.employee_id : SELF.current_employee_id),
103
              title_key='safe_name') %]</td>
104
          </tr>
105

  
106
          [% IF SELF.cv == 'customer' %]
107
          <tr>
108
            <th align="right">[% 'Salesman' | $T8 %]</th>
109
            <td>[% L.select_tag('order.salesman_id',
110
              SELF.all_salesmen,
111
              default=(SELF.order.salesman_id ? SELF.order.salesman_id : SELF.current_employee_id),
112
              title_key='safe_name') %]</td>
113
          </tr>
114
          [% END %]
115

  
116
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
117
          <tr>
118
            <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
119
            <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
120
          </tr>
121
          [%- END -%]
122

  
123
          [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
124
            [%- SET quo_nr_txt = 'Quotation Number' -%]
125
          [%- ELSE -%]
126
            [%- SET quo_nr_txt = 'RFQ Number' -%]
127
          [%- END -%]
128
          <tr>
129
            <th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
130
            [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
131
              <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]</td>
132
            [%- ELSE -%]
133
              <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]</td>
134
            [%- END -%]
135
          </tr>
136

  
137
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
138
          <tr>
139
            <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
140
            <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
141
          </tr>
142
          [%- END -%]
143

  
144
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
145
            [%- SET transdate_txt = 'Order Date' -%]
146
          [%- ELSIF SELF.type == "sales_quotation" -%]
147
            [%- SET transdate_txt = 'Quotation Date' -%]
148
          [%- ELSE -%]
149
            [%- SET transdate_txt = 'RFQ Date' -%]
150
          [%- END -%]
151
          <tr>
152
            <th width="70%" align="right" nowrap>[% transdate_txt | $T8 %]</th>
153
            <td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %]</td>
154
          </tr>
155

  
156
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
157
            [%- SET reqdate_txt = 'Reqdate' -%]
158
          [%- ELSIF SELF.type == "sales_quotation" -%]
159
            [%- SET reqdate_txt = 'Valid until' -%]
160
          [%- ELSE -%]
161
            [%- SET reqdate_txt = 'Required by' -%]
162
          [%- END -%]
163
          <tr>
164
            <th width="70%" align="right" nowrap>[% reqdate_txt | $T8 %]</th>
165
            <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date) %]</td>
166
          </tr>
167

  
168
          [%- IF SELF.type == "sales_quotation" -%]
169
          <tr>
170
            <th width="70%" align="right" nowrap>[% 'Order probability' | $T8 %]</th>
171
            <td>[%- L.select_tag('order.order_probability', SELF.order_probabilities, title='title', default=SELF.order.order_probability) %]%</td>
172
          </tr>
173
          <tr>
174
            <th width="70%" align="right" nowrap>[% 'Expected billing date' | $T8 %]</th>
175
            <td>[%- L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_sa_date) %]</td>
176
          </tr>
177
          [%- END %]
178

  
179
          <tr>
180
            <th width="70%" align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
181
            <td>[% SELF.order.itime_as_date %]</td>
182
          </tr>
183

  
184
        </table>
10
<!-- PENDENT: EXPERIMENTELL -->
11

  
12

  
13
<div class="wrapper" id="wrapper-1">
14
[% INCLUDE 'generic/toggle_wrapper.html' %]
15

  
16
<div class="col">
17

  
18
  <table class="tbl-horizontal col">
19
    <caption>[% 'Customer & Order info' | $T8 %]</caption>
20
    <colgroup><col class="wi-mediumsmall"><col class="wi-lightwide"></colgroup>
21
    <tbody>
22
      <tr>
23
        <th>[%- SELF.cv == "customer" ? LxERP.t8('Customer') : LxERP.t8('Vendor') -%]</th>
24
        [% SET cv_id = SELF.cv _ '_id' %]
25
        <td class="wi-lightwide">
26
          [% P.customer_vendor.picker("order.${SELF.cv}" _ '_id', SELF.order.$cv_id, type=SELF.cv, class='wi-lightwide') %]
27
          [% #P.button_tag("kivi.Order.show_vc_details_dialog()", LxERP.t8("Details (one letter abbreviation)"), class='wi-tiny neutral') %]
28
          <a href="javascript:kivi.Order.show_vc_details_dialog();" title="[% 'Show detail informationen' | $T8 %]" class="button-image info"><img src="image/detail.png"></a>
29
        </td>
30
      </tr>
31
      <tr id='cp_row' [% IF !SELF.order.${SELF.cv}.contacts.size %]style='display:none'[% END %]>
32
        <th>[% 'Contact Person' | $T8 %]</th>
33
        <td>[% L.select_tag('order.cp_id',
34
                            SELF.order.${SELF.cv}.contacts,
35
                            default=SELF.order.cp_id,
36
                            title_key='full_name_dep',
37
                            value_key='cp_id',
38
                            with_empty=1,
39
                            class='wi-lightwide') %]</td>
40
      </tr>
41
      <tr id='shipto_row' [% IF !SELF.order.${SELF.cv}.shipto.size %]style='display:none'[% END %]>
42
        <th>[% 'Shipping Address' | $T8 %]</th>
43
        <td>[% L.select_tag('order.shipto_id',
44
                            SELF.order.${SELF.cv}.shipto,
45
                            default=SELF.order.shipto_id,
46
                            title_key='displayable_id',
47
                            value_key='shipto_id',
48
                            with_empty=1,
49
                            class='wi-lightwide') %]</td>
50
      </tr>
51
      [% PROCESS order/tabs/_business_info_row.html SELF=SELF %]
52
      <tr>
53
        <th>[% 'Steuersatz' | $T8 %]</th>
54
        <td>[% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', class='recalc wi-lightwide') %]</td>
55
      </tr>
56
      [% IF SELF.all_departments.size %]
57
        <tr>
58
          <th>[% 'Department' | $T8 %]</th>
59
          <td>
60
            [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, class='wi-lightwide') %]
61
          </td>
62
        </tr>
63
      [% END %]
64
      <tr>
65
        <th>[% 'Shipping Point' | $T8 %]</th>
66
        <td>[% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, class='wi-lightwide') %]</td>
67
      </tr>
68
      <tr>
69
        <th>[% 'Ship via' | $T8 %]</th>
70
        <td>[% L.input_tag('order.shipvia', SELF.order.shipvia, class='wi-lightwide') %]</td>
71
      </tr>
72
      <tr>
73
        <th>[% 'Transaction description' | $T8 %]</th>
74
        <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, class='wi-lightwide') %]</td>
75
      </tr>
76
      <tr>
77
        <th>[% 'Project Number' | $T8 %]</th>
78
        <td>[% P.project.picker('order.globalproject_id', SELF.order.globalproject_id, class='wi-lightwide') %]</td>
79
      </tr>
80
    </tbody>
81
  </table>
185 82

  
186
      </td>
187
    </tr>
83
  <table class="tbl-horizontal col">
84
    <caption>[% 'Terms' | $T8 %]</caption>
85
    <colgroup><col class="wi-mediumsmall"><col class="wi-lightwide"></colgroup>
86
    <tbody>
87
      <tr>
88
        <td colspan="2">
89
          <span class="label above">[% 'Payment Terms' | $T8 %]</span>
90
          [% L.select_tag('order.payment_id',
91
                            SELF.all_payment_terms,
92
                            default = SELF.order.payment_id,
93
                            with_empty = 1,
94
                            title_key = 'description',
95
                            class = 'wi-mediumsmall-lightwide') %]
96
        </td>
97
      </tr>
98
      <tr>
99
        <td colspan="2">
100
          <span class="label above">[% 'Delivery Terms' | $T8 %]</span>
101
          [% L.select_tag('order.delivery_term_id',
102
                            SELF.all_delivery_terms,
103
                            default = SELF.order.delivery_term_id,
104
                            with_empty = 1,
105
                            title_key = 'description',
106
                            class = 'wi-mediumsmall-lightwide') %]
107
        </td>
108
      </tr>
109
      <tr id="taxincluded_row_id">
110
        <th>[% IF !SELF.taxes.size %]<label for="order.taxincluded">[% 'Tax Included' | $T8 %]</label> [% END %]</th>
111
        <td>[% IF !SELF.taxes.size %][% L.yes_no_tag('order.taxincluded', SELF.order.taxincluded, class='recalc') %][% END %]</td>
112
      </tr>
113
      [% IF SELF.type == "sales_order" %]
114
        <tr>
115
          <th>[% 'Periodic Invoices' | $T8 %]</th>
116
          <td>
117
            <span id='periodic_invoices_status' class="data wi-normal wi-lightwide">[% SELF.periodic_invoices_status %]</span>
118
            <span class="button-inline">
119
              [% L.button_tag('kivi.Order.show_periodic_invoices_config_dialog()', LxERP.t8('Configure'), class='neutral inline below') %]
120
              <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank" class="button wi-tiny neutral" title="[% 'Documentation about periodic invoices in a new window' | $T8 %]">?</a>
121
            </span>
122
          </td>
123
        </tr>
124
      [% END %]
125
    </tbody>
188 126
  </table>
189 127

  
190
  [%- PROCESS order/tabs/_item_input.html %]
128
</div><!-- /.col -->
191 129

  
192
  [% L.button_tag('kivi.Order.show_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
193 130

  
194
  <table width="100%">
131
<table class="tbl-horizontal col">
132
  <caption>[% 'Notes' | $T8 %]</caption>
133
  <colgroup><col class="wi-wide"></colgroup>
134
  <tbody>
195 135
    <tr>
196
      <td>
197

  
198
        <div id="row_table_scroll_id" style="overflow-y: auto; height: 25vh">
199
          <table id="row_table_id" width="100%">
200
            <thead>
201
              <tr class="listheading">
202
                <th class="listheading" style='text-align:center' nowrap width="1">
203
                  [%- IF MYCONFIG.show_form_details %]
204
                    [%- L.img_tag(src="image/collapse.svg", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all', "data-expanded"="1") %]
205
                  [%- ELSE %]
206
                    [%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
207
                  [%- END %]
208
                </th>
209
                <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
210
                <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
211
                <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
212
                <th id="partnumber_header_id"  class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Order.reorder_items("partnumber")'> [%- 'Partnumber'  | $T8 %]</a></th>
213
                <th id="partclass_header_id"   class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
214
                <th id="description_header_id" class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
215
                [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
216
                <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>
217
                [%- END -%]
218
                <th id="qty_header_id"         class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
219
                <th class="listheading" nowrap width="5" >[%- 'Price Factor' | $T8 %] </th>
220
                <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
221
                <th class="listheading" nowrap width="5" >[%- 'Price Source' | $T8 %] </th>
222
                <th id="sellprice_header_id"   class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Order.reorder_items("sellprice")'> [%- 'Price'       | $T8 %]</a></th>
223
                <th id="discount_header_id"    class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Order.reorder_items("discount")'>  [%- 'Discount'    | $T8 %]</a></th>
224
                <th class="listheading" nowrap width="10">[%- 'Extended'     | $T8 %] </th>
225
              </tr>
226
            </thead>
227

  
228
            [%- FOREACH item = SELF.order.items_sorted %]
229
              [%- PROCESS order/tabs/_row.html ITEM=item ID=(item.id||item.new_fake_id) TYPE=SELF.type ALL_PRICE_FACTORS=SELF.all_price_factors %]
230
            [%- END %]
231

  
232
          </table>
233
        </div>
234

  
235
      </td>
136
      <td class="wi-wide">[% L.textarea_tag('order.notes', SELF.order.notes, wrap="soft",rows=7, class="texteditor wi-wide") %]</td>
236 137
    </tr>
237

  
238 138
    <tr>
139
      <td><span class="label above">[% 'Internal Notes' | $T8 %]</span>[% L.textarea_tag('order.intnotes', SELF.order.intnotes, wrap="soft", style="height: 150px", class="wi-wide") %]</td>
239 140
    </tr>
240

  
141
  </tbody>
142
</table>
143

  
144
<table class="tbl-horizontal col">
145
  <caption>[% 'Handling, Dates & Numbers' | $T8 %]</caption>
146
  <colgroup> <col class="wi-mediumsmall"><col class="wi-lightwide"> </colgroup>
147
  <tbody>
148
    [% IF SELF.order.id %]
241 149
    <tr>
242
      <td colspan="100%" width="100%">
243
        <table width="100%">
244
          <tr>
245
            <td>
246
              <table>
247
                <tr>
248
                  <th align="left">[% 'Notes' | $T8 %]</th>
249
                  <th align="left">[% 'Internal Notes' | $T8 %]</th>
250
                </tr>
251
                <tr valign="top">
252
                  <td>
253
                    [% L.textarea_tag('order.notes', SELF.order.notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
254
                  </td>
255
                  <td>
256
                    [% L.textarea_tag('order.intnotes', SELF.order.intnotes, wrap="soft", style="width: 350px; height: 150px") %]
257
                  </td>
258
                </tr>
259
              </table>
260
            </td>
261

  
262
            <td>
263
              <table>
264
                <tr>
265
                  <th align="right">[% 'Payment Terms' | $T8 %]</th>
266
                  <td>[% L.select_tag('order.payment_id',
267
                                      SELF.all_payment_terms,
268
                                      default = SELF.order.payment_id,
269
                                      with_empty = 1,
270
                                      title_key = 'description',
271
                                      style = 'width: 250px') %]</td>
272
                </tr>
273
                <tr>
274
                  <th align="right">[% 'Delivery Terms' | $T8 %]</th>
275
                  <td>[% L.select_tag('order.delivery_term_id',
276
                                      SELF.all_delivery_terms,
277
                                      default = SELF.order.delivery_term_id,
278
                                      with_empty = 1,
279
                                      title_key = 'description',
280
                                      style = 'width: 250px') %]</td>
281
                </tr>
282
                [%- IF SELF.type == "sales_order" %]
283
                <tr>
284
                  <th align="right">[%- 'Periodic Invoices' | $T8 %]</th>
285
                  <td>[% L.button_tag('kivi.Order.show_periodic_invoices_config_dialog()', LxERP.t8('Configure')) %]
286
                    (<span id='periodic_invoices_status'>[%- SELF.periodic_invoices_status -%]</span>)
287
                    <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank">?</a>
288
                  </td>
289
                </tr>
290
                [%- END %]
291
              </table>
292
            </td>
150
    <th><label for="order.delivered">[% 'Delivery Order(s) for full qty created' | $T8 %]</label></th>
151
    <td>[% L.yes_no_tag('order.delivered', SELF.order.delivered, class='wi-small') %]</td>
152
    </tr>
153
    <tr>
154
      <th><label for="order.closed">[% 'Closed' | $T8 %]</label></th>
155
      <td>[% L.yes_no_tag('order.closed', SELF.order.closed, class='wi-small') %]</td>
156
    </tr>
157
    [% END %]
158
    <tr>
159
      <th>[% 'Employee' | $T8 %]</th>
160
      <td>[% L.select_tag('order.employee_id',
161
        SELF.all_employees,
162
        default=(SELF.order.employee_id ? SELF.order.employee_id : SELF.current_employee_id),
163
        title_key='safe_name') %]</td>
164
    </tr>
165
    [% IF SELF.cv == 'customer' %]
166
      <tr>
167
        <th>[% 'Salesman' | $T8 %]</th>
168
        <td>[% L.select_tag('order.salesman_id',
169
          SELF.all_salesmen,
170
          default=(SELF.order.salesman_id ? SELF.order.salesman_id : SELF.current_employee_id),
171
          title_key='safe_name') %]</td>
172
      </tr>
173
    [% END %]
174
    [% IF (SELF.type == "sales_order" || SELF.type == "purchase_order") %]
175
      <tr>
176
        <th>[% 'Order Number' | $T8 %]</th>
177
        <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.Order.set_number_in_title(this)', class='wi-small numeric') %]</td>
178
      </tr>
179
    [% END %]
180
    [% IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") %]
181
      [% SET quo_nr_txt = 'Quotation Number' %]
182
    [% ELSE %]
183
      [% SET quo_nr_txt = 'RFQ Number' %]
184
    [% END %]
185
    <tr>
186
      <th>[% quo_nr_txt | $T8 %]</th>
187
      [% IF (SELF.type == "sales_order" || SELF.type == "purchase_order") %]
188
        <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size=5, class='wi-small') %]</td>
189
      [% ELSE %]
190
        <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, class='wi-small numeric', size=5, class='wi-small', onchange='kivi.Order.set_number_in_title(this)') %]</td>
191
      [% END %]
192
    </tr>
193
    [% IF (SELF.type == "sales_order" || SELF.type == "purchase_order") %]
194
      <tr>
195
        <th>[% 'Customer Order Number' | $T8 %]</th>
196
        <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size=5, class='wi-small numeric') %]</td>
197
      </tr>
198
    [% END %]
199
    [% IF (SELF.type == "sales_order" || SELF.type == "purchase_order") %]
200
      [% SET transdate_txt = 'Order Date' %]
201
    [% ELSIF SELF.type == "sales_quotation" %]
202
      [% SET transdate_txt = 'Quotation Date' %]
203
    [% ELSE %]
204
      [% SET transdate_txt = 'RFQ Date' %]
205
    [% END %]
206
    <tr>
207
      <th>[% transdate_txt | $T8 %]</th>
208
      <td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date, class='wi-date') %]</td>
209
    </tr>
210
    [% IF (SELF.type == "sales_order" || SELF.type == "purchase_order") %]
211
      [% SET reqdate_txt = 'Reqdate' %]
212
    [% ELSIF SELF.type == "sales_quotation" %]
213
      [% SET reqdate_txt = 'Valid until' %]
214
    [% ELSE %]
215
      [% SET reqdate_txt = 'Required by' %]
216
    [% END %]
217
    <tr>
218
      <th>[% reqdate_txt | $T8 %]</th>
219
      <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class='wi-date') %]</td>
220
    </tr>
221
    [% IF SELF.type == "sales_quotation" %]
222
      <tr>
223
        <th>[% 'Order probability' | $T8 %]</th>
224
        <td>[% L.select_tag('order.order_probability', SELF.order_probabilities, title='title', default=SELF.order.order_probability) %]%</td>
225
      </tr>
226
      <tr>
227
        <th>[% 'Expected billing date' | $T8 %]</th>
228
        <td>[% L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_as_date) %]</td>
229
      </tr>
230
    [% END %]
231
    <tr>
232
      <th>[% 'Insert Date' | $T8 %]</th>
233
      <td><span class="data wi-small">[% SELF.order.itime_as_date %]</span></td>
234
    </tr>
235
  </tbody>
236
</table>
293 237

  
294
            [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
295
            [%- SET marge_class = (SELF.order.marge_total < 0) ? 'plus0' : '' -%]
296
            <td>
297
              <table>
298
                <tr>
299
                  <th  align="left">[% 'Ertrag' | $T8 %]</th>
300
                  <td align="right">
301
                    [%- L.div_tag(SELF.order.marge_total_as_number, id='marge_total_id', class=marge_class) %]
302
                  </td>
303
                </tr>
304
                <tr>
305
                  <th  align="left">[% 'Ertrag prozentual' | $T8 %]</th>
306
                  <td align="right">
307
                    [%- L.div_tag(LxERP.format_amount(SELF.order.marge_percent, 2), id='marge_percent_id', class=marge_class) %]
308
                  </td>
309
                  <td>[%- L.div_tag('%', id='marge_percent_sign_id', class=marge_class) %]</td>
310
                </tr>
311
              </table>
312
            </td>
313
            [%- END %]
238
</div><!-- /.wrapper -->
314 239

  
315
            <td align="right">
316
              <table>
317
                <tr id="taxincluded_row_id" [%- IF !SELF.taxes.size %]style="display:none"[%- END %]>
318
                  <td align=right colspan="2">
319
                    <label for="order.taxincluded"><b>[% 'Tax Included' | $T8 %]</b></label>
320
                    [% L.yes_no_tag('order.taxincluded', SELF.order.taxincluded, class='recalc') %]
321
                  </td>
322
                </tr>
240
[% PROCESS order/tabs/_item_input.html %]
323 241

  
324
                <tr id="subtotal_row_id" [%- IF SELF.order.taxincluded %]style="display:none"[%- END %]>
325
                  <th align="right">[%- 'Subtotal' | $T8 %]</th>
326
                  <td align="right">
327
                    [%- L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %]
328
                  </td>
329
                </tr>
330
                [%- FOREACH tax = SELF.taxes %]
331
                  [%- PROCESS order/tabs/_tax_row.html TAX=tax TAXINCLUDED=SELF.order.taxincluded %]
332
                [%- END %]
333
                <tr id="amount_row_id">
334
                  <th align="right">[%- 'Total' | $T8 %]</th>
335
                  <td align="right">
336
                    [%- L.div_tag(SELF.order.amount_as_number, id='amount_id') %]
337
                  </td>
338
                </tr>
339
              </table>
340
            </td>
242
<div id="row_table_scroll_id" class="wrapper">
341 243

  
342
          </tr>
343
        </table>
344
      </td>
244
<table id="row_table_id" class="tbl-list">
245
  <caption>[% 'Articles' | $T8 %]</caption>
246
  <thead>
247
    <tr>
248
      <th class="center">
249
        [% IF MYCONFIG.show_form_details %]
250
          [% L.img_tag(src="image/collapse.svg", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all', "data-expanded"="1") %]
251
        [% ELSE %]
252
          [% L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
253
        [% END %]
254
      </th>
255
      <th>[% 'position'     | $T8 %] </th>
256
      <th style='text-align:center'><img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]"></th>
257
      <th style='text-align:center'><img src="image/close.png" alt="[% LxERP.t8('delete item') %]"></th>
258
      <th id="partnumber_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("partnumber")'> [% 'Partnumber'  | $T8 %]</a></th>
259
      <th id="partclass_header_id">[% 'Type'  | $T8 %]</th>
260
      <th id="description_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[% 'Description' | $T8 %]</a></th>
261
      [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
262
      <th id="shipped_qty_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("shipped_qty")'>[% 'Delivered' | $T8 %]</a></th>
263
      [%- END -%]
264
      <th id="qty_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'>        [% 'Qty'         | $T8 %]</a></th>
265
      <th >[% 'Price Factor' | $T8 %]</th>
266
      <th >[% 'Unit'         | $T8 %]</th>
267
      <th >[% 'Price Source' | $T8 %]</th>
268
      <th id="sellprice_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("sellprice")'> [% 'Price'       | $T8 %]</a></th>
269
      <th id="discount_header_id" ><a href='#' onClick='javascript:kivi.Order.reorder_items("discount")'>  [% 'Discount'    | $T8 %]</a></th>
270
      <th>[% 'Extended'     | $T8 %]</th>
271
    </tr>
272
  </thead>
273
  [% FOREACH item = SELF.order.items_sorted %]
274
    [% PROCESS order/tabs/_row.html ITEM=item ID=(item.id||item.new_fake_id) TYPE=SELF.type ALL_PRICE_FACTORS=SELF.all_price_factors %]
275
  [% END %]
276
  <tfoot>
277
    <tr id="subtotal_row_id">
278
      <td colspan="11"></td>
279
      <th colspan="3">[% IF SELF.order.taxincluded %][% 'Subtotal' | $T8 %][% END %]</th>
280
      <td>[% IF SELF.order.taxincluded %][% L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %][% END %]</td>
345 281
    </tr>
282
    [% FOREACH tax = SELF.taxes %]
283
      [% PROCESS order/tabs/_tax_row.html TAX=tax TAXINCLUDED=SELF.order.taxincluded %]
284
    [% END %]
285
    <tr id="amount_row_id">
286
      [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
287
      [%- SET marge_class = (SELF.order.marge_total < 0) ? 'plus0' : '' -%]
288
      <th colspan="2">[% 'Ertrag' | $T8 %]</th>
289
      <td colspan="2" class="numeric">[%- L.div_tag(SELF.order.marge_total_as_number, id='marge_total_id', class=marge_class) %]</td>
290
      <th colspan="2">[% 'Ertrag prozentual' | $T8 %]</th>
291
      <td class="numeric">[%- LxERP.format_amount(SELF.order.marge_percent, 2) %] %</td>
292
      [%- ELSE -%]
293
      <td colspan="7">
294
      [%- END -%]
295
      <td colspan="4">
296
      <th colspan="3">[% 'Total' | $T8 %]</th>
297
      <td class="numeric">[% L.div_tag(SELF.order.amount_as_number, id='amount_id') %]</td>
298
    </tr>
299
  </tfoot>
300
</table>
346 301

  
347
  </table>
... Dieser Diff wurde abgeschnitten, weil er die maximale Anzahl anzuzeigender Zeilen überschreitet.

Auch abrufbar als: Unified diff