mirror of
https://github.com/itflow-org/itflow
synced 2026-11-22 12:27:23 +00:00
QoL 59: confirmation messages say created after Create and saved after Save instead of added, updated or edited, invoice copy, make recurring, bulk payment and file-only ticket replies say what happened, payment edits show the payment's own currency and log who made them, and record kinds are lower case mid-sentence
This commit is contained in:
@@ -226,6 +226,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
|
||||
- Badges and blanks: every badge is a rounded pill, the menu counts included, and an empty value shows as a grey dash everywhere. A request that can't be done - credit over the balance, say - shows in red like every other error, and the client portal's search boxes read Search ... like the agent pages'.
|
||||
- Sizes and lengths of time: a file or backup size reads 512 B or 1.5 MB everywhere - some pages said 1.53 MB, a portal attachment never less than 1 KB, and setup bytes. Booking lengths, the dispatch board and how long a cron job ran are written 1h 30m like time logged everywhere else - they read 1 hour 30 min and 2 min 5 s - and hours as a number are 12.5 h, project hours included.
|
||||
- Forms: hints inside empty fields are plain examples - example.com, Contracts, Closing remarks - rather than e.g. ..., ex. ... and Enter a ..., and address fields bring up the web keyboard on a phone. New Location and New Network open at the size their Edit windows do, and the transactions list's amount filters take 1,000.00 like every other money field.
|
||||
- Messages: the message after a window closes matches its button - created after Create, saved after Save - where some said added, updated or edited. Copying an invoice says which invoice it was copied to, making one recurring names the new recurring invoice, a payment on several invoices says how many it paid and who the receipt was queued to, and attaching files to a ticket without a reply says so rather than Ticket updated.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -287,6 +288,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
|
||||
- Browser tabs: many pages were named after their file - Kb, Ai Providers, Rmm Providers, Sla, Settings Ticket, Profit Loss - and one with & in its name showed &. Each tab now has the name the menu gives the page, and a rack, an instance and a ticket, document or project template show their own name.
|
||||
- Client menu: a client's Domains count never turned amber or red for domains about to expire or expired, and the Certificates and Licenses counts carried two text colours at once.
|
||||
- Audit Logs: income was filed as Income or Revenue, and transfers as Transfer or Account Transfer, depending on where they were made, so the Type filter listed each twice. Each now has one name, and licenses and license templates are License and License Template rather than Software. Entries already in the log are renamed when you update. Entries for RMM providers, collation repairs, the demo reset and Undo have their own icons.
|
||||
- Payments: editing a payment said "Payment edited to amount ... added" in your company's currency rather than the payment's, and its audit log entry didn't say who edited it or which client it was for.
|
||||
|
||||
### Developer Updates
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ if (isset($_POST['check_ai_model']) || isset($_POST['add_ai_model']) || isset($_
|
||||
$model_id = aiModelWrite($after);
|
||||
logAudit("AI Model", "Create", "$session_name added AI model " . escapeSql("$name on {$provider['ai_provider_name']}, for $use_case"), 0, $model_id);
|
||||
if ($already && $already['ai_model_use_case'] === $use_case) {
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> added - but <strong>' . escapeHtml($already['ai_model_name']) . "</strong> is for $use_case already and is the one used. Delete it, or set it to something else, to use this one", 'warning');
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> created - but <strong>' . escapeHtml($already['ai_model_name']) . "</strong> is for $use_case already and is the one used. Delete it, or set it to something else, to use this one", 'warning');
|
||||
} else {
|
||||
flashAlert('<strong>' . escapeHtml($name) . "</strong> added - it is used for " . ($use_case === 'General' ? 'everything without a model of its own' : $use_case));
|
||||
flashAlert('<strong>' . escapeHtml($name) . "</strong> created - it is used for " . ($use_case === 'General' ? 'everything without a model of its own' : $use_case));
|
||||
}
|
||||
redirect('ai_models.php');
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@ if (isset($_POST['check_ai_provider']) || isset($_POST['add_ai_provider']) || is
|
||||
if ($first_model !== '') {
|
||||
$model_id = aiModelWrite(['ai_model_ai_provider_id' => $provider_id, 'ai_model_name' => $first_model, 'ai_model_use_case' => 'General', 'ai_model_temperature' => null, 'ai_model_prompt' => '']);
|
||||
logAudit("AI Model", "Create", "$session_name added AI model " . escapeSql("$first_model on $name, for General"), 0, $model_id);
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> added, with <strong>' . escapeHtml($first_model) . '</strong> for everything - AI is ready to use');
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> created, with <strong>' . escapeHtml($first_model) . '</strong> for everything - AI is ready to use');
|
||||
} else {
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> added - now add the model to use on it');
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> created - now add the model to use on it');
|
||||
}
|
||||
redirect('ai_providers.php');
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ if (isset($_POST['edit_backup_settings'])) {
|
||||
mysqli_query($mysqli, "UPDATE settings SET config_backup_retention_days = $retention_days, config_backup_retention_count = $retention_count, config_backup_cron_type = '$cron_type' WHERE company_id = 1");
|
||||
|
||||
logAudit("Backup", "Edit", ($session_name ?? 'Unknown User') . " updated the backup settings");
|
||||
flashAlert("Backup settings saved.");
|
||||
flashAlert("Backup settings saved");
|
||||
|
||||
redirect("backup.php");
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ if (isset($_POST['edit_cron_job'])) {
|
||||
|
||||
logAudit("Cron", "Edit", "$session_name edited the schedule for cron job $cron_job_name", 0, $cron_job_id);
|
||||
|
||||
flashAlert("Cron job schedule updated.");
|
||||
flashAlert("Cron job schedule saved");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -153,7 +153,7 @@ if (isset($_GET['clear_cron_error'])) {
|
||||
|
||||
mysqli_query($mysqli, "UPDATE cron_jobs SET cron_job_last_error = NULL, cron_job_last_error_at = NULL WHERE cron_job_id = $cron_job_id");
|
||||
|
||||
flashAlert("Error cleared.");
|
||||
flashAlert("Error cleared");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -187,7 +187,7 @@ if (isset($_POST['edit_cron_alerts'])) {
|
||||
|
||||
logAudit("Cron", "Edit", "$session_name set cron alerts " . ($alert_email ? 'to email ' . ($alert_to === '' ? 'every active admin' : $alert_to) : 'not to email'));
|
||||
|
||||
flashAlert("Cron alerts saved.");
|
||||
flashAlert("Cron alerts saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ if (isset($_GET['delete_labor_cost_rate'])) {
|
||||
if ($user_id) {
|
||||
$agent_name = (string) (mysqli_fetch_row(mysqli_query($mysqli, "SELECT user_name FROM users WHERE user_id = $user_id"))[0] ?? "agent $user_id");
|
||||
logAudit("Settings", "Edit", "$session_name took away a labor cost of " . escapeSql($agent_name), 0, $user_id);
|
||||
flashAlert("Rate taken away.");
|
||||
flashAlert("Rate taken away");
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -56,7 +56,7 @@ if (isset($_POST['add_managed_instance'])) {
|
||||
|
||||
logAudit("Managed Instance", "Create", "$session_name added managed instance " . escapeSql($fields['name']), $fields['client_id'], $instance_id);
|
||||
|
||||
flashAlert("<strong>" . escapeHtml($fields['name']) . "</strong> added - now connect it with the code below");
|
||||
flashAlert("<strong>" . escapeHtml($fields['name']) . "</strong> created - now connect it with the code below");
|
||||
|
||||
redirect("managed_instance.php?id=$instance_id");
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['add_payment_method']) || isset($_POST['edit_payment_method']))
|
||||
} else {
|
||||
$payment_method_id = paymentMethodCreate($fields);
|
||||
logAudit("Payment Method", "Create", "$session_name added payment method " . escapeSql($fields['name']) . " for " . strtolower(PAYMENT_METHOD_USES[$fields['use']]['short']), 0, $payment_method_id);
|
||||
flashAlert("Payment method <strong>" . escapeHtml($fields['name']) . "</strong> added");
|
||||
flashAlert("Payment method <strong>" . escapeHtml($fields['name']) . "</strong> created");
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -71,7 +71,7 @@ if (isset($_POST['check_payment_provider']) || isset($_POST['add_payment_provide
|
||||
$account_name = (string) (paymentProviderRow($provider_id)['account_name'] ?? '');
|
||||
logAudit("Payment Provider", "Create", "$session_name added payment provider " . escapeSql("$name ($mode mode), payments into $account_name, card limit " . paymentProviderLimitText($after['payment_provider_threshold'])
|
||||
. ', fees ' . ($after['payment_provider_expense_vendor'] ? 'recorded' : 'not recorded') . ', card fee clients pay ' . paymentProviderCardFeeText($after)), 0, $provider_id);
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> added - clients can pay invoices by card' . ($mode === 'test' ? '. Its keys are test keys, so no real money moves until they are live ones' : ''));
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> created - clients can pay invoices by card' . ($mode === 'test' ? '. Its keys are test keys, so no real money moves until they are live ones' : ''));
|
||||
redirect();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ if (isset($_POST['check_sms_provider']) || isset($_POST['add_sms_provider']) ||
|
||||
if (!$before) {
|
||||
$provider_id = smsProviderWrite($after);
|
||||
logAudit("Text Message", "Create", "$session_name added texting provider " . escapeSql("$name, texting from $number"), 0, $provider_id);
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> added, texting from <strong>' . escapeHtml($number) . '</strong> - paste the address texts come back to into its portal, then send a test text');
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> created, texting from <strong>' . escapeHtml($number) . '</strong> - paste the address texts come back to into its portal, then send a test text');
|
||||
redirect('text_messaging.php');
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['add_ticket_status']) || isset($_POST['edit_ticket_status'])) {
|
||||
} else {
|
||||
$ticket_status_id = ticketStatusCreate($fields);
|
||||
logAudit("Ticket Status", "Create", "$session_name added ticket status " . escapeSql($fields['name']) . ($fields['pauses_sla'] ? ' (pauses the resolution clock)' : ''), 0, $ticket_status_id);
|
||||
flashAlert("Status <strong>" . escapeHtml($fields['name']) . "</strong> added - at the end of the order");
|
||||
flashAlert("Status <strong>" . escapeHtml($fields['name']) . "</strong> created - at the end of the order");
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -132,11 +132,11 @@ if (isset($_POST['billing_item_save'])) {
|
||||
// A quote line's picture - a new one, or taken off (functions/quote_images.php)
|
||||
$image_error = $type === 'quote' ? quoteImageSave('quote_items', $saved, $_POST, $_FILES) : '';
|
||||
if ($image_error !== '') {
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> ' . ($item_id ? 'updated' : 'added') . ', but its picture couldn\'t be added: ' . escapeHtml($image_error), 'warning');
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> ' . ($item_id ? 'saved' : 'added') . ', but its picture couldn\'t be added: ' . escapeHtml($image_error), 'warning');
|
||||
billingPostBack($type, $doc_id, "line-$saved");
|
||||
}
|
||||
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> ' . ($item_id ? 'updated' : 'added'));
|
||||
flashAlert('<strong>' . escapeHtml($name) . '</strong> ' . ($item_id ? 'saved' : 'added'));
|
||||
|
||||
billingPostBack($type, $doc_id, $item_id ? "line-$saved" : 'add-line');
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ if (isset($_POST['edit_certificate'])) {
|
||||
$name = $form['name'];
|
||||
logAudit("Certificate", "Edit", "$session_name edited certificate " . escapeSql($name), $client_id, $certificate_id);
|
||||
|
||||
flashAlert("Certificate <strong>" . escapeHtml($name) . "</strong> updated");
|
||||
flashAlert("Certificate <strong>" . escapeHtml($name) . "</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -135,9 +135,9 @@ if (isset($_POST['edit_client'])) {
|
||||
// Another contract, started from a template picked on the Billing tab (functions/contract.php)
|
||||
[$contract_id, $contract_name, $contract_error] = contractFromClientForm($client_id, $_POST);
|
||||
if ($contract_error !== '') {
|
||||
flashAlert("Client <strong>" . stripslashes($name) . "</strong> updated - the contract wasn't added: " . escapeHtml($contract_error), 'warning');
|
||||
flashAlert("Client <strong>" . stripslashes($name) . "</strong> saved - the contract wasn't added: " . escapeHtml($contract_error), 'warning');
|
||||
} else {
|
||||
flashAlert("Client <strong>" . stripslashes($name) . "</strong> updated" . ($contract_id ? ", with new contract <strong>" . escapeHtml($contract_name) . "</strong>" : ''));
|
||||
flashAlert("Client <strong>" . stripslashes($name) . "</strong> saved" . ($contract_id ? ", with new contract <strong>" . escapeHtml($contract_name) . "</strong>" : ''));
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -213,7 +213,7 @@ if (isset($_POST['edit_contact'])) {
|
||||
|
||||
triggerCustomAction('contact_update', $contact_id);
|
||||
|
||||
flashAlert("Contact <strong>" . stripslashes($name) . "</strong> updated" . ($invited ? ' and invited to the client portal' : ($invited === false ? ' - the portal invite was not sent, as ' . (portalMailReady() ? 'their email address is not valid' : 'outgoing mail is not set up') : '')), $invited === false ? 'warning' : 'success');
|
||||
flashAlert("Contact <strong>" . stripslashes($name) . "</strong> saved" . ($invited ? ' and invited to the client portal' : ($invited === false ? ' - the portal invite was not sent, as ' . (portalMailReady() ? 'their email address is not valid' : 'outgoing mail is not set up') : '')), $invited === false ? 'warning' : 'success');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -523,7 +523,7 @@ if (isset($_POST['bulk_edit_contact_role'])) {
|
||||
|
||||
logAudit("Contact", "Bulk Edit", "$session_name edited the contact role for $contact_count contacts", $client_id);
|
||||
|
||||
flashAlert("Roles updated on <strong>$contact_count</strong> contact" . ($contact_count === 1 ? '' : 's'));
|
||||
flashAlert("Roles set on <strong>$contact_count</strong> contact" . ($contact_count === 1 ? '' : 's'));
|
||||
undoOfferChanges($undo, "Roles put back on <strong>{n}</strong> contact{s}", 'module_client');
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ if (isset($_POST['add_contract']) || isset($_POST['edit_contract'])) {
|
||||
contractHoursSync($contract_id);
|
||||
logAudit("Contract", "Create", "$session_name added " . strtolower($fields['status']) . " contract " . escapeSql($fields['name']) . " (" . escapeSql(contractTypeLabel($fields['type'])) . ")"
|
||||
. ($fields['start_date'] !== '' ? " from " . escapeSql($fields['start_date']) : '') . ($fields['end_date'] !== '' ? " to " . escapeSql($fields['end_date']) : ''), $client_id, $contract_id);
|
||||
flashAlert("Contract <strong>" . escapeHtml($fields['name']) . "</strong> added" . ($fields['status'] === 'Draft' ? ' as a draft' : ''));
|
||||
flashAlert("Contract <strong>" . escapeHtml($fields['name']) . "</strong> created" . ($fields['status'] === 'Draft' ? ' as a draft' : ''));
|
||||
redirect("contract.php?client_id=$client_id&contract_id=$contract_id");
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ if (isset($_POST['edit_credential'])) {
|
||||
$name = trim($_POST['name']);
|
||||
logAudit("Credential", "Edit", "$session_name edited credential " . escapeSql($name) . ($password_changed ? ' and changed its password' : ''), $client_id, $credential_id);
|
||||
|
||||
flashAlert("Credential <strong>$name</strong> updated");
|
||||
flashAlert("Credential <strong>$name</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ if (isset($_POST['edit_domain'])) {
|
||||
$name = $form['name'];
|
||||
logAudit("Domain", "Edit", "$session_name edited domain " . escapeSql($name), $client_id, $domain_id);
|
||||
|
||||
flashAlert("Domain <strong>$name</strong> updated");
|
||||
flashAlert("Domain <strong>$name</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ if (isset($_POST['add_event'])) {
|
||||
|
||||
logAudit("Calendar Event", "Create", "$session_name added the event " . escapeSql($event['event_title']) . " to calendar " . escapeSql($event['calendar_name']), $client_id, $event_id);
|
||||
|
||||
flashAlert("Event <strong>" . escapeHtml($event['event_title']) . "</strong> added" . calendarSentText($sent));
|
||||
flashAlert("Event <strong>" . escapeHtml($event['event_title']) . "</strong> created" . calendarSentText($sent));
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ if (isset($_POST['add_expense'])) {
|
||||
logAudit("Expense", $refund ? "Refund" : "Create", "$session_name " . ($refund ? 'recorded a refund from ' : 'added the expense ') . escapeSql($label), intval($row['expense_client_id']), $expense_id);
|
||||
|
||||
if ($receipt_error) {
|
||||
flashAlert(($refund ? 'Refund' : 'Expense') . " <strong>" . escapeHtml($label) . "</strong> added, but " . lcfirst(escapeHtml($receipt_error)), 'warning');
|
||||
flashAlert(($refund ? 'Refund' : 'Expense') . " <strong>" . escapeHtml($label) . "</strong> " . ($refund ? 'recorded' : 'created') . ", but " . lcfirst(escapeHtml($receipt_error)), 'warning');
|
||||
} else {
|
||||
flashAlert(($refund ? 'Refund' : 'Expense') . " <strong>" . escapeHtml($label) . "</strong> added" . ($row['expense_receipt'] ? ' with its receipt' : ''));
|
||||
flashAlert(($refund ? 'Refund' : 'Expense') . " <strong>" . escapeHtml($label) . "</strong> " . ($refund ? 'recorded' : 'created') . ($row['expense_receipt'] ? ' with its receipt' : ''));
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -84,7 +84,7 @@ if (isset($_POST['edit_invoice'])) {
|
||||
|
||||
logAudit("Invoice", "Edit", "$session_name edited Invoice $invoice_prefix$invoice_number - $scope", $client_id, $invoice_id);
|
||||
|
||||
flashAlert("Invoice <strong>$invoice_prefix$invoice_number</strong> edited");
|
||||
flashAlert("Invoice <strong>$invoice_prefix$invoice_number</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -159,7 +159,7 @@ if (isset($_POST['add_invoice_copy'])) {
|
||||
|
||||
triggerCustomAction('invoice_create', $new_invoice_id);
|
||||
|
||||
flashAlert("Created new Invoice <strong>$config_invoice_prefix$new_invoice_number</strong> from <strong>$old_invoice_prefix$old_invoice_number</strong>" . ($card_fees > 0 ? ' - without its card fee' : ''));
|
||||
flashAlert("Invoice <strong>$old_invoice_prefix$old_invoice_number</strong> copied to <strong>$config_invoice_prefix$new_invoice_number</strong>" . ($card_fees > 0 ? ' - without its card fee' : ''));
|
||||
|
||||
redirect("invoice.php?invoice_id=$new_invoice_id");
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ if (isset($_POST['edit_location'])) {
|
||||
$name = trim($_POST['name']);
|
||||
logAudit("Location", "Edit", "$session_name edited location " . escapeSql($name), $client_id, $location_id);
|
||||
|
||||
flashAlert("Location <strong>$name</strong> updated");
|
||||
flashAlert("Location <strong>$name</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ if (isset($_POST['add_payment'])) {
|
||||
|
||||
triggerCustomAction('invoice_pay', $invoice_id);
|
||||
|
||||
flashAlert("Payment amount <strong>" . billingMoney($amount, $invoice_currency_code) . "</strong> added");
|
||||
flashAlert("Payment of <strong>" . billingMoney($amount, $invoice_currency_code) . "</strong> added");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -110,9 +110,11 @@ if (isset($_POST['edit_payment'])) {
|
||||
// A changed amount can leave the invoice paid, part paid or owing again
|
||||
updateInvoiceStatusFromPayments(intval(getFieldById('payments', $payment_id, 'payment_invoice_id')));
|
||||
|
||||
logAudit("Payment", "Edit", "Payment edited amount of " . billingMoney($amount, $session_company_currency));
|
||||
$currency_code = (string) getFieldById('payments', $payment_id, 'payment_currency_code');
|
||||
|
||||
flashAlert("Payment edited to amount <strong>" . billingMoney($amount, $session_company_currency) . "</strong> added");
|
||||
logAudit("Payment", "Edit", "$session_name edited a payment to " . billingMoney($amount, $currency_code), $client_id, $payment_id);
|
||||
|
||||
flashAlert("Payment of <strong>" . billingMoney($amount, $currency_code) . "</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -526,13 +528,14 @@ if (isset($_POST['add_bulk_payment'])) {
|
||||
billingLog('invoice', $entry['invoice_id'], 'Sent', 'Payment receipt emailed to ' . implode(', ', $receipt_to));
|
||||
}
|
||||
logAudit("Payment", "Email", "Bulk Payment receipt for multiple Invoices queued to " . escapeSql(implode(', ', $receipt_to)), $client_id);
|
||||
$alert_message .= "Email receipt queued and ";
|
||||
$alert_message = " - receipt queued to <strong>" . escapeHtml(implode(', ', $receipt_to)) . "</strong>";
|
||||
}
|
||||
}
|
||||
|
||||
logAudit("Invoice", "Payment", "Bulk Payment amount of " . billingMoney($bulk_payment_amount_static, $currency_code) . " applied to multiple invoices", $client_id);
|
||||
|
||||
flashAlert("$alert_message Bulk Payment added");
|
||||
$paid = count($applied_payments);
|
||||
flashAlert("Payment of <strong>" . billingMoney($bulk_payment_amount_static, $currency_code) . "</strong> added across <strong>$paid</strong> invoice" . ($paid === 1 ? '' : 's') . $alert_message);
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@ if (isset($_POST['add_product'])) {
|
||||
// Its picture (functions/quote_images.php)
|
||||
$image_error = quoteImageSave('products', $product_id, $_POST, $_FILES);
|
||||
if ($image_error !== '') {
|
||||
flashAlert("$type_label <strong>" . escapeHtml($product['product_name']) . "</strong> added, but its picture couldn't be added: " . escapeHtml($image_error), 'warning');
|
||||
flashAlert("$type_label <strong>" . escapeHtml($product['product_name']) . "</strong> created, but its picture couldn't be added: " . escapeHtml($image_error), 'warning');
|
||||
redirect();
|
||||
}
|
||||
|
||||
flashAlert("$type_label <strong>" . escapeHtml($product['product_name']) . "</strong> added");
|
||||
flashAlert("$type_label <strong>" . escapeHtml($product['product_name']) . "</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ if (isset($_POST['edit_quote'])) {
|
||||
|
||||
logAudit("Quote", "Edit", "$session_name edited quote $quote_prefix$quote_number", $client_id, $quote_id);
|
||||
|
||||
flashAlert("Quote edited");
|
||||
flashAlert("Quote <strong>$quote_prefix$quote_number</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ if (isset($_POST['add_invoice_recurring'])) {
|
||||
|
||||
logAudit("Recurring Invoice", "Create", "$session_name created recurring Invoice from Invoice $invoice_prefix$invoice_number", $client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Created recurring Invoice from Invoice <strong>$invoice_prefix$invoice_number</strong>" . ($card_fees > 0 ? ' - without its card fee' : ''));
|
||||
flashAlert("Invoice <strong>$invoice_prefix$invoice_number</strong> made recurring as <strong>$config_recurring_invoice_prefix$recurring_invoice_number</strong>" . ($card_fees > 0 ? ' - without its card fee' : ''));
|
||||
|
||||
redirect("recurring_invoice.php?recurring_invoice_id=$recurring_invoice_id");
|
||||
|
||||
@@ -125,7 +125,7 @@ if (isset($_POST['add_recurring_invoice'])) {
|
||||
|
||||
logAudit("Recurring Invoice", "Create", "$session_name created recurring invoice $config_recurring_invoice_prefix$recurring_invoice_number - $scope", $client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Recurring Invoice <strong>$config_recurring_invoice_prefix$recurring_invoice_number</strong> created");
|
||||
flashAlert("Recurring invoice <strong>$config_recurring_invoice_prefix$recurring_invoice_number</strong> created");
|
||||
|
||||
redirect("recurring_invoice.php?recurring_invoice_id=$recurring_invoice_id");
|
||||
|
||||
@@ -200,7 +200,7 @@ if (isset($_POST['copy_recurring_invoice'])) {
|
||||
|
||||
logAudit("Recurring Invoice", "Create", escapeSql("$session_name copied recurring invoice $from_number to $client_name as $new_number"), $client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Recurring Invoice <strong>" . escapeHtml($new_number) . "</strong> made for <strong>" . escapeHtml($client_name) . "</strong>, first billing on " . escapeHtml($start)
|
||||
flashAlert("Recurring invoice <strong>" . escapeHtml($new_number) . "</strong> made for <strong>" . escapeHtml($client_name) . "</strong>, first billing on " . escapeHtml($start)
|
||||
. ($seat_changes ? ' - seats counted for them: ' . escapeHtml(implode('; ', $seat_changes)) : ''));
|
||||
|
||||
redirect("recurring_invoice.php?client_id=$client_id&recurring_invoice_id=$recurring_invoice_id");
|
||||
@@ -250,7 +250,7 @@ if (isset($_POST['edit_recurring_invoice'])) {
|
||||
|
||||
logAudit("Recurring Invoice", "Edit", "$session_name edited recurring invoice $recurring_invoice_prefix$recurring_invoice_number - $scope", $client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Recurring Invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong> edited");
|
||||
flashAlert("Recurring invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -307,7 +307,7 @@ if (isset($_GET['delete_recurring_invoice'])) {
|
||||
|
||||
logAudit("Recurring Invoice", "Delete", "$session_name deleted recurring invoice $recurring_invoice_prefix$recurring_invoice_number - $recurring_invoice_scope", $client_id);
|
||||
|
||||
flashAlert("Recurring Invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong> deleted", 'error');
|
||||
flashAlert("Recurring invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -406,14 +406,14 @@ if (isset($_POST['set_recurring_payment'])) {
|
||||
|
||||
logAudit("Recurring Invoice", "Auto Payment", "$session_name created Auto Pay for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number in the amount of " . billingMoney($recurring_invoice_amount, $recurring_invoice_currency_code), $client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Automatic Payment <strong>$saved_payment_description</strong> enabled for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number");
|
||||
flashAlert("Automatic payment with <strong>$saved_payment_description</strong> turned on for recurring invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong>");
|
||||
} else {
|
||||
// Delete
|
||||
mysqli_query($mysqli, "DELETE FROM recurring_payments WHERE recurring_payment_recurring_invoice_id = $recurring_invoice_id");
|
||||
|
||||
logAudit("Recurring Invoice", "Auto Payment", "$session_name removed Auto Pay for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number in the amount of " . billingMoney($recurring_invoice_amount, $recurring_invoice_currency_code), $client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Automatic Payment <strong>Disabled</strong> for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number", 'error');
|
||||
flashAlert("Automatic payment turned off for recurring invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong>", 'error');
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -211,7 +211,7 @@ if (isset($_POST['edit_recurring_ticket'])) {
|
||||
|
||||
logAudit("Recurring Ticket", "Edit", "$session_name edited recurring ticket {$f['subject']}", $client_id, $recurring_ticket_id);
|
||||
|
||||
flashAlert("Recurring ticket <strong>" . escapeHtml(trim($_POST['subject'])) . "</strong> updated");
|
||||
flashAlert("Recurring ticket <strong>" . escapeHtml(trim($_POST['subject'])) . "</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ if (isset($_POST['add_revenue'])) {
|
||||
|
||||
logAudit("Income", "Create", "$session_name added other income " . escapeSql($label), intval($row['revenue_client_id']), $revenue_id);
|
||||
|
||||
flashAlert("Income <strong>" . escapeHtml($label) . "</strong> added");
|
||||
flashAlert("Income <strong>" . escapeHtml($label) . "</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ if (isset($_POST['edit_software'])) {
|
||||
logAudit("License", "Edit", "$session_name edited license " . escapeSql($name . softwareSeatChangeText($changes)), $client_id, $software_id);
|
||||
|
||||
$warning = softwareSeatWarning($software_id);
|
||||
flashAlert("License <strong>$name</strong> updated$warning", $warning ? 'warning' : 'success');
|
||||
flashAlert("License <strong>$name</strong> saved$warning", $warning ? 'warning' : 'success');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ if (isset($_POST['edit_ticket'])) {
|
||||
|
||||
logAudit("Ticket", "Edit", "$session_name edited ticket $reference", $client_id, $ticket_id);
|
||||
|
||||
flashAlert("Ticket <strong>" . escapeHtml(ticketReference($row)) . "</strong> updated");
|
||||
flashAlert("Ticket <strong>" . escapeHtml(ticketReference($row)) . "</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -400,7 +400,7 @@ if (isset($_POST['edit_ticket_sla'])) {
|
||||
|
||||
triggerCustomAction('ticket_update', $ticket_id);
|
||||
|
||||
flashAlert("SLA updated from <strong>" . escapeHtml($original_sla_name) . "</strong> to <strong>" . escapeHtml($sla_name) . "</strong>");
|
||||
flashAlert("SLA changed from <strong>" . escapeHtml($original_sla_name) . "</strong> to <strong>" . escapeHtml($sla_name) . "</strong>");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -1258,7 +1258,7 @@ if (isset($_POST['add_ticket_reply'])) {
|
||||
// so it attaches to the ticket itself
|
||||
$emailable_attachments = filterEmailableAttachments(array_merge(saveTicketAttachments($ticket_id, null),
|
||||
cannedResponseAttachFiles((array) ($_POST['canned_response_file_ids'] ?? []), $ticket_id, null, $session_user_id)));
|
||||
flashAlert("Ticket updated");
|
||||
flashAlert("Files attached to ticket <strong>" . escapeHtml(ticketReference($row)) . "</strong>");
|
||||
}
|
||||
|
||||
// A status that counts as the first response, for a ticket the reply didn't answer (functions/ticket_status.php)
|
||||
@@ -1396,7 +1396,7 @@ if (isset($_POST['edit_ticket_reply'])) {
|
||||
|
||||
logAudit("Ticket", "Reply", "$session_name edited a reply on ticket " . escapeSql(ticketReference($row)), $client_id, intval($row['ticket_id']));
|
||||
|
||||
flashAlert("Ticket reply updated" . ($told ? " - <strong>" . escapeHtml(ticketMentionNames($told)) . "</strong> " . (count($told) === 1 ? 'was' : 'were') . " told" : ''));
|
||||
flashAlert("Reply saved" . ($told ? " - <strong>" . escapeHtml(ticketMentionNames($told)) . "</strong> " . (count($told) === 1 ? 'was' : 'were') . " told" : ''));
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ if (isset($_POST['edit_vendor'])) {
|
||||
$name = trim($_POST['name']);
|
||||
logAudit("Vendor", "Edit", "$session_name edited vendor " . escapeSql($name), $client_id, $vendor_id);
|
||||
|
||||
flashAlert("Vendor <strong>$name</strong> updated");
|
||||
flashAlert("Vendor <strong>$name</strong> saved");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ if (isset($_POST['set_contact_phone'])) {
|
||||
|
||||
logAudit("Contact", "Edit", "Client contact $session_contact_name updated their phone numbers in the client portal", $session_client_id, $session_contact_id);
|
||||
|
||||
flashAlert("Phone numbers updated");
|
||||
flashAlert("Phone numbers saved");
|
||||
|
||||
redirect('profile.php');
|
||||
|
||||
@@ -348,7 +348,7 @@ if (isset($_POST['set_contact_pin'])) {
|
||||
// an audit trail an agent can read would defeat the point of having one
|
||||
logAudit("Contact", "Edit", "Client contact $session_contact_name set their phone PIN in the client portal", $session_client_id, $session_contact_id);
|
||||
|
||||
flashAlert("Phone PIN updated");
|
||||
flashAlert("Phone PIN saved");
|
||||
|
||||
redirect('profile.php');
|
||||
|
||||
@@ -1488,7 +1488,7 @@ if (isset($_GET['stripe_save_card'])) {
|
||||
|
||||
logAudit("Stripe", "Create", "$session_contact_name saved payment method ($saved_payment_description) (PM: $payment_method_id)", $session_client_id);
|
||||
|
||||
flashAlert("Payment method saved – thank you.");
|
||||
flashAlert("Payment method saved - thank you");
|
||||
redirect("saved_payment_methods.php");
|
||||
}
|
||||
|
||||
@@ -1589,7 +1589,7 @@ if (isset($_GET['delete_saved_payment'])) {
|
||||
|
||||
logAudit("Stripe", "Delete", "$session_contact_name deleted Stripe payment method $saved_payment_description (PM: $payment_method_id)", $session_client_id);
|
||||
|
||||
flashAlert("Payment method $saved_payment_description removed.");
|
||||
flashAlert("Payment method $saved_payment_description removed");
|
||||
|
||||
redirect("saved_payment_methods.php");
|
||||
}
|
||||
@@ -1649,14 +1649,14 @@ if (isset($_POST['set_recurring_payment'])) {
|
||||
|
||||
logAudit("Recurring Invoice", "Auto Payment", "$session_contact_name created Auto Pay for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number in the amount of " . billingMoney($recurring_invoice_amount, $recurring_invoice_currency_code), $session_client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Automatic Payment $saved_payment_description enabled for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number");
|
||||
flashAlert("Automatic payment with $saved_payment_description turned on for recurring invoice $recurring_invoice_prefix$recurring_invoice_number");
|
||||
} else {
|
||||
// Delete
|
||||
mysqli_query($mysqli, "DELETE FROM recurring_payments WHERE recurring_payment_recurring_invoice_id = $recurring_invoice_id");
|
||||
|
||||
logAudit("Recurring Invoice", "Auto Payment", "$session_contact_name removed Auto Pay for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number in the amount of " . billingMoney($recurring_invoice_amount, $recurring_invoice_currency_code), $session_client_id, $recurring_invoice_id);
|
||||
|
||||
flashAlert("Automatic Payment Disabled for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number");
|
||||
flashAlert("Automatic payment turned off for recurring invoice $recurring_invoice_prefix$recurring_invoice_number");
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
Reference in New Issue
Block a user