summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-05 05:59:13 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-05 05:59:13 +0000
commitac836087123d066b6fe5277911fa8f8db81292c0 (patch)
tree32a5d0158334399b61dc9dd2ac585f27f7220a92 /scripts
parentcb825aa1943feef0e719aef81fc270478b924f9a (diff)
Correcting logic for vouchers and payments
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1944 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vouchers.pl15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/vouchers.pl b/scripts/vouchers.pl
index e264ed8a..c779e887 100644
--- a/scripts/vouchers.pl
+++ b/scripts/vouchers.pl
@@ -44,9 +44,20 @@ sub create_vouchers {
{
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()}},
+ receipts => {script => 'scripts/payments.pl',
+ function => sub {
+ my ($request) = @_;
+ $request->{account_class} = 2;
+ LedgerSMB::Scripts::payment::payments($request);
+ }},
+ payments => {script => 'scripts/payments.pl',
+ function => sub {
+ my ($request) = @_;
+ $request->{account_class} = 1;
+ LedgerSMB::Scripts::payment::payments($request);
+ }},
+
};
# Note that the line below is generally considered incredibly bad form.