mirror of https://github.com/itflow-org/itflow
Fix for Auto Recurring Duplicate Invoice Numbers
This commit is contained in:
parent
f3c1df3e17
commit
42918e90ae
16
README.md
16
README.md
|
|
@ -6,13 +6,13 @@
|
|||
* Locations
|
||||
* Vendors
|
||||
* Assets
|
||||
* Application Licenses
|
||||
* Logins Password Manager
|
||||
* Domains
|
||||
* Apps
|
||||
* Password Manager
|
||||
* Domain Names
|
||||
* Applications
|
||||
* Networks
|
||||
* Files
|
||||
* Documentation
|
||||
* Tickets
|
||||
* Invoicing
|
||||
* Automatically Emails Past Due Invoices to clients
|
||||
* Auto Email Receipts upon receiving payments
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
* Software License Expiring
|
||||
* Calendar Integration
|
||||
* Schedule Jobs
|
||||
* Overview of Invoices Domains
|
||||
* Overview of Invoices Domains that are expiring
|
||||
* Schedule Events
|
||||
* Automatic Email Reminders of upcomming calendar events to customers
|
||||
* Dashboard
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
* Multi-Tenant - One Instance Multiple Companies and Users
|
||||
* 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
|
||||
* CardDAV to integrate with 3rd party Address books
|
||||
* 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_invoice_overdue_reminders = $row['config_invoice_overdue_reminders'];
|
||||
$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_username = $row['config_smtp_username'];
|
||||
$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'];
|
||||
|
||||
//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_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");
|
||||
|
|
|
|||
|
|
@ -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>";
|
||||
|
||||
include("footer.php");
|
||||
|
||||
}else{
|
||||
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
|
|
|||
Loading…
Reference in New Issue