From 8f5b8bd131d1a2cae3e2455b4a32d09d21999c30 Mon Sep 17 00:00:00 2001 From: tetragon Date: Wed, 24 Oct 2007 22:50:12 +0000 Subject: Convert the yearend form to a template git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1815 4979c152-3d1c-0410-bac9-87ea11338e46 --- UI/am-yearend.html | 70 ++++++++++++++++++++++++++++++++++++++++++ bin/am.pl | 90 ++++++++++++++++++------------------------------------ 2 files changed, 99 insertions(+), 61 deletions(-) create mode 100644 UI/am-yearend.html diff --git a/UI/am-yearend.html b/UI/am-yearend.html new file mode 100644 index 00000000..33159a97 --- /dev/null +++ b/UI/am-yearend.html @@ -0,0 +1,70 @@ + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
'date', + name => 'todate', + size => 11, + title => user.dateformat, + } -?>
'reference', + size => 20, + value => text('Yearend'), + } -?>
'description', + rows => 3, + cols => 50, + } -?>
'method', + type => 'radio', + value => 'accrual', + checked => 'checked', + label => text('Accrual'), + }; + PROCESS input element_data={ + name => 'method', + type => 'radio', + value => 'cash', + label => text('Cash'), + } -?>
+
+
+ 'hidden', + name => hidden, + value => hiddens.item(hidden) + }; END ?> + +
+ + diff --git a/bin/am.pl b/bin/am.pl index 3bb2468f..96442c6f 100644 --- a/bin/am.pl +++ b/bin/am.pl @@ -2130,73 +2130,41 @@ sub delete_warehouse { sub yearend { AM->earningsaccounts( \%myconfig, \%$form ); - $chart = ""; + my %hiddens; + my $chart = ""; + my %accounts = ( + name => 'accno', + options => [], + ); for ( @{ $form->{chart} } ) { - $chart .= "