mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +02:00
Delete Used Voucher which not exists in tbl recharges
This commit is contained in:
parent
b862a759d0
commit
055b855bc1
5 changed files with 62 additions and 41 deletions
|
@ -11,8 +11,6 @@ $action = $routes['1'];
|
|||
$user = User::_info();
|
||||
$ui->assign('_user', $user);
|
||||
|
||||
use PEAR2\Net\RouterOS;
|
||||
|
||||
require_once 'system/autoload/PEAR2/Autoload.php';
|
||||
|
||||
switch ($action) {
|
||||
|
@ -27,7 +25,7 @@ switch ($action) {
|
|||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||
run_hook('customer_activate_voucher'); #HOOK
|
||||
if ($v1) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Activation", "Voucher")) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Voucher", $code)) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue