Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6c4ea0af

Von Sven Schöling vor fast 13 Jahren hinzugefügt

  • ID 6c4ea0af7845a7c0259c77f529198677a98bcd8a
  • Vorgänger 554034c0
  • Nachfolger 7482f315

rp.pl::report auf template umgestellt.

Bei der Umstellung sind die folgenden vier Funktionalitäten aufgefallen:
- tax_collected
- tax_apid
- nontaxable_purchases
- nontaxable_sales

Diese 4 Funktionen waren schon in der ältesten erhaltenen git Version von
Lx-Office deaktiviert, und laut Moritz nur für den amerikanischen Markt
brauchbar. Ich habe die Grundfunktionalität erhalten, und die HTML Blöcke
mitportiert, aber unkonditional deaktiviert. Ausserdem werden die dispatching
Variablen nicht an das Template weitergereicht.

Im gleichen Zuge ist die Funktion RP->get_taxaccounts aufgefallen. Die wird
anscheinend nur von den oben genannten benutzt und enthält seit 2007 einen
Typo, der sie nutzlos macht (ISE beim Aufruf). Da das nie aufgefallen ist, wird
sie wohl nicht anderweitig benutzt. Ich entferne sie nicht in diesem Commit,
weil es nichts mit der template Umstellung zu tun hat.

Unterschiede anzeigen:

bin/mozilla/rp.pl
120 120
}
121 121

  
122 122
sub report {
123
  $main::lxdebug->enter_sub();
123
  $::lxdebug->enter_sub;
124 124

  
125 125
  check_rp_access();
126 126

  
127
  my $form     = $main::form;
128
  my %myconfig = %main::myconfig;
129
  my $locale   = $main::locale;
130

  
131 127
  my %title = (
132
            'balance_sheet'        => 'Balance Sheet',
133
            'income_statement'     => 'Income Statement',
134
            'trial_balance'        => 'Trial Balance',
135
            'ar_aging'             => 'Search AR Aging',
136
            'ap_aging'             => 'Search AP Aging',
137
            'tax_collected'        => 'Tax collected',
138
            'tax_paid'             => 'Tax paid',
139
            'nontaxable_sales'     => 'Non-taxable Sales',
140
            'nontaxable_purchases' => 'Non-taxable Purchases',
141
            'receipts'             => 'Receipts',
142
            'payments'             => 'Payments',
143
            'projects'             => 'Project Transactions',
144
            'bwa'                  => 'Business evaluation',
128
    balance_sheet        => $::locale->text('Balance Sheet'),
129
    income_statement     => $::locale->text('Income Statement'),
130
    trial_balance        => $::locale->text('Trial Balance'),
131
    ar_aging             => $::locale->text('Search AR Aging'),
132
    ap_aging             => $::locale->text('Search AP Aging'),
133
    tax_collected        => $::locale->text('Tax collected'),
134
    tax_paid             => $::locale->text('Tax paid'),
135
    nontaxable_sales     => $::locale->text('Non-taxable Sales'),
136
    nontaxable_purchases => $::locale->text('Non-taxable Purchases'),
137
    receipts             => $::locale->text('Receipts'),
138
    payments             => $::locale->text('Payments'),
139
    projects             => $::locale->text('Project Transactions'),
140
    bwa                  => $::locale->text('Business evaluation'),
145 141
  );
146 142

  
147
  $form->{title} = $locale->text($title{ $form->{report} });
148

  
149
  my $accrual =  $::instance_conf->get_accounting_method eq 'cash' ? ""        : "checked";
150
  my $cash    =  $::instance_conf->get_accounting_method eq 'cash' ? "checked" : "";
151

  
152
  my $year = (localtime)[5] + 1900;
143
  $::form->{title} = $title{$::form->{report}};
153 144

  
154 145
  # get departments
155
  $form->all_departments(\%myconfig);
156
  if (@{ $form->{all_departments} || [] }) {
157
    $form->{selectdepartment} = "<option>\n";
158
    map { $form->{selectdepartment} .= "<option>$_->{description}--$_->{id}\n" } @{ $form->{all_departments} || [] };
146
  $::form->all_departments(\%::myconfig);
147
  if (@{ $::form->{all_departments} || [] }) {
148
    $::form->{selectdepartment} = "<option>\n";
149
    map { $::form->{selectdepartment} .= "<option>$_->{description}--$_->{id}\n" } @{ $::form->{all_departments} || [] };
159 150
  }
160 151

  
161
  my $department;
162
  $department = qq|
163
        <tr>
164
          <th align=right nowrap>| . $locale->text('Department') . qq|</th>
165
          <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
166
        </tr>
167
| if $form->{selectdepartment};
168

  
169
  $form->get_lists("projects" => { "key" => "ALL_PROJECTS",
170
                                   "all" => 1 });
171

  
172
  my %project_labels = ();
173
  my @project_values = ("");
174
  foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
175
    push(@project_values, $item->{"id"});
176
    $project_labels{$item->{"id"}} = $item->{"projectnumber"};
177
  }
178

  
179
  my $projectnumber =
180
    NTI($::request->{cgi}->popup_menu('-name' => "project_id",
181
                               '-values' => \@project_values,
182
                               '-labels' => \%project_labels));
183

  
184
  # use JavaScript Calendar or not
185
  $form->{jsscript} = 1;
186
  my $jsscript = "";
187
  my ( $name_1, $id_1, $value_1, $trigger_1, $name_2, $id_2, $value_2, $trigger_2, );
188
  if ($form->{report} eq "balance_sheet") {
189
    $name_1    = "asofdate";
190
    $id_1      = "asofdate";
191
    $value_1   = "$form->{asofdate}";
192
    $trigger_1 = "trigger1";
193
    $name_2    = "compareasofdate";
194
    $id_2      = "compareasofdate";
195
    $value_2   = "$form->{compareasofdate}";
196
    $trigger_2 = "trigger2";
197
  } elsif ($form->{report} =~ /(receipts|payments)$/) {
198
    $name_1    = "fromdate";
199
    $id_1      = "fromdate";
200
    $value_1   = "$form->{fromdate}";
201
    $trigger_1 = "trigger1";
202
    $name_2    = "todate";
203
    $id_2      = "todate";
204
    $value_2   = "";
205
    $trigger_2 = "trigger2";
206
  } elsif (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
207
    $name_1    = "fromdate";
208
    $id_1      = "fromdate";
209
    $value_1   = "$form->{fromdate}";
210
    $trigger_1 = "trigger1";
211
    $name_2    = "todate";
212
    $id_2      = "todate";
213
    $value_2   = "";
214
    $trigger_2 = "trigger2";
215

  
216
  } else {
217
    $name_1    = "fromdate";
218
    $id_1      = "fromdate";
219
    $value_1   = "$form->{fromdate}";
220
    $trigger_1 = "trigger1";
221
    $name_2    = "todate";
222
    $id_2      = "todate";
223
    $value_2   = "";
224
    $trigger_2 = "trigger2";
225
  }
226

  
227
  my ($button1, $button1_2, $button2, $button2_2);
228
  my $checked;
229

  
230
  # with JavaScript Calendar
231
  if ($form->{jsscript}) {
232
    if ($name_1 eq "") {
233
      $button1   = qq| <input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">|;
234
      $button1_2 = qq| <input type=button name=$name_2 id="$trigger_2" value=| . $locale->text('button') . qq|>|;
235

  
236
      #write Trigger
237
      $jsscript = Form->write_trigger(\%myconfig, "1", "$name_2", "BR", "$trigger_2");
238
    } else {
239
      $button1   = qq| <input name=$name_1 id=$id_1 size=11 title="$myconfig{dateformat}" value="$value_1" onBlur=\"check_right_date_format(this)\">|;
240
      $button1_2 = qq| <input type=button name=$name_1 id="$trigger_1" value=| . $locale->text('button') . qq|>|;
241
      $button2   = qq| <input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">|;
242
      $button2_2 = qq| <input type=button name=$name_2 id="$trigger_2" value=| . $locale->text('button') . qq|> |;
243

  
244
      #write Trigger
245
      $jsscript = Form->write_trigger(\%myconfig, "2", "$name_1", "BR", "$trigger_1", "$name_2", "BL", "$trigger_2");
246
    }
247
  } else {
152
  $::form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 });
