X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/be4e11d36f40d90622fdf35eb07ab207422b5455..18da4a96827fd65559a6f64334c3d8a313884f84:/bin/mozilla/rp.pl
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index e365c3304..67ad8a5e3 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -35,12 +35,17 @@
#
#======================================================================
-require "$form->{path}/arap.pl";
-require "bin/mozilla/common.pl";
+use POSIX qw(strftime);
use SL::PE;
use SL::RP;
use SL::USTVA;
+use SL::Iconv;
+use SL::ReportGenerator;
+
+require "bin/mozilla/arap.pl";
+require "bin/mozilla/common.pl";
+require "bin/mozilla/reportgenerator.pl";
1;
@@ -110,9 +115,7 @@ sub report {
$accrual = ($eur) ? "" : "checked";
$cash = ($eur) ? "checked" : "";
- ($null, $null, $null, $null, $null, $year, $null, $null, $null) =
- localtime();
- $year += 1900;
+ $year = (localtime)[5] + 1900;
# get departments
$form->all_departments(\%myconfig);
@@ -148,7 +151,7 @@ sub report {
'-labels' => \%project_labels));
# use JavaScript Calendar or not
- $form->{jsscript} = $jscalendar;
+ $form->{jsscript} = 1;
$jsscript = "";
if ($form->{report} eq "ustva") {
$department = "";
@@ -978,7 +981,6 @@ $jsscript
-{path}>
{login}>
{password}>
@@ -1356,7 +1358,7 @@ sub list_accounts {
$description = $form->escape($ref->{description});
$href =
- qq|ca.pl?path=$form->{path}&action=list_transactions&accounttype=$form->{accounttype}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&sort=transdate&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&eur=$form->{eur}&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title&nextsub=$form->{nextsub}&accno=$ref->{accno}&description=$description|;
+ qq|ca.pl?action=list_transactions&accounttype=$form->{accounttype}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&sort=transdate&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&eur=$form->{eur}&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title&nextsub=$form->{nextsub}&accno=$ref->{accno}&description=$description|;
$ml = ($ref->{category} =~ /(A|C|E)/) ? -1 : 1;
@@ -1517,17 +1519,14 @@ sub generate_ar_aging {
# split customer
($form->{customer}) = split(/--/, $form->{customer});
- $customer = $form->escape($form->{customer}, 1);
- $title = $form->escape($form->{title}, 1);
$form->{ct} = "customer";
$form->{arap} = "ar";
- $form->{callback} =
- qq|$form->{script}?path=$form->{path}&action=generate_ar_aging&login=$form->{login}&password=$form->{password}&todate=$form->{todate}&customer=$customer&title=$title|;
+ $form->{callback} = build_std_url('action=generate_ar_aging', qw(todate customer title));
RP->aging(\%myconfig, \%$form);
- &aging;
+ aging();
$lxdebug->leave_sub();
}
@@ -1537,296 +1536,148 @@ sub generate_ap_aging {
# split vendor
($form->{vendor}) = split(/--/, $form->{vendor});
- $vendor = $form->escape($form->{vendor}, 1);
- $title = $form->escape($form->{title}, 1);
$form->{ct} = "vendor";
$form->{arap} = "ap";
- $form->{callback} =
- qq|$form->{script}?path=$form->{path}&action=generate_ap_aging&login=$form->{login}&password=$form->{password}&todate=$form->{todate}&vendor=$vendor&title=$title|;
+ $form->{callback} = build_std_url('action=generate_ap_aging', qw(todate vendor title));
RP->aging(\%myconfig, \%$form);
- &aging;
+ aging();
$lxdebug->leave_sub();
}
-sub aging {
+sub create_aging_subtotal_row {
$lxdebug->enter_sub();
- $form->header;
+ my ($subtotals, $columns, $periods, $class) = @_;
- $column_header{statement} = qq|