diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-18 00:45:37 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-18 00:45:37 +0000 |
commit | 59a9c930a875cc618b7386314bcfc69adc4fe549 (patch) | |
tree | 5cd55697cc97b255cf3d24df431d49a9cdcc3471 /scripts | |
parent | e20e7a6e47760d0e8561ae7d13a29ddc24330b68 (diff) |
POS Fixes:
1: Drawer opening now uses correct printer designation
2: Change issued is now entered with correct memo field.
3: Closing tell report works as advertised
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1782 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vouchers.pl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/scripts/vouchers.pl b/scripts/vouchers.pl new file mode 100644 index 00000000..34305139 --- /dev/null +++ b/scripts/vouchers.pl @@ -0,0 +1,56 @@ +#!/usr/bin/perl + +# This file is copyright (C) 2007the LedgerSMB core team and licensed under +# the GNU General Public License. For more information please see the included +# LICENSE and COPYRIGHT files + +package LedgerSMB::Scripts::vouchers; +our $VERSION = '0.1'; + +$menufile = "menu.ini"; +use LedgerSMB::Batch; +use LedgerSMB::Voucher; +use LedgerSMB::Template; +use strict; + +sub create_batch { + my ($request) = @_; + $request->{hidden} = [ + batch_type => $request->{batch_type}, + ]; + my $template = LedgerSMB::Template->new( + user =>$request->{_user}, + locale => $request->{_locale}, + path => 'UI', + template => 'create_batch', + format => 'HTML' + ); + $template->render($request); +} + +sub create_vouchers { + # This function is not safe for caching as long as the scripts are in bin. + # This is because these scripts import all functions into the *current* + # namespace. People using fastcgi and modperl should *not* cache this + # module at the moment. -- CT + my %vouchers_dispatch = ( + payable => {script => 'bin/ap.pl', function => sub {add()}}, + receivable => {script => 'bin/ar.pl', function => sub {add()}}, + payments => {script => 'bin/cp.pl', function => sub {payments()}}, + receipts => {script => 'bin/cp.pl', function => sub {receipts()}}, + gl => {script => 'bin/gl.pl'. function => sub {add()}}, + ) + require $vouchers_dispatch{$request->{batch_type}}{script} + $vouchers_dispatch{$request->{batch_type}}{function}(); +} + +sub list_vouchers { +} + +sub approve_batch { +} + +sub delete_batch { +} + +1; |