248 153

  
249
    # without JavaScript Calendar
250
    if ($name_1 eq "") {
251
      $button1 = qq|<input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">|;
252
    } else {
253
      $button1 = qq|<input name=$name_1 id=$id_1 size=11 title="$myconfig{dateformat}" value=$value_1 onBlur=\"check_right_date_format(this)\">|;
254
      $button2 = qq|<input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">|;
255
    }
256
  }
257
  $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
258
  $form->header;
259 154
  my $onload = qq|focus()|;
260
  $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
261
  $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
262
  print qq|
263
<body onLoad="$onload">
264

  
265
<form method=post action=$form->{script}>
266

  
267
<input type=hidden name=title value="$form->{title}">
268

  
269
<table width=100% border="0">
270
  <tr>
271
    <th class=listtop>$form->{title}</th>
272
  </tr>
273
  <tr height="5"></tr>
274
  <tr>
275
    <td>
276
      <table border="0">
277
      $department
278
|;
279

  
280
  if ($form->{report} eq "projects") {
281
    print qq|
282
        <tr>
283
          <th align=right nowrap>| . $locale->text('Project') . qq|</th>
284
          <td colspan=5><input name=projectnumber size=25</td>
285
        </tr>
286
        <input type=hidden name=nextsub value=generate_projects>
287
        <tr>
288
          <th align=right>| . $locale->text('From') . qq|</th>
289
          <td>$button1</td>
290
          <td>$button1_2</td>
291
          <th align=right>| . $locale->text('Bis') . qq|</th>
292
          <td>$button2</td>
293
          <td>$button2_2</td>
294
        </tr>
295
      </table>
296
    </td>
297
  </tr>
298
  <tr>
299
    <td>
300
      <table>
301
        <tr>
302
          <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
303
          <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;| . $locale->text('Heading') . qq|
304
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;| . $locale->text('Subtotal') . qq|</td>
305
        </tr>
306

  
307
$jsscript
308
|;
309
  }
310

  
311
  if ($form->{report} eq "income_statement") {
312
    print qq|
313
        <tr>
314
          <th align=right nowrap>| . $locale->text('Project') . qq|</th>
315
          <td colspan=3>$projectnumber</td>
316
        </tr>
317
        <input type=hidden name=nextsub value=generate_income_statement>
318
</table>
319
<table>
320
        <tr>
321
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
322
        </tr>
323
        <tr>
324
          <th colspan=1>| . $locale->text('Year') . qq|</th>
325
          <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
326
        </tr>
327
|;
328

  
329
    print qq|
330
        <tr>
331
                <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
332
                <th align=left>| . $locale->text('Quarterly') . qq|</th>
333
                <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
334
        </tr>
335
        <tr>
336
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13" "checked"></td>
337
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. | . $locale->text('Quarter') . qq|</td>
338
|;
339
    $checked = "";
340
    print qq|
341
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;| . $locale->text('January') . qq|</td>
342
|;
343
    $checked = "";
344
    print qq|
345
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;| . $locale->text('May') . qq|</td>
346
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;| . $locale->text('September') . qq|</td>
347

  
348
        </tr>
349
        <tr>
350
                <td align= right>&nbsp;</td>
351
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. | . $locale->text('Quarter') . qq|</td>
352
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;| . $locale->text('February') . qq|</td>
353
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;| . $locale->text('June') . qq|</td>
354
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;| . $locale->text('October') . qq|</td>
355
        </tr>
356
        <tr>
357
                <td> &nbsp;</td>
358
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. | . $locale->text('Quarter') . qq|</td>
359
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;| . $locale->text('March') . qq|</td>
360
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;| . $locale->text('July') . qq|</td>
361
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;| . $locale->text('November') . qq|</td>
362

  
363
        </tr>
364
        <tr>
365
                <td> &nbsp;</td>
366
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. | . $locale->text('Quarter') . qq|&nbsp;</td>
367
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;| . $locale->text('April') . qq|</td>
368
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;| . $locale->text('August') . qq|</td>
369
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;| . $locale->text('December') . qq|</td>
370

  
371
        </tr>
372
        <tr>
373
                   <td colspan=5><hr size=3 noshade></td>
374
        </tr>
375
        <tr>
376
          <th align=left><input name=reporttype class=radio type=radio value="free" $checked> | . $locale->text('Free report period') . qq|</th>
377
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
378
              $button1
379
              $button1_2&nbsp;
380
              | . $locale->text('Bis') . qq|
381
              $button2
382
              $button2_2&nbsp;
383
          </td>
384
        </tr>
385
        <tr>
386
                   <td colspan=5><hr size=3 noshade></td>
387
        </tr>
388
        <tr>
389
          <th align=leftt>| . $locale->text('Method') . qq|</th>
390
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
391
          &nbsp;<input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
392
        </tr>
393

  
394
$jsscript
395
|;
396
  }
