Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3df9de88

Von Hans P. Schlaepfer vor mehr als 3 Jahren hinzugefügt

  • ID 3df9de881a6c5d510f46094acef941e8de06d856
  • Vorgänger 352d3f64
  • Nachfolger bf0ba467

Neues Design 2019 Standard-Code templates/webpages/ir/

Unterschiede anzeigen:

templates/webpages/ir/_payments.html
1
  <tr>
2
   <td>
3
    <table width="100%">
4
     <tr class="listheading">
5
      <th colspan="6" class="listheading">[% 'Payments' | $T8 %]</th>
6
     </tr>
7
     <tr>
8 1
[% USE T8 %]
9 2
[% USE LxERP %]
10 3
[% USE L %]
11 4
[% USE HTML %]
12 5

  
6

  
7
<table class="tbl-list wi-moderate">
8
  <caption>
9
      [% 'Payments' | $T8 %]
10
  </caption>
11

  
12
  <thead>
13
    <tr>
13 14
      <th>[% 'Date' | $T8 %]</th>
14 15
      <th>[% 'Source' | $T8 %]</th>
15 16
      <th>[% 'Memo' | $T8 %]</th>
16 17
      <th>[% 'Amount' | $T8 %]</th>
17 18
      <th></th>
18
[% IF show_exchangerate %]
19
      [% IF show_exchangerate %]
19 20
      <th>[% 'Exch' | $T8 %]</th>
20
[% END %]
21
      [% END %]
21 22
      <th>[% 'Account' | $T8 %]</th>
22
     </tr>
23

  
23
    </tr>
24
  </thead>
24 25

  
25
[% FOREACH i = paid_indices %]
26
  [% SET changeable    = 'changeable_'    _ i %]
27
  [% SET acc_trans_id  = 'acc_trans_id_'  _ i %]
28
  [% SET p_gldate      = 'gldate_'        _ i %]
29
  [% SET datepaid      = 'datepaid_'      _ i %]
30
  [% SET source        = 'source_'        _ i %]
31
  [% SET memo          = 'memo_'          _ i %]
32
  [% SET paid          = 'paid_'          _ i %]
33
  [% SET AP_paid       = 'AP_paid_'       _ i %]
34
  [% SET selectAP_paid_ref = 'selectAP_paid_' _ i %]
35 26

  
36
     <input type=hidden name="acc_trans_id_[% i %]" value=[% $acc_trans_id %]>
37
     <input type=hidden name="gldate_[% i %]" value=[% $p_gldate %]>
38 27

  
39
     <tr>
28
  <tbody>
29
  [% FOREACH i = paid_indices %]
30
    [% SET changeable    = 'changeable_'    _ i %]
31
    [% SET acc_trans_id  = 'acc_trans_id_'  _ i %]
32
    [% SET p_gldate      = 'gldate_'        _ i %]
33
    [% SET datepaid      = 'datepaid_'      _ i %]
34
    [% SET source        = 'source_'        _ i %]
35
    [% SET memo          = 'memo_'          _ i %]
36
    [% SET paid          = 'paid_'          _ i %]
37
    [% SET AP_paid       = 'AP_paid_'       _ i %]
38
    [% SET selectAP_paid_ref = 'selectAP_paid_' _ i %]
39
  <tr>
40 40

  
41
    <td align="center">
42
    [% IF $changeable %]
43
      [% IF $datepaid %]
44
        [% L.date_tag('datepaid_'_ i, $datepaid) %]
41
    <td>
42
      <input type=hidden name="acc_trans_id_[% i %]" value=[% $acc_trans_id %]>
43
      <input type=hidden name="gldate_[% i %]" value=[% $p_gldate %]>
44
      [% IF $changeable %]
45
        [% IF $datepaid %]
46
          [% L.date_tag('datepaid_'_ i, $datepaid) %]
47
        [% ELSE %]
48
          [% L.date_tag('datepaid_'_ i, today) %]
49
        [% END %]
45 50
      [% ELSE %]
46
        [% L.date_tag('datepaid_'_ i, today) %]
51
        <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]">[% $datepaid %]
47 52
      [% END %]
48
    [% ELSE %]
49
      <input type="hidden" name="datepaid_[% i %]" value="[% $datepaid %]">[% $datepaid %]
50
    [% END %]
51
     </td>
52
     <td align=center>
53
    [% IF $changeable %]
54
       <input name="source_[% i %]" size="11" value="[% $source %]">
55
    [% ELSE %]
53
    </td>
54
    <td>
55
      [% IF $changeable %]
