Commit Graph

34 Commits

Author SHA1 Message Date
johnnyq
81c80d8965 Canned responses stages 3 and 4: agents keep canned responses of their own in Your account > Canned Responses (on the standard list with Yours and Shared tabs, how often they used each, change, copy, archive and delete their own, Copy to yours from a shared one), offered to them alone and first in the picker as Yours; Save your reply as a canned response at the foot of the picker opens the draft with the ticket's contact, first name, client, ticket number, subject, link and agent swapped back to placeholders (canned_response_unfill, text only, a one-word subject left alone), offered on the ticket's category with a switch to put it back as written, and saves it in JSON without leaving the ticket so the reply stays and the new one goes straight into the picker; Admin > Canned Responses gains an Agents' own tab showing whose each is with Share with everyone, copies made there are shared, and admins can share their own or tick Share when saving a reply; files go with a response (Files tab, up to ten of the ticket attachment kinds, kept in uploads/canned_responses/<id>/, streamed by agent/canned_response_file.php to those who may use it), shown as chips under the picker with an x to leave one off, copied onto the ticket with the reply and sent with its email on a ticket and in Update & Reply; migration 3.2.4 adds canned_response_user_id and canned_response_created_by and the canned_response_files table, existing responses staying shared; the response window moves to includes/canned_response_form.php for the admin and account windows; export and import (functions/canned_response_transfer.php) of one, some or every shared response as a versioned JSON file with categories by name, what it sets up, status by name and files as base64, importing as shared with categories matched or made and leave, add as well or replace (keeping use and archived state), everything made safe and refused files named; an MSP starter pack of 27 canned responses in Starter Content loaded through the same import, with Update for the ones already added, and the Update button now driven by the pack registry; new Canned Responses report under Service Desk by response and by agent, filtered by client and by the agent who used it, admins seeing every agent's own; changelog updated 2026-10-18 15:36:00 -04:00
johnnyq
c93cb20f14 Expenses stage 1: rebuilt expenses list with this month against the same days last month, year so far with monthly average, recurring cost a month and expenses without a receipt in the last 90 days along the top, pills for client, no receipt and refunds with counts, vendor, category, client, date, account and payment method filters and a total of what the filters leave, an expense quick look showing the receipt inline with attach from the window, who entered it, refunds against it and the stock it paid for, one shared form for New, Edit, Copy and Refund with icons on every field, payment method saved from the default in Settings, vendor picks filling in the category, account and method of the last expense with them, refunds linked to the expense they give back and starting at what has not come back, receipts replaced or removed in Edit and served through agent/expense_receipt.php after the Financial and client checks with uploads/expenses closed to the web, bulk set category, account, payment method or client in one window and a single bulk delete, export with the list filters plus paid by, receipt and entered by columns, expenses in global search with open on load, the vendor page, Transactions and product stock history opening the quick look and Client Profitability linking direct costs to the client's expenses, fixes for the dead bulk delete button, bulk set client ignoring client restrictions, the New Expense window opening without write access, unlink warnings on empty receipts and photo receipts downloading as pdf, functions/expenses.php shared by the list, windows, export and search, database 2.9.9 with expense_created_by backfilled from the audit log and expense_refund_of_id, CHANGELOG updated 2026-10-16 17:43:11 -04:00
wrongecho
5ee1c9580f Enhance .htaccess rules 2026-08-03 17:51:04 +01:00
johnnyq
ae468d6cee Encrypted backups with types, scheduling and CLI restore
Backups are now AES-256 encrypted zips in three types (full, database
only, master key), catalogued in a new backups table, built by cron rather
than the web request, and kept under uploads/backups with retention in the
nightly job. The encryption key is one value per install held in config.php,
never in the database and never in the file name.

Restore is shared by the setup wizard and the new scripts/restore_cli.php,
which is the only path without an upload size limit. It verifies the key and
unpacks the archive before dropping anything, and dumps the current database
first so a failed import is rolled back.

A backup dumps, zips and encrypts for minutes without issuing a query, so on
a server with a short wait_timeout the connection is closed underneath it and
the UPDATE marking the backup complete is what fails - long after the archive
was written correctly. The connection is now held open for the job and
re-established before any write that follows long file work, including the
database phase of a restore. Retention recovers rows a dropped connection
left behind: still Running after six hours becomes Complete if the archive is
on disk, Failed if it is not.

cron.php's own failure path is hardened to match. It recorded job failures
through the same connection the failing job had just killed, so an uncaught
exception ended the dispatch and no trace of the original error survived.
Failures now also echo to stdout, so cron mails something useful when the
database is unreachable.

