mirror of https://github.com/itflow-org/itflow
Added Recurring Ticket Reference to Tickets
This commit is contained in:
parent
b78e31e518
commit
c0db914213
|
|
@ -2576,10 +2576,17 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.8'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.9.8') {
|
||||
// // Insert queries here required to update to DB version 1.9.9
|
||||
if (CURRENT_DATABASE_VERSION == '1.9.8') {
|
||||
// Reference a Recurring Ticket that generated ticket
|
||||
mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_recurring_ticket_id` INT(11) DEFAULT 0 AFTER `ticket_project_id`");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.9'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.9.9') {
|
||||
// // Insert queries here required to update to DB version 2.0.0
|
||||
// // Then, update the database to the next sequential version
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.9.9'");
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.0.0'");
|
||||
// }
|
||||
|
||||
} else {
|
||||
|
|
|
|||
4
db.sql
4
db.sql
|
|
@ -1463,7 +1463,7 @@ CREATE TABLE `recurring_invoices` (
|
|||
`recurring_invoice_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
|
||||
`recurring_invoice_currency_code` varchar(200) NOT NULL,
|
||||
`recurring_invoice_note` text DEFAULT NULL,
|
||||
`recurring_invoice_invoice_email_notify` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`recurring_invoice_email_notify` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`recurring_invoice_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`recurring_invoice_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`recurring_invoice_archived_at` datetime DEFAULT NULL,
|
||||
|
|
@ -2417,4 +2417,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2025-03-11 22:07:39
|
||||
-- Dump completed on 2025-03-12 13:56:16
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
* It is used in conjunction with database_updates.php
|
||||
*/
|
||||
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.9.8");
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.9.9");
|
||||
|
|
|
|||
|
|
@ -2132,7 +2132,7 @@ if (isset($_GET['force_recurring_ticket'])) {
|
|||
mysqli_query($mysqli, "UPDATE settings SET config_ticket_next_number = $new_config_ticket_next_number WHERE company_id = 1");
|
||||
|
||||
// Raise the ticket
|
||||
mysqli_query($mysqli, "INSERT INTO tickets SET ticket_prefix = '$config_ticket_prefix', ticket_number = $ticket_number, ticket_subject = '$subject', ticket_details = '$details', ticket_priority = '$priority', ticket_status = '$ticket_status', ticket_billable = $billable, ticket_url_key = '$url_key', ticket_created_by = $created_id, ticket_assigned_to = $assigned_id, ticket_contact_id = $contact_id, ticket_client_id = $client_id, ticket_asset_id = $asset_id");
|
||||
mysqli_query($mysqli, "INSERT INTO tickets SET ticket_prefix = '$config_ticket_prefix', ticket_number = $ticket_number, ticket_subject = '$subject', ticket_details = '$details', ticket_priority = '$priority', ticket_status = '$ticket_status', ticket_billable = $billable, ticket_url_key = '$url_key', ticket_created_by = $created_id, ticket_assigned_to = $assigned_id, ticket_contact_id = $contact_id, ticket_client_id = $client_id, ticket_asset_id = $asset_id, ticket_recurring_ticket_id = $recurring_ticket_id");
|
||||
$id = mysqli_insert_id($mysqli);
|
||||
|
||||
// Copy Additional Assets from Recurring ticket to new ticket
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ $sql_tax = mysqli_query($mysqli, "SELECT `tax_name` FROM `taxes`");
|
|||
}
|
||||
}
|
||||
?>
|
||||
<td></td>
|
||||
<td class="text-right"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ if (mysqli_num_rows($sql_recurring_tickets) > 0) {
|
|||
mysqli_query($mysqli, "UPDATE settings SET config_ticket_next_number = $new_config_ticket_next_number WHERE company_id = 1");
|
||||
|
||||
// Raise the ticket
|
||||
mysqli_query($mysqli, "INSERT INTO tickets SET ticket_prefix = '$config_ticket_prefix', ticket_number = $ticket_number, ticket_subject = '$subject', ticket_details = '$details', ticket_priority = '$priority', ticket_status = '$ticket_status', ticket_billable = $billable, ticket_created_by = $created_id, ticket_assigned_to = $assigned_id, ticket_contact_id = $contact_id, ticket_client_id = $client_id, ticket_asset_id = $asset_id");
|
||||
mysqli_query($mysqli, "INSERT INTO tickets SET ticket_prefix = '$config_ticket_prefix', ticket_number = $ticket_number, ticket_subject = '$subject', ticket_details = '$details', ticket_priority = '$priority', ticket_status = '$ticket_status', ticket_billable = $billable, ticket_created_by = $created_id, ticket_assigned_to = $assigned_id, ticket_contact_id = $contact_id, ticket_client_id = $client_id, ticket_asset_id = $asset_id, ticket_recurring_ticket_id = $recurring_ticket_id");
|
||||
$id = mysqli_insert_id($mysqli);
|
||||
|
||||
// Copy Additional Assets from Recurring ticket to new ticket
|
||||
|
|
|
|||
Loading…
Reference in New Issue