397

  
398
  if ($form->{report} eq "bwa") {
399
    print qq|
400
        <tr>
401
          <th align=right nowrap>| . $locale->text('Project') . qq|</th>
402
          <td colspan=3>$projectnumber</td>
403
        </tr>
404
        <input type=hidden name=nextsub value=generate_bwa>
405
</table>
406
<table>
407
        <tr>
408
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
409
        </tr>
410
        <tr>
411
          <th colspan=1>| . $locale->text('Year') . qq|</th>
412
          <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
413
        </tr>
414
|;
415

  
416
    print qq|
417
        <tr>
418
                <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
419
                <th align=left>| . $locale->text('Quarterly') . qq|</th>
420
                <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
421
        </tr>
422
        <tr>
423
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
424
$checked></td>
425
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. | . $locale->text('Quarter') . qq|</td>
426
|;
427
    $checked = "checked";
428
    print qq|
429
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;| . $locale->text('January') . qq|</td>
430
|;
431
    $checked = "";
432
    print qq|
433
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;| . $locale->text('May') . qq|</td>
434
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;| . $locale->text('September') . qq|</td>
435

  
436
        </tr>
437
        <tr>
438
                <td align= right>&nbsp;</td>
439
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. | . $locale->text('Quarter') . qq|</td>
440
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;| . $locale->text('February') . qq|</td>
441
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;| . $locale->text('June') . qq|</td>
442
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;| . $locale->text('October') . qq|</td>
443
        </tr>
444
        <tr>
445
                <td> &nbsp;</td>
446
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. | . $locale->text('Quarter') . qq|</td>
447
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;| . $locale->text('March') . qq|</td>
448
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;| . $locale->text('July') . qq|</td>
449
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;| . $locale->text('November') . qq|</td>
450

  
451
        </tr>
452
        <tr>
453
                <td> &nbsp;</td>
454
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. | . $locale->text('Quarter') . qq|&nbsp;</td>
455
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;| . $locale->text('April') . qq|</td>
456
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;| . $locale->text('August') . qq|</td>
457
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;| . $locale->text('December') . qq|</td>
458

  
459
        </tr>
460
        <tr>
461
                   <td colspan=5><hr size=3 noshade></td>
462
        </tr>
463
        <tr>
464
          <th align=left><input name=reporttype class=radio type=radio value="free" $checked> | . $locale->text('Free report period') . qq|</th>
465
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
466
              $button1
467
              $button1_2&nbsp;
468
              | . $locale->text('Bis') . qq|&nbsp;
469
              $button2
470
              $button2_2
471
          </td>
472
        </tr>
473
        <tr>
474
                   <td colspan=5><hr size=3 noshade></td>
475
        </tr>
476
        <tr>
477
          <th align=leftt>| . $locale->text('Method') . qq|</th>
478
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
479
          &nbsp;<input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
480
        </tr>
481
        <tr>
482
         <th align=right colspan=4>| . $locale->text('Decimalplaces') . qq|</th>
483
             <td><input name=decimalplaces size=3 value="2"></td>
484
         </tr>
485

  
486
$jsscript
487
|;
488
  }
489

  
490
  if ($form->{report} eq "balance_sheet") {
491
    print qq|
492
        <input type=hidden name=nextsub value=generate_balance_sheet>
493
        <tr>
494
          <th align=right>| . $locale->text('as at') . qq|</th>
495
          <td>
496
            $button1
497
            $button1_2
498
          </td>
499
          <th align=right nowrap>| . $locale->text('Compare to') . qq|</th>
500
          <td>
501
          $button2
502
          $button2_2
503
          </td>
504
        </tr>
505
        <tr>
506
          <th align=right>| . $locale->text('Decimalplaces') . qq|</th>
507
          <td><input name=decimalplaces size=3 value="2"></td>
508
        </tr>
509
      </table>
510
    </td>
511
  </tr>
512
  <tr>
513
    <td>
514
      <table>
515
        <tr>
516
          <th align=right>| . $locale->text('Method') . qq|</th>
517
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
518
          &nbsp;<input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
519
        </tr>
520

  
521
        <tr>
522
          <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
523
          <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;| . $locale->text('Heading') . qq|
524
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;| . $locale->text('Subtotal') . qq|
525
          <input name=l_accno class=checkbox type=checkbox value=Y>&nbsp;| . $locale->text('Account Number') . qq|</td>
526
        </tr>
527 155

  
528
$jsscript
529
|;
530
  }