56
        <input type="text" name="source_[% i %]" size="11" value="[% $source %]">
57
      [% ELSE %]
56 58
       <input type="hidden" name="source_[% i %]" value="[% $source %]">[% $source %]
57
    [% END %]
58
     </td>
59
     <td align="center">
60
    [% IF $changeable %]
61
       <input name="memo_[% i %]" size="11" value="[% $memo %]">
62
    [% ELSE %]
63
       <input type="hidden" name="memo_[% i %]" value="[% $memo %]">[% $memo %]
64
    [% END %]
65
     </td>
66
     <td align="center">
67
    [% IF $changeable %]
68
       <input name="paid_[% i %]" size="11" value="[% LxERP.format_amount($paid, 2, 1) %]">
69
    [% ELSE %]
70
       <input type="hidden" name="paid_[% i %]" value="[% LxERP.format_amount($paid, 2, 1) %]">
71
       [% LxERP.format_amount($paid, 2, 1) %]
72
    [% END %]
73
     </td>
74
     <td>
75
       [% IF $changeable && loop.last && paid_missing > 0 %]
76
         <input type='button' id='is_set_to_paid_missing' value='[% 'Set to paid missing' | $T8 %]'>
77
       [% END %]
78
     </td>
59
      [% END %]
60
    </td>
61
    <td>
62
      [% IF $changeable %]
63
        <input type="text" name="memo_[% i %]" size="11" value="[% $memo %]">
64
      [% ELSE %]
65
        <input type="hidden" name="memo_[% i %]" value="[% $memo %]">[% $memo %]
66
      [% END %]
67
    </td>
68
    <td>
69
      [% IF $changeable %]
70
        <input type="text" name="paid_[% i %]" size="11" value="[% LxERP.format_amount($paid, 2, 1) %]">
71
      [% ELSE %]
72
        <input type="hidden" name="paid_[% i %]" value="[% LxERP.format_amount($paid, 2, 1) %]">
73
        [% LxERP.format_amount($paid, 2, 1) %]
74
      [% END %]
75
    </td>
76
    <td>
77
      [% IF $changeable && loop.last && paid_missing > 0 %]
78
        <input type='button' id='is_set_to_paid_missing' value='[% 'Set to paid missing' | $T8 %]'>
79
      [% END %]
80
    </td>
79 81

  
80
[% IF show_exchangerate %]
81
     <td align="center">
82
  [% SET forex        = 'forex_'        _ i %]
83
  [% SET exchangerate = 'exchangerate_' _ i %]
84
  [% IF $forex %]
85
        <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]">
86
        [% LxERP.format_amount($forex, 5) %]
87
  [% ELSE %]
88
     [% IF $changeable %]
89
        <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
90
     [% ELSE %]
91
        <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
92
        [% LxERP.format_amount($exchangerate, 5, 1) %]
93
     [% END %]
94
  [% END %]
82
    [% IF show_exchangerate %]
83
      <td>
84
        [% SET forex        = 'forex_'        _ i %]
85
        [% SET exchangerate = 'exchangerate_' _ i %]
86
        [% IF $forex %]
87
          <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]">
88
          [% LxERP.format_amount($forex, 5) %]
89
        [% ELSE %]
90
          [% IF $changeable %]
91
            <input type="text" name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
92
          [% ELSE %]
93
            <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5, 1) %]">
94
            [% LxERP.format_amount($exchangerate, 5, 1) %]
95
          [% END %]
96
        [% END %]
95 97
        <input type="hidden" name="forex_[% i %]" value="[% $forex %]">
96
     </td>
97
[% END %]
98

  
99
     <td align="center">
100
     [% IF $changeable %]
101
       <select name="AP_paid_[% i %]">[% $selectAP_paid_ref %]</select>
102
     [% ELSE %]
103
       <input type="hidden" name="AP_paid_[% i %]" value="[% $AP_paid %]">[% $AP_paid %]
104
     [% END %]
105
     </td>
98
      </td>
99
    [% END %]
106 100

  
107
    </tr>
101
    <td>
102
      [% IF $changeable %]
103
        <select name="AP_paid_[% i %]">[% $selectAP_paid_ref %]</select>
104
      [% ELSE %]
105
        <input type="hidden" name="AP_paid_[% i %]" value="[% $AP_paid %]">[% $AP_paid %]
106
      [% END %]
107
    </td>
