- %title = ('balance_sheet' => 'Balance Sheet',
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
+
+ my %title = (
+ 'balance_sheet' => 'Balance Sheet',
'income_statement' => 'Income Statement',
'trial_balance' => 'Trial Balance',
'ar_aging' => 'AR Aging',
'income_statement' => 'Income Statement',
'trial_balance' => 'Trial Balance',
'ar_aging' => 'AR Aging',
'receipts' => 'Receipts',
'payments' => 'Payments',
'projects' => 'Project Transactions',
'receipts' => 'Receipts',
'payments' => 'Payments',
'projects' => 'Project Transactions',
| if $form->{selectdepartment};
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
| if $form->{selectdepartment};
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
- NTI($cgi->popup_menu('-name' => "project_id",
- '-values' => \@project_values,
- '-labels' => \%project_labels));
+ NTI($main::cgi->popup_menu('-name' => "project_id",
+ '-values' => \@project_values,
+ '-labels' => \%project_labels));
$onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
$onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
print qq|
$onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
$onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
print qq|
- <tr>
- <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
- <td><input name=l_heading class=checkbox type=checkbox value=Y> | . $locale->text('Heading') . qq|
- <input name=l_subtotal class=checkbox type=checkbox value=Y> | . $locale->text('Subtotal') . qq|</td>
- </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td><input name=l_heading class=checkbox type=checkbox value=Y> | . $locale->text('Heading') . qq|
+ <input name=l_subtotal class=checkbox type=checkbox value=Y> | . $locale->text('Subtotal') . qq|</td>
+ </tr>
- <tr>
- <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
- </tr>
- <tr>
- <th colspan=1>| . $locale->text('Year') . qq|</th>
- <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
- </tr>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
+ </tr>
+ <tr>
+ <th colspan=1>| . $locale->text('Year') . qq|</th>
+ <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
+ </tr>
- <tr>
- <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
- <th align=left>| . $locale->text('Quarterly') . qq|</th>
- <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
- </tr>
- <tr>
- <td align=right> <input name=duetyp class=radio type=radio value="13" "checked"></td>
- <td><input name=duetyp class=radio type=radio value="A" $checked > 1. | . $locale->text('Quarter') . qq|</td>
+ <tr>
+ <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
+ <th align=left>| . $locale->text('Quarterly') . qq|</th>
+ <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
+ </tr>
+ <tr>
+ <td align=right> <input name=duetyp class=radio type=radio value="13" "checked"></td>
+ <td><input name=duetyp class=radio type=radio value="A" $checked > 1. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="5" $checked > | . $locale->text('May') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="9" $checked > | . $locale->text('September') . qq|</td>
-
- </tr>
- <tr>
- <td align= right> </td>
- <td><input name=duetyp class=radio type=radio value="B" $checked> 2. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="2" $checked > | . $locale->text('February') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="6" $checked > | . $locale->text('June') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="10" $checked > | . $locale->text('October') . qq|</td>
- </tr>
- <tr>
- <td> </td>
- <td><input name=duetyp class=radio type=radio value="C" $checked> 3. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="3" $checked > | . $locale->text('March') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="7" $checked > | . $locale->text('July') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="11" $checked > | . $locale->text('November') . qq|</td>
-
- </tr>
- <tr>
- <td> </td>
- <td><input name=duetyp class=radio type=radio value="D" $checked> 4. | . $locale->text('Quarter') . qq| </td>
- <td><input name=duetyp class=radio type=radio value="4" $checked > | . $locale->text('April') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="8" $checked > | . $locale->text('August') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="12" $checked > | . $locale->text('December') . qq|</td>
-
- </tr>
- <tr>
- <td colspan=5><hr size=3 noshade></td>
- </tr>
- <tr>
+ <td><input name=duetyp class=radio type=radio value="5" $checked > | . $locale->text('May') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="9" $checked > | . $locale->text('September') . qq|</td>
+
+ </tr>
+ <tr>
+ <td align= right> </td>
+ <td><input name=duetyp class=radio type=radio value="B" $checked> 2. | . $locale->text('Quarter') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="2" $checked > | . $locale->text('February') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="6" $checked > | . $locale->text('June') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="10" $checked > | . $locale->text('October') . qq|</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="C" $checked> 3. | . $locale->text('Quarter') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="3" $checked > | . $locale->text('March') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="7" $checked > | . $locale->text('July') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="11" $checked > | . $locale->text('November') . qq|</td>
+
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="D" $checked> 4. | . $locale->text('Quarter') . qq| </td>
+ <td><input name=duetyp class=radio type=radio value="4" $checked > | . $locale->text('April') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="8" $checked > | . $locale->text('August') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="12" $checked > | . $locale->text('December') . qq|</td>
+
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
- <tr>
- <td colspan=5><hr size=3 noshade></td>
- </tr>
- <tr>
- <th align=leftt>| . $locale->text('Method') . qq|</th>
- <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
- <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
- </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=leftt>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
+ </tr>
- <tr>
- <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
- </tr>
- <tr>
- <th colspan=1>| . $locale->text('Year') . qq|</th>
- <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
- </tr>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
+ </tr>
+ <tr>
+ <th colspan=1>| . $locale->text('Year') . qq|</th>
+ <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
+ </tr>
- <tr>
- <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
- <th align=left>| . $locale->text('Quarterly') . qq|</th>
- <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
- </tr>
- <tr>
- <td align=right> <input name=duetyp class=radio type=radio value="13"
+ <tr>
+ <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
+ <th align=left>| . $locale->text('Quarterly') . qq|</th>
+ <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
+ </tr>
+ <tr>
+ <td align=right> <input name=duetyp class=radio type=radio value="13"
- <td><input name=duetyp class=radio type=radio value="5" $checked > | . $locale->text('May') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="9" $checked > | . $locale->text('September') . qq|</td>
-
- </tr>
- <tr>
- <td align= right> </td>
- <td><input name=duetyp class=radio type=radio value="B" $checked> 2. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="2" $checked > | . $locale->text('February') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="6" $checked > | . $locale->text('June') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="10" $checked > | . $locale->text('October') . qq|</td>
- </tr>
- <tr>
- <td> </td>
- <td><input name=duetyp class=radio type=radio value="C" $checked> 3. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="3" $checked > | . $locale->text('March') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="7" $checked > | . $locale->text('July') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="11" $checked > | . $locale->text('November') . qq|</td>
-
- </tr>
- <tr>
- <td> </td>
- <td><input name=duetyp class=radio type=radio value="D" $checked> 4. | . $locale->text('Quarter') . qq| </td>
- <td><input name=duetyp class=radio type=radio value="4" $checked > | . $locale->text('April') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="8" $checked > | . $locale->text('August') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="12" $checked > | . $locale->text('December') . qq|</td>
-
- </tr>
- <tr>
- <td colspan=5><hr size=3 noshade></td>
- </tr>
- <tr>
+ <td><input name=duetyp class=radio type=radio value="5" $checked > | . $locale->text('May') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="9" $checked > | . $locale->text('September') . qq|</td>
+
+ </tr>
+ <tr>
+ <td align= right> </td>
+ <td><input name=duetyp class=radio type=radio value="B" $checked> 2. | . $locale->text('Quarter') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="2" $checked > | . $locale->text('February') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="6" $checked > | . $locale->text('June') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="10" $checked > | . $locale->text('October') . qq|</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="C" $checked> 3. | . $locale->text('Quarter') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="3" $checked > | . $locale->text('March') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="7" $checked > | . $locale->text('July') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="11" $checked > | . $locale->text('November') . qq|</td>
+
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="D" $checked> 4. | . $locale->text('Quarter') . qq| </td>
+ <td><input name=duetyp class=radio type=radio value="4" $checked > | . $locale->text('April') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="8" $checked > | . $locale->text('August') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="12" $checked > | . $locale->text('December') . qq|</td>
+
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
- <tr>
- <td colspan=5><hr size=3 noshade></td>
- </tr>
- <tr>
- <th align=leftt>| . $locale->text('Method') . qq|</th>
- <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
- <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
- </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=leftt>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
+ </tr>
- <tr>
- <th align=right>| . $locale->text('Method') . qq|</th>
- <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
- <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
- </tr>
-
- <tr>
- <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
- <td><input name=l_heading class=checkbox type=checkbox value=Y> | . $locale->text('Heading') . qq|
- <input name=l_subtotal class=checkbox type=checkbox value=Y> | . $locale->text('Subtotal') . qq|
- <input name=l_accno class=checkbox type=checkbox value=Y> | . $locale->text('Account Number') . qq|</td>
- </tr>
+ <tr>
+ <th align=right>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
+ </tr>
+
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td><input name=l_heading class=checkbox type=checkbox value=Y> | . $locale->text('Heading') . qq|
+ <input name=l_subtotal class=checkbox type=checkbox value=Y> | . $locale->text('Subtotal') . qq|
+ <input name=l_accno class=checkbox type=checkbox value=Y> | . $locale->text('Account Number') . qq|</td>
+ </tr>
- <tr>
- <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
- </tr>
- <tr>
- <th colspan=1>| . $locale->text('Year') . qq|</th>
- <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
- </tr>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="custom" checked> | . $locale->text('Customized Report') . qq|</th>
+ </tr>
+ <tr>
+ <th colspan=1>| . $locale->text('Year') . qq|</th>
+ <td><input name=year size=11 title="| . $locale->text('YYYY') . qq|" value="$year"></td>
+ </tr>
- <tr>
- <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
- <th align=left>| . $locale->text('Quarterly') . qq|</th>
- <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
- </tr>
- <tr>
- <td align=right> <input name=duetyp class=radio type=radio value="13" $checked></td>
- <td><input name=duetyp class=radio type=radio value="A" $checked > 1. | . $locale->text('Quarter') . qq|</td>
+ <tr>
+ <td align=right> <b> | . $locale->text('Yearly') . qq|</b> </td>
+ <th align=left>| . $locale->text('Quarterly') . qq|</th>
+ <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
+ </tr>
+ <tr>
+ <td align=right> <input name=duetyp class=radio type=radio value="13" $checked></td>
+ <td><input name=duetyp class=radio type=radio value="A" $checked > 1. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="5" $checked > | . $locale->text('May') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="9" $checked > | . $locale->text('September') . qq|</td>
-
- </tr>
- <tr>
- <td align= right> </td>
- <td><input name=duetyp class=radio type=radio value="B" $checked> 2. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="2" $checked > | . $locale->text('February') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="6" $checked > | . $locale->text('June') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="10" $checked > | . $locale->text('October') . qq|</td>
- </tr>
- <tr>
- <td> </td>
- <td><input name=duetyp class=radio type=radio value="C" $checked> 3. | . $locale->text('Quarter') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="3" $checked > | . $locale->text('March') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="7" $checked > | . $locale->text('July') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="11" $checked > | . $locale->text('November') . qq|</td>
-
- </tr>
- <tr>
- <td> </td>
- <td><input name=duetyp class=radio type=radio value="D" $checked> 4. | . $locale->text('Quarter') . qq| </td>
- <td><input name=duetyp class=radio type=radio value="4" $checked > | . $locale->text('April') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="8" $checked > | . $locale->text('August') . qq|</td>
- <td><input name=duetyp class=radio type=radio value="12" $checked > | . $locale->text('December') . qq|</td>
-
- </tr>
- <tr>
- <td colspan=5><hr size=3 noshade></td>
- </tr>
- <tr>
+ <td><input name=duetyp class=radio type=radio value="5" $checked > | . $locale->text('May') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="9" $checked > | . $locale->text('September') . qq|</td>
+
+ </tr>
+ <tr>
+ <td align= right> </td>
+ <td><input name=duetyp class=radio type=radio value="B" $checked> 2. | . $locale->text('Quarter') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="2" $checked > | . $locale->text('February') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="6" $checked > | . $locale->text('June') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="10" $checked > | . $locale->text('October') . qq|</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="C" $checked> 3. | . $locale->text('Quarter') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="3" $checked > | . $locale->text('March') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="7" $checked > | . $locale->text('July') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="11" $checked > | . $locale->text('November') . qq|</td>
+
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="D" $checked> 4. | . $locale->text('Quarter') . qq| </td>
+ <td><input name=duetyp class=radio type=radio value="4" $checked > | . $locale->text('April') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="8" $checked > | . $locale->text('August') . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="12" $checked > | . $locale->text('December') . qq|</td>
+
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
- <tr>
- <td colspan=5><hr size=3 noshade></td>
- </tr>
- <tr>
- <th align=leftt>| . $locale->text('Method') . qq|</th>
- <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
- <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
- </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=leftt>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
+ </tr>
- <tr>
- <th align=right>| . $locale->text('From') . qq|</th>
- <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
- <th align=right>| . $locale->text('Bis') . qq|</th>
- <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
- </tr>
- <tr>
- <th align=right>| . $locale->text('Report for') . qq|</th>
- <td colspan=3>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Report for') . qq|</th>
+ <td colspan=3>
- </td>
- </tr>
- <tr>
- <th align=right>| . $locale->text('Method') . qq|</th>
- <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
- <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
- </tr>
+ </td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>| . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>| . $locale->text('EUR') . qq|</td>
+ </tr>
- <th align=right>| . $locale->text('Include in Report') . qq|</th>
- <td>
- <table>
- <tr>
- <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
- <td>| . $locale->text('ID') . qq|</td>
- <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
- <td>| . $locale->text('Invoice') . qq|</td>
- <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
- <td>| . $locale->text('Date') . qq|</td>
- </tr>
- <tr>
- <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
- <td>|;
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td>
+ <table>
+ <tr>
+ <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('ID') . qq|</td>
+ <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Invoice') . qq|</td>
+ <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Date') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
+ <td>|;
- <td>| . $locale->text('Amount') . qq|</td>
- <td><input name="l_tax" class=checkbox type=checkbox value=Y checked></td>
- <td>| . $locale->text('Tax') . qq|</td>
- <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
- <td>| . $locale->text('Total') . qq|</td>
- </tr>
- <tr>
- <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
- <td>| . $locale->text('Subtotal') . qq|</td>
- </tr>
- </table>
- </td>
- </tr>
+ <td>| . $locale->text('Amount') . qq|</td>
+ <td><input name="l_tax" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Tax') . qq|</td>
+ <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Total') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Subtotal') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
- <tr>
- <th align=right>| . $locale->text('From') . qq|</th>
- <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
- <th align=right>| . $locale->text('Bis') . qq|</th>
- <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
- </tr>
- <tr>
- <th align=right>| . $locale->text('Method') . qq|</th>
- <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
- </tr>
- <tr>
- <th align=right>| . $locale->text('Include in Report') . qq|</th>
- <td colspan=3>
- <table>
- <tr>
- <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
- <td>| . $locale->text('ID') . qq|</td>
- <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
- <td>| . $locale->text('Invoice') . qq|</td>
- <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
- <td>| . $locale->text('Date') . qq|</td>
- </tr>
- <tr>
- <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
- <td>|;
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td colspan=3>
+ <table>
+ <tr>
+ <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('ID') . qq|</td>
+ <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Invoice') . qq|</td>
+ <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Date') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
+ <td>|;
- <td>| . $locale->text('Amount') . qq|</td>
- <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
- <td>| . $locale->text('Total') . qq|</td>
- </tr>
- <tr>
- <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
- <td>| . $locale->text('Subtotal') . qq|</td>
- </tr>
- </table>
- </td>
- </tr>
+ <td>| . $locale->text('Amount') . qq|</td>
+ <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Total') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Subtotal') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
if (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
if ($form->{report} eq 'ar_aging') {
$label = $locale->text('Customer');
if (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
if ($form->{report} eq 'ar_aging') {
$label = $locale->text('Customer');
if ($form->{report} =~ /(receipts|payments)$/) {
$form->{db} = ($form->{report} =~ /payments$/) ? "ap" : "ar";
RP->paymentaccounts(\%myconfig, \%$form);
$selection = "<option>\n";
if ($form->{report} =~ /(receipts|payments)$/) {
$form->{db} = ($form->{report} =~ /payments$/) ? "ap" : "ar";
RP->paymentaccounts(\%myconfig, \%$form);
$selection = "<option>\n";
- <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
- <th align=left colspan=3>| . $locale->text('Include Exchangerate Difference') . qq|</td>
- </tr>
+ <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
+ <th align=left colspan=3>| . $locale->text('Include Exchangerate Difference') . qq|</td>
+ </tr>
- $auth->assert('report');
+ $main::auth->assert('report');
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
# if there is one only, assign id
$form->{project_id} = $form->{project_id_1};
}
# if there is one only, assign id
$form->{project_id} = $form->{project_id_1};
}
$form->{fromdate} = "1.2.$form->{year}";
#this works from 1901 to 2099, 1900 and 2100 fail.
$form->{fromdate} = "1.2.$form->{year}";
#this works from 1901 to 2099, 1900 and 2100 fail.
- $longtodate = $locale->date(\%myconfig, $form->{todate}, 1);
- $shorttodate = $locale->date(\%myconfig, $form->{todate}, 0);
+ my $longtodate = $locale->date(\%myconfig, $form->{todate}, 1);
+ my $shorttodate = $locale->date(\%myconfig, $form->{todate}, 0);
- $longfromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
- $shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0);
+ my $longfromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
+ my $shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0);
- $longcomparefromdate =
- $locale->date(\%myconfig, $form->{comparefromdate}, 1);
- $shortcomparefromdate =
- $locale->date(\%myconfig, $form->{comparefromdate}, 0);
+ my $longcomparefromdate = $locale->date(\%myconfig, $form->{comparefromdate}, 1);
+ my $shortcomparefromdate = $locale->date(\%myconfig, $form->{comparefromdate}, 0);
- $longcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 1);
- $shortcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 0);
+ my $longcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 1);
+ my $shortcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 0);
- $auth->assert('report');
+ $::form->{decimalplaces} = $::form->{decimalplaces} * 1 || 2;
+ $::form->{padding} = " ";
+ $::form->{bold} = "<b>";
+ $::form->{endbold} = "</b>";
+ $::form->{br} = "<br>";
- $form->{asofdate} = $form->current_date(\%myconfig) unless $form->{asofdate};
- $form->{period} = $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
-
- ($form->{department}) = split /--/, $form->{department};
+ ($::form->{department}) = split /--/, $::form->{department};
- $padding = ($form->{l_heading}) ? $form->{padding} : "";
- push(@{ $form->{equity_account} }, $padding . $locale->text('Current Earnings'));
+ my $padding = $::form->{l_heading} ? $::form->{padding} : "";
+ push @{ $::form->{equity_account} }, $padding . $::locale->text('Current Earnings');
- $form->{this_period} = $locale->date(\%myconfig, $form->{asofdate}, 0);
- $form->{last_period} = $locale->date(\%myconfig, $form->{compareasofdate}, 0);
+ $::form->{this_period} = $::locale->date(\%::myconfig, $::form->{asofdate}, 0);
+ $::form->{last_period} = $::locale->date(\%::myconfig, $::form->{compareasofdate}, 0);
- &get_project(generate_projects);
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
+
+ &get_project("generate_projects");
$form->{fromdate} = "1.2.$form->{year}";
#this works from 1901 to 2099, 1900 and 2100 fail.
$form->{fromdate} = "1.2.$form->{year}";
#this works from 1901 to 2099, 1900 and 2100 fail.
$row->{accno}->{link} = build_std_url('script=ca.pl', 'action=list_transactions', 'accno=' . E($accno->{accno}), 'description=' . E($accno->{description}), 'fromdate=' . E($form->{fromdate}), 'todate=' . E($form->{todate}), 'method=' . E($form->{method}));
my $row_set = [ $row ];
$row->{accno}->{link} = build_std_url('script=ca.pl', 'action=list_transactions', 'accno=' . E($accno->{accno}), 'description=' . E($accno->{description}), 'fromdate=' . E($form->{fromdate}), 'todate=' . E($form->{todate}), 'method=' . E($form->{method}));
my $row_set = [ $row ];
my ($totals, $columns, $column_alignment, $subtotal_columns, $class) = @_;
my ($totals, $columns, $column_alignment, $subtotal_columns, $class) = @_;
my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => $column_alignment->{$_}, } } @{ $columns } };
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 2) } @{ $subtotal_columns };
my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => $column_alignment->{$_}, } } @{ $columns } };
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 2) } @{ $subtotal_columns };
my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => 'right' } } @{ $columns } };
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $subtotals->{$_}, 2) } @{ $fields };
my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => 'right' } } @{ $columns } };
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $subtotals->{$_}, 2) } @{ $fields };
my @options;
if ($form->{department}) {
my ($department) = split /--/, $form->{department};
my @options;
if ($form->{department}) {
my ($department) = split /--/, $form->{department};
my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => 'right' } } @{ $columns } };
foreach (@{ $periods }) {
my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => 'right' } } @{ $columns } };
foreach (@{ $periods }) {
'invnumber' => { 'text' => $locale->text('Invoice'), },
'transdate' => { 'text' => $locale->text('Date'), },
'duedate' => { 'text' => $locale->text('Due'), },
'invnumber' => { 'text' => $locale->text('Invoice'), },
'transdate' => { 'text' => $locale->text('Date'), },
'duedate' => { 'text' => $locale->text('Due'), },
- 'amount' => { 'text' => $locale->text('Amount'), },
- 'open' => { 'text' => $locale->text('Open'), },
+ 'amount' => { 'text' => $locale->text('Amount'), },
+ 'open' => { 'text' => $locale->text('Open'), },
push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1);
}
push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1);
}
$report->set_options('top_info_text' => join("\n", @options),
'output_format' => 'HTML',
$report->set_options('top_info_text' => join("\n", @options),
'output_format' => 'HTML',
if ($row_idx && ($previous_ctid != $ref->{ctid})) {
$report->add_data(create_aging_subtotal_row(\%subtotals, \@columns, \@periods, 'listsubtotal'));
}
if ($row_idx && ($previous_ctid != $ref->{ctid})) {
$report->add_data(create_aging_subtotal_row(\%subtotals, \@columns, \@periods, 'listsubtotal'));
}
$report->add_data(create_aging_subtotal_row(\%totals, \@columns, \@periods, 'listtotal'));
if ($form->{arap} eq 'ar') {
$report->add_data(create_aging_subtotal_row(\%totals, \@columns, \@periods, 'listtotal'));
if ($form->{arap} eq 'ar') {
- $raw_top_info_text = $form->parse_html_template('rp/aging_ar_top');
- $raw_bottom_info_text = $form->parse_html_template('rp/aging_ar_bottom', { 'row_idx' => $row_idx,
+ my $raw_top_info_text = $form->parse_html_template('rp/aging_ar_top');
+ my $raw_bottom_info_text = $form->parse_html_template('rp/aging_ar_bottom', { 'row_idx' => $row_idx,
'PRINT_OPTIONS' => print_options(inline => 1), });
$report->set_options('raw_top_info_text' => $raw_top_info_text,
'raw_bottom_info_text' => $raw_bottom_info_text);
'PRINT_OPTIONS' => print_options(inline => 1), });
$report->set_options('raw_top_info_text' => $raw_top_info_text,
'raw_bottom_info_text' => $raw_bottom_info_text);
- $auth->assert('general_ledger');
+ $main::auth->assert('general_ledger');
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
if ($form->{"statement_$i"}) {
$form->{"$form->{ct}_id"} = $form->{"$form->{ct}_id_$i"};
RP->get_customer(\%myconfig, \%$form);
if ($form->{"statement_$i"}) {
$form->{"$form->{ct}_id"} = $form->{"$form->{ct}_id_$i"};
RP->get_customer(\%myconfig, \%$form);
- <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
- <td><input name=email size=30 value="$form->{email}"></td>
- <th align=right nowrap>| . $locale->text('Cc') . qq|</th>
- <td><input name=cc size=30 value="$form->{cc}"></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Subject') . qq|</th>
- <td><input name=subject size=30 value="$form->{subject}"></td>
- $bcc
- </tr>
+ <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td><input name=email size=30 value="$form->{email}"></td>
+ <th align=right nowrap>| . $locale->text('Cc') . qq|</th>
+ <td><input name=cc size=30 value="$form->{cc}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Subject') . qq|</th>
+ <td><input name=subject size=30 value="$form->{subject}"></td>
+ $bcc
+ </tr>
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
$form->{$key} =~ s/\"/"/g;
print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
$form->{$key} =~ s/\"/"/g;
print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
- $auth->assert('general_ledger');
+ $main::auth->assert('general_ledger');
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
if ($form->{media} eq 'printer') {
$form->error($locale->text('Select postscript or PDF!'))
if ($form->{format} !~ /(postscript|pdf)/);
}
if ($form->{media} eq 'printer') {
$form->error($locale->text('Select postscript or PDF!'))
if ($form->{format} !~ /(postscript|pdf)/);
}
- @a =
- (name, street, zipcode, city, country, contact, email,
+ my @a =
+ ("name", "street", "zipcode", "city", "country", "contact", "email",
"$form->{ct}phone", "$form->{ct}fax");
map { $form->{$_} = $ref->{$_} } @a;
"$form->{ct}phone", "$form->{ct}fax");
map { $form->{$_} = $ref->{$_} } @a;
- } (c0, c30, c60, c90, "");
+ } ('c0', 'c30', 'c60', 'c90', "");
$form->{attachment_filename} = $locale->quote_special_chars('filenames', $locale->text("Statement") . "_$form->{todate}.$attachment_suffix");
$form->{attachment_filename} =~ s/\s+/_/g;
$form->{attachment_filename} = $locale->quote_special_chars('filenames', $locale->text("Statement") . "_$form->{todate}.$attachment_suffix");
$form->{attachment_filename} =~ s/\s+/_/g;
- $form->{addition} = "PRINTED";
- $form->{what_done} = $form->{type};
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->{addition} = "PRINTED";
+ $form->{what_done} = $form->{type};
+ $form->save_history($form->dbconnect(\%myconfig));
push @{ $form->{invdate} }, $ref->{transdate};
push @{ $form->{duedate} }, $ref->{duedate};
push @{ $form->{invdate} }, $ref->{transdate};
push @{ $form->{duedate} }, $ref->{duedate};
if ($ref->{exchangerate} * 1) {
$ref->{$item} =
$form->round_amount($ref->{$item} / $ref->{exchangerate}, 2);
if ($ref->{exchangerate} * 1) {
$ref->{$item} =
$form->round_amount($ref->{$item} / $ref->{exchangerate}, 2);
- $auth->assert('report');
+ $main::auth->assert('report');
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
- $descvar = "$form->{accno}_description";
- $description = $form->escape($form->{$descvar});
- $ratevar = "$form->{accno}_rate";
+ my $descvar = "$form->{accno}_description";
+ my $description = $form->escape($form->{$descvar});
+ my $ratevar = "$form->{accno}_rate";
+ our $taxrate; # most likely error
"$form->{script}?&action=generate_tax_report&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&$ratevar=$taxrate&report=$form->{report}";
# construct callback
$description = $form->escape($form->{$descvar}, 1);
$department = $form->escape($form->{department}, 1);
"$form->{script}?&action=generate_tax_report&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&$ratevar=$taxrate&report=$form->{report}";
# construct callback
$description = $form->escape($form->{$descvar}, 1);
$department = $form->escape($form->{department}, 1);
$href .= "&title=$title";
$title = $form->escape($form->{title}, 1);
$callback .= "&title=$title";
$form->{title} = qq|$form->{title} $form->{"$form->{accno}_description"} |;
$href .= "&title=$title";
$title = $form->escape($form->{title}, 1);
$callback .= "&title=$title";
$form->{title} = qq|$form->{title} $form->{"$form->{accno}_description"} |;
if ($form->{department}) {
($department) = split /--/, $form->{department};
$option = $locale->text('Department') . " : $department";
}
if ($form->{department}) {
($department) = split /--/, $form->{department};
$option = $locale->text('Department') . " : $department";
}
$column_header{id} = qq|<th><a class=listheading href=$href&sort=id>| . $locale->text('ID') . qq|</th>|;
$column_header{invnumber} = qq|<th><a class=listheading href=$href&sort=invnumber>| . $locale->text('Invoice') . qq|</th>|;
$column_header{transdate} = qq|<th><a class=listheading href=$href&sort=transdate>| . $locale->text('Date') . qq|</th>|;
$column_header{id} = qq|<th><a class=listheading href=$href&sort=id>| . $locale->text('ID') . qq|</th>|;
$column_header{invnumber} = qq|<th><a class=listheading href=$href&sort=invnumber>| . $locale->text('Invoice') . qq|</th>|;
$column_header{transdate} = qq|<th><a class=listheading href=$href&sort=transdate>| . $locale->text('Date') . qq|</th>|;
- $total =
- $form->format_amount(\%myconfig, $totalnetamount + $totaltax, 2, " ");
- $totalnetamount =
- $form->format_amount(\%myconfig, $totalnetamount, 2, " ");
- $totaltax = $form->format_amount(\%myconfig, $totaltax, 2, " ");
+ my $total = $form->format_amount(\%myconfig, $totalnetamount + $totaltax, 2, " ");
+ $totalnetamount = $form->format_amount(\%myconfig, $totalnetamount, 2, " ");
+ $totaltax = $form->format_amount(\%myconfig, $totaltax, 2, " ");
- $subtotalnetamount =
- $form->format_amount(\%myconfig, $subtotalnetamount, 2, " ");
- $subtotaltax = $form->format_amount(\%myconfig, $subtotaltax, 2, " ");
- $subtotal =
- $form->format_amount(\%myconfig, $subtotalnetamount + $subtotaltax,
- 2, " ");
+ $subtotalnetamount = $form->format_amount(\%myconfig, $subtotalnetamount, 2, " ");
+ $subtotaltax = $form->format_amount(\%myconfig, $subtotaltax, 2, " ");
+ $subtotal = $form->format_amount(\%myconfig, $subtotalnetamount + $subtotaltax, 2, " ");
- $column_data{netamount} =
- "<th class=listsubtotal align=right>$subtotalnetamount</th>";
- $column_data{tax} = "<th class=listsubtotal align=right>$subtotaltax</th>";
- $column_data{amount} = "<th class=listsubtotal align=right>$subtotal</th>";
+ $column_data{netamount} = "<th class=listsubtotal align=right>$subtotalnetamount</th>";
+ $column_data{tax} = "<th class=listsubtotal align=right>$subtotaltax</th>";
+ $column_data{amount} = "<th class=listsubtotal align=right>$subtotal</th>";
- <option value=attachment $form->{SM}{attachment}>|
- . $locale->text('Attachment') . qq|
- <option value=inline $form->{SM}{inline}>| . $locale->text('In-line');
+ <option value=attachment $form->{SM}{attachment}>| . $locale->text('Attachment') . qq|
+ <option value=inline $form->{SM}{inline}>| . $locale->text('In-line');
$form->{fromdate} = "1.2.$form->{year}";
#this works from 1901 to 2099, 1900 and 2100 fail.
$form->{fromdate} = "1.2.$form->{year}";
#this works from 1901 to 2099, 1900 and 2100 fail.
$form->{todate} = "$leap.2.$form->{year}";
$form->{comparefromdate} = "1.01.$form->{year}";
$form->{comparetodate} = "$leap.02.$form->{year}";
$form->{todate} = "$leap.2.$form->{year}";
$form->{comparefromdate} = "1.01.$form->{year}";
$form->{comparetodate} = "$leap.02.$form->{year}";
- ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{fromdate});
- $form->{fromdate} = "${dd}.${mm}.${yy}";
- ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{todate});
- $form->{todate} = "${dd}.${mm}.${yy}";
- $form->{comparefromdate} = "01.01.$yy";
- $form->{comparetodate} = $form->{todate};
+ # die konvertierungen nur dann durchführen, wenn auch daten gesetzt sind.
+ # ansonsten ist die prüfung in RP.pm
+ # if (defined ($form->{fromdate|todate}=='..'))
+ # immer wahr
+ if ($form->{fromdate}){
+ my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{fromdate});
+ $form->{fromdate} = "${dd}.${mm}.${yy}";
+ $form->{comparefromdate} = "01.01.$yy";
+ }
+ if ($form->{todate}){
+ my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{todate});
+ $form->{todate} = "${dd}.${mm}.${yy}";
+ $form->{comparetodate} = $form->{todate};
+ }
- $longtodate = $locale->date(\%germandate, $form->{todate}, 1);
- $shorttodate = $locale->date(\%germandate, $form->{todate}, 0);
+ my $longtodate = $locale->date(\%germandate, $form->{todate}, 1);
+ my $shorttodate = $locale->date(\%germandate, $form->{todate}, 0);
- $longfromdate = $locale->date(\%germandate, $form->{fromdate}, 1);
- $shortfromdate = $locale->date(\%germandate, $form->{fromdate}, 0);
+ my $longfromdate = $locale->date(\%germandate, $form->{fromdate}, 1);
+ my $shortfromdate = $locale->date(\%germandate, $form->{fromdate}, 0);