531

  
532
  if ($form->{report} eq "trial_balance") {
533
    print qq|
534
        <tr>
535
          <th align=right nowrap>| . $locale->text('Project') . qq|</th>
536
          <td colspan=3>$projectnumber</td>
537
        </tr>
538
        <input type=hidden name=nextsub value=generate_trial_balance>
539
</table>
540
<table>
541
        <tr>
542
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
543
        </tr>
544
        <tr>
545
          <th colspan=1>| . $locale->text('Year') . qq|</th>
546
          <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
547
        </tr>
548
|;
549

  
550
    print qq|
551
        <tr>
552
                <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
553
                <th align=left>| . $locale->text('Quarterly') . qq|</th>
554
                <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
555
        </tr>
556
        <tr>
557
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13" $checked></td>
558
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. | . $locale->text('Quarter') . qq|</td>
559
|;
560
    $checked = "checked";
561
    print qq|
562
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;| . $locale->text('January') . qq|</td>
563
|;
564
    $checked = "";
565
    print qq|
566
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;| . $locale->text('May') . qq|</td>
567
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;| . $locale->text('September') . qq|</td>
568

  
569
        </tr>
570
        <tr>
571
                <td align= right>&nbsp;</td>
572
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. | . $locale->text('Quarter') . qq|</td>
573
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;| . $locale->text('February') . qq|</td>
574
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;| . $locale->text('June') . qq|</td>
575
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;| . $locale->text('October') . qq|</td>
576
        </tr>
577
        <tr>
578
                <td> &nbsp;</td>
579
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. | . $locale->text('Quarter') . qq|</td>
580
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;| . $locale->text('March') . qq|</td>
581
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;| . $locale->text('July') . qq|</td>
582
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;| . $locale->text('November') . qq|</td>
583

  
584
        </tr>
585
        <tr>
586
                <td> &nbsp;</td>
587
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. | . $locale->text('Quarter') . qq|&nbsp;</td>
588
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;| . $locale->text('April') . qq|</td>
589
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;| . $locale->text('August') . qq|</td>
590
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;| . $locale->text('December') . qq|</td>
591

  
592
        </tr>
593
        <tr>
594
                   <td colspan=5><hr size=3 noshade></td>
595
        </tr>
596
        <tr>
597
          <th align=left><input name=reporttype class=radio type=radio value="free" $checked> | . $locale->text('Free report period') . qq|</th>
598
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
599
              $button1
600
              $button1_2&nbsp;
601
              | . $locale->text('Bis') . qq|&nbsp;
602
              $button2
603
              $button2_2
604
          </td>
605
        </tr>
606
        <tr>
607
                   <td colspan=5><hr size=3 noshade></td>
608
        </tr>
609
        <tr>
610
          <th align=leftt>| . $locale->text('Method') . qq|</th>
611
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
612
          &nbsp;<input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
613
        </tr>
614
       <tr>
615
         <th align=right colspan=4>| . $locale->text('All Accounts') . qq|</th>
616
             <td><input name=all_accounts type=checkbox value=1></td>
617
         </tr>
618
        <tr>
619
         <th align=right colspan=4>| . $locale->text('Decimalplaces') . qq|</th>
620
             <td><input name=decimalplaces size=3 value="2"></td>
621
         </tr>
622

  
623
$jsscript
624
|;
625
  }
626

  
627
  if ($form->{report} =~ /^tax_/) {
628
    $form->{db} = ($form->{report} =~ /_collected/) ? "ar" : "ap";
629

  
630
    RP->get_taxaccounts(\%myconfig, \%$form);
631

  
632
    print qq|
633
        <input type=hidden name=nextsub value=generate_tax_report>
634
        <tr>
635
          <th align=right>| . $locale->text('From') . qq|</th>
636
          <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
637
          <th align=right>| . $locale->text('Bis') . qq|</th>
638
          <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
639
        </tr>
640
        <tr>
641
          <th align=right>| . $locale->text('Report for') . qq|</th>
642
          <td colspan=3>
643
|;
644

  
645
    $checked = "checked";
646
    foreach my $ref (@{ $form->{taxaccounts} }) {
647

  
648
      print
649
        qq|<input name=accno class=radio type=radio value=$ref->{accno} $checked>&nbsp;$ref->{description}
650

  
651
    <input name="$ref->{accno}_description" type=hidden value="$ref->{description}">
652
    <input name="$ref->{accno}_rate" type=hidden value="$ref->{rate}">|;
653

  
654
      $checked = "";
655

  
656
    }
657

  
658
    print qq|
659
  <input type=hidden name=db value=$form->{db}>
660
  <input type=hidden name=sort value=transdate>
661

  
662
          </td>
663
        </tr>
664
        <tr>
665
          <th align=right>| . $locale->text('Method') . qq|</th>
666
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
667
          &nbsp;<input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
668
        </tr>
669
      </table>
670
    </td>
671
  </tr>
672
  <tr>
673
    <td>
674
      <table>
675
        <tr>
676
          <th align=right>| . $locale->text('Include in Report') . qq|</th>
677
          <td>
678
            <table>
679
              <tr>
680
                <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
681
                <td>| . $locale->text('ID') . qq|</td>
682
                <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
683
                <td>| . $locale->text('Invoice') . qq|</td>
684
                <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
685
                <td>| . $locale->text('Date') . qq|</td>
686
              </tr>
687
              <tr>
688
                <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
689
                <td>|;
690

  
691
    if ($form->{db} eq 'ar') {
692
      print $locale->text('Customer');
693
    }
694
    if ($form->{db} eq 'ap') {
695
      print $locale->text('Vendor');
696
    }
697

  
698
    print qq|</td>
699
                <td><input name="l_netamount" class=checkbox type=checkbox value=Y checked></td>
700
                <td>| . $locale->text('Amount') . qq|</td>
701
                <td><input name="l_tax" class=checkbox type=checkbox value=Y checked></td>
702
                <td>| . $locale->text('Tax') . qq|</td>
703
                <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
704
                <td>| . $locale->text('Total') . qq|</td>
705
              </tr>
706
              <tr>
707
                <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
708
                <td>| . $locale->text('Subtotal') . qq|</td>
709
              </tr>
710
            </table>
711
          </td>
712
        </tr>
713
|;
714

  
715
  }
