X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=02023f532089bf39fc32626ad609a867c7519357;hb=f04e9769b7015b54a3d3ceb87072cc31579c5470;hp=152db9572a278041d02d2d740bbea0502eacf6cb;hpb=d2e805cac9546036c5fe186b74ccecf3151b1e8b;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 152db9572..02023f532 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -14,8 +14,8 @@ # # Contributors: Antonio Gallardo # Benjamin Lee -# Philip Reetz -# Udo Spallek +# Philip Reetz +# Udo Spallek # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,16 +35,26 @@ # #====================================================================== -require "$form->{path}/arap.pl"; -require "bin/mozilla/common.pl"; +use POSIX qw(strftime); +use SL::DB::Default; +use SL::DB::Project; +use SL::DB::Customer; use SL::PE; use SL::RP; -use SL::USTVA; +use SL::Iconv; +use SL::ReportGenerator; +use Data::Dumper; +use List::MoreUtils qw(any); -1; +require "bin/mozilla/arap.pl"; +require "bin/mozilla/common.pl"; +require "bin/mozilla/reportgenerator.pl"; -# end of main +# note: this file was particularly hard to strictify. +# alot of the vars are passed carelessly between invocations +# should there be any missing vars, declare them globally +use strict; # this is for our long dates # $locale->text('January') @@ -79,965 +89,139 @@ use SL::USTVA; # $locale->text('Trial Balance') # $locale->text('AR Aging') # $locale->text('AP Aging') +# $locale->text('Search AR Aging') +# $locale->text('Search AP Aging') # $locale->text('Tax collected') # $locale->text('Tax paid') # $locale->text('Receipts') # $locale->text('Payments') # $locale->text('Project Transactions') -# $locale->text('Non-taxable Sales') -# $locale->text('Non-taxable Purchases') - -sub report { - $lxdebug->enter_sub(); - - %title = ('balance_sheet' => 'Balance Sheet', - 'income_statement' => 'Income Statement', - 'trial_balance' => 'Trial Balance', - 'ar_aging' => 'AR Aging', - 'ap_aging' => 'Offene Verbindlichkeiten', - 'tax_collected' => 'Tax collected', - 'tax_paid' => 'Tax paid', - 'nontaxable_sales' => 'Non-taxable Sales', - 'nontaxable_purchases' => 'Non-taxable Purchases', - 'receipts' => 'Receipts', - 'payments' => 'Payments', - 'projects' => 'Project Transactions', - 'bwa' => 'Betriebswirtschaftliche Auswertung', - 'ustva' => 'Umsatzsteuervoranmeldung',); - - $form->{title} = $locale->text($title{ $form->{report} }); - - $accrual = ($eur) ? "" : "checked"; - $cash = ($eur) ? "checked" : ""; - - ($null, $null, $null, $null, $null, $year, $null, $null, $null) = - localtime(); - $year += 1900; - - # get departments - $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} }) { - $form->{selectdepartment} = "