Added Enabled Balance Alert Enabled Check before executing low balance alerts in cron
This commit is contained in:
@@ -33,6 +33,7 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
$config_mail_from_email = $row['config_mail_from_email'];
|
||||
$config_mail_from_name = $row['config_mail_from_name'];
|
||||
$config_recurring_auto_send_invoice = $row['config_recurring_auto_send_invoice'];
|
||||
$config_enable_alert_low_balance = $row['config_enable_alert_low_balance'];
|
||||
$config_base_url = $row['config_base_url'];
|
||||
|
||||
if($config_enable_cron == 1){
|
||||
@@ -139,6 +140,8 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
}
|
||||
|
||||
//LOW BALANCE ALERTS
|
||||
if($config_enable_alert_low_balance == 1){
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM accounts WHERE company_id = $company_id ORDER BY account_id DESC");
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
@@ -166,6 +169,8 @@ while($row = mysqli_fetch_array($sql_companies)){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Send Recurring Invoices that match todays date and are active
|
||||
|
||||
//Loop through all recurring that match today's date and is active
|
||||
|
||||
Reference in New Issue
Block a user