716

  
717
  if ($form->{report} =~ /^nontaxable_/) {
718
    $form->{db} = ($form->{report} =~ /_sales/) ? "ar" : "ap";
719

  
720
    print qq|
721
        <input type=hidden name=nextsub value=generate_tax_report>
722

  
723
        <input type=hidden name=db value=$form->{db}>
724
        <input type=hidden name=sort value=transdate>
725
        <input type=hidden name=report value=$form->{report}>
726

  
727
        <tr>
728
          <th align=right>| . $locale->text('From') . qq|</th>
729
          <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
730
          <th align=right>| . $locale->text('Bis') . qq|</th>
731
          <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
732
        </tr>
733
        <tr>
734
          <th align=right>| . $locale->text('Method') . qq|</th>
735
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
736
      . $locale->text('Accrual') . qq|
737
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
738
      . $locale->text('EUR') . qq|</td>
739
        </tr>
740
        <tr>
741
          <th align=right>| . $locale->text('Include in Report') . qq|</th>
742
          <td colspan=3>
743
            <table>
744
              <tr>
745
                <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
746
                <td>| . $locale->text('ID') . qq|</td>
747
                <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
748
                <td>| . $locale->text('Invoice') . qq|</td>
749
                <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
750
                <td>| . $locale->text('Date') . qq|</td>
751
              </tr>
752
              <tr>
753
                <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
754
                <td>|;
755

  
756
    if ($form->{db} eq 'ar') {
757
      print $locale->text('Customer');
758
    }
759
    if ($form->{db} eq 'ap') {
760
      print $locale->text('Vendor');
761
    }
762

  
763
    print qq|</td>
764
                <td><input name="l_netamount" class=checkbox type=checkbox value=Y checked></td>
765
                <td>| . $locale->text('Amount') . qq|</td>
766
                <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
767
                <td>| . $locale->text('Total') . qq|</td>
768
              </tr>
769
              <tr>
770
                <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
771
                <td>| . $locale->text('Subtotal') . qq|</td>
772
              </tr>
773
            </table>
774
          </td>
775
        </tr>
776
|;
777

  
778
  }
156
  my $is_projects         = $::form->{report} eq "projects";
157
  my $is_income_statement = $::form->{report} eq "income_statement";
158
  my $is_bwa              = $::form->{report} eq "bwa";
159
  my $is_balance_sheet    = $::form->{report} eq "balance_sheet";
160
  my $is_trial_balance    = $::form->{report} eq "trial_balance";
161
  my $is_taxreport        = $::form->{report} =~ /^tax_/;
162
  my $is_nontaxable       = $::form->{report} =~ /^nontaxable_/;
163
  my $is_aging            = $::form->{report} =~ /^a[rp]_aging$/;
164
  my $is_payments         = $::form->{report} =~ /(receipts|payments)$/;
165

  
166
#  if (is_taxreport) {
167
#    $::form->{db} = ($::form->{report} =~ /_collected/) ? "ar" : "ap";
168
#    RP->get_taxaccounts(\%::myconfig, $::form);
169
#  }
170
#
171
#  if ($is_nontaxable) {
172
#    $::form->{db} = ($::form->{report} =~ /_sales/) ? "ar" : "ap";
173
#  }
779 174

  
780 175
  my ($label, $nextsub, $vc);
