diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-03 18:15:41 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-03 18:15:41 +0000 |
commit | 9b24d1041b7c8e96962d1aa95dd4efba39f912b2 (patch) | |
tree | 219d12b0d005eefd19b46e12e1be3f3b836a2a9f /scripts | |
parent | 26e09a22f9226776ed00998ad77712808c8fdb67 (diff) |
Adding button to generate entity control code
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2310 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vendor.pl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/vendor.pl b/scripts/vendor.pl index 7e5c5371..ed415140 100644 --- a/scripts/vendor.pl +++ b/scripts/vendor.pl @@ -41,7 +41,6 @@ of the vendor informations. =cut - sub get { my ($request) = @_; @@ -69,6 +68,24 @@ sub add_location { } +sub generate_control_code { + my ($request) = @_; + my $vendor= LedgerSMB::DBObject::Vendor->new({base => $request, copy => 'all'}); + + my ($ref) = $vendor->call_procedure( + procname => 'setting_increment', + args => ['entity_control'] + ); + ($vendor->{control_code}) = values %$ref; + $vendor->{dbh}->commit; + if ($vendor->{meta_number}){ + edit($vendor); + } else { + _render_main_screen($vendor); + } + +} + =pod =over |