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). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
19 <form method="post" name="EditAccount" action="am.pl">
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) %]">
33 [% 'Main Preferences' | $T8 %]
39 [% 'Account Number' | $T8 %]
41 <td><input id="accno" name="accno" size="20" value="[% HTML.escape(accno) %]"></td>
46 [% 'Description' | $T8 %]
49 <td><input id="description" name="description" size="40" value="[% HTML.escape(description) %]"></td>
54 [% 'Chart Type' | $T8 %]
59 [% IF AccountIsPosted %]
60 [% L.select_tag('dummy_charttype',
64 default => selected_charttype,
66 [% L.hidden_tag('charttype', selected_charttype) %]
68 [% L.select_tag('charttype',
72 default => selected_charttype) %]
79 <fieldset class="DEPENDS ON charttype BEING A">
80 <legend>[% 'Account Type' | $T8 %]</legend>
81 <select name="category" id="AccountType" class="DEPENDS ON charttype BEING A">
82 [% select_category %]</select>
85 [% IF ChartTypeIsAccount %]
86 <fieldset class="DEPENDS ON charttype BEING A">
87 <legend>[% 'Is this a summary account to record' | $T8 %]</legend>
88 [% L.radio_button_tag('summary_account',
90 disabled => AccountIsPosted,
92 [% 'AR' | $T8 %]
93 [% L.radio_button_tag('summary_account',
95 disabled => AccountIsPosted,
97 [% 'AP' | $T8 %]
98 [% L.radio_button_tag('summary_account',
100 disabled => AccountIsPosted,
102 [% 'Inventory' | $T8 %]
103 [% L.radio_button_tag('summary_account',
105 disabled => AccountIsPosted) %]
106 [% 'No summary account' | $T8 %]
108 [% IF AccountIsPosted %]
109 [% IF AR %] [% L.hidden_tag('AR', 'AR') %] [% END %]
110 [% IF AP %] [% L.hidden_tag('AP', 'AP') %] [% END %]
111 [% IF IC %] [% L.hidden_tag('IC', 'IC') %] [% END %]
116 [% IF AccountIsPosted %]
117 [% IF AR_amount %] [% L.hidden_tag('AR_amount', 'AR_amount') %] [% END %]
118 [% IF AR_paid %] [% L.hidden_tag('AR_paid', 'AR_paid') %] [% END %]
119 [% IF AR_tax %] [% L.hidden_tag('AR_tax', 'AR_tax') %] [% END %]
120 [% IF AP_amount %] [% L.hidden_tag('AP_amount', 'AP_amount') %] [% END %]
121 [% IF AP_paid %] [% L.hidden_tag('AP_paid', 'AP_paid') %] [% END %]
122 [% IF AP_tax %] [% L.hidden_tag('AP_tax', 'AP_tax') %] [% END %]
123 [%- SET DIS = ' disabled="disabled"' %]
125 <fieldset class="DEPENDS ON charttype BEING A">
126 <legend>[% 'Include in drop-down menus' | $T8 %]</legend>
127 <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>
128 <p style='font-weight:normal'>[% 'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' | $T8 %]
129 [% 'The changing of tax-o-matic account is NOT recommended, but if you do so please also (re)configure buchungsgruppen and reconfigure ALL charts which point to this tax-o-matic account. ' | $T8 %]</p>
132 <th align="left">[% 'Receivables' | $T8 %]</th>
133 <th align="left">[% 'Payables' | $T8 %]</th>
134 <th align="left">[% 'Parts Inventory' | $T8 %]</th>
135 <th align="left">[% 'Service Items' | $T8 %]</th>
139 [% L.radio_button_tag('AR_include_in_dropdown',
140 value => 'AR_amount',
141 disabled => AccountIsPosted,
142 checked => AR_amount) %]
143 [% 'Revenue' | $T8 %] <br>
144 [% L.radio_button_tag('AR_include_in_dropdown',
146 disabled => AccountIsPosted,
147 checked => AR_paid) %]
148 [% 'Receipt' | $T8 %] <br>
149 [% L.radio_button_tag('AR_include_in_dropdown',
151 disabled => AccountIsPosted,
152 checked => AR_tax) %]
153 [% 'Tax' | $T8 %] <br>
154 [% L.radio_button_tag('AR_include_in_dropdown',
156 disabled => AccountIsPosted) %]
157 [% 'do not include' | $T8 %]
160 [% L.radio_button_tag('AP_include_in_dropdown',
161 value => 'AP_amount',
162 disabled => AccountIsPosted,
163 checked => AP_amount) %]
164 [% 'Expense/Asset' | $T8 %] <br>
165 [% L.radio_button_tag('AP_include_in_dropdown',
167 disabled => AccountIsPosted,
168 checked => AP_paid) %]
169 [% 'Payment' | $T8 %] <br>
170 [% L.radio_button_tag('AP_include_in_dropdown',
172 disabled => AccountIsPosted,
173 checked => AP_tax) %]
174 [% 'Tax' | $T8 %] <br>
175 [% L.radio_button_tag('AP_include_in_dropdown',
177 disabled => AccountIsPosted) %]
178 [% 'do not include' | $T8 %]
181 <input name="IC_sale" type="checkbox" class="checkbox" value="IC_sale"
182 [% HTML.escape(IC_sale) %]>
183 [% 'Revenue' | $T8 %] <br>
184 <input name="IC_cogs" type="checkbox" class="checkbox" value="IC_cogs"
185 [% HTML.escape(IC_cogs) %]>
186 [% 'Expense' | $T8 %] <br>
187 <input name="IC_taxpart" type="checkbox" class="checkbox" value="IC_taxpart"
188 [% HTML.escape(IC_taxpart) %]>
193 <input name=IC_income type=checkbox class=checkbox value="IC_income"
194 [% HTML.escape(IC_income) %]>
195 [% 'Revenue' | $T8 %] <br>
196 <input name=IC_expense type=checkbox class=checkbox value="IC_expense"
197 [% HTML.escape(IC_expense) %]>
198 [% 'Expense' | $T8 %] <br>
199 <input name=IC_taxservice type=checkbox class=checkbox value="IC_taxservice"
200 [% HTML.escape(IC_taxservice) %]>
208 <fieldset class="DEPENDS ON charttype BEING A">
210 [% 'Taxkeys and Taxreport Preferences' | $T8 %]
212 <p style='font-weight:normal'>[% 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' | $T8 %]</p>
216 <th align="left">[% 'Taxkey' | $T8 %]</th>
217 <th align="left">[% 'valid from' | $T8 %]</th>
218 <th align="left">[% 'pos_ustva' | $T8 %]</th>
219 <th align="left">[% 'delete' | $T8 %] ? </th>
221 [% FOREACH tk = ACCOUNT_TAXKEYS %]
225 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="[% tk.id %]">
226 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
227 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
228 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
229 <td><input name="taxkey_del_[% tk.runningnumber %]" type="checkbox"
230 class="checkbox" value="delete"></td>
232 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="NEW">
233 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
234 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
235 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
245 <fieldset class="DEPENDS ON charttype BEING A">
246 <legend>[% 'Report and misc. Preferences' | $T8 %]</legend>
249 <th align="left">[% 'EUER' | $T8 %]</th>
250 <td colspan="3"><select name="pos_eur">[% select_eur %]</select></td>
253 <th align="left">[% 'BWA' | $T8 %]</th>
254 <td colspan="3"><select name="pos_bwa">[% select_bwa %]</select></td>
256 <!-- Diese Steuerfunktion hat keine Auswirkung in der Bilanz und wird erstmal deaktiviert. -->
258 <th align="left">[% 'Bilanz' | $T8 %]</th>
259 <td colspan="3"><select name="pos_bilanz">[% select_bilanz %]</select></td>
262 <th align="left">[% 'Datevautomatik' | $T8 %]</th>
263 <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>
266 <th align="left">[% 'Folgekonto' | $T8 %]</th>
267 <td><select name="new_chart_id">[% selectnewaccount %]</select></td>
268 <th align="left">[% 'Valid from' | $T8 %]</th>
269 <td><input name="valid_from" value="[% valid_from %]"></td>
274 <hr size="3" noshade>
277 <script type="text/javascript">
278 function callback_save() {
279 var prev_desc = "[% description | html %]";
280 var prev_accno = "[% accno | html %]";
281 var cur_desc = $("#description").val();
282 var cur_accno = $("#accno").val();
284 if ( prev_desc != cur_desc || prev_accno != cur_accno )
285 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]));