johnnyq
6ecc27e7ca
Version ITFlow's scripts and stylesheets so browsers fetch the new copies after an update instead of needing a cache clear: add staticFileUrl() in functions/app.php, which adds ?v= and the file's modification time to the address, and send every script and stylesheet tag through it, libs included, with page-relative addresses changed to start from the site root; add js/tinymce_defaults.js to set TinyMCE's cache_suffix so the plugins, theme and skins it loads itself are versioned too; load ticket collision detection only when a ticket is shown, so a ticket that isn't found no longer throws a script error; add changelog entries and a CONTRIBUTING rule that new tags must use staticFileUrl()
2026-11-09 01:22:35 -05:00
johnnyq
26437daa44
AI stage 4: Billing use case falling back to General; Write it with AI on quotes and invoices whose lines can still change - say what it is for and AI picks lines from the product catalog at catalog prices and frequency, labor in quarter hours at the client's rate, and anything else unpriced for the agent to set (AI never sets a price), with a suggested scope, client note and pre-send checks, optionally using the quote's ticket and the client's people, sites and devices (ticket and documentation only with Support); ticked lines added through billing_ai_lines, taxed by kind, scope and note kept on request, lines that can't go on listed; Write it on the ticket Invoice window describes the work done from replies and notes for the client under the usual ticket line, passwords never sent nor written back; new functions/ai_billing.php, ai_billing_draft and ai_ticket_invoice_description endpoints, billing_ai_writer modal, billing_draft and invoice_description features; callAiApi remove mode also strips made-up secret placeholders; changelog
2026-10-20 21:23:52 -04:00
johnnyq
afaaa5fc32
Taxes stage 1: Admin > Taxes rebuilt (renamed from Tax Rates) listing each rate with its whole percent, parts, description, registration number and usage (invoices, quotes, recurring invoices, products, clients), Current and Archived tabs showing what replaced a rate, Restore, Make default, and Delete only for a rate never used; rates made of parts (state and county, GST and QST) with parts charged on top of the ones above, the whole rate shown as typed, four decimal places and a registration number per rate or part printed with the company details on invoices, quotes and PDFs; changing the percent or parts of a rate on a sent invoice or quote makes a new rate of the same name and archives the old one, so billed lines keep the old rate while products, client rates, the default, recurring invoices and optionally drafts move to the new one, and archiving offers to move whatever still uses it; How lines are taxed settings for the default rate, taxing billed time, trips and expenses, and discounts taken off before tax (on by default, shared across lines by amount, paid, cancelled and answered documents never recalculated); clients get their own tax rate and tax exempt with certificate number and expiry on the Billing tab, new lines defaulting to the client's rate then the product's then the default and to no tax for exempt clients, exempt badge on the client header and overview, a warning with Take the tax off on open documents that still carry taxed lines for an exempt client, and Tax exempt with the certificate under the client on untaxed documents; totals, PDFs, guest and portal views show tax by part; Unbilled Time can bill at each client's usual rate and the ticket, Add Tickets, Add Expenses and Add Trips windows start on it; API client fields for rate and exemption and tax_id default on invoice item create; Tax Collected shows exact percents; demo taxes get parts and registration numbers, demo clients their rates and two nonprofits exemptions; database 3.1.1 makes tax_percent decimal(9,4) and adds tax description, registration and replaced-by, tax_components, client rate and exemption columns and the tax settings; new functions/tax.php and js/tax_form.js; changelog updated
2026-10-17 13:00:54 -04:00
johnnyq
001cd9c658
Products makeover stage 4: price changes reach recurring invoices, drafts and quotes - every change to a product's price or cost kept with its source (edited, imported or from received stock) and who made it, on a Prices tab with the last change on the Pricing card, lines on recurring invoices, draft invoices and draft quotes still at an old price flagged on the product page, the Products page, each document and the dashboard Needs attention with what updating them adds a month, a new Update Prices page by product, client or document that picks lines at an old price, marks prices the product never had as their own and leaves them unpicked with the last change applied as the suggestion, Catalog price and same percent fills, editable new prices and a running monthly total, sent invoices and quotes left alone, changed lines recalculated with their tax and document total and noted in each document's history, saving a new price or importing a price list says how many lines are behind, deleting a product removes its price history, database 2.9.7 with the product_prices table, CHANGELOG updated
2026-10-16 16:35:29 -04:00
johnnyq
775edc53d8
Products makeover stage 1: products and services with cost and margin, the vendor they are bought from with its part number, internal notes and default billing of one time, monthly, quarterly or yearly per user or per device that fills in Billed on quotes and Counted on recurring invoices, a per-product Track stock switch so only tracked items move stock and refuse to be invoiced past the shelf while untracked ones are ordered as needed, rebuilt Products list with what catalog lines bring in each month on recurring, sales over 90 days with the top seller and stock value at cost, tabs for Services, Products, Recurring and Stocked, a vendor filter and part number search, a new product page with price, margin, 12 month sales, monthly recurring, stock with recent moves, recurring invoices, open quotes, invoices and history tabs, inline notes and Copy, one New and Edit window with live margin, rebuilt Add Stock, import by column heading with update by code for price lists, export with cost, margin, billing, vendor, part number and stock, agent-only margin on invoices, quotes and recurring invoices, a Products tab on our vendors' pages, search results opening the product page, billing defaults in the starter catalog and costs and vendors in the demo data. Fixes bulk Restore of archived products doing nothing, deleted products leaving stock behind, Add Stock recording zero units or a missing expense, and a backslash before an apostrophe in agent names in billing history. Adds DB 2.9.4 with product cost, vendor, part number, notes, frequency, seat source and track stock set for products with stock history plus product keys on line and stock tables, functions/products.php with productSave() as the one write path, productUsage() and billingMargin(), agent/product.php, a shared product_form.php, copy_product and product_set_notes handlers, removes product_model.php, and updates the 26.11 changelog
2026-10-16 15:23:05 -04:00
johnnyq
2fcdd6006b
Invoices, quotes and recurring invoices makeover stage 4: quote lines billed one time or each month, quarter or year with a Billed choice on the add-a-line row and in Edit Line, quotes grouped into One-time, Each month, Each quarter and Each year with a total for each on the page, PDF and client view, lines dragged within their own group, Start Billing on accepted quotes putting one-time lines on a draft invoice due on the client's terms and each recurring part on a new recurring invoice from a chosen date, emailed or left as drafts, or added to one of the client's recurring invoices of the same frequency, with an option to bill the first period on the invoice, an Invoiced as card on the quote linking every invoice and recurring invoice it became including ones it added lines to, From links back on invoices and recurring invoices, monthly amounts in the quotes list and its totals, search, client portal, quote email, Send and Copy windows, quotes export and client export, and Quotes Pipeline valuing quotes at up front plus a year of recurring lines. Fixes Make Invoice invoicing a quote twice or one never accepted, and its audit entry using the current quote prefix instead of the quote's own. Adds DB 2.9.3 with item_frequency, quote_monthly_amount, invoice_quote_id and recurring_invoice_quote_id, linking invoices to their quotes from history, quoteConvert() as the one invoicing path claiming the quote in a transaction, quoteLineGroups(), quoteAmountText() and quoteMadeFrom(), reportCsv() totals written as given, and updates the 26.11 changelog
2026-10-16 14:14:53 -04:00
johnnyq
fee0a5cb80
Invoices, quotes and recurring invoices makeover stage 1: one shared document page for all three with inline line editing (product pick, live line totals, drag to reorder, lines locked once paid or answered), shared New/Edit form, late recurring invoices offer to skip to the next date without billing missed runs, Add Payment shows remaining balance and account balances, Batch Payment lists the invoices it will pay, Add Tickets takes several at once, new PDF layout for invoices, quotes and packing slips with pay/answer QR codes and paid/answered stamps, Letter or A4 by country, guest invoice Pay Now with other open invoices, guest quote Accept/Decline then signed copy or PO upload. Line amounts rounded to the cent on save, expired quotes can no longer be accepted from the link, Batch Payment skips non-billable invoices, recurring list creation-date filter removed. Fixes discount reset to zero on invoice/quote edit, stock not moving on invoice item quantity change, invoice status not updating on payment edit, autopay left behind on recurring invoice delete. Consolidates line items, totals, statuses and PDFs into functions/billing.php, includes/billing_paper.php, agent/post/billing.php and functions/billing_pdf.php with a single billing_items_order ajax reorder; removes the three item edit modals, link_invoice_to_ticket, guest_quote_upload_file_modal.php and js/product_autocomplete.js
2026-10-16 12:37:50 -04:00
johnnyq
6ff9dbe9a4
Files and documents everywhere else: asset and contact quick looks list their documents and files with the same tiles and rows as the document page, files opening their quick look instead of a raw download; client overview share links show document and file tiles and open the document page or file quick look; service quick look shows linked documents as tiles and leaves out archived ones, service add and edit document pickers carry an icon and summary; global search shows file and document type tiles in the palette and on the results page, and a file result opens its folder narrowed to that file; quote attachments show their tile and size, open the file quick look and download through file.php instead of linking straight into the uploads folder; ticket attachments show their file type tile; client portal documents list shows the document tile, folder and summary with the last updated date; removed unused modals/asset/asset_documents.php
2026-10-14 20:47:30 -04:00
johnnyq
9bfd26d57b
Add titles to icon-only buttons
...
- title on 294 icon-only buttons, named for what each one does
- aria-label on the 7 show-password buttons (title becomes the popover
header) and the portal mobile nav toggle
- Fix dead add-category button on products filter, credential bulk tag
button now preselects Credential, drop duplicate inner-icon titles
2026-10-08 17:12:21 -04:00
johnnyq
e7015d1595
Fix undefined item name when selecting from product list in quote or recurring invoice
2026-09-03 18:35:46 -04:00
johnnyq
156c51224d
Fix client portal review findings: PIN wipe, log indexing, statement currency (db 2.7.8)
...
Setting a PIN containing < or > silently cleared it: the length check ran before escapeSql(), whose strip_tags() then emptied the value, and the UPDATE stored the blank while flashing success. Length is now checked after sanitising.
Password and PIN changes require the current password. SSO contacts are exempt - no local password to check, and the IdP already did it.
New index on logs(log_user_id, log_client_id) for the portal profile and activity pages, which were scanning the whole table twice per profile view. admin/audit_logs.php's date filter rewritten as a half-open range so KEY log_created_at is usable - DATE(log_created_at) BETWEEN made it non-sargable.
Portal statement page and PDF now render in the client's currency, matching the guest view and the emailed statement.
Quick Send asks for confirmation; confirm-link extended to submit buttons.
Portal audit entries logged an empty name - client/post.php used , which only exists agent-side.
2026-08-28 16:38:42 -04:00
johnnyq
86ba041cdc
Add Quick Send Quote / Invoice to replicate the old single click to Send Email
2026-08-28 14:40:25 -04:00
johnnyq
68b15ca49b
Email Invoice Only shows Billing and Primary, Quote shows Important Billing, Primary and Technical contacts that can be selected
2026-08-28 13:43:51 -04:00
johnnyq
72e6f23e19
Send Email and Mark Sent modals for invoices and quotes (db 2.7.7)
...
Send Email opens a contact picker instead of hardcoding the primary contact; Mark Sent asks how it went out and takes a note. Both log recipients / method / note to the document history. Handlers moved GET -> POST.
Fixes two pre-existing bugs in the email path: archived contacts were still receiving billing copies, and every copy was addressed to the primary contact by name.
2026-08-28 13:31:22 -04:00
johnnyq
bdab434707
Fix Margins in various areas
2026-08-15 13:34:38 -04:00
johnnyq
2375e69f2d
Update badge classes to bg
2026-08-15 13:00:41 -04:00
johnnyq
8c0e5246b4
Fix Card Margin bottoms client header and ticket cards on the right
2026-08-14 19:08:15 -04:00
johnnyq
bbbfff7413
All Jquery removed replaced with stand JS and non jqery dependent libs
2026-08-14 17:28:06 -04:00
johnnyq
dc6b191eed
Update Font, Migrated away from JQUERY dependent libs: toastr to bootstrap5 toasts, daterangepicker to flatpickr, select2 to Tom Select, InputMask to IMask
2026-08-14 17:08:40 -04:00
johnnyq
a084e37c39
Initial migration from AdminLTE 3 to 4, bootstrap 4 to 5
2026-08-14 13:22:11 -04:00
johnnyq
b3744e9ed5
More sweeps to replace select * with actual returned column names dramatically reduces php memory usage and speeds up processing dramatically especially in the crons since they run all the time
2026-08-06 13:10:23 -04:00
johnnyq
b8c9d5b4cf
Query Optimization: Select only needed columns instead of SELECT * on looped queries
2026-08-06 12:59:43 -04:00
johnnyq
ddd9c2b56a
clientScopeSql sweep whicn now removed the extra unessesary client joins
2026-08-06 11:45:56 -04:00
johnnyq
7a44cdd438
Fix Autofill products in invoice, quotes, recurring invoice, tax field wasnt updating and a dash was being put in front
2026-08-03 13:28:41 -04:00
johnnyq
89fba247c5
Add some missing maxlength form options to prevent info overflow and result in error 500
2026-08-02 16:08:01 -04:00
johnnyq
b3f959ac55
Use Short echo tags across the code
2026-07-28 18:47:52 -04:00
johnnyq
41b118ab87
Add formatAddress function and replace all addresses with it
2026-07-23 18:10:39 -04:00
johnnyq
7bc47a58fe
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
2026-07-14 17:10:45 -04:00
johnnyq
8da3a107fb
Rename plugins to libs and update all file references
2026-07-10 13:24:20 -04:00
johnnyq
de6d2b1595
OAUTH Send Quote Fix: was reading smtp host var needed to read smtp provider as smtp host is not filled in when OAUTH2 is selected
2026-07-07 16:20:21 -04:00
johnnyq
a819dff19a
Mail: Update mail configuration check to use smtp_provider instead of smtp_host as host is blank upon using oath2
2026-06-24 12:47:41 -04:00
johnnyq
6122efc870
Updated all Queries related to invoice items to reflect their new tables quote, invoice, recurring invoice items
2026-03-07 19:35:44 -05:00
johnnyq
6d2cb0aea3
Split out item edits into seperate posts and modals for editing invoice, quote and recurring invoice items
2026-03-07 12:12:27 -05:00
johnnyq
a81edc122d
Add CSRF Checks on Agent ajax endpoints that would update / delete or add something to the db
2026-03-05 17:12:44 -05:00
johnnyq
2c47001b19
Quote: Add missing CSRF checks and missing permission on export quote pdf
2026-03-01 22:02:43 -05:00
johnnyq
0a30300bde
replace all instances of mysqli_fetch_array with mysqli_fetch_assoc for better performance and memory usage
2026-01-14 17:30:23 -05:00
johnnyq
faa94d888d
Convert Quote to Invoice to use ajax-modal
2025-11-28 14:44:47 -05:00
johnnyq
c851e54e1d
Fix Decimal not showing on the iphone for specific fields associated to price cost percentage etc
2025-11-26 13:54:24 -05:00
johnnyq
cea7d61481
Updated Bread crumbs in ticket, quote invoice to show All as the first breadcrumb
2025-11-03 15:43:56 -05:00
johnnyq
edabc5c33f
rename /user/ to /agent/ and update links to use agent/ instead
2025-09-23 18:04:23 -04:00