X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=sql-ledger%2Fbin%2Fmozilla%2Fcp.pl;h=8aefa0ccda56445740edf338c0c0896c1306592d;hb=32306b5f8ffe4ce594409aa6e89626740b225a39;hp=911b701052a249f38176803706937b5f5c469c19;hpb=f6c9088e16c4c083174dd1130ae58d213923cdef;p=freeside.git diff --git a/sql-ledger/bin/mozilla/cp.pl b/sql-ledger/bin/mozilla/cp.pl index 911b70105..8aefa0ccd 100644 --- a/sql-ledger/bin/mozilla/cp.pl +++ b/sql-ledger/bin/mozilla/cp.pl @@ -6,6 +6,7 @@ # Email: dsimader@sql-ledger.org # Web: http://www.sql-ledger.org # +# Contributors: # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,6 +28,7 @@ use SL::CP; +use SL::OP; use SL::IS; use SL::IR; @@ -38,30 +40,64 @@ require "$form->{path}/arap.pl"; sub payment { + $form->{callback} = "$form->{script}?action=payment&vc=$form->{vc}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&all_vc=$form->{all_vc}&type=$form->{type}"; + + $form->{ARAP} = ($form->{type} eq 'receipt') ? "AR" : "AP"; + $form->{arap} = lc $form->{ARAP}; + # setup customer/vendor selection for open invoices - CP->get_openvc(\%myconfig, \%$form); + if ($form->{all_vc}) { + $form->all_vc(\%myconfig, $form->{vc}, $form->{ARAP}); + } else { + CP->get_openvc(\%myconfig, \%$form); + } + $form->{"select$form->{vc}"} = ""; + if ($form->{"all_$form->{vc}"}) { - map { $form->{"select$form->{vc}"} .= "