6 <script type="text/javascript" src="js/FormManager.js" >
7 /****************************************************
8 * Form Dependency Manager- By Twey- http://www.twey.co.uk
9 * Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
10 ****************************************************/
13 <script type="text/javascript">
15 setupDependencies('EditAccount'); //name of form(s). Separate each with a comma (ie: 'weboptions', 'myotherform' )
19 <form method="post" name="EditAccount" action="am.pl" id="form">
21 <input type="hidden" name="id" value="[% HTML.escape(id) %]">
22 <input type="hidden" name="type" value="account">
23 <input type="hidden" name="orphaned" value="[% HTML.escape(orphaned) %]">
24 <input type="hidden" name="new_chart_valid" value="[% HTML.escape(new_chart_valid) %]">
25 <input type="hidden" name="inventory_accno_id" value="[% HTML.escape(inventory_accno_id) %]">
26 <input type="hidden" name="income_accno_id" value="[% HTML.escape(income_accno_id) %]">
27 <input type="hidden" name="expense_accno_id" value="[% HTML.escape(expense_accno_id) %]">
28 <input type="hidden" name="fxgain_accno_id" value="[% HTML.escape(fxgain_accno_id) %]">
29 <input type="hidden" name="fxloss_accno_id" value="[% HTML.escape(fxloss_accno_id) %]">
30 <input type="hidden" name="rndgain_accno_id" value="[% HTML.escape(rndgain_accno_id) %]">
31 <input type="hidden" name="rndloss_accno_id" value="[% HTML.escape(rndloss_accno_id) %]">
35 [% 'Main Preferences' | $T8 %]
41 [% 'Account Number' | $T8 %]
43 <td><input id="accno" name="accno" size="20" value="[% HTML.escape(accno) %]"></td>
48 [% 'Description' | $T8 %]
51 <td><input id="description" name="description" size="40" value="[% HTML.escape(description) %]"></td>
56 [% 'Chart Type' | $T8 %]
61 [% IF AccountIsPosted %]
62 [% L.select_tag('dummy_charttype',
66 default => selected_charttype,
68 [% L.hidden_tag('charttype', selected_charttype) %]
70 [% L.select_tag('charttype',
74 default => selected_charttype) %]
81 <fieldset class="DEPENDS ON charttype BEING A">
82 <legend>[% 'Account Type' | $T8 %]</legend>
83 <select name="category" id="AccountType" class="DEPENDS ON charttype BEING A">
84 [% select_category %]</select>
87 [% IF ChartTypeIsAccount %]
88 <fieldset class="DEPENDS ON charttype BEING A">
89 <legend>[% 'Is this a summary account to record' | $T8 %]</legend>
90 [% L.radio_button_tag('summary_account',
92 disabled => AccountIsPosted,
94 [% 'AR' | $T8 %]
95 [% L.radio_button_tag('summary_account',
97 disabled => AccountIsPosted,
99 [% 'AP' | $T8 %]
100 [% L.radio_button_tag('summary_account',
102 disabled => AccountIsPosted,
104 [% 'Inventory' | $T8 %]
105 [% L.radio_button_tag('summary_account',
107 disabled => AccountIsPosted) %]
108 [% 'No summary account' | $T8 %]
110 [% IF AccountIsPosted %]
111 [% IF AR %] [% L.hidden_tag('AR', 'AR') %] [% END %]
112 [% IF AP %] [% L.hidden_tag('AP', 'AP') %] [% END %]
113 [% IF IC %] [% L.hidden_tag('IC', 'IC') %] [% END %]
118 [% IF AccountIsPosted %]
119 [% IF AR_amount %] [% L.hidden_tag('AR_amount', 'AR_amount') %] [% END %]
120 [% IF AR_paid %] [% L.hidden_tag('AR_paid', 'AR_paid') %] [% END %]
121 [% IF AR_tax %] [% L.hidden_tag('AR_tax', 'AR_tax') %] [% END %]
122 [% IF AP_amount %] [% L.hidden_tag('AP_amount', 'AP_amount') %] [% END %]
123 [% IF AP_paid %] [% L.hidden_tag('AP_paid', 'AP_paid') %] [% END %]
124 [% IF AP_tax %] [% L.hidden_tag('AP_tax', 'AP_tax') %] [% END %]
125 [%- SET DIS = ' disabled="disabled"' %]
127 <fieldset class="DEPENDS ON charttype BEING A">
128 <legend>[% 'Include in drop-down menus' | $T8 %]</legend>
129 <p style='font-weight:normal'>[% 'Changes in this block are only sensible if the account is NOT a summary account AND there exists one valid taxkey. To select both Receivables and Payables only make sense for Payment / Receipt (i.e. account cash).' | $T8 %]</p>
130 <p style='font-weight:normal'>[% 'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' | $T8 %]
131 [% 'The changing of tax-o-matic account is NOT recommended, but if you do so please also (re)configure booking groups and reconfigure ALL charts which point to this tax-o-matic account. ' | $T8 %]</p>
134 <th align="left">[% 'Receivables' | $T8 %]</th>
135 <th align="left">[% 'Payables' | $T8 %]</th>
136 <th align="left">[% 'Parts Inventory' | $T8 %]</th>
137 <th align="left">[% 'Service Items' | $T8 %]</th>
141 [% L.radio_button_tag('AR_include_in_dropdown',
142 value => 'AR_amount',
143 disabled => AccountIsPosted,
144 checked => AR_amount) %]
145 [% 'Revenue' | $T8 %] <br>
146 [% L.radio_button_tag('AR_include_in_dropdown',
148 disabled => AccountIsPosted,
149 checked => AR_paid) %]
150 [% 'Receipt' | $T8 %] <br>
151 [% L.radio_button_tag('AR_include_in_dropdown',
153 disabled => AccountIsPosted,
154 checked => AR_tax) %]
155 [% 'Tax' | $T8 %] <br>
156 [% L.radio_button_tag('AR_include_in_dropdown',
158 disabled => AccountIsPosted) %]
159 [% 'do not include' | $T8 %]
162 [% L.radio_button_tag('AP_include_in_dropdown',
163 value => 'AP_amount',
164 disabled => AccountIsPosted,
165 checked => AP_amount) %]
166 [% 'Expense/Asset' | $T8 %] <br>
167 [% L.radio_button_tag('AP_include_in_dropdown',
169 disabled => AccountIsPosted,
170 checked => AP_paid) %]
171 [% 'Payment' | $T8 %] <br>
172 [% L.radio_button_tag('AP_include_in_dropdown',
174 disabled => AccountIsPosted,
175 checked => AP_tax) %]
176 [% 'Tax' | $T8 %] <br>
177 [% L.radio_button_tag('AP_include_in_dropdown',
179 disabled => AccountIsPosted) %]
180 [% 'do not include' | $T8 %]
183 <input name="IC_sale" type="checkbox" class="checkbox" value="IC_sale"
184 [% HTML.escape(IC_sale) %]>
185 [% 'Revenue' | $T8 %] <br>
186 <input name="IC_cogs" type="checkbox" class="checkbox" value="IC_cogs"
187 [% HTML.escape(IC_cogs) %]>
188 [% 'Expense' | $T8 %] <br>
189 <input name="IC_taxpart" type="checkbox" class="checkbox" value="IC_taxpart"
190 [% HTML.escape(IC_taxpart) %]>
195 <input name=IC_income type=checkbox class=checkbox value="IC_income"
196 [% HTML.escape(IC_income) %]>
197 [% 'Revenue' | $T8 %] <br>
198 <input name=IC_expense type=checkbox class=checkbox value="IC_expense"
199 [% HTML.escape(IC_expense) %]>
200 [% 'Expense' | $T8 %] <br>
201 <input name=IC_taxservice type=checkbox class=checkbox value="IC_taxservice"
202 [% HTML.escape(IC_taxservice) %]>
210 <fieldset class="DEPENDS ON charttype BEING A">
212 [% 'Taxkeys and Taxreport Preferences' | $T8 %]
214 <p style='font-weight:normal'>[% 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' | $T8 %]</p>
218 <th align="left">[% 'Taxkey' | $T8 %]</th>
219 <th align="left">[% 'valid from' | $T8 %]</th>
220 [% IF feature_ustva %]
221 <th align="left">[% 'pos_ustva' | $T8 %]</th>
223 <th align="left">[% 'delete' | $T8 %] ? </th>
225 [% FOREACH tk = ACCOUNT_TAXKEYS %]
229 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="[% tk.id %]">
230 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
231 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
232 [% IF feature_ustva %]
233 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
235 <td><input name="taxkey_del_[% tk.runningnumber %]" type="checkbox"
236 class="checkbox" value="delete"></td>
238 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="NEW">
239 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
240 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
241 [% IF feature_ustva %]
242 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
253 <fieldset class="DEPENDS ON charttype BEING A">
254 <legend>[% 'Report and misc. Preferences' | $T8 %]</legend>
256 [% IF feature_erfolgsrechnung %]
258 <th align="left">[% 'Erfolgsrechnung' | $T8 %]</th>
259 <td colspan="3"><select name="pos_er">[% select_er %]</select></td>
262 [% IF feature_eurechnung %]
264 <th align="left">[% 'EUER' | $T8 %]</th>
265 <td colspan="3"><select name="pos_eur">[% select_eur %]</select></td>
268 <th align="left">[% 'BWA' | $T8 %]</th>
269 <td colspan="3"><select name="pos_bwa">[% select_bwa %]</select></td>
272 [% IF feature_balance %]
273 <!-- Diese Steuerfunktion hat keine Auswirkung in der Bilanz und wird erstmal deaktiviert. -->
275 <th align="left">[% 'Bilanz' | $T8 %]</th>
276 <td colspan="3"><select name="pos_bilanz">[% select_bilanz %]</select></td>
279 [% IF feature_datev %]
281 <th align="left">[% 'Datevautomatik' | $T8 %]</th>
282 <td colspan="3"><input name="datevautomatik" type="checkbox" class="checkbox" value="T" [% IF datevautomatik %]checked [% END %]>[% 'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' | $T8 %] </td>
286 <th align="left">[% 'Folgekonto' | $T8 %]</th>
287 <td><select name="new_chart_id">[% selectnewaccount %]</select></td>
288 <th align="left">[% 'Valid from' | $T8 %]</th>
289 <td><input name="valid_from" value="[% valid_from %]"></td>
294 <hr size="3" noshade>
297 <script type="text/javascript">
298 function callback_save() {
299 var prev_desc = "[% description | html %]";
300 var prev_accno = "[% accno | html %]";
301 var cur_desc = $("#description").val();
302 var cur_accno = $("#accno").val();
304 if ( prev_desc != cur_desc || prev_accno != cur_accno )
305 return confirm(kivi.t8("Do you want to set the account number \"#1\" to \"#2\" and the name \"#3\" to \"#4\"?", [prev_accno, cur_accno, prev_desc, cur_desc]));
311 [% L.hidden_tag('callback', callback) %]