Security: the setup wizard's restore step is now closed on any install that
has users, whatever config.php says. $config_enable_setup defaulted to
enabled when the flag was absent, and the flag is only written at the end of
a successful install, so an install abandoned partway left an unauthenticated
endpoint that would drop every table, import an attacker-supplied archive,
and overwrite uploads/ including the .htaccess that stops PHP running there.
Affects 26.07 and earlier. Restoring over a live install is now CLI only.
2026-07-31 16:18:20 -04:00
johnnyq
8993bce53f Force No Indexes of empty directories even if enabled using .htaccess in uploads 2026-07-24 20:52:35 -04:00
johnnyq
5ef53b569c Create upload folders for recurring tickets and ticket_templates 2025-11-24 13:09:01 -05:00
johnnyq
435da991ec Add custom folder to uploads for custom uploading for custom modules 2025-11-23 14:32:57 -05:00
johnnyq
ebd9aae924 Add Document Templates to uploads dir 2025-11-23 14:30:50 -05:00
johnnyq
e73af9980e Also Delete Documents/Document_id folder during bulk delete 2025-11-23 13:43:12 -05:00
johnnyq
29839d3b23 Implemented saveBase64Images() to convert base64 <img> tags into real files stored under /uploads/<module>/<id>/ with secure filenames. Added wrapper functions and updated document creation to use processed image paths. 2025-11-23 13:03:03 -05:00
johnnyq
2ee70fd3a8 Update .htaccess 2025-10-09 19:23:48 -04:00
johnnyq
ed589ef65b Update Backup / Restore, now streams backup and restore to disk instead of memory causing memory to run out, sets timeout limit to unlimited, checks backup file contents for anything bad, use php instead shell exec for import of db, added .htaccess for apache to prevent php execution in /uploads/ directory as this is intended for file download only 2025-10-09 12:28:38 -04:00
johnnyq
5d9ab76689 Remove Custom favicon 2024-02-03 14:32:08 -05:00
johnnyq
e9c85297eb Feature: Allow to upload custom fav icon under settings > Theme, icon is limited to .ico format only 2024-02-03 14:30:03 -05:00
Marcus Hill
0a9af8f2e0 Ticket attachments (email)
Email to ticket parser: Add support for email attachments
2023-04-30 10:52:25 +01:00
johnnyq
48fe49cf77 BREAKING CHANGES - MAKE FULL BACKUP BEFORE PROCEEDING - Requires Manual Intervention on files see Forum Post Make sure you run the Database update directly after update. This Removes Multi-Company Functionality. Fixes issues with Reponsive tables and bunch of other UI and small Fixes 2023-03-11 16:16:46 -05:00
Marcus Hill
6746edda1a Misc tidying code spacing & formatting in accordance with SonarCloud/PSR 2023-01-01 15:41:21 +00:00
johnny@pittpc.com
67a0c8bfbf Created a tmp directory, added states array to setup add localhost default database host value to setup, added inputmask to setup 2019-08-22 13:24:36 -04:00
johnny@pittpc.com
c2786d42ff even more gitignore fixes 2019-08-05 17:39:19 -04:00
johnny@pittpc.com
3770e8bdc5 more gitignore fixes 2019-08-05 17:34:24 -04:00
johnny@pittpc.com
4f65fcb86f Cleared git cache to honor gitignore 2019-08-05 17:29:49 -04:00
johnny@pittpc.com
8ca2b833e6 Invalid Get var in API redirect back to login Instead of showing error 2019-07-20 16:20:19 -04:00
johnny@pittpc.com
bdcb8e3bb7 Some UI Enhancements, Fixed issue where dashboard was calculating transfers as well as payment as income, fixed missing syntax in cron.php, fixed issue where invoice notes were not showing under guest invoice view, updated the db to comply with mysql strict mode 2019-07-12 17:53:34 -04:00
root
86b0c1c45a Changed upload paths 2019-05-27 13:45:47 -04:00
root
bdbbecfc7b Added Send Email to invoice listings, started adding pregtty graphs to dashboard, and other ui cleanup 2019-05-04 01:06:03 -04:00
root
448267cb32 Marked Invoice status overdue if > due_date and not draft or paid, Added some nice statistic graphics for invoices 2019-04-30 13:28:16 -04:00
root
40e3097125 Added SMTP Port field, Set invoice naming YYYY-MM-DD-COMPANY-Invoice##, and some other little cleanups 2019-04-28 14:38:10 -04:00
root
2e1a9ae7c7 Fixed Calculation in Profit and Loss under total expenses, it was calculating transfers too so added vendor_id > 0 2019-04-27 15:38:58 -04:00
root
3e7df44eed moved email_invoice.php into post.php along with pdf_invoice.php 2019-04-16 14:44:02 -04:00
root
88ee1f2156 Added Option to Email Thank you for your payment! under add payment 2019-04-16 14:11:30 -04:00
root
06b1f55849 Invoices now shows the remaining balance after amount 2019-04-13 22:41:03 -04:00
root
4ba961e533 Bunch of changes including mpdf library for creating pdf of invoices. It now attaches a PDF invoice when marked sent. Don't mark invoice_status sent if it partial or paid, removed green text from balance under clients only use red if the client has a balance and some other cleanups were done 2019-04-13 21:34:25 -04:00
root
a280a56e68 remove an s in add and edit mileage 2019-03-30 11:31:03 -04:00
root
8063c627f8 Implemented user avatar support 2019-03-22 21:38:08 -04:00