781
  if (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
782
    if ($form->{report} eq 'ar_aging') {
783
      $label = $locale->text('Customer');
784
      $form->{vc} = 'customer';
785
    } else {
786
      $label = $locale->text('Vendor');
787
      $form->{vc} = 'vendor';
788
    }
176
  if ($is_aging) {
177
    my $is_sales  = $::form->{report} eq 'ar_aging';
178
    $label        = $is_sales ? $::locale->text('Customer') : $::locale->text('Vendor');
179
    $::form->{vc} = $is_sales ? 'customer' : 'vendor';
789 180

  
790
    $nextsub = "generate_$form->{report}";
181
    $nextsub = "generate_$::form->{report}";
791 182

  
792 183
    # setup vc selection
793
    $form->all_vc(\%myconfig, $form->{vc},
794
                  ($form->{vc} eq 'customer') ? "AR" : "AP");
795

  
796
    map { $vc .= "<option>$_->{name}--$_->{id}\n" }
797
      @{ $form->{"all_$form->{vc}"} };
798

  
799
    $vc =
800
      ($vc)
801
      ? qq|<select name=$form->{vc}><option>\n$vc</select>|
802
      : qq|<input name=$form->{vc} size=35>|;
803

  
804
    print qq|
805
        <tr>
806
          <th align=right>| . $locale->text($label) . qq|</th>
807
          <td>$vc</td>
808
        </tr>
809
        <tr>
810
          <td>| . $locale->text('Review of Aging list') . qq|</td>
811
          <td><select name="review_of_aging_list">
812
              <option></option>
813
              <option>0-30</option>
814
              <option>30-60</option>
815
              <option>60-90</option>
816
              <option>90-120</option>
817
              <option>> 120</option>
818
              </select>
819
          </td>
820
        </tr>
821
        <tr>
822
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
823
              $button1
824
              $button1_2&nbsp;
825
              | . $locale->text('Bis') . qq|&nbsp;
826
              $button2
827
              $button2_2
828
          </td>
829
        </tr>
830
        <input type=hidden name=type value=statement>
831
        <input type=hidden name=format value=html>
832
        <input type=hidden name=media value=screen>
833

  
834
        <input type=hidden name=nextsub value=$nextsub>
835
        <input type=hidden name=action value=$nextsub>
836

  
837
$jsscript
838
|;
184
    $::form->all_vc(\%::myconfig, $::form->{vc}, $is_sales ? "AR" : "AP");
185
    $vc .= "<option>$_->{name}--$_->{id}\n" for @{ $::form->{"all_$::form->{vc}"} };
186
    $vc = ($vc)
187
        ? qq|<select name=$::form->{vc}><option>\n$vc</select>|
188
        : qq|<input name=$::form->{vc} size=35>|;
839 189
  }
840 190

  
841
  # above action can be removed if there is more than one input field
842

  
843 191
  my ($selection, $paymentaccounts);
844
  if ($form->{report} =~ /(receipts|payments)$/) {
845
    $form->{db} = ($form->{report} =~ /payments$/) ? "ap" : "ar";
192
  if ($is_payments) {
193
    $::form->{db} = $::form->{report} =~ /payments$/ ? "ap" : "ar";
846 194

  
847
    RP->paymentaccounts(\%myconfig, \%$form);
195
    RP->paymentaccounts(\%::myconfig, $::form);
848 196

  
849 197
    $selection = "<option>\n";
850
    foreach my $ref (@{ $form->{PR} }) {
198
    for my $ref (@{ $::form->{PR} }) {
851 199
      $paymentaccounts .= "$ref->{accno} ";
852 200
      $selection       .= "<option>$ref->{accno}--$ref->{description}\n";
853 201
    }
854

  
855
    chop $paymentaccounts;
856

  
857
    print qq|
858
        <input type=hidden name=nextsub value=list_payments>
859
        <tr>
860
          <th align=right nowrap>| . $locale->text('Account') . qq|</th>
861
          <td colspan=3><select name=account>$selection</select>
862
            <input type=hidden name=paymentaccounts value="$paymentaccounts">
863
          </td>
864
        </tr>
865
        <tr>
866
          <th align=right>| . $locale->text('Reference') . qq|</th>
867
          <td colspan=3><input name=reference></td>
868
        </tr>
869
        <tr>
870
          <th align=right nowrap>| . $locale->text('Source') . qq|</th>
871
          <td colspan=3><input name=source></td>
872
        </tr>
873
        <tr>
874
          <th align=right nowrap>| . $locale->text('Memo') . qq|</th>
875
          <td colspan=3><input name=memo size=30></td>
876
        </tr>
877
        <tr>
878
          <th align=right>| . $locale->text('From') . qq|</th>
879
          <td>
880
            $button1
881
            $button1_2
882
          </td>
883
          <th align=right>| . $locale->text('Bis') . qq|</th>
884
          <td>
885
            $button2
886
            $button2_2
887
          </td>
888
        </tr>
889
        <tr>
890
          <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
891
          <th align=left colspan=3>| . $locale->text('Include Exchangerate Difference') . qq|</td>
892
        </tr>
893

  
894
$jsscript
895

  
896
          <input type=hidden name=db value=$form->{db}>
897
          <input type=hidden name=sort value=transdate>
898
|;
899

  
900 202
  }
901 203

  
902
  print qq|
903

  
904
      </table>
905
    </td>
906
  </tr>
907
  <tr>
908
    <td><hr size=3 noshade></td>
909
  </tr>
910
</table>
911

  
912
<br>
913
<input type=submit class=submit name=action value="| . $locale->text('Continue') . qq|">
914

  
915
</form>
916

  
917
</body>
918
</html>
919
|;
204
  $::form->header;
205
  print $::form->parse_html_template('rp/report', {
206
    paymentaccounts     => $paymentaccounts,
207
    selection           => $selection,
208
    is_aging            => $is_aging,
209
    vc                  => $vc,
210
    label               => $label,
211
    year                => DateTime->today->year,
212
    onload              => $onload,
213
    accrual             => $::instance_conf->get_accounting_method ne 'cash',
214
    cash                => $::instance_conf->get_accounting_method eq 'cash',
215
    is_payments         => $is_payments,
216
    is_trial_balance    => $is_trial_balance,
217
    is_balance_sheet    => $is_balance_sheet,
218
    is_bwa              => $is_bwa,
219
    is_income_statement => $is_income_statement,
220
    is_projects         => $is_projects,
221
  });
920 222

  
921
  $main::lxdebug->leave_sub();
223
  $::lxdebug->leave_sub;
922 224
}
923 225

  
924 226
sub continue { call_sub($main::form->{"nextsub"}); }
templates/webpages/rp/report.html
1
[%- USE HTML %]
2
[%- USE LxERP %]
3
[%- USE L %]
4
[%- USE T8 %]
5

  
6
[%- BLOCK customized_report %]
7
  <tr>
8
    <th align=left><input name=reporttype class=radio type=radio value="custom" checked>[% 'Customized Report' | $T8 %]</th>
9
  </tr>
10
  <tr>
11
    <th colspan=1>[% 'Year' | $T8 %]</th>
12
    <td><input name=year size=11 title="[% 'YYYY' | $T8 %]" value="[% year %]"></td>
13
  </tr>
14
  <tr>
15
    <td align=right> <b>[% 'Yearly' | $T8 %]</b> </td>
16
    <th align=left>[% 'Quarterly' | $T8 %]</th>
17
    <th align=left colspan=3>[% 'Monthly' | $T8 %]</th>
18
  </tr>
19
  <tr>
20
    <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"></td>
21
    <td><input name=duetyp class=radio type=radio value="A">&nbsp;1. [% 'Quarter' | $T8 %]</td>
22
    <td><input name=duetyp class=radio type=radio value="1" checked>&nbsp;[% 'January' | $T8 %]</td>
23
    <td><input name=duetyp class=radio type=radio value="5">&nbsp;[% 'May' | $T8 %]</td>
24
    <td><input name=duetyp class=radio type=radio value="9">&nbsp;[% 'September' | $T8 %]</td>
25
  </tr>
26
  <tr>
27
    <td align= right>&nbsp;</td>
28
    <td><input name=duetyp class=radio type=radio value="B">&nbsp;2. [% 'Quarter' | $T8 %]</td>
29
    <td><input name=duetyp class=radio type=radio value="2">&nbsp;[% 'February' | $T8 %]</td>
30
    <td><input name=duetyp class=radio type=radio value="6">&nbsp;[% 'June' | $T8 %]</td>
31
    <td><input name=duetyp class=radio type=radio value="10">&nbsp;[% 'October' | $T8 %]</td>
32
  </tr>
33
  <tr>
34
    <td> &nbsp;</td>
35
    <td><input name=duetyp class=radio type=radio value="C">&nbsp;3. [% 'Quarter' | $T8 %]</td>
36
    <td><input name=duetyp class=radio type=radio value="3">&nbsp;[% 'March' | $T8 %]</td>
37
    <td><input name=duetyp class=radio type=radio value="7">&nbsp;[% 'July' | $T8 %]</td>
38
    <td><input name=duetyp class=radio type=radio value="11">&nbsp;[% 'November' | $T8 %]</td>
39
  </tr>
40
  <tr>
41
    <td> &nbsp;</td>
42
    <td><input name=duetyp class=radio type=radio value="D">&nbsp;4. [% 'Quarter' | $T8 %]</td>
43
    <td><input name=duetyp class=radio type=radio value="4">&nbsp;[% 'April' | $T8 %]</td>
44
    <td><input name=duetyp class=radio type=radio value="8">&nbsp;[% 'August' | $T8 %]</td>
45
    <td><input name=duetyp class=radio type=radio value="12">&nbsp;[% 'December' | $T8 %]</td>
46
  </tr>
47
  <tr>
48
    <td colspan=5><hr size=3 noshade></td>
49
  </tr>
50
  <tr>
51
    <th align=left><input name=reporttype class=radio type=radio value="free">[% 'Free report period' | $T8 %]</th>
52
    <td align=left colspan=4>
53
      [% 'From' | $T8 %] [% L.date_tag('fromdate', fromdate) %]
54
      [% 'Bis' | $T8 %] [% L.date_tag('todate') %]
55
    </td>
56
  </tr>
57
  <tr>
58
    <td colspan=5><hr size=3 noshade></td>
59
  </tr>
60
[%- END %]
61
[%- BLOCK cash_or_accrual %]
62
  <tr>
63
    <th align=leftt>[% 'Method' | $T8 %]</th>
64
    <td colspan=3>
65
      [% L.radio_button_tag('method', value='accrual', checked=accrual, label=LxERP.t8('Accrual')) %]
66
      [% L.radio_button_tag('method', value='cash', checked=cash, label=LxERP.t8('EUR')) %]
67
    </td>
68
  </tr>
69
[%- END %]
70
[%- BLOCK projectnumber %]
71
  <tr>
72
    <th align=right nowrap>[% 'Project' | $T8 %]</th>
73
    <td colspan=3>[% L.select_tag('project_id', L.options_for_select(ALL_PROJECTS, title='projectnumber', with_empty=1)) %]</td>
74
  </tr>
75
[%- END %]
76

  
77
<body onLoad="[% onload %]">
78
<h1>[% title %]</h1>
79

  
80
<form method=post action='[% script %]'>
81

  
82
<input type=hidden name=title value="[% title %]">
83

  
84
<table border="0">
85
[%- IF selectdepartment %]
86
  <tr>
87
    <th align=right nowrap>[% 'Department' | $T8 %]</th>
88
    <td colspan=3><select name=department>[% selectdepartment %]</select></td>
89
  </tr>
90
[%- END %]
91

  
92
[%- IF is_projects %]
93
  <tr>
94
    <th align=right nowrap>[% 'Project' | $T8 %]</th>
95
    <td colspan=5><input name=projectnumber size=25</td>
96
  </tr>
97
  <input type=hidden name=nextsub value=generate_projects>
98
  <tr>
99
    <th align=right>[% 'as at' | $T8 %]</th>
100
    <td> [% L.date_tag('fromdate', fromdate) %]</td>
101
    <th align=right nowrap>[% 'Compare to' | $T8 %]</th>
102
    <td>[% L.date_tag('todate') %]</td>
103
  </tr>
104
</table>
105
<table>
106
  <tr>
107
    <th align=right nowrap>[% 'Include in Report' | $T8 %]</th>
108
    <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;[% 'Heading' | $T8 %]
109
    <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;[% 'Subtotal' | $T8 %]</td>
110
  </tr>
111
[%- END %]
112

  
113
[%- IF is_income_statement %]
114
[%- PROCESS projectnumber %]
115
  <input type=hidden name=nextsub value=generate_income_statement>
116
</table>
117
<table>
118
[%- PROCESS customized_report %]
119
[%- PROCESS cash_or_accrual %]
120
[%- END %]
121

  
122
[%- IF is_bwa %]
123
[%- PROCESS projectnumber %]
124
  <input type=hidden name=nextsub value=generate_bwa>
125
</table>
126
<table>
127
[%- PROCESS customized_report %]
128
[%- PROCESS cash_or_accrual %]
129
  <tr>
130
  <th align=right colspan=4>[% 'Decimalplaces' | $T8 %]</th>
131
    <td><input name=decimalplaces size=3 value="2"></td>
132
  </tr>
133
[%- END %]
134

  
135
[%- IF is_balance_sheet %]
136
  <input type=hidden name=nextsub value=generate_balance_sheet>
137
  <tr>
138
    <th align=right>[% 'as at' | $T8 %]</th>
139
    <td> [% L.date_tag('asofdate', asofdate) %]</td>
140
    <th align=right nowrap>[% 'Compare to' | $T8 %]</th>
141
    <td>[% L.date_tag('compareasofdate', compareasofdate) %]</td>
142
  </tr>
143
  <tr>
144
    <th align=right>[% 'Decimalplaces' | $T8 %]</th>
145
    <td><input name=decimalplaces size=3 value="2"></td>
146
  </tr>
147
</table>
148
<table>
149
[%- PROCESS cash_or_accrual %]
150
  <tr>
151
    <th align=right nowrap>[% 'Include in Report' | $T8 %]</th>
152
    <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;[% 'Heading' | $T8 %]
153
    <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;[% 'Subtotal' | $T8 %]
154
    <input name=l_accno class=checkbox type=checkbox value=Y>&nbsp;[% 'Account Number' | $T8 %]</td>
155
  </tr>
156
[%- END %]
157

  
158
[%- IF is_trial_balance %]
159
[%- PROCESS projectnumber %]
160
  <input type=hidden name=nextsub value=generate_trial_balance>
161
</table>
162
<table>
163
[%- PROCESS customized_report %]
164
[%- PROCESS cash_or_accrual %]
165
 <tr>
166
   <th align=right colspan=4>[% 'All Accounts' | $T8 %]</th>
167
   <td><input name=all_accounts type=checkbox value=1></td>
168
 </tr>
169
 <tr>
170
   <th align=right colspan=4>[% 'Decimalplaces' | $T8 %]</th>
171
   <td><input name=decimalplaces size=3 value="2"></td>
172
 </tr>
173
[%- END %]
174

  
175
[%- IF is_aging %]
176
  <tr>
177
    <th align=right>[% label %]</th>
178
    <td>[% vc %]</td>
179
  </tr>
180
  <tr>
181
    <td>[% 'Review of Aging list' | $T8 %]</td>
182
    <td><select name="review_of_aging_list">
183
        <option></option>
184
        <option>0-30</option>
185
        <option>30-60</option>
186
        <option>60-90</option>
187
        <option>90-120</option>
188
        <option>&gt; 120</option>
189
        </select>
190
    </td>
191
  </tr>
192
  <tr>
193
    <td align=left colspan=4>
194
      [% 'From' | $T8 %] [% L.date_tag('fromdate', fromdate) %]
195
      [% 'Bis' | $T8 %] [% L.date_tag('todate') %]
196
    </td>
197
  </tr>
198
  <input type=hidden name=type value=statement>
199
  <input type=hidden name=format value=html>
200
  <input type=hidden name=media value=screen>
201

  
202
  <input type=hidden name=nextsub value='[% nextsub %]'>
203
  <input type=hidden name=action value='[% nextsub %]'>
204
[%- END %]
205

  
206
[%- IF is_payments %]
207
  <input type=hidden name=nextsub value=list_payments>
208
  <tr>
209
    <th align=right nowrap>[% 'Account' | $T8 %]</th>
210
    <td colspan=3><select name=account>[% selection %]</select>
211
      <input type=hidden name=paymentaccounts value="[% paymentaccounts %]">
212
    </td>
213
  </tr>
214
  <tr>
215
    <th align=right>[% 'Reference' | $T8 %]</th>
216
    <td colspan=3><input name=reference></td>
217
  </tr>
218
  <tr>
219
    <th align=right nowrap>[% 'Source' | $T8 %]</th>
220
    <td colspan=3><input name=source></td>
221
  </tr>
222
  <tr>
223
    <th align=right nowrap>[% 'Memo' | $T8 %]</th>
224
    <td colspan=3><input name=memo size=30></td>
225
  </tr>
226
  <tr>
227
    <th align=right>[% 'From' | $T8 %]</th>
228
    <td>[% L.date_tag('fromdate', fromdate) %]</td>
229
    <th align=right>[% 'Bis' | $T8 %]</th>
230
    <td>[% L.date_tag('todate') %]</td>
231
  </tr>
232
  <tr>
233
    <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
234
    <th align=left colspan=3>[% 'Include Exchangerate Difference' | $T8 %]</td>
235
  </tr>
236

  
237
  <input type=hidden name=db value='[% db %]'>
238
  <input type=hidden name=sort value=transdate>
239
[%- END %]
240

  
241
[%- IF 0 # is_taxreport %]
242
  <input type=hidden name=nextsub value=generate_tax_report>
243
  <tr>
244
    <th align=right>[% 'From' | $T8 %]</th>
245
    <td>[% L.date_tag('fromdate', fromdate) %]</td>
246
    <th align=right>[% 'Bis' | $T8 %]</th>
247
    <td>[% L.date_tag('todate', todate) %]</td>
248
  </tr>
249
  <tr>
250
    <th align=right>[% 'Report for' | $T8 %]</th>
251
    <td colspan=3>
252
[% FOREACH row IN taxaccounts %]
253
      <input name=accno class=radio type=radio value='[% row.accno %]' [% loop.first ? 'checked' : '' %]>&nbsp;[% row.description %]
254
      <input name="[% row.accno %]_description" type=hidden value="[% row.description %]">
255
      <input name="[% row.accno %]_rate" type=hidden value="[% row.rate %]">
256
[%- END %]
257
      <input type=hidden name=db value='[% db %]'>
258
      <input type=hidden name=sort value=transdate>
259
    </td>
260
  </tr>
261
[%- PROCESS cash_or_accrual %]
262
</table>
263
<table>
264
  <tr>
265
    <th align=right>[% 'Include in Report' | $T8 %]</th>
266
    <td>
267
      <table>
268
        <tr>
269
          <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
270
          <td>[% 'ID' | $T8 %]</td>
271
          <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
272
          <td>[% 'Invoice' | $T8 %]</td>
273
          <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
274
          <td>[% 'Date' | $T8 %]</td>
275
        </tr>
276
        <tr>
277
          <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
278
          <td>
279
            [% LxERP.t8('Customer') IF db == 'ar' %]
280
            [% LxERP.t8('Vendor')   IF db == 'ap' %]
281
         </td>
282
          <td><input name="l_netamount" class=checkbox type=checkbox value=Y checked></td>
283
          <td>[% 'Amount' | $T8 %]</td>
284
          <td><input name="l_tax" class=checkbox type=checkbox value=Y checked></td>
285
          <td>[% 'Tax' | $T8 %]</td>
286
          <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
287
          <td>[% 'Total' | $T8 %]</td>
288
        </tr>
289
        <tr>
290
          <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
291
          <td>[% 'Subtotal' | $T8 %]</td>
292
        </tr>
293
      </table>
294
    </td>
295
  </tr>
296
[%- END %]
297

  
298
[%- IF 0 # is_nontaxable %]
299
  <input type=hidden name=nextsub value=generate_tax_report>
300

  
301
  <input type=hidden name=db value=[% db %]>
302
  <input type=hidden name=sort value=transdate>
303
  <input type=hidden name=report value='[% report %]'>
304

  
305
  <tr>
306
    <th align=right>[% 'From' | $T8 %]</th>
307
    <td>[% L.date_tag('fromdate', fromdate) %]</td>
308
    <th align=right>[% 'Bis' | $T8 %]</th>
309
    <td>[% L.date_tag('todate', todate) %]</td>
310
  </tr>
311
[%- PROCESS cash_or_accrual %]
312
  <tr>
313
    <th align=right>[% 'Include in Report' | $T8 %]</th>
314
    <td colspan=3>
315
      <table>
316
        <tr>
317
          <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
318
          <td>[% 'ID' | $T8 %]</td>
319
          <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
320
          <td>[% 'Invoice' | $T8 %]</td>
321
          <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
322
          <td>[% 'Date' | $T8 %]</td>
323
        </tr>
324
        <tr>
325
          <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
326
          <td>
327
            [% LxERP.t8('Customer') IF db == 'ar' %]
328
            [% LxERP.t8('Vendor')   IF db == 'ap' %]
329
       </td>
330
          <td><input name="l_netamount" class=checkbox type=checkbox value=Y checked></td>
331
          <td>[% 'Amount' | $T8 %]</td>
332
          <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
333
          <td>[% 'Total' | $T8 %]</td>
334
        </tr>
335
        <tr>
336
          <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
337
          <td>[% 'Subtotal' | $T8 %]</td>
338
        </tr>
339
      </table>
340
    </td>
341
  </tr>
342
[%- END %]
343
</table>
344

  
345
<hr size=3 noshade>
346
<br>
347
<input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
348

  
349
</form>
350

  
351
</body>
352
</html>

Auch abrufbar als: Unified diff