mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Fix for Auto Recurring Duplicate Invoice Numbers
This commit is contained in:
16
README.md
16
README.md
@@ -6,13 +6,13 @@
|
|||||||
* Locations
|
* Locations
|
||||||
* Vendors
|
* Vendors
|
||||||
* Assets
|
* Assets
|
||||||
* Application Licenses
|
* Password Manager
|
||||||
* Logins Password Manager
|
* Domain Names
|
||||||
* Domains
|
* Applications
|
||||||
* Apps
|
|
||||||
* Networks
|
* Networks
|
||||||
* Files
|
* Files
|
||||||
* Documentation
|
* Documentation
|
||||||
|
* Tickets
|
||||||
* Invoicing
|
* Invoicing
|
||||||
* Automatically Emails Past Due Invoices to clients
|
* Automatically Emails Past Due Invoices to clients
|
||||||
* Auto Email Receipts upon receiving payments
|
* Auto Email Receipts upon receiving payments
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
* Software License Expiring
|
* Software License Expiring
|
||||||
* Calendar Integration
|
* Calendar Integration
|
||||||
* Schedule Jobs
|
* Schedule Jobs
|
||||||
* Overview of Invoices Domains
|
* Overview of Invoices Domains that are expiring
|
||||||
* Schedule Events
|
* Schedule Events
|
||||||
* Automatic Email Reminders of upcomming calendar events to customers
|
* Automatic Email Reminders of upcomming calendar events to customers
|
||||||
* Dashboard
|
* Dashboard
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
* Multi-Tenant - One Instance Multiple Companies and Users
|
* Multi-Tenant - One Instance Multiple Companies and Users
|
||||||
* Audit Logging - Logs actions of users on the system
|
* Audit Logging - Logs actions of users on the system
|
||||||
|
* 2 Factor Authentication (TOTP)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -96,4 +97,7 @@ NOTE: [API_KEY] - is auto generated when a company is created and shows up in Ge
|
|||||||
* CalDAV to integrate with 3rd party calendars
|
* CalDAV to integrate with 3rd party calendars
|
||||||
* CardDAV to integrate with 3rd party Address books
|
* CardDAV to integrate with 3rd party Address books
|
||||||
* Unifi and UNMS integration
|
* Unifi and UNMS integration
|
||||||
* Stripe Integration for online payments
|
* Stripe Integration for online payments
|
||||||
|
* Client Portal
|
||||||
|
* Toast Alerts with recent caller that matches caller ID in database which allows you to click on the toast alerts and bring up the clients account right away.
|
||||||
|
* Built-in mailing list used for alerts and marketing
|
||||||
5
cron.php
5
cron.php
@@ -20,7 +20,6 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||||||
$config_enable_cron = $row['config_enable_cron'];
|
$config_enable_cron = $row['config_enable_cron'];
|
||||||
$config_invoice_overdue_reminders = $row['config_invoice_overdue_reminders'];
|
$config_invoice_overdue_reminders = $row['config_invoice_overdue_reminders'];
|
||||||
$config_invoice_prefix = $row['config_invoice_prefix'];
|
$config_invoice_prefix = $row['config_invoice_prefix'];
|
||||||
$config_invoice_next_number = $row['config_invoice_next_number'];
|
|
||||||
$config_smtp_host = $row['config_smtp_host'];
|
$config_smtp_host = $row['config_smtp_host'];
|
||||||
$config_smtp_username = $row['config_smtp_username'];
|
$config_smtp_username = $row['config_smtp_username'];
|
||||||
$config_smtp_password = $row['config_smtp_password'];
|
$config_smtp_password = $row['config_smtp_password'];
|
||||||
@@ -137,6 +136,10 @@ while($row = mysqli_fetch_array($sql_companies)){
|
|||||||
$client_net_terms = $row['client_net_terms'];
|
$client_net_terms = $row['client_net_terms'];
|
||||||
|
|
||||||
//Get the last Invoice Number and add 1 for the new invoice number
|
//Get the last Invoice Number and add 1 for the new invoice number
|
||||||
|
$sql_invoice_number = mysqli_query($mysqli,"SELECT * FROM settings WHERE company_id = $company_id");
|
||||||
|
$row = mysqli_fetch_array($sql_invoice_number)){
|
||||||
|
$config_invoice_next_number = $row['config_invoice_next_number'];
|
||||||
|
|
||||||
$new_invoice_number = "$config_invoice_prefix$config_invoice_next_number";
|
$new_invoice_number = "$config_invoice_prefix$config_invoice_next_number";
|
||||||
$new_config_invoice_next_number = $config_invoice_next_number + 1;
|
$new_config_invoice_next_number = $config_invoice_next_number + 1;
|
||||||
mysqli_query($mysqli,"UPDATE settings SET config_invoice_next_number = $new_config_invoice_next_number WHERE company_id = $company_id");
|
mysqli_query($mysqli,"UPDATE settings SET config_invoice_next_number = $new_config_invoice_next_number WHERE company_id = $company_id");
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ if(isset($_GET['ticket_id'])){
|
|||||||
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1><a class='btn btn-lg btn-secondary mt-3' href='tickets.php'><i class='fa fa-fw fa-arrow-left'></i> Go Back</a></center>";
|
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1><a class='btn btn-lg btn-secondary mt-3' href='tickets.php'><i class='fa fa-fw fa-arrow-left'></i> Go Back</a></center>";
|
||||||
|
|
||||||
include("footer.php");
|
include("footer.php");
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$row = mysqli_fetch_array($sql);
|
$row = mysqli_fetch_array($sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user