run_hook on cron forgot to uncomment

This commit is contained in:
Ibnu Maksum 2024-06-21 16:05:05 +07:00
parent f6ff09957e
commit b0c718b8fd
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 18 additions and 3 deletions

View File

@ -21,7 +21,7 @@ $textExpired = Lang::getNotifText('expired');
$d = ORM::for_table('tbl_user_recharges')->where('status', 'on')->where_lte('expiration', date("Y-m-d"))->find_many();
echo "Found " . count($d) . " user(s)\n";
//run_hook('cronjob'); #HOOK
run_hook('cronjob'); #HOOK
foreach ($d as $ds) {
$date_now = strtotime(date("Y-m-d H:i:s"));
@ -55,7 +55,7 @@ foreach ($d as $ds) {
$p['price'] += $add_cost;
}
}
if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
if ($p && $c['balance'] >= $p['price']) {
if (Package::rechargeUser($ds['customer_id'], $ds['routers'], $p['id'], 'Customer', 'Balance')) {
// if success, then get the balance
Balance::min($ds['customer_id'], $p['price']);

View File

@ -120,5 +120,20 @@
"Optional": "Optional",
"Expired_Internet_Plan": "Expired Internet Plan",
"When_Expired__customer_will_be_move_to_selected_internet_plan": "When Expired, customer will be move to selected internet plan",
"Data_Updated_Successfully": "Data Updated Successfully"
"Data_Updated_Successfully": "Data Updated Successfully",
"Plugin_Installer": "Plugin Installer",
"Plugin": "Plugin",
"Search_by_Username": "Search by Username",
"Created_On": "Created On",
"Expires_On": "Expires On",
"Method": "Method",
"Extend": "Extend",
"Status_Voucher": "Status Voucher",
"Generated_By": "Generated By",
"View": "View",
"Buy_Balance": "Buy Balance",
"Buy_Package": "Buy Package",
"Order_History": "Order History",
"List_Activated_Voucher": "List Activated Voucher",
"Invoice": "Invoice"
}