3 [% USE HTML %]<script type="text/javascript" src="js/FormManager.js" >
 
   4 /****************************************************
 
   5 * Form Dependency Manager- By Twey- http://www.twey.co.uk
 
   6 * Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
 
   7 ****************************************************/
 
  10 <script type="text/javascript">
 
  12     setupDependencies('EditAccount'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
 
  16 <form method="post" name="EditAccount" action="am.pl">
 
  18 <input type="hidden" name="id"                 value="[% HTML.escape(id) %]">
 
  19 <input type="hidden" name="type"               value="account">
 
  20 <input type="hidden" name="orphaned"           value="[% HTML.escape(orphaned) %]">
 
  21 <input type="hidden" name="new_chart_valid"    value="[% HTML.escape(new_chart_valid) %]">
 
  22 <input type="hidden" name="inventory_accno_id" value="[% HTML.escape(inventory_accno_id) %]">
 
  23 <input type="hidden" name="income_accno_id"    value="[% HTML.escape(income_accno_id) %]">
 
  24 <input type="hidden" name="expense_accno_id"   value="[% HTML.escape(expense_accno_id) %]">
 
  25 <input type="hidden" name="fxgain_accno_id"    value="[% HTML.escape(fxgain_accno_id) %]">
 
  26 <input type="hidden" name="fxloss_accno_id"    value="[% HTML.escape(fxloss_accno_id) %]">
 
  28 <table border="0" width="100%">
 
  30     <th class="listtop">[% title %]</th>
 
  36     [% 'Main Preferences' | $T8 %]
 
  42           [% 'Account Number' | $T8 %]
 
  44         <td><input name="accno" size="20" value="[% HTML.escape(accno) %]"></td>
 
  49           [% 'Description' | $T8 %]
 
  52       <td><input name="description" size="40" value="[% HTML.escape(description) %]"></td>
 
  57           [% 'Chart Type' | $T8 %]
 
  62 [% IF AccountIsPosted %]
 
  63         [% L.select_tag('dummy_charttype',
 
  67                         default => selected_charttype,
 
  69         [% L.hidden_tag('charttype', selected_charttype) %]
 
  71         [% L.select_tag('charttype',
 
  75                         default => selected_charttype) %]
 
  82 <fieldset class="DEPENDS ON charttype BEING A">
 
  83   <legend>[% 'Account Type' | $T8 %]</legend>
 
  84   <select name="category" id="AccountType" class="DEPENDS ON charttype BEING A">
 
  85           [% select_category %]</select>
 
  88 [% IF ChartTypeIsAccount %]
 
  89 <fieldset class="DEPENDS ON charttype BEING A">
 
  90   <legend>[% 'Is this a summary account to record' | $T8 %]</legend>
 
  91     [% L.checkbox_tag('AR', value => 'AR', checked => AR, class => 'checkbox', disabled => AccountIsPosted) %]  [% 'AR' | $T8 %]
 
  92     [% L.checkbox_tag('AP', value => 'AP', checked => AP, class => 'checkbox', disabled => AccountIsPosted) %]  [% 'AP' | $T8 %]
 
  93     [% L.checkbox_tag('IC', value => 'IC', checked => IC, class => 'checkbox', disabled => AccountIsPosted) %]  [% 'Inventory' | $T8 %]
 
  95 [% IF AccountIsPosted %]
 
  96     [% IF AR %] [% L.hidden_tag('AR', 'AR') %] [% END %]
 
  97     [% IF AP %] [% L.hidden_tag('AP', 'AP') %] [% END %]
 
  98     [% IF IC %] [% L.hidden_tag('IC', 'IC') %] [% END %]
 
 103 [% IF AccountIsPosted %]
 
 104   [% IF AR_amount %] [% L.hidden_tag('AR_amount', 'AR_amount') %] [% END %]
 
 105   [% IF AR_paid   %] [% L.hidden_tag('AR_paid',   'AR_paid')   %] [% END %]
 
 106   [% IF AR_tax    %] [% L.hidden_tag('AR_tax',    'AR_tax')    %] [% END %]
 
 107   [% IF AP_amount %] [% L.hidden_tag('AP_amount', 'AP_amount') %] [% END %]
 
 108   [% IF AP_paid   %] [% L.hidden_tag('AP_paid',   'AP_paid')   %] [% END %]
 
 109   [% IF AP_tax    %] [% L.hidden_tag('AP_tax',    'AP_tax')    %] [% END %]
 
 110   [%- SET DIS = ' disabled="disabled"' %]
 
 112 <fieldset class="DEPENDS ON charttype BEING A">
 
 113   <legend>[% 'Include in drop-down menus' | $T8 %]</legend>
 
 114   <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>
 
 115   <p style='font-weight:normal'>[% 'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' | $T8 %]
 
 116   [% '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>
 
 119       <th align="left">[% 'Receivables' | $T8 %]</th>
 
 120       <th align="left">[% 'Payables' | $T8 %]</th>
 
 121       <th align="left">[% 'Parts Inventory' | $T8 %]</th>
 
 122       <th align="left">[% 'Service Items' | $T8 %]</th>
 
 126         [% L.radio_button_tag('AR_include_in_dropdown',
 
 127           value => 'AR_amount',
 
 128           disabled => AccountIsPosted,
 
 129           checked  => AR_amount) %]
 
 130          [% 'Revenue' | $T8 %] <br>
 
 131         [% L.radio_button_tag('AR_include_in_dropdown',
 
 133           disabled => AccountIsPosted,
 
 134           checked  => AR_paid) %]
 
 135          [% 'Receipt' | $T8 %] <br>
 
 136         [% L.radio_button_tag('AR_include_in_dropdown',
 
 138           disabled => AccountIsPosted,
 
 139           checked  => AR_tax) %]
 
 140          [% 'Tax' | $T8 %] <br>
 
 141         [% L.radio_button_tag('AR_include_in_dropdown',
 
 143           disabled => AccountIsPosted) %]
 
 144          [% 'do not include' | $T8 %]
 
 147         [% L.radio_button_tag('AP_include_in_dropdown',
 
 148           value => 'AP_amount',
 
 149           disabled => AccountIsPosted,
 
 150           checked  => AP_amount) %]
 
 151          [% 'Expense/Asset' | $T8 %] <br>
 
 152         [% L.radio_button_tag('AP_include_in_dropdown',
 
 154           disabled => AccountIsPosted,
 
 155           checked  => AP_paid) %]
 
 156          [% 'Payment' | $T8 %] <br>
 
 157         [% L.radio_button_tag('AP_include_in_dropdown',
 
 159           disabled => AccountIsPosted,
 
 160           checked  => AP_tax) %]
 
 161          [% 'Tax' | $T8 %] <br>
 
 162         [% L.radio_button_tag('AP_include_in_dropdown',
 
 164           disabled => AccountIsPosted) %]
 
 165          [% 'do not include' | $T8 %]
 
 168         <input name="IC_sale" type="checkbox" class="checkbox" value="IC_sale"
 
 169           [% HTML.escape(IC_sale) %]> 
 
 170         [% 'Revenue' | $T8 %] <br>
 
 171         <input name="IC_cogs" type="checkbox" class="checkbox" value="IC_cogs"
 
 172           [% HTML.escape(IC_cogs) %]> 
 
 173         [% 'Expense' | $T8 %] <br>
 
 174         <input name="IC_taxpart" type="checkbox" class="checkbox" value="IC_taxpart"
 
 175           [% HTML.escape(IC_taxpart) %]> 
 
 180         <input name=IC_income type=checkbox class=checkbox value="IC_income"
 
 181           [% HTML.escape(IC_income) %]> 
 
 182         [% 'Revenue' | $T8 %] <br>
 
 183         <input name=IC_expense type=checkbox class=checkbox value="IC_expense"
 
 184           [% HTML.escape(IC_expense) %]> 
 
 185         [% 'Expense' | $T8 %] <br>
 
 186         <input name=IC_taxservice type=checkbox class=checkbox value="IC_taxservice"
 
 187           [% HTML.escape(IC_taxservice) %]> 
 
 195 <fieldset class="DEPENDS ON charttype BEING A">
 
 197     [% 'Taxkeys and Taxreport Preferences' | $T8 %]
 
 199   <p style='font-weight:normal'>[% 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' | $T8 %]</p>
 
 203                 <th align="left">[% 'Taxkey' | $T8 %]</th>
 
 204                 <th align="left">[% 'valid from' | $T8 %]</th>
 
 205                 <th align="left">[% 'pos_ustva' | $T8 %]</th>
 
 206                 <th align="left">[% 'delete' | $T8 %] ? </th>
 
 208 [% FOREACH tk = ACCOUNT_TAXKEYS %]
 
 212                 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="[% tk.id %]">
 
 213                 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
 
 214                 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
 
 215                 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
 
 216                 <td><input name="taxkey_del_[% tk.runningnumber %]" type="checkbox"
 
 217                 class="checkbox" value="delete"></td>
 
 219                 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="NEW">
 
 220                 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
 
 221                 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
 
 222                 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
 
 232 <fieldset class="DEPENDS ON charttype BEING A">
 
 233   <legend>[% 'Report and misc. Preferences' | $T8 %]</legend>
 
 236           <th align="left">[% 'EUER' | $T8 %]</th>
 
 237           <td colspan="3"><select name="pos_eur">[% select_eur %]</select></td>
 
 240           <th align="left">[% 'BWA' | $T8 %]</th>
 
 241           <td colspan="3"><select name="pos_bwa">[% select_bwa %]</select></td>
 
 243         <!-- Diese Steuerfunktion hat keine Auswirkung in der Bilanz und wird erstmal deaktiviert. -->
 
 245           <th align="left">[% 'Bilanz' | $T8 %]</th>
 
 246           <td colspan="3"><select name="pos_bilanz">[% select_bilanz %]</select></td>
 
 249           <th align="left">[% 'Datevautomatik' | $T8 %]</th>
 
 250           <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>
 
 253           <th align="left">[% 'Folgekonto' | $T8 %]</th>
 
 254           <td><select name="new_chart_id">[% selectnewaccount %]</select></td>
 
 255           <th align="left">[% 'Valid from' | $T8 %]</th>
 
 256           <td><input name="valid_from" value="[% valid_from %]"></td>
 
 261 <hr size="3" noshade>