108 108

  
109
[% END # foreach %]
109
  </tr>
110
  [% END # foreach %]
111
  </tbody>
110 112

  
111
    <tr>
112
      <td></td>
113
      <td></td>
114
      <td align="center">[% 'Total' | $T8 %]</td>
115
      <td align="center">[% LxERP.format_amount(totalpaid, 2) | html %]</td>
116
    </tr>
117
    <tr>
118
      <td></td>
119
      <td></td>
120
      <td align="center">[% 'Missing amount' | $T8 %]</td>
121
      <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
122
    </tr>
113
  <tfoot>
114
  <tr>
115
    <td></td>
116
    <td></td>
117
    <td>[% 'Total' | $T8 %]</td>
118
    <td>[% LxERP.format_amount(totalpaid, 2) | html %]</td>
119
    <td colspan="2"></td>
120
  </tr>
121
  <tr>
122
    <td></td>
123
    <td></td>
124
    <td>[% 'Missing amount' | $T8 %]</td>
125
    <td>[% LxERP.format_amount(paid_missing, 2) | html %]</td>
126
    <td colspan="2"></td>
127
  </tr>
128
  </tfoot>
129
</table>
123 130

  
124
     <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
125
     <input type="hidden" name="selectAP_paid" value="[% selectAP_paid %]">
126
     <input type="hidden" name="oldinvtotal" value="[% oldinvtotal %]">
131
<input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
132
<input type="hidden" name="selectAP_paid" value="[% selectAP_paid %]">
133
<input type="hidden" name="oldinvtotal" value="[% oldinvtotal %]">
134
<input type="hidden" name="oldtotalpaid" value="[% totalpaid %]">
127 135

  
128
     <input type="hidden" name="oldtotalpaid" value="[% totalpaid %]">
129
    </table>
130 136

  
131
    </td>
132
  </tr>
133
    <script type='text/javascript'>
134
     $('#is_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });
135
    </script>
137
<script type='text/javascript'>
138
  $('#is_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });
139
</script>
templates/webpages/ir/form_footer.html
1
  <tr>
2
   <td>
3
    <table width="100%">
4
     <tr valign="bottom">
5
      <td>
6
       <table>
7
        <tr>
8
         <th align="left">[% 'Notes' | $T8 %]</th>
9
         <th align="left">[% 'Internal Notes' | $T8 %]</th>
10
         <th align="right">[% 'Payment / Delivery Options' | $T8 %]</th>
11
        </tr>
12
        <tr valign="top">
13
         <td>
14
          [% L.textarea_tag("notes", notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
15
         </td>
16
         <td>
17
          [% L.textarea_tag("intnotes", intnotes, wrap="soft", style="width: 350px; height: 150px") %]
18
         </td>
19
         <td>
20
           <table>
21
             <tr>
22
               <th align="right">[% 'Payment Terms' | $T8 %]</th>
23
               <td>[% L.select_tag('payment_id', payment_terms, default = payment_id, title_key = 'description', with_empty = 1, style="width: 250px") %]
24
                 <script type='text/javascript'>$('#payment_id').change(function(){ kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate"); })</script>
25
               </td>
26
             </tr>
27
             <tr>
28
               <th align="right">[% 'Delivery Terms' | $T8 %] </th>
29
               <td>
30
                 [% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description', style = 'width: 250px') %]
31
               </td>
32
             </tr>
33
             <tr>
34
               <th align="right">[% 'direct debit' | $T8 %]</th>
35
               <td>
36
                 [%- L.checkbox_tag('direct_debit', 'checked', direct_debit) %]
37
               </td>
38
             </tr>
39
           </table>
40
         </td>
41
        </tr>
42
[%- IF id && follow_ups.size %]
43
        <tr>
44
          <td colspan="2">
45
            [%- LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size, follow_ups_unfinished) | html %]
46
          <td>
47
        </tr>
48
[%- END %]
49
       </table>
50
      </td>
51
[%- IF show_weight %]
52
      <td>
53
       <table>
54
        <tr>
55
         <th  align=left>[% 'Total weight' | $T8 %]</th>
56
         <td>
57
          [% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]
58
         </td>
59
        </tr>
60
       </table>
61
      </td>
62
[%- END %]
63
      <td align="right">
64
  [%- IF taxaccounts %]
65
       <input name="taxincluded" class="checkbox" type="checkbox" [% IF taxincluded %]checked[% END %]>
66
       <b>[% 'Tax Included' | $T8 %]</b>
67
       <br>
68
       <br>
69
  [%- END %]
70
       <table>
71

  
72
[%- UNLESS taxincluded %]
73
        <tr>
74
         <th align="right">[% 'Subtotal' | $T8 %]</th>
75
         <td align="right">[% LxERP.format_amount(invsubtotal, 2) %]</td>
76
       </tr>
77
[%- END %]
78

  
79
[%# tax %]
80
[% FOREACH item = taxaccounts_array %]
81
[% SET description_ref = item _ '_description' %]
82
[% SET rate_ref        = item _ '_rate' %]
83
[% SET total_ref       = item _ '_total' %]
84
[% SET netto_ref       = item _ '_netto' %]
85
       <tr>
86
        <th align="right">[% 'Including' | $T8 %] [% $description_ref | html %]&nbsp;[% $rate_ref * 100 %]%</th>
87
        <td align="right">[% LxERP.format_amount($total_ref, 2) %]</td>
88
       </tr>
89
  [%- IF taxincluded %]
90
       <tr>
91
        <th align="right">[% 'Net amount' | $T8 %]</th>
92
        <td align="right">[% LxERP.format_amount($netto_ref, 2) %]</td>
93
       </tr>
94
  [%- END %]
95
[%- END %]
96

  
97
        <tr>
98
         <th align="right">[% 'Total' | $T8 %]</th>
99
         <td align="right">[% LxERP.format_amount(invtotal, 2) %]</td>
100
        </tr>
101
       </table>
102
      </td>
103
     </tr>
104
    </table>
105
   </td>
106
  </tr>
107 1
[% USE T8 %]
108 2
[% USE HTML %]
109 3
[% USE LxERP %]
......
111 5
[% USE P %]
112 6

  
113 7

  
8
<div class="list-total">
9

  
10
<table class="tbl-list footer-only right">
11
  <colgroup> <col class="wi-small"><col class="wi-small"><col class="wi-small"><col class="wi-small"><col class="wi-small"> </colgroup>
12
  <tfoot>
13
    [% UNLESS taxincluded %]
14
    <tr>
15
      <th colspan="3"></th>
16
      <th>[% 'Subtotal' | $T8 %]</th>
17
      <td class="numeric">[% LxERP.format_amount(invsubtotal, 2) %]</td>
18
    </tr>
19
    [% END %][% # tax %]
20

  
21
    [% FOREACH item = taxaccounts_array %]
22
      [% SET description_ref = item _ '_description' %]
23
      [% SET rate_ref        = item _ '_rate' %]
24
      [% SET total_ref       = item _ '_total' %]
25
      [% SET netto_ref       = item _ '_netto' %]
26
      <tr>
27
        <th colspan="3"></th>
28
        <th>[% 'Including' | $T8 %] [% $description_ref | html %]&nbsp;[% $rate_ref * 100 %]%</th>
29
        <td class="numeric">[% LxERP.format_amount($total_ref, 2) %]</td>
30
      </tr>
31
      [% IF taxincluded %]
32
      <tr>
33
        <th colspan="3"></th>
34
        <th>[% 'Net amount' | $T8 %]</th>
35
        <td class="numeric">[% LxERP.format_amount($netto_ref, 2) %]</td>
36
      </tr>
37
      [% END %]
38
    [% END %]
39

  
40
    <tr>
41
      [% IF show_weight %]
42
        <th>[% 'Total weight' | $T8 %]</th>
43
        <td class="numeric">[% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]</td>
44
        <th></th>
45
      [% ELSE %]
46
        <th colspan="3"></th>
47
      [% END %]
48
      <th>[% 'Total' | $T8 %]</th>
49
      <td class="numeric">[% LxERP.format_amount(invtotal, 2) %]</td>
50
    </tr>
51
  </tfoot>
52
</table>
53

  
54
[% IF taxaccounts %]
55
<div class="after-item"><input name="taxincluded" type="checkbox"[% IF taxincluded %] checked[% END %]> [% 'Tax Included' | $T8 %]</div>
56
[% END %]
57

  
58
</div><!-- /.list-total -->
59
</div><!-- /.list-table-with-separate-total-table -->
60

  
61

  
62

  
114 63
[% PROCESS 'ir/_payments.html' %]
115 64

  
116
 </table>
117 65
</div>
66

  
118 67
[% PROCESS 'webdav/_list.html' %]
119 68
<div id="ui-tabs-1">
120
 [%- LxERP.t8("Loading...") %]
69
  [% LxERP.t8("Loading...") %]
121 70
</div>
122 71
</div>
123 72

  
124
<hr size="3" noshade>
73

  
125 74

  
126 75
<p>[% print_options %]</p>
127 76

  
templates/webpages/ir/form_header.html
15 15

  
16 16
<p>[% saved_message %]</p>
17 17

  
18
[%- FOREACH key = HIDDENS %]
18
[% FOREACH key = HIDDENS %]
19 19
<input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
20
[%- END %]
20
[% END %]
21 21
<input type="hidden" name="follow_up_trans_id_1" value="[% id %]">
22 22
<input type="hidden" name="follow_up_trans_type_1" value="purchase_invoice">
23 23
<input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
24 24
<input type="hidden" name="follow_up_rowcount" value="1">
25 25
<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
26 26

  
27
[%- INCLUDE 'common/flash.html' %]
28
[%- INCLUDE 'generic/set_longdescription.html' %]
27
[% INCLUDE 'common/flash.html' %]
28
[% INCLUDE 'generic/set_longdescription.html' %]
29 29

  
30 30
<div id="ir_tabs" class="tabwidget">
31
 <ul>
31

  
32
<ul>
32 33
  <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
33
[%- IF INSTANCE_CONF.get_webdav %]
34
  <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
35
[%- END %]
36
[%- IF id %]
37
  [%- IF INSTANCE_CONF.get_doc_storage %]
38
  <li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
39
  <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
40
  [%- END %]
41
  [%- IF AUTH.assert('record_links', 1) %]
42
  <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
43
  [%- END %]
44
  <li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
45
[%- END %]
46
 </ul>
47

  
48
 <div id="ui-tabs-basic-data">
49
<table width="100%">
50
  <tr>
51
    <td valign="top">
52
      <table>
53
        <tr>
54
          <th align="right">[% 'Vendor' | $T8 %]</th>
55
          <td>
56
           [% P.customer_vendor.picker("vendor_id", vendor_id, type="vendor", style="width: 250px", class="initial_focus", onchange="\$('#update_button').click()") %]
57
           [% P.button_tag("show_vc_details('vendor')", LxERP.t8('Details (one letter abbreviation)')) %]
58
           [% P.hidden_tag("previous_vendor_id", vendor_id) %]
59
          </td>
60
        </tr>
61
[%- IF ALL_CONTACTS.size %]
62
        <tr>
63
          <th align="right">[% 'Contact Person' | $T8 %]</th>
64
          <td>
65
            [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style = 'width: 250px') %]
66
          </td>
67
        </tr>
68
[%- END %]
69
        <tr>
70
          <td align="right">[% 'Credit Limit' | $T8 %]</td>
71
          <td>
72
            [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %]
73
            <span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
74
          </td>
75
        </tr>
76
[%- IF invoice_obj.sepa_exports.as_list.size %]
77
        <tr>
78
          <th align="right">[% LxERP.t8("SEPA exports") %]</th>
79
          <td>
80
           [% FOREACH export = invoice_obj.sepa_exports.as_list %]
81
            <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
82
            [% UNLESS loop.last %], [% END %]
83
           [% END %]
84
          </td>
85
        </tr>
86
[%- END %]
87
[%- IF business %]
88
        <tr>
89
          <th align="right">[% 'Vendor type' | $T8 %]</th>
90
          <td>[% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %</td>
91
        </tr>
92
[%- END %]
93
        <tr>
94
          <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
95
          <td colspan="3"><select name="AP" style="width:250px;">[% selectAP %]</select></td>
96
          <input type="hidden" name="selectAP" value="[% selectAP %]">
97
        </tr>
98
        <tr>
99
          <th align="right">[% 'Steuersatz' | $T8 %]</th>
100
          <td>
101
            [% L.select_tag('taxzone_id', ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES) , default = taxzone_id, title_key = 'description', disabled = (id ? 1 : 0), style='width: 250px', onchange = "document.getElementById('update_button').click();") %]
102
  [%- IF id %]
103
          <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
104
  [%- END %]
105
          </td>
106
  [%- IF id %]
34
  [% IF INSTANCE_CONF.get_webdav %]
35
    <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
36
  [% END %]
37
  [% IF id %]
38
    [% IF INSTANCE_CONF.get_doc_storage %]
39
      <li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
40
      <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
41
    [% END %]
42
    [% IF AUTH.assert('record_links', 1) %]
43
      <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
44
    [% END %]
45
    <li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li>
46
  [% END %]
47
</ul>
48

  
49
<div id="ui-tabs-basic-data">
50

  
51
<div class="wrapper" id="wrapper-1">
52
  [% INCLUDE 'generic/toggle_wrapper.html' %]
53

  
54
  <table class="tbl-horizontal col">
55
  <caption>[% 'Vendor & Transaction' | $T8 %]</caption>
56
  <colgroup> <col class="wi-small"><col class="wi-wide"> </colgroup>
57
  <tbody>
58
    <tr>
59
      <th>[% 'Vendor' | $T8 %]</th>
60
      <td class="wi-wide">[% P.customer_vendor.picker("vendor_id", vendor_id, type="vendor", class="wi-wide", class="initial_focus", onchange="\$('#update_button').click()") %][% P.button_tag("show_vc_details('vendor')", LxERP.t8('Details (one letter abbreviation)'), class='wi-tiny neutral') %] [% P.hidden_tag("previous_vendor_id", vendor_id) %]</td>
61
    </tr>
62
    [% IF ALL_CONTACTS.size %]
63
    <tr>
64
      <th>[% 'Contact Person' | $T8 %]</th>
65
      <td>[% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, class='wi-wide') %]</td>
66
    </tr>
67
    [% END %]
68
    [% IF business %]
69
    <tr>
70
      <th>[% 'Vendor type' | $T8 %]</th>
71
      <td>[% business %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_amount(tradediscount * 100) %] %</td>
72
    </tr>
73
    [% END %]
74
    [% IF ALL_DEPARTMENTS.as_list.size %]
75
    <tr>
76
      <th>[% 'Department' | $T8 %]</th>
77
      <td>[% P.select_tag("department_id", ALL_DEPARTMENTS, with_empty=1, default=department_id, title_key="description", class="wi-wide") %]</td>
78
    </tr>
79
    [% END %]
80
    <tr>
81
      <th>[% 'Credit Limit' | $T8 %]</th>
82
      <td>
83
        <span class="data wi-wide">
84
          [% LxERP.format_amount(creditlimit, 0, '0') %]; [% 'Remaining' | $T8 %]
85
          <span class="plus[% IF is_credit_remaining_negativ %]0[% ELSE %]1[% END %]">[% LxERP.format_amount(creditremaining,0 ,'0') %]</span>
86
        </span>
87
      </td>
88
    </tr>
89
    [% IF invoice_obj.sepa_exports.as_list.size %]
90
    <tr>
91
      <th>[% LxERP.t8("SEPA exports") %]</th>
92
      <td>
93
        [% FOREACH export = invoice_obj.sepa_exports.as_list %]
94
          <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
95
          [% UNLESS loop.last %], [% END %] [% END %]
96
        </td>
97
    </tr>
98
    [% END %]
99
    <tr>
100
      <th>[% 'Record in' | $T8 %]</th>
101
      <td>
102
      <select name="AP" class="wi-wide strict">
103
        [% selectAP %]
104
      </select>
105
      <input type="hidden" name="selectAP" value="[% selectAP %]">
106
      </td>
107
    </tr>
108
    <tr>
109
      <th>[% 'Steuersatz' | $T8 %]</th>
110
      <td>
111
        [% L.select_tag('taxzone_id',
112
                         ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES) ,
113
                         default = taxzone_id,
114
                         title_key = 'description',
115
                         disabled = (id ? 1 : 0),
116
                         class='wi-wide',
117
                         onchange = "document.getElementById('update_button').click();"
118
        ) %]
119
        [% IF id %]
107 120
          <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
108
  [%- END %]
109
        </tr>
110
[%- IF ALL_DEPARTMENTS.as_list.size %]
111
        <tr>
112
          <th align="right" nowrap>[% 'Department' | $T8 %]</th>
113
          <td colspan="3">[% P.select_tag("department_id", ALL_DEPARTMENTS, with_empty=1, default=department_id, title_key="description", style="width: 250px") %]</td>
114
        </tr>
115
[%- END %]
116
[%- IF currencies %]
117
        <tr>
118
          <th align="right">[% 'Currency' | $T8 %]</th>
119
          <td>[% currencies %]</td>
120
        </tr>
121
[%- END %]
122
        <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
123
        <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
124
[%- IF show_exchangerate %]
125
        <tr>
126
          <th align="right">[% 'Exchangerate' | $T8 %]</th>
127
          <td>
128
           [%- IF forex %]
129
            [% LxERP.format_amount(exchangerate, 5) %]
130
           [%- ELSE %]
131
            <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
132
           [%- END %]
133
          </td>
134
        </tr>
135
[%- END %]
136
      </table>
137
    </td>
138
    <td align="right" valign="top">
139
      <table>
140
        <tr>
141
          <th align="right">[% 'Employee' | $T8 %]</th>
142
          <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]</td>
143
        </tr>
144
        <tr>
145
          <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
146
          <td colspan="3">[% L.input_tag("invnumber", invnumber, size="11") %]</td>
147
        </tr>
148
        <tr>
149
          <th align="right">[% 'Invoice Date' | $T8 %]</th>
150
          <td>[% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")') %]</td>
151
        </tr>
152
        <tr>
153
          <th align="right">[% 'Due Date' | $T8 %]</th>
154
          <td>
155
           <span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% L.date_tag('duedate', duedate) %]</span>
156
           <span id="duedate_fixed"[% IF !payment_terms_obj.auto_calculation %] style="display:none"[% END %]>[% HTML.escape(duedate) %]</span>
157
          </td>
158
        </tr>
159
        <tr>
160
          <th align="right" nowrap>[% LxERP.t8('Tax point') %]</th>
161
          <td nowrap>[% L.date_tag('tax_point', tax_point, id='tax_point') %]</td>
162
        </tr>
163
        <tr>
164
          <th align="right">[% 'Delivery Date' | $T8 %]</th>
165
          <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
166
        </tr>
167
        <tr>
168
          <th align="right" nowrap>[% 'Order Number' | $T8 %]</th>
169
          <td colspan="3"><input size='11' name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
170
        </tr>
121
        [% END %]
122
      </td>
123
    </tr>
124
    [% IF currencies %]
125
      <tr>
126
        <th>[% 'Currency' | $T8 %]</th>
127
        <td class="wi-small">[% currencies %]</td>
128
      </tr>
129
    [% END %]
130
    <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
131
    <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
132
    [% IF show_exchangerate %]
133
      <tr>
134
        <th>[% 'Exchangerate' | $T8 %]</th>
135
        <td class="wi-small">
136
          [% IF forex %]
137
            <span class="data wi-small">[% LxERP.format_amount(exchangerate, 5) %]</span>
138
          [% ELSE %]
139
            <input type="text" name="exchangerate" class="wi-small" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
140
          [% END %]
141
        </td>
142
      </tr>
143
    [% END %]
144
  </tbody>
145
  </table>
146

  
147
  <table class="tbl-horizontal col">
148
    <caption>[% 'Payment / Delivery Options' | $T8 %]</caption>
149
    <colgroup><col class="wi-wider"> </colgroup>
150
    <tbody>
151
      <tr>
152
        <td>
153
          <span class="label-above">[% 'Payment Terms' | $T8 %]</span>
154
          [% L.select_tag('payment_id', payment_terms, default = payment_id, title_key = 'description', with_empty = 1, style="width: 250px") %]
155
          <script type='text/javascript'>$('#payment_id').change(function(){ kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate"); })</script>
156
        </td>
157
      </tr>
158
      <tr>
159
        <td>
160
          <span class="label-above">[% 'Delivery Terms' | $T8 %]</span>
161
          [% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default=delivery_term_id, with_empty=1, title_key='description', class='wi-wider') %]
162
        </td>
163
      </tr>
164
      <tr>
165
        <td>[% L.checkbox_tag('direct_debit', 'checked', direct_debit) %] <label for="direct_debit">[% 'direct debit' | $T8 %]</label></td>
166
      </tr>
167
      <tr>
168
        <th class="caption">[% 'Notes' | $T8 %]</th>
169
      </tr>
170
      <tr>
171
        <td class="wi-wider">[% L.textarea_tag("notes", notes, wrap="soft", style="height:150px", class="texteditor wi-wider") %]</td>
172
      </tr>
173
      <tr>
174
        <td>
175
          <span class="label-above">[% 'Internal Notes' | $T8 %]</span>
176
          [% L.textarea_tag("intnotes", intnotes, wrap="soft", class="wi-wider", style="width: 350px; height: 150px") %]
177
        </td>
178
      </tr>
179
      [% IF id && follow_ups.size %]
180
      <tr>
181
        <td>[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size, follow_ups_unfinished) | html %]</td>
182
      </tr>
183
      [% END %]
184
    </tbody>
185
  </table>
186

  
187
  <table class="tbl-horizontal col">
188
    <caption>[% 'Handling, Numbers & Dates' | $T8 %]</caption>
189
    <colgroup> <col class="wi-mediumsmall"><col class="wi-wide"> </colgroup>
190
    <tbody>
191
      <tr>
192
        <th>[% 'Employee' | $T8 %]</th>
193
        <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name', class='wi-wide') %]</td>
194
      </tr>
195
      <tr>
196
        <th>[% 'Order Number' | $T8 %]</th>
197
        <td><input type="text" class="wi-mediumsmall" name="ordnumber" value="[% HTML.escape(ordnumber) %]"></td>
198
      </tr>
199
      [% IF is_type_credit_note %]
200
      <tr>
201
        <th>[% 'Credit Note Number' | $T8 %]</th>
202
        <td><input type="text" class="wi-mediumsmall" name="invnumber" value="[% HTML.escape(invnumber) %]"></td>
203
      </tr>
204
      [% ELSE %]
205
      <tr>
206
        <th>[% 'Invoice Number' | $T8 %]</th>
207
        <td>[% L.input_tag('invnumber', invnumber, class='wi-mediumsmall') %]</td>
208
      </tr>
209
      [% END %]
210
      <tr>
211
        <th>[% 'Project Number' | $T8 %]</th>
212
        <td>[% P.project.picker('globalproject_id', globalproject_id, onchange="document.getElementById('update_button').click();", class='wi-mediumsmall') %]</td>
213
      </tr>
214
      <tr>
215
        <th>[% 'Quotation Date' | $T8 %]</th>
216
        <td>[% L.date_tag('quodate', quodate, class='wi-small') %]</td>
217
      </tr>
218
      <tr>
219
        <th>[% 'Order Date' | $T8 %]</th>
220
        <td>[% L.date_tag('orddate', orddate, class='wi-small') %]</td>
221
      </tr>
222
      [% IF is_type_credit_note %]
171 223
        <tr>
172
          <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
173
          <td>[% L.date_tag('orddate', orddate) %]</td>
224
          <th>[% 'Credit Note Date' | $T8 %]</th>
225
          <td>[% L.date_tag('invdate', invdate, class='wi-small') %]</td>
174 226
        </tr>
227
      [% ELSE %]
175 228
        <tr>
176
          <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
177
          <td>[% L.date_tag('quodate', quodate) %]</td>
229
          <th>[% 'Invoice Date' | $T8 %]</th>
230
          <td>[% L.date_tag('invdate', invdate, onChange='kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate")', class='wi-small') %]</td>
178 231
        </tr>
179 232
        <tr>
180
          <th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
181
          <td>[% P.project.picker('globalproject_id', globalproject_id, onchange="document.getElementById('update_button').click();") %]</td>
233
          <th>[% 'Due Date' | $T8 %]</th>
234
          <td><span id="duedate_container"[% IF payment_terms_obj.auto_calculation %] style="display:none"[% END %] class="condensed">[% L.date_tag('duedate', duedate, class='wi-small') %]</span> <span id="duedate_fixed" [% IF !payment_terms_obj.auto_calculation %] style="display:none" [% END %]>[% HTML.escape(duedate) %]</span> </td>
182 235
        </tr>
183
      </table>
184
    </td>
185
  </tr>
186
</table>
187
    </td>
188
  </tr>
189
  <tr>
190
    <td>
191
    </td>
192
  </tr>
193
  <script type="text/javascript" src="js/show_form_details.js"></script>
194
  <script type="text/javascript" src="js/show_vc_details.js"></script>
195
  <script type="text/javascript" src="js/show_history.js"></script>
196
  <script type="text/javascript">
197
   <!--
198
     $('document').ready(function(){
199
[% IF creditwarning != '' %]
200
       alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
201
[% ELSE %]
202
[% END %]
236
      [% END %]
237
      <tr>
238
        <th>[% 'Tax point' | $T8 %]</th>
239
        <td>[% L.date_tag('tax_point', tax_point, id='tax_point', class='wi-small') %]</td>
240
      </tr>
241
      <tr>
242
        <th>[% 'Delivery Date' | $T8 %]</th>
243
        <td>[% L.date_tag('deliverydate', deliverydate, class='wi-small') %]</td>
244
      </tr>
245

  
246

  
247
    </tbody>
248
  </table>
249

  
250
</div><!-- /.wrapper -->
251

  
252
<script type="text/javascript" src="js/show_form_details.js"></script>
253
<script type="text/javascript" src="js/show_vc_details.js"></script>
254
<script type="text/javascript" src="js/show_history.js"></script>
255
<script type="text/javascript"><!--
256
  $('document').ready(function(){
257
  [% IF creditwarning != '' %]
258
    alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
259
  [% ELSE %]
260
  [% END %]
203 261
     });
204
   //-->
205
  </script>
206
  <input type="hidden" name="webdav" value="[% webdav | html %]">
262
//--></script>
263

  
264
<input type="hidden" name="webdav" value="[% webdav | html %]">
265

  
266
<div class="list-table-with-separate-total-table">

Auch abrufbar als: Unified diff