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.radio_button_tag('summary_account',
 
  93           disabled => AccountIsPosted,
 
  95          [% 'AR' | $T8 %]
 
  96         [% L.radio_button_tag('summary_account',
 
  98           disabled => AccountIsPosted,
 
 100          [% 'AP' | $T8 %]
 
 101         [% L.radio_button_tag('summary_account',
 
 103           disabled => AccountIsPosted,
 
 105          [% 'Inventory' | $T8 %]
 
 106         [% L.radio_button_tag('summary_account',
 
 108           disabled => AccountIsPosted) %]
 
 109          [% 'No summary account' | $T8 %]
 
 111 [% IF AccountIsPosted %]
 
 112     [% IF AR %] [% L.hidden_tag('AR', 'AR') %] [% END %]
 
 113     [% IF AP %] [% L.hidden_tag('AP', 'AP') %] [% END %]
 
 114     [% IF IC %] [% L.hidden_tag('IC', 'IC') %] [% END %]
 
 119 [% IF AccountIsPosted %]
 
 120   [% IF AR_amount %] [% L.hidden_tag('AR_amount', 'AR_amount') %] [% END %]
 
 121   [% IF AR_paid   %] [% L.hidden_tag('AR_paid',   'AR_paid')   %] [% END %]
 
 122   [% IF AR_tax    %] [% L.hidden_tag('AR_tax',    'AR_tax')    %] [% END %]
 
 123   [% IF AP_amount %] [% L.hidden_tag('AP_amount', 'AP_amount') %] [% END %]
 
 124   [% IF AP_paid   %] [% L.hidden_tag('AP_paid',   'AP_paid')   %] [% END %]
 
 125   [% IF AP_tax    %] [% L.hidden_tag('AP_tax',    'AP_tax')    %] [% END %]
 
 126   [%- SET DIS = ' disabled="disabled"' %]
 
 128 <fieldset class="DEPENDS ON charttype BEING A">
 
 129   <legend>[% 'Include in drop-down menus' | $T8 %]</legend>
 
 130   <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>
 
 131   <p style='font-weight:normal'>[% 'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' | $T8 %]
 
 132   [% '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>
 
 135       <th align="left">[% 'Receivables' | $T8 %]</th>
 
 136       <th align="left">[% 'Payables' | $T8 %]</th>
 
 137       <th align="left">[% 'Parts Inventory' | $T8 %]</th>
 
 138       <th align="left">[% 'Service Items' | $T8 %]</th>
 
 142         [% L.radio_button_tag('AR_include_in_dropdown',
 
 143           value => 'AR_amount',
 
 144           disabled => AccountIsPosted,
 
 145           checked  => AR_amount) %]
 
 146          [% 'Revenue' | $T8 %] <br>
 
 147         [% L.radio_button_tag('AR_include_in_dropdown',
 
 149           disabled => AccountIsPosted,
 
 150           checked  => AR_paid) %]
 
 151          [% 'Receipt' | $T8 %] <br>
 
 152         [% L.radio_button_tag('AR_include_in_dropdown',
 
 154           disabled => AccountIsPosted,
 
 155           checked  => AR_tax) %]
 
 156          [% 'Tax' | $T8 %] <br>
 
 157         [% L.radio_button_tag('AR_include_in_dropdown',
 
 159           disabled => AccountIsPosted) %]
 
 160          [% 'do not include' | $T8 %]
 
 163         [% L.radio_button_tag('AP_include_in_dropdown',
 
 164           value => 'AP_amount',
 
 165           disabled => AccountIsPosted,
 
 166           checked  => AP_amount) %]
 
 167          [% 'Expense/Asset' | $T8 %] <br>
 
 168         [% L.radio_button_tag('AP_include_in_dropdown',
 
 170           disabled => AccountIsPosted,
 
 171           checked  => AP_paid) %]
 
 172          [% 'Payment' | $T8 %] <br>
 
 173         [% L.radio_button_tag('AP_include_in_dropdown',
 
 175           disabled => AccountIsPosted,
 
 176           checked  => AP_tax) %]
 
 177          [% 'Tax' | $T8 %] <br>
 
 178         [% L.radio_button_tag('AP_include_in_dropdown',
 
 180           disabled => AccountIsPosted) %]
 
 181          [% 'do not include' | $T8 %]
 
 184         <input name="IC_sale" type="checkbox" class="checkbox" value="IC_sale"
 
 185           [% HTML.escape(IC_sale) %]> 
 
 186         [% 'Revenue' | $T8 %] <br>
 
 187         <input name="IC_cogs" type="checkbox" class="checkbox" value="IC_cogs"
 
 188           [% HTML.escape(IC_cogs) %]> 
 
 189         [% 'Expense' | $T8 %] <br>
 
 190         <input name="IC_taxpart" type="checkbox" class="checkbox" value="IC_taxpart"
 
 191           [% HTML.escape(IC_taxpart) %]> 
 
 196         <input name=IC_income type=checkbox class=checkbox value="IC_income"
 
 197           [% HTML.escape(IC_income) %]> 
 
 198         [% 'Revenue' | $T8 %] <br>
 
 199         <input name=IC_expense type=checkbox class=checkbox value="IC_expense"
 
 200           [% HTML.escape(IC_expense) %]> 
 
 201         [% 'Expense' | $T8 %] <br>
 
 202         <input name=IC_taxservice type=checkbox class=checkbox value="IC_taxservice"
 
 203           [% HTML.escape(IC_taxservice) %]> 
 
 211 <fieldset class="DEPENDS ON charttype BEING A">
 
 213     [% 'Taxkeys and Taxreport Preferences' | $T8 %]
 
 215   <p style='font-weight:normal'>[% 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' | $T8 %]</p>
 
 219                 <th align="left">[% 'Taxkey' | $T8 %]</th>
 
 220                 <th align="left">[% 'valid from' | $T8 %]</th>
 
 221                 <th align="left">[% 'pos_ustva' | $T8 %]</th>
 
 222                 <th align="left">[% 'delete' | $T8 %] ? </th>
 
 224 [% FOREACH tk = ACCOUNT_TAXKEYS %]
 
 228                 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="[% tk.id %]">
 
 229                 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
 
 230                 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
 
 231                 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
 
 232                 <td><input name="taxkey_del_[% tk.runningnumber %]" type="checkbox"
 
 233                 class="checkbox" value="delete"></td>
 
 235                 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="NEW">
 
 236                 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
 
 237                 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
 
 238                 <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
 
 248 <fieldset class="DEPENDS ON charttype BEING A">
 
 249   <legend>[% 'Report and misc. Preferences' | $T8 %]</legend>
 
 252           <th align="left">[% 'EUER' | $T8 %]</th>
 
 253           <td colspan="3"><select name="pos_eur">[% select_eur %]</select></td>
 
 256           <th align="left">[% 'BWA' | $T8 %]</th>
 
 257           <td colspan="3"><select name="pos_bwa">[% select_bwa %]</select></td>
 
 259         <!-- Diese Steuerfunktion hat keine Auswirkung in der Bilanz und wird erstmal deaktiviert. -->
 
 261           <th align="left">[% 'Bilanz' | $T8 %]</th>
 
 262           <td colspan="3"><select name="pos_bilanz">[% select_bilanz %]</select></td>
 
 265           <th align="left">[% 'Datevautomatik' | $T8 %]</th>
 
 266           <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>
 
 269           <th align="left">[% 'Folgekonto' | $T8 %]</th>
 
 270           <td><select name="new_chart_id">[% selectnewaccount %]</select></td>
 
 271           <th align="left">[% 'Valid from' | $T8 %]</th>
 
 272           <td><input name="valid_from" value="[% valid_from %]"></td>
 
 277 <hr size="3" noshade>