1 #=====================================================================
2 # SQL-Ledger Accounting
5 # Author: Dieter Simader
6 # Email: dsimader@sql-ledger.org
7 # Web: http://www.sql-ledger.org
9 # Contributors: Steve Doerr <sdoerr907@everestkc.net>
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #=====================================================================
27 #=====================================================================
36 $form->{title} = $locale->text('Add POS Invoice');
38 $form->{callback} = "$form->{script}?action=$form->{nextsub}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}" unless $form->{callback};
42 $form->{type} = "pos_invoice";
43 $form->{format} = "txt";
44 $form->{media} = ($myconfig{printer}) ? $myconfig{printer} : "screen";
45 $form->{rowcount} = 0;
47 $form->{readonly} = ($myconfig{acs} =~ /POS--Sale/) ? 1 : 0;
49 $ENV{REMOTE_ADDR} =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/;
52 map { $form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n" } @{ $form->{all_partsgroup} };
61 $ENV{REMOTE_ADDR} =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/;
64 $form->{sort} = 'transdate';
66 map { $form->{$_} = 'Y' } qw(open l_invnumber l_transdate l_name l_amount l_curr l_till l_subtotal);
68 if ($myconfig{role} ne 'user') {
69 $form->{l_employee} = 'Y';
72 $form->{title} = $locale->text('Open');
80 $form->{title} = $locale->text('Edit POS Invoice');
82 $form->{callback} = "$form->{script}?action=$form->{nextsub}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}" unless $form->{callback};
87 $form->{type} = "pos_invoice";
88 $form->{format} = "txt";
89 $form->{media} = ($myconfig{printer}) ? $myconfig{printer} : "screen";
91 $form->{readonly} = ($myconfig{acs} =~ /POS--Sale/) ? 1 : 0;
93 map { $form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n" } @{ $form->{all_partsgroup} };
102 # set option selected
103 foreach $item (qw(AR currency)) {
104 $form->{"select$item"} =~ s/ selected//;
105 $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
108 foreach $item (qw(customer department employee)) {
109 $form->{"select$item"} = $form->unescape($form->{"select$item"});
110 $form->{"select$item"} =~ s/ selected//;
111 $form->{"select$item"} =~ s/(<option value="\Q$form->{$item}\E")/$1 selected/;
114 $form->{exchangerate} = $form->format_amount(\%myconfig, $form->{exchangerate});
116 if ($form->{oldtotalpaid} > $form->{oldinvtotal}) {
117 $adj = $form->{oldtotalpaid} - $form->{oldinvtotal};
119 $form->{creditremaining} = $form->{creditremaining} - $adj + $form->{oldchange};
122 if ($form->{currency} ne $form->{defaultcurrency}) {
123 if ($form->{forex}) {
124 $exchangerate .= qq|<th align=right>|.$locale->text('Exchange Rate').qq|</th><td>$form->{exchangerate}<input type=hidden name=exchangerate value=$form->{exchangerate}></td>|;
126 $exchangerate .= qq|<th align=right>|.$locale->text('Exchange Rate').qq|</th><td><input name=exchangerate size=10 value=$form->{exchangerate}></td>|;
130 <input type=hidden name=forex value=$form->{forex}>
133 if ($form->{selectcustomer}) {
134 $customer = qq|<select name=customer>$form->{selectcustomer}</select>
135 <input type=hidden name="selectcustomer" value="|.
136 $form->escape($form->{selectcustomer},1).qq|">|;
138 $customer = qq|<input name=customer value="$form->{customer}" size=35>|;
143 <th align="right" nowrap>|.$locale->text('Department').qq|</th>
144 <td colspan=3><select name=department>$form->{selectdepartment}</select>
145 <input type=hidden name=selectdepartment value="|.
146 $form->escape($form->{selectdepartment},1).qq|">
149 | if $form->{selectdepartment};
151 $n = ($form->{creditremaining} < 0) ? "0" : "1";
153 if ($form->{selectlanguage}) {
154 if ($form->{language_code} ne $form->{oldlanguage_code}) {
156 $form->get_partsgroup(\%myconfig, { language_code => $form->{language_code} });
157 $form->{partsgroup} = "";
158 map { $form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n" } @{ $form->{all_partsgroup} };
159 $form->{oldlanguage_code} = $form->{language_code};
163 $form->{"selectlanguage"} = $form->unescape($form->{"selectlanguage"});
164 $form->{"selectlanguage"} =~ s/ selected//;
165 $form->{"selectlanguage"} =~ s/(<option value="\Q$form->{language_code}\E")/$1 selected/;
168 <th align=right>|.$locale->text('Language').qq|</th>
169 <td colspan=3><select name=language_code>$form->{selectlanguage}</select></td>
171 <input type=hidden name=oldlanguage_code value=$form->{oldlanguage_code}>
172 <input type=hidden name=selectlanguage value="|.
173 $form->escape($form->{selectlanguage},1).qq|">|;
183 <form method=post action=$form->{script}>
185 <input type=hidden name=id value=$form->{id}>
187 <input type=hidden name=till value=$form->{till}>
189 <input type=hidden name=type value=$form->{type}>
190 <input type=hidden name=media value=$form->{media}>
191 <input type=hidden name=format value=$form->{format}>
193 <input type=hidden name=printed value="$form->{printed}">
195 <input type=hidden name=title value="$form->{title}">
196 <input type=hidden name=vc value="customer">
198 <input type=hidden name=discount value=$form->{discount}>
199 <input type=hidden name=creditlimit value=$form->{creditlimit}>
200 <input type=hidden name=creditremaining value=$form->{creditremaining}>
202 <input type=hidden name=closedto value=$form->{closedto}>
203 <input type=hidden name=locked value=$form->{locked}>
208 <th class=listtop>$form->{title}</font></th>
218 <th align=right nowrap>|.$locale->text('Customer').qq|</th>
220 <input type=hidden name=customer_id value=$form->{customer_id}>
221 <input type=hidden name=oldcustomer value="$form->{oldcustomer}">
228 <th nowrap>|.$locale->text('Credit Limit').qq|</th>
229 <td>$form->{creditlimit}</td>
230 <th nowrap>|.$locale->text('Remaining').qq|</th>
231 <td class="plus$n">|.$form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0").qq|</font></td>
238 <th align=right nowrap>|.$locale->text('Record in').qq|</th>
239 <td><select name=AR>$form->{selectAR}</select></td>
240 <input type=hidden name=selectAR value="$form->{selectAR}">
248 <th align=right nowrap>|.$locale->text('Salesperson').qq|</th>
249 <td colspan=3><select name=employee>$form->{selectemployee}</select></td>
250 <input type=hidden name=selectemployee value="|.
251 $form->escape($form->{selectemployee},1).qq|">
254 <th align=right nowrap>|.$locale->text('Currency').qq|</th>
255 <td><select name=currency>$form->{selectcurrency}</select></td>
256 <input type=hidden name=selectcurrency value="$form->{selectcurrency}">
257 <input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
258 <input type=hidden name=fxgain_accno value=$form->{fxgain_accno}>
259 <input type=hidden name=fxloss_accno value=$form->{fxloss_accno}>
265 <input type=hidden name=invnumber value=$form->{invnumber}>
266 <input type=hidden name=transdate value=$form->{transdate}>
267 <input type=hidden name=duedate value=$form->{duedate}>
278 <input type=hidden name=taxaccounts value="$form->{taxaccounts}">
281 foreach $item (split / /, $form->{taxaccounts}) {
283 <input type=hidden name="${item}_rate" value="$form->{"${item}_rate"}">
284 <input type=hidden name="${item}_description" value="$form->{"${item}_description"}">
285 <input type=hidden name="${item}_taxnumber" value="$form->{"${item}_taxnumber"}">
295 $form->{invtotal} = $form->{invsubtotal};
297 foreach $item (split / /, $form->{taxaccounts}) {
298 if ($form->{"${item}_base"}) {
299 $form->{"${item}_total"} = $form->round_amount($form->{"${item}_base"} * $form->{"${item}_rate"}, 2);
300 $form->{invtotal} += $form->{"${item}_total"};
301 $form->{"${item}_total"} = $form->format_amount(\%myconfig, $form->{"${item}_total"}, 2, 0);
305 <th align=right>$form->{"${item}_description"}</th>
306 <td align=right>$form->{"${item}_total"}</td>
314 $form->{invsubtotal} = $form->format_amount(\%myconfig, $form->{invsubtotal}, 2, 0);
318 <th align=right>|.$locale->text('Subtotal').qq|</th>
319 <td align=right>$form->{invsubtotal}</td>
326 $form->{paidaccounts} = 1;
329 $form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
330 $form->{"selectAR_paid_$i"} =~ s/option>\Q$form->{"AR_paid_$i"}\E/option selected>$form->{"AR_paid_$i"}/;
333 $totalpaid += $form->{"paid_$i"};
334 $form->{"paid_$i"} = $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
335 $form->{"exchangerate_$i"} = $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
338 if ($totalpaid > $form->{invtotal}) {
339 $form->{change} = $totalpaid - $form->{invtotal};
341 $form->{oldchange} = $form->{change};
342 $form->{change} = $form->format_amount(\%myconfig, $form->{change}, 2, 0);
343 $form->{totalpaid} = $form->format_amount(\%myconfig, $totalpaid, 2);
346 $form->{oldinvtotal} = $form->{invtotal};
347 $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2, 0);
352 <input type=hidden name="exchangerate_$i" value=$form->{"exchangerate"}>
353 <input type=hidden name="forex_$i" value=$form->{"forex_$i"}>
363 <th>|.$locale->text('Paid').qq|</th>
364 <th>|.$locale->text('Source').qq|</th>
365 <th>|.$locale->text('Memo').qq|</th>
366 <th>|.$locale->text('Account').qq|</th>
370 <td><input name="paid_$i" size=11 value=$form->{"paid_$i"}></td>
371 <td><input name="source_$i" size=10 value="$form->{"source_$i"}"></td>
372 <td><input name="memo_$i" size=10 value="$form->{"memo_$i"}"></td>
373 <td><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>
376 <th align=right>|.$locale->text('Change').qq|</th>
377 <th>$form->{change}</th>
386 <th align=right>|.$locale->text('Total').qq|</th>
387 <td align=right>$form->{invtotal}</td>
397 <input type=hidden name=paidaccounts value=$form->{paidaccounts}>
398 <input type=hidden name=selectAR_paid value="$form->{selectAR_paid}">
399 <input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
400 <input type=hidden name=oldtotalpaid value=$totalpaid>
402 <input type=hidden name=change value=$form->{change}>
403 <input type=hidden name=oldchange value=$form->{oldchange}>
405 <input type=hidden name=datepaid value=$form->{transdate}>
406 <input type=hidden name=invtotal value=$form->{invtotal}>
418 <td><hr size=3 noshade></td>
423 $transdate = $form->datetonum($form->{transdate}, \%myconfig);
424 $closedto = $form->datetonum($form->{closedto}, \%myconfig);
426 if (! $form->{readonly}) {
427 if ($transdate > $closedto) {
429 <input class=submit type=submit name=action value="|.$locale->text('Update').qq|">
430 <input class=submit type=submit name=action value="|.$locale->text('Print').qq|">
431 <input class=submit type=submit name=action value="|.$locale->text('Post').qq|">|;
435 <input class=submit type=submit name=action value="|.$locale->text('Delete').qq|">|;
441 if ($form->{partsgroup}) {
443 <input type=hidden name=nextsub value=lookup_partsgroup>
444 <input type=hidden name=partsgroup value="$form->{partsgroup}">|;
446 foreach $item (split /\n/, $form->{partsgroup}) {
448 ($partsgroup, $translation) = split /--/, $item;
449 $item = ($translation) ? $translation : $partsgroup;
450 print qq| <input class=submit type=submit name=action value=".$item">\n|;
458 <input type=hidden name=rowcount value=$form->{rowcount}>
460 <input name=callback type=hidden value="$form->{callback}">
462 <input type=hidden name=path value=$form->{path}>
463 <input type=hidden name=login value=$form->{login}>
464 <input type=hidden name=sessionid value=$form->{sessionid}>
477 $form->isblank("customer", $locale->text('Customer missing!'));
479 # if oldcustomer ne customer redo form
480 $customer = $form->{customer};
481 $customer =~ s/--.*//g;
482 $customer .= "--$form->{customer_id}";
483 if ($customer ne $form->{oldcustomer}) {
490 $form->isblank("exchangerate", $locale->text('Exchange rate missing!')) if ($form->{currency} ne $form->{defaultcurrency});
492 $paid = $form->parse_amount(\%myconfig, $form->{"paid_1"});
493 $total = $form->parse_amount(\%myconfig, $form->{invtotal});
495 $form->{"paid_1"} = $form->{invtotal} if $paid > $total;
497 ($form->{AR}) = split /--/, $form->{AR};
499 $form->{invnumber} = $form->update_defaults(\%myconfig, "sinumber") unless $form->{invnumber};
501 $form->redirect($locale->text('Posted!')) if (IS->post_invoice(\%myconfig, \%$form));
502 $form->error($locale->text('Cannot post transaction!'));
510 @column_index = qw(partnumber description partsgroup qty unit sellprice discount linetotal);
512 $form->{invsubtotal} = 0;
514 map { $form->{"${_}_base"} = 0 } (split / /, $form->{taxaccounts});
516 $column_data{partnumber} = qq|<th class=listheading nowrap>|.$locale->text('Number').qq|</th>|;
517 $column_data{description} = qq|<th class=listheading nowrap>|.$locale->text('Description').qq|</th>|;
518 $column_data{qty} = qq|<th class=listheading nowrap>|.$locale->text('Qty').qq|</th>|;
519 $column_data{unit} = qq|<th class=listheading nowrap>|.$locale->text('Unit').qq|</th>|;
520 $column_data{sellprice} = qq|<th class=listheading nowrap>|.$locale->text('Price').qq|</th>|;
521 $column_data{linetotal} = qq|<th class=listheading nowrap>|.$locale->text('Extended').qq|</th>|;
522 $column_data{discount} = qq|<th class=listheading nowrap>%</th>|;
528 <tr class=listheading>|;
530 map { print "\n$column_data{$_}" } @column_index;
536 $exchangerate = $form->parse_amount(\%myconfig, $form->{exchangerate});
537 $exchangerate = ($exchangerate) ? $exchangerate : 1;
539 for $i (1 .. $numrows) {
541 map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(qty discount sellprice);
543 ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
545 $decimalplaces = ($dec > 2) ? $dec : 2;
547 if (($form->{"qty_$i"} != $form->{"oldqty_$i"}) || ($form->{currency} ne $form->{oldcurrency})) {
548 # check for a pricematrix
549 foreach $item (split / /, $form->{"pricematrix_$i"}) {
550 ($q, $p) = split /:/, $item;
551 if ($p && $form->{"qty_$i"} > $q) {
552 $form->{"sellprice_$i"} = $form->round_amount($p / $exchangerate, $decimalplaces);
558 if ($form->{"discount_$i"} != $form->{discount} * 100) {
559 $form->{"discount_$i"} = $form->{discount} * 100;
563 $discount = $form->round_amount($form->{"sellprice_$i"} * $form->{"discount_$i"}/100, $decimalplaces);
564 $linetotal = $form->round_amount($form->{"sellprice_$i"} - $discount, $decimalplaces);
565 $linetotal = $form->round_amount($linetotal * $form->{"qty_$i"}, 2);
567 map { $form->{"${_}_$i"} = $form->quote($form->{"${_}_$i"}) } qw(partnumber sku description partsgroup unit);
569 $column_data{partnumber} = qq|<td><input name="partnumber_$i" size=20 value="$form->{"partnumber_$i"}"></td>|;
571 if (($rows = $form->numtextrows($form->{"description_$i"}, 25, 6)) > 1) {
572 $column_data{description} = qq|<td><textarea name="description_$i" rows=$rows cols=25 wrap=soft>$form->{"description_$i"}</textarea></td>|;
574 $column_data{description} = qq|<td><input name="description_$i" size=30 value="$form->{"description_$i"}"></td>|;
577 $column_data{partsgroup} = qq|<input type=hidden name="partsgroup_$i" value="$form->{"partsgroup_$i"}">|;
579 $column_data{qty} = qq|<td align=right><input name="qty_$i" size=5 value=|.$form->format_amount(\%myconfig, $form->{"qty_$i"}).qq|></td>|;
580 $column_data{unit} = qq|<td><input type=hidden name="unit_$i" value="$form->{"unit_$i"}">$form->{"unit_$i"}</td>|;
581 $column_data{sellprice} = qq|<td align=right><input name="sellprice_$i" size=9 value=|.$form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces).qq|></td>|;
582 $column_data{linetotal} = qq|<td align=right>|.$form->format_amount(\%myconfig, $linetotal, 2).qq|</td>|;
585 $discount = $form->format_amount(\%myconfig, $form->{"discount_$i"});
586 $column_data{discount} = qq|<td align=right>$discount</td>
587 <input type=hidden name="discount_$i" value=$discount>|;
592 map { print "\n$column_data{$_}" } @column_index;
597 <input type=hidden name="id_$i" value=$form->{"id_$i"}>
598 <input type=hidden name="inventory_accno_$i" value=$form->{"inventory_accno_$i"}>
599 <input type=hidden name="income_accno_$i" value=$form->{"income_accno_$i"}>
600 <input type=hidden name="expense_accno_$i" value=$form->{"expense_accno_$i"}>
601 <input type=hidden name="listprice_$i" value="$form->{"listprice_$i"}">
602 <input type=hidden name="assembly_$i" value="$form->{"assembly_$i"}">
603 <input type=hidden name="taxaccounts_$i" value="$form->{"taxaccounts_$i"}">
604 <input type=hidden name="pricematrix_$i" value="$form->{"pricematrix_$i"}">
605 <input type=hidden name="oldqty_$i" value="$form->{"qty_$i"}">
606 <input type=hidden name="sku_$i" value="$form->{"sku_$i"}">
610 map { $form->{"${_}_base"} += $linetotal } (split / /, $form->{"taxaccounts_$i"});
612 $form->{invsubtotal} += $linetotal;
620 <input type=hidden name=oldcurrency value=$form->{currency}>
629 $paid = $form->parse_amount(\%myconfig, $form->{"paid_1"});
630 $total = $form->parse_amount(\%myconfig, $form->{invtotal});
633 if ($paid > $total) {
634 $form->{paid} = $total - $paid;
635 $form->{"paid_1"} = $form->format_amount(\%myconfig, $paid, 2, 0);
636 $form->{change} = $form->format_amount(\%myconfig, $paid - $total, 2, 0);
639 $old_form = new Form;
640 map { $old_form->{$_} = $form->{$_} } keys %$form;
642 map { $form->{$_} =~ s/--.*//g } qw(employee department);
643 $form->{invdate} = $form->{transdate};
644 $form->{invtime} = scalar localtime;
646 &print_form($old_form);
652 my $old_form = shift;
654 # if oldcustomer ne customer redo form
655 $customer = $form->{customer};
656 $customer =~ s/--.*//g;
657 $customer .= "--$form->{customer_id}";
658 if ($customer ne $form->{oldcustomer}) {
666 &{ "$form->{vc}_details" };
669 map { push @a, ("partnumber_$_", "description_$_") } (1 .. $form->{rowcount});
670 map { push @a, "${_}_description" } split / /, $form->{taxaccounts};
671 $form->format_string(@a);
673 # format payment dates
674 map { $form->{"datepaid_$_"} = $locale->date(\%myconfig, $form->{"datepaid_$_"}) } (1 .. $form->{paidaccounts});
676 IS->invoice_details(\%myconfig, \%$form);
678 map { $form->{$_} = $myconfig{$_} } (qw(company address tel fax businessnumber));
679 $form->{username} = $myconfig{name};
680 map { $form->{$_} =~ s/\\n/ /g } qw(company address);
682 $form->{templates} = "$myconfig{templates}";
683 $form->{IN} = "$form->{type}.$form->{format}";
685 if ($form->{media} !~ /screen/) {
686 $form->{OUT} = "| $printer{$form->{media}}";
689 $form->{discount} = $form->format_amount(\%myconfig, $form->{discount} * 100);
692 $form->{pre} = "<body bgcolor=#ffffff>\n<pre>";
693 delete $form->{stylesheet};
695 $form->parse_template(\%myconfig, $userspath);
697 if ($form->{printed} !~ /$form->{formname}/) {
698 $form->{printed} .= " $form->{formname}";
699 $form->{printed} =~ s/^ //;
701 $form->update_status(\%myconfig);
703 $old_form->{printed} = $form->{printed};
705 # if we got back here restore the previous form
706 if ($form->{media} !~ /screen/) {
707 # restore and display form
708 map { $form->{$_} = $old_form->{$_} } keys %$old_form;
709 map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate);
712 for $i (1 .. $form->{paidaccounts}) {
713 map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate);
725 sub lookup_partsgroup {
727 $form->{action} =~ s/
\r//;
728 $form->{action} = substr($form->{action}, 1);
730 if ($form->{language_code}) {
732 foreach $item (split /\n/, $form->{partsgroup}) {
733 if ($item =~ /$form->{action}/) {
734 ($partsgroup, $translation) = split /--/, $item;
735 $form->{action} = $partsgroup;
741 $form->{"partsgroup_$form->{rowcount}"} = $form->{action};
751 $form->{PD}{$form->{type}} = "checked";
754 <input type=hidden name=format value=$form->{format}>
755 <input type=hidden name=formname value=$form->{type}>
763 <td><input class=radio type=radio name=media value="screen"></td>
764 <td>|.$locale->text('Screen').qq|</td>|;
768 <td><input class=radio type=radio name=media value="$_"></td>
773 $media =~ s/(value="\Q$form->{media}\E")/$1 checked/;
778 <td width=99%> </td>|;
780 if ($form->{printed} =~ /$form->{type}/) {
782 <th>\||.$locale->text('Printed').qq|\|</th>|;
795 $form->{title} = $locale->text('Receipts');
798 RP->paymentaccounts(\%myconfig, \%$form);
800 map { $paymentaccounts .= "$_->{accno} " } @{ $form->{PR} };
803 $form->{selectaccountingyear} = "<option>\n";
804 map { $form->{selectaccountingyear} .= qq|<option>$_\n| } @{ $form->{all_years} };
805 $form->{selectaccountingmonth} = "<option>\n";
806 map { $form->{selectaccountingmonth} .= qq|<option value=$_>|.$locale->text($form->{all_month}{$_}).qq|\n| } sort keys %{ $form->{all_month} };
810 <th align=right>|.$locale->text('Period').qq|</th>
812 <select name=month>$form->{selectaccountingmonth}</select>
813 <select name=year>$form->{selectaccountingyear}</select>
814 <input name=interval class=radio type=radio value=0 checked>|.$locale->text('Current').qq|
815 <input name=interval class=radio type=radio value=1>|.$locale->text('Month').qq|
816 <input name=interval class=radio type=radio value=3>|.$locale->text('Quarter').qq|
817 <input name=interval class=radio type=radio value=12>|.$locale->text('Year').qq|
827 <form method=post action=$form->{script}>
829 <input type=hidden name=title value="$form->{title}">
830 <input type=hidden name=paymentaccounts value="$paymentaccounts">
832 <input type=hidden name=till value=1>
833 <input type=hidden name=subtotal value=1>
837 <th class=listtop>$form->{title}</th>
844 <input type=hidden name=nextsub value=list_payments>
847 <th align=right>|.$locale->text('From').qq|</th>
848 <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
849 <th align=right>|.$locale->text('To').qq|</th>
850 <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
853 <input type=hidden name=sort value=transdate>
854 <input type=hidden name=db value=$form->{db}>
859 <td><hr size=3 noshade></td>
864 <input type=hidden name=path value=$form->{path}>
865 <input type=hidden name=login value=$form->{login}>
866 <input type=hidden name=sessionid value=$form->{sessionid}>
868 <input type=submit class=submit name=action value="|.$locale->text('Continue').qq|">