mirror of https://github.com/itflow-org/itflow
Create Alert when recurring invoice was sent
This commit is contained in:
parent
5535540fa2
commit
7e1e97c13f
2
cron.php
2
cron.php
|
|
@ -235,6 +235,8 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||
|
||||
mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = 'Sent', history_description = 'Invoice Generated from Recurring!', history_created_at = NOW(), invoice_id = $new_invoice_id, company_id = $company_id");
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Recurring', alert_message = 'Recurring Invoice $invoice_prefix$new_invoice_number for $client_name Sent', alert_date = NOW(), company_id = $company_id");
|
||||
|
||||
//Update Recurring Balances by tallying up recurring items also update recurring dates
|
||||
$sql_recurring_total = mysqli_query($mysqli,"SELECT SUM(item_total) AS recurring_total FROM invoice_items WHERE recurring_id = $recurring_id");
|
||||
$row = mysqli_fetch_array($sql_recurring_total);
|
||||
|
|
|
|||
Loading…
Reference in New Issue