From 3692c4b5cff68cc803f9aaee434a75007b3e19c7 Mon Sep 17 00:00:00 2001 From: tetragon Date: Sat, 3 Nov 2007 03:01:24 +0000 Subject: Template search forms for rp.pl Templating of bin/rp.pl done git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1843 4979c152-3d1c-0410-bac9-87ea11338e46 --- UI/rp-search-aging.html | 108 ++++ UI/rp-search-balance_sheet.html | 97 ++++ UI/rp-search-generate_tax_report.html | 199 ++++++++ UI/rp-search-generate_trial_balance.html | 81 +++ UI/rp-search-income_statement.html | 147 ++++++ UI/rp-search-inv_activity.html | 60 +++ UI/rp-search-payments.html | 95 ++++ UI/rp-search-projects.html | 79 +++ UI/rp-search.html | 53 ++ bin/rp.pl | 848 ++++++------------------------- 10 files changed, 1080 insertions(+), 687 deletions(-) create mode 100644 UI/rp-search-aging.html create mode 100644 UI/rp-search-balance_sheet.html create mode 100644 UI/rp-search-generate_tax_report.html create mode 100644 UI/rp-search-generate_trial_balance.html create mode 100644 UI/rp-search-income_statement.html create mode 100644 UI/rp-search-inv_activity.html create mode 100644 UI/rp-search-payments.html create mode 100644 UI/rp-search-projects.html create mode 100644 UI/rp-search.html diff --git a/UI/rp-search-aging.html b/UI/rp-search-aging.html new file mode 100644 index 00000000..6e5f86ac --- /dev/null +++ b/UI/rp-search-aging.html @@ -0,0 +1,108 @@ + + + + + + + 'date', + name => 'todate', + size => '11', + title => user.dateformat, + } ?> + + + + + + + + + + + + + + 'radio', + name => 'summary', + value => '1', + label => text('Summary'), + checked => 'checked', + } -?> + 'radio', + name => 'summary', + value => '0', + label => text('Detail'), + } -?> + + + + + + + + +
+ + + + + + + + + + + +
+ 'overdue', + type => 'radio', + value => '0', + label => text('Aged'), + checked => 'checked', + } -?> + + 'overdue', + type => 'radio', + value => '1', + label => text('Overdue'), + } -?> +
+ 'c0', + type => 'checkbox', + value => '1', + label => text('Current'), + checked => 'checked', + } -?> + + 'c30', + type => 'checkbox', + value => '1', + label => '30', + checked => 'checked', + } -?> + + 'c60', + type => 'checkbox', + value => '1', + label => '60', + checked => 'checked', + } -?> + + 'c90', + type => 'checkbox', + value => '1', + label => '90', + checked => 'checked', + } -?> +
+
+ diff --git a/UI/rp-search-balance_sheet.html b/UI/rp-search-balance_sheet.html new file mode 100644 index 00000000..2363b4a6 --- /dev/null +++ b/UI/rp-search-balance_sheet.html @@ -0,0 +1,97 @@ + + + 'date', + name => 'asofdate', + size => '11', + title => user.dateformat, + value => form.asofdate, + } ?> + + + + + + + + + + + 'date', + name => 'compareasofdate', + size => '11', + title => user.dateformat, + } ?> + + form.selectaccountingmonth.options, + name => 'compareasofmonth', + }; + compare_year = { + options => form.selectaccountingyear.options, + name => 'compareasofyear', + }; + -?> + + + + + + + + 'decimalplaces', + size => '3', + value => '2', + } ?> + + + + + + + + + + + + + + + + diff --git a/UI/rp-search-generate_tax_report.html b/UI/rp-search-generate_tax_report.html new file mode 100644 index 00000000..2323acd6 --- /dev/null +++ b/UI/rp-search-generate_tax_report.html @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 'method', + type => 'radio', + value => 'accrual', + label => text('Accrual'), + checked => 'checked', + } -?> + 'method', + type => 'radio', + value => 'cash', + label => text('Cash'), + } -?> +
+ 'l_heading', + type => 'checkbox', + value => 'Y', + label => text('Heading'), + } -?> + 'l_subtotal', + type => 'checkbox', + value => 'Y', + label => text('Subtotal'), + } -?> + 'l_accno', + type => 'checkbox', + value => 'Y', + label => text('Account Number'), + } -?> +
'date', + name => 'fromdate', + size => '11', + title => user.dateformat, + value => form.fromdate, + } ?> 'date', + name => 'todate', + size => '11', + title => user.dateformat, + value => form.todate, + } ?>
+ + + 'radio', + name => 'interval', + value => '0', + label => text('Current'), + checked => 'checked', + } -?> + 'radio', + name => 'interval', + value => '1', + label => text('Month'), + } -?> + 'radio', + name => 'interval', + value => '3', + label => text('Quarter'), + } -?> + 'radio', + name => 'interval', + value => '12', + label => text('Year'), + } -?> +
+ 'radio', + name => 'summary', + value => '1', + label => text('Summary'), + checked => 'checked', + } -?> + 'radio', + name => 'summary', + value => '0', + label => text('Detail'), + } -?> +
+ +
+ +
+ 'method', + type => 'radio', + value => 'accrual', + label => text('Accrual'), + checked => 'checked', + } -?> + 'method', + type => 'radio', + value => 'cash', + label => text('Cash'), + } -?> +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/UI/rp-search-generate_trial_balance.html b/UI/rp-search-generate_trial_balance.html new file mode 100644 index 00000000..db8c7c4b --- /dev/null +++ b/UI/rp-search-generate_trial_balance.html @@ -0,0 +1,81 @@ + + + + + + + + + + + + +
+ 'l_id', + type => 'checkbox', + value => 'Y', + } -?> + + 'l_invnumber', + type => 'checkbox', + value => 'Y', + checked => 'checked', + } -?> + + 'l_transdate', + type => 'checkbox', + value => 'Y', + checked => 'checked', + } -?> +
+ + 'l_name', + type => 'checkbox', + value => 'Y', + checked => 'checked', + } -?> + + 'l_description', + type => 'checkbox', + value => 'Y', + checked => 'checked', + } -?> + + 'l_netamount', + type => 'checkbox', + value => 'Y', + checked => 'checked', + } -?> + + 'l_tax', + type => 'checkbox', + value => 'Y', + checked => 'checked', + } -?> + + 'l_total', + type => 'checkbox', + value => 'Y', + checked => 'checked', + } -?> +
+ + + 'l_subtotal', + type => 'checkbox', + value => 'Y', + } -?> +
'date', + name => 'fromdate', + size => '11', + title => user.dateformat, + value => form.fromdate, + } ?> 'date', + name => 'todate', + size => '11', + title => user.dateformat, + value => form.todate, + } ?>
+ + + 'radio', + name => 'interval', + value => '0', + label => text('Current'), + checked => 'checked', + } -?> + 'radio', + name => 'interval', + value => '1', + label => text('Month'), + } -?> + 'radio', + name => 'interval', + value => '3', + label => text('Quarter'), + } -?> + 'radio', + name => 'interval', + value => '12', + label => text('Year'), + } -?> +
+ + + + + + + + + diff --git a/UI/rp-search-income_statement.html b/UI/rp-search-income_statement.html new file mode 100644 index 00000000..3af19469 --- /dev/null +++ b/UI/rp-search-income_statement.html @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + form.selectaccountingmonth.options, + name => 'comparemonth', + }; + compare_year = { + options => form.selectaccountingyear.options, + name => 'compareyear', + }; + -?> + + + + + + + + + +
+ 'l_heading', + type => 'checkbox', + value => 'Y', + label => text('Heading'), + } -?> + 'l_subtotal', + type => 'checkbox', + value => 'Y', + label => text('Subtotal'), + } -?> + 'all_accounts', + type => 'checkbox', + value => 'Y', + label => text('All Accounts'), + } -?> +
'date', + name => 'fromdate', + size => '11', + title => user.dateformat, + value => form.fromdate, + } ?> 'date', + name => 'todate', + size => '11', + title => user.dateformat, + value => form.todate, + } ?>
+ + + 'radio', + name => 'interval', + value => '0', + label => text('Current'), + checked => 'checked', + } -?> + 'radio', + name => 'interval', + value => '1', + label => text('Month'), + } -?> + 'radio', + name => 'interval', + value => '3', + label => text('Quarter'), + } -?> + 'radio', + name => 'interval', + value => '12', + label => text('Year'), + } -?> +
'date', + name => 'comparefromdate', + size => '11', + title => user.dateformat, + } ?> 'date', + name => 'comparetodate', + size => '11', + title => user.dateformat, + } ?>
+ + +
'decimalplaces', + size => '3', + value => '2', + } ?> +
+ + + + + + + + + + + + + diff --git a/UI/rp-search-inv_activity.html b/UI/rp-search-inv_activity.html new file mode 100644 index 00000000..a6078eed --- /dev/null +++ b/UI/rp-search-inv_activity.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + +
+ 'method', + type => 'radio', + value => 'accrual', + label => text('Accrual'), + checked => 'checked', + } -?> + 'method', + type => 'radio', + value => 'cash', + label => text('Cash'), + } -?> +
+ 'l_heading', + type => 'checkbox', + value => 'Y', + label => text('Heading'), + } -?> + 'l_subtotal', + type => 'checkbox', + value => 'Y', + label => text('Subtotal'), + } -?> + 'l_accno', + type => 'checkbox', + value => 'Y', + label => text('Account Number'), + } -?> +
'date', + name => 'fromdate', + size => '11', + title => user.dateformat, + value => form.fromdate, + } ?> 'date', + name => 'todate', + size => '11', + title => user.dateformat, + value => form.todate, + } ?>
+ + + 'radio', + name => 'interval', + value => '0', + label => text('Current'), + checked => 'checked', + } -?> + 'radio', + name => 'interval', + value => '1', + label => text('Month'), + } -?> + 'radio', + name => 'interval', + value => '3', + label => text('Quarter'), + } -?> + 'radio', + name => 'interval', + value => '12', + label => text('Year'), + } -?> +
+ + + + + + + diff --git a/UI/rp-search-payments.html b/UI/rp-search-payments.html new file mode 100644 index 00000000..54a3ca0b --- /dev/null +++ b/UI/rp-search-payments.html @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UI/rp-search-projects.html b/UI/rp-search-projects.html new file mode 100644 index 00000000..40ce0c32 --- /dev/null +++ b/UI/rp-search-projects.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + +
'partnumber'} ?> 'description'} ?>
'description', + size => '35', + } ?>
'source'} ?>
'memo', + size => '30', + } ?>
'date', + name => 'fromdate', + size => '11', + title => user.dateformat, + value => form.fromdate, + } ?> 'date', + name => 'todate', + size => '11', + title => user.dateformat, + value => form.todate, + } ?>
+ + + 'radio', + name => 'interval', + value => '0', + label => text('Current'), + checked => 'checked', + } -?> + 'radio', + name => 'interval', + value => '1', + label => text('Month'), + } -?> + 'radio', + name => 'interval', + value => '3', + label => text('Quarter'), + } -?> + 'radio', + name => 'interval', + value => '12', + label => text('Year'), + } -?> +
+ 'checkbox', + name => 'fx_transaction', + value => '1', + checked => 'checked', + } -?> +
+ 'checkbox', + name => 'l_subtotal', + value => 'Y', + } -?> +
'date', + name => 'fromdate', + size => '11', + title => user.dateformat, + value => form.fromdate, + } ?> 'date', + name => 'todate', + size => '11', + title => user.dateformat, + value => form.todate, + } ?>
+ + + 'radio', + name => 'interval', + value => '0', + label => text('Current'), + checked => 'checked', + } -?> + 'radio', + name => 'interval', + value => '1', + label => text('Month'), + } -?> + 'radio', + name => 'interval', + value => '3', + label => text('Quarter'), + } -?> + 'radio', + name => 'interval', + value => '12', + label => text('Year'), + } -?> +
+ + + + + + + + + diff --git a/UI/rp-search.html b/UI/rp-search.html new file mode 100644 index 00000000..097319dd --- /dev/null +++ b/UI/rp-search.html @@ -0,0 +1,53 @@ + + + + +
+ 'l_heading', + type => 'checkbox', + value => 'Y', + label => text('Heading'), + } -?> + 'l_subtotal', + type => 'checkbox', + value => 'Y', + label => text('Subtotal'), + } -?> +
+ + + + + + +
+ + + + + + + + + + + + + + +
+ 'radio', + name => 'accounttype', + value => 'standard', + label => text('Standard'), + checked => 'checked', + } -?> + 'radio', + name => 'accounttype', + value => 'gifi', + label => text('GIFI'), + } -?> +
+

+
+ 'hidden', + name => hidden, + value => hiddens.item(hidden) + }; END ?> + + + + diff --git a/bin/rp.pl b/bin/rp.pl index e81f199c..53dad4aa 100644 --- a/bin/rp.pl +++ b/bin/rp.pl @@ -96,7 +96,8 @@ use LedgerSMB::RP; sub report { - %report = ( + my %hiddens; + my %report = ( balance_sheet => { title => 'Balance Sheet' }, income_statement => { title => 'Income Statement' }, trial_balance => { title => 'Trial Balance' }, @@ -114,751 +115,224 @@ sub report { $form->{title} = $locale->text( $report{ $form->{report} }->{title} ); - $gifi = qq| - - | . $locale->text('Accounts') . qq| - | - . $locale->text('Standard') . qq| - - | - . $locale->text('GIFI') . qq| - - -|; + my $gifi = 1; # get departments - $form->all_departments( \%myconfig, undef, - $report{ $form->{report} }->{vc} ); - if ( @{ $form->{all_department} } ) { - $form->{selectdepartment} = "