diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-07-31 22:08:16 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-07-31 22:08:16 +0000 |
commit | 327beb77919cbea42841ec0c10977f4d1c3648ca (patch) | |
tree | 16c970b664c69f82ec595f0ee290e9f30686c55d /scripts | |
parent | 41db8ed11dae7f891481015d2d6022e26ed3ad1e (diff) |
Fixing issues with adding ap/ar vouchers to existing batch
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2228 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vouchers.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/vouchers.pl b/scripts/vouchers.pl index 047afcb7..5173045a 100644 --- a/scripts/vouchers.pl +++ b/scripts/vouchers.pl @@ -72,10 +72,10 @@ sub add_vouchers { my $batch = LedgerSMB::Batch->new({base => $request}); our $vouchers_dispatch = { - payable => {script => 'bin/ap.pl', function => sub {add()}}, - receivable => {script => 'bin/ar.pl', function => sub {add()}}, + ap => {script => 'bin/ap.pl', function => sub {add()}}, + ar => {script => 'bin/ar.pl', function => sub {add()}}, gl => {script => 'bin/gl.pl', function => sub {add()}}, - receipt => {script => 'scripts/payment.pl', + receipt => {script => 'scripts/payment.pl', function => sub { my ($request) = @_; $request->{account_class} = 2; @@ -124,6 +124,8 @@ sub add_vouchers { my $script = $vouchers_dispatch->{$request->{batch_type}}{script}; $form->{script} = $script; $form->{script} =~ s|.*/||; + delete $form->{id}; + delete $request->{id}; if ($script =~ /^bin/){ # Note that the line below is generally considered incredibly bad form. |