booking roundings to new standard-accounts
[kivitendo-erp.git] / templates / webpages / is / form_footer.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %][%- USE P -%]
5   <tr>
6    <td>
7     <table width="100%">
8      <tr valign="bottom">
9       <td>
10        <table>
11         <tr>
12          <th align="left">[% 'Notes (will appear on hard copy)' | $T8 %]</th>
13          <th align="left">[% 'Internal Notes' | $T8 %]</th>
14          <th align="right">[% 'Payment / Delivery Options' | $T8 %]</th>
15         </tr>
16         <tr valign="top">
17          <td>
18           [% L.textarea_tag("notes", notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
19          </td>
20          <td>
21           <textarea name="intnotes" rows="[% rows %]" cols="35">[% intnotes %]</textarea>
22          </td>
23          <td>
24            <table>
25              <tr>
26                <th align="right">[% 'Payment Terms' | $T8 %]</th>
27                <td>
28                  [%- INCLUDE 'generic/multibox.html'
29                    name          = 'payment_id',
30                    style         = 'width: 250px',
31                    DATA          = payment_terms,
32                    id_key        = 'id',
33                    label_key     = 'description',
34                    show_empty    = 1
35                    allow_textbox = 0 -%]
36                  <script type='text/javascript'>$('#payment_id').change(function(){ kivi.SalesPurchase.set_duedate_on_reference_date_change("invdate"); })</script>
37                </td>
38              </tr>
39              <tr>
40                <th align="right">[% 'Delivery Terms' | $T8 %] </th>
41                <td>
42                  [% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description', style = 'width: 250px') %]
43                </td>
44              </tr>
45              <tr>
46                <th align="right">[% 'direct debit' | $T8 %]</th>
47                <td>
48                  [%- L.checkbox_tag('direct_debit', 'checked', direct_debit) %]
49                </td>
50              </tr>
51            </table>
52          </td>
53         </tr>
54 [%- IF id && follow_ups.size %]
55         <tr>
56           <td colspan="2">
57             [%- LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_ups.size, follow_ups_unfinished) | html %]
58           <td>
59         </tr>
60 [%- END %]
61        </table>
62       </td>
63 [%- IF show_weight %]
64       <td>
65        <table>
66         <tr>
67          <th  align=left>[% 'Total weight' | $T8 %]</th>
68          <td>
69           [% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]
70          </td>
71         </tr>
72        </table>
73       </td>
74 [%- END %]
75       <td>
76        <table>
77         <tr>
78          <th  align=left>[% 'Ertrag' | $T8 %]</th>
79          <td>
80           [% LxERP.format_amount(marge_total, 2, 0) %]
81           <input type=hidden name="marge_total" value="[% marge_total %]">
82          </td>
83         </tr>
84         <tr>
85          <th  align=left>[% 'Ertrag prozentual' | $T8 %]</th>
86          <td>
87           [% LxERP.format_amount(marge_percent, 2, 0) %] %
88           <input type=hidden name="marge_percent" value="[% marge_percent %]">
89          </td>
90         </tr>
91        </table>
92       </td>
93       <td align="right">
94   [%- IF taxaccounts %]
95        <input type="hidden" name="taxincluded_changed_by_user" id="taxincluded_changed_by_user" value="[% taxincluded_changed_by_user ? '1' : '0' %]">
96        <input name="taxincluded" onclick="document.getElementById('taxincluded_changed_by_user').value = '1';" class="checkbox" type="checkbox" [% IF taxincluded %]checked[% END %]>
97        <b>[% 'Tax Included' | $T8 %]</b>
98        <br>
99        <br>
100   [%- END %]
101        <table>
102
103 [%- UNLESS taxincluded %]
104         <tr>
105          <th align="right">[% 'Subtotal' | $T8 %]</th>
106          <td align="right">[% LxERP.format_amount(invsubtotal, 2) %]</td>
107        </tr>
108 [%- END %]
109
110 [%- IF rounding %]
111         <tr>
112           <th align='right'>[% 'Rounding' | $T8 %]</th>
113           <td align='right'>[% LxERP.format_amount(rounding, 2) %]</td>
114         </tr>
115 [%- END %]
116
117 [%# tax %]
118 [% FOREACH item = taxaccounts_array %]
119 [% SET description_ref = item _ '_description' %]
120 [% SET rate_ref        = item _ '_rate' %]
121 [% SET total_ref       = item _ '_total' %]
122 [% SET netto_ref       = item _ '_netto' %]
123        <tr>
124         <th align="right">[% 'Including' | $T8 %] [% $description_ref | html %]&nbsp;[% $rate_ref * 100 %]%</th>
125         <td align="right">[% LxERP.format_amount($total_ref, 2) %]</td>
126        </tr>
127   [%- IF taxincluded %]
128        <tr>
129         <th align="right">[% 'Net amount' | $T8 %]</th>
130         <td align="right">[% LxERP.format_amount($netto_ref, 2) %]</td>
131        </tr>
132   [%- END %]
133 [%- END %]
134         <tr>
135          <th align="right">[% 'Total' | $T8 %]</th>
136          <td align="right">[% LxERP.format_amount(invtotal, 2) %]</td>
137         </tr>
138        </table>
139       </td>
140      </tr>
141     </table>
142    </td>
143   </tr>
144
145 [% PROCESS 'is/_payments.html' %]
146  </table>
147 </div>
148 [% PROCESS 'webdav/_list.html' %]
149 <div id="ui-tabs-1">
150  [% LxERP.t8('Loading...') %]
151 </div>
152 </div>
153
154 <hr size="3" noshade>
155
156 <p>[% print_options %]</p>
157
158   [% IF id %]
159
160     <input class="submit" type="submit" accesskey="u" name="action" id="update_button" value="[% 'Update' | $T8 %]">
161     <input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
162     <input class="submit" type="submit" name="action" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
163     <input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
164 [% IF  show_storno %]
165     <input class="submit" type="submit" name="action" value="[% 'Storno' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
166 [% END %]
167     <input class="submit" type="submit" name="action" value="[% 'Post Payment' | $T8 %]">
168     <input class="submit" type="submit" name="action" value="[% 'Use As New' | $T8 %]">
169
170 [% IF id && !is_type_credit_note %]
171     <input class="submit" type="submit" name="action" value="[% 'Credit Note' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
172 [% END %]
173 [% IF show_delete && !storno %]
174     <input class="submit" type="submit" name="action" value="[% 'Delete' | $T8 %]">
175     <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
176 [% END %]
177     <input class="submit" type="submit" name="action" value="[% 'Order' | $T8 %]">
178     <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
179
180  [% ELSE # no id %]
181    [% UNLESS locked %]
182       <input class="submit" type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
183       <input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
184       <input class="submit" type="submit" name="action" value="[% 'Preview' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
185       <input class="submit" type="submit" name="action" value="[% 'Post and E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
186       <input class="submit" type="submit" name="action" value="[% 'Print and Post' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
187       <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
188       <input class="submit" type="submit" name="action" value="[% 'Save Draft' | $T8 %]">
189    [%- END %]
190  [% END # id %]
191
192   [% IF id %]
193       [%#- button for saving history %]
194       <input type="button" class="submit" onclick="set_history_window([% id | html %], 'glid');" name="history" id="history" value="[% 'history' | $T8 %]">
195       [% IF INSTANCE_CONF.get_is_show_mark_as_paid %]
196           <input type="submit" class="submit" name="action" value="[% 'mark as paid' | $T8 %]">
197       [% END %]
198   [% END %]
199
200   [% IF callback %]
201     <a href="[% callback %]">[% 'back' | $T8  %]</a>
202   [% END %]
203
204 <input type="hidden" name="rowcount" value="[% rowcount %]">
205 <input type="hidden" name="callback" value="[% callback | html %]">
206 <input type="hidden" name="draft_id" value="[% draft_id %]">
207 <input type="hidden" name="draft_description" value="[% draft_description %]">
208 <input type="hidden" name="customer_discount" value="[% customer_discount %]">
209 <input type="hidden" name="gldate" value="[% gldate %]">
210 </form>
211 <script type='text/javascript'>
212  $(kivi.SalesPurchase.init_on_submit_checks);
213 </script>