johnnyq
1e5bffff3c
Rates, net terms and SLAs come from the client's contract, else the instance defaults: database 3.5.0 adds a default after-hours rate (Settings > Defaults, now Rates and terms), gives each client whose own rate, net terms or SLAs differ from the defaults an active Standard terms contract setting just those (12-month term renewing itself, starting the day the client was added or the day before its earliest contract, archived with an archived client), deletes per-client SLA assignments and drops clients.client_rate and client_net_terms; time bills at the contract's rate, its after-hours rate or the default after-hours rate, else the default rate, new invoices are due on the contract's net terms else the default, and new tickets get the contract's SLA else the default; a client's own terms still apply until the update runs; the client add and edit windows lose the rate, terms and SLA fields for a note saying what the client is billed on and where it comes from, the Clients list loses Set Hourly Rate and Set Net Terms and shows the contract's rate, the overview's Terms shows the after-hours rate and whether terms are a contract's or the defaults, a contract's page and document show what it leaves empty from another contract in force or the default so signed documents stay unchanged, contract windows show the defaults as placeholders, contract names take a proper possessive; the client import and API create make a Standard terms contract for a rate or terms that aren't the defaults (returning contract_id), API update reports them in not_kept; the client export gives the rates, terms and SLAs as billed; demo data puts each demo client's terms on a contract; changelog updated
2026-10-27 22:22:34 -04:00
johnnyq
77df925981
Contracts stage 4: a contract in force sets the client's SLA for new tickets, the hourly rate with an after-hours rate for tickets opened outside business hours, and net terms for new invoices, the one that started last first and the client's own where it is empty; Unbilled Time bills each ticket at its own rate with one line per rate, and the ticket invoice window, Add Tickets, quote from a ticket, Unbilled Work and Time Detail reports, New Invoice, copy, quote to invoice, the invoice page, client overview and client edit follow it; a recurring invoice made from or linked to a contract is paused while it is a draft, started when it is made active or renewed with missed runs skipped, and paused once when it ends or its cancellation takes effect; new functions/contract_billing.php; fixes agent names double-escaped in the prepaid hours history; DB 3.4.5 adds contract_recurring_invoice_id and contract_recurring_stopped_at and treats a 0.00 contract rate as empty
2026-10-25 01:06:59 -04: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
be002b6f29
Roles stage 4: the money on invoices goes by Financial with Sales at Read through billingMoneyCan and enforceBillingMoney, so taking payments one at a time, by saved card or as a batch, changing them and emailing receipts, reminders and statements need write access to Financial, and deleting or refunding a payment needs full access, with the old Sales rules for reminders, statements and receipts still accepted; invoice, invoice list, Income and payment quick looks offer only what the role can do, the reminder window offers only the reminder to a role that cannot send the invoice, a reminder for a draft or with nothing owed still needs Sales, and Income bulk Set Category on payments needs Sales as it changes the invoice; database 3.1.8 gives the built-in Accountant full access to Financial when it still has its shipped levels, and new installs seed it that way; calendar events for a client follow the role's Clients level through calendarEventCan, Read to see, Modify to add, change, move, skip or send, Full to delete or Modify for the agent who added it, events an agent is on always show, events with no client stay open to everyone, and the calendar, dashboard and calendar links leave out other agents' client events for roles without Clients, with New event, the client picker and dragging following the same rule; the API now sets PHP and MySQL to ITFlow's timezone so what it creates, API ticket SLA times and key expiry go by local time, and inc_set_timezone.php only writes the session when one is open and no longer leaves its result and row variables behind; changelog updated
2026-10-17 21:52:10 -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
a2a0823163
Trips stage 2: mileage money - Trips and Mileage in Admin > Settings > Invoice with miles or kilometers, the rate an agent is paid back for their own vehicle and the expense category it goes under, and what a trip bills a client as a trip charge, a rate a mile beyond the distance the charge covers and the invoice line name; the trip form has In their own vehicle starting as the driver's latest trip and Bill the client starting as the ticket is billable, each showing what it pays back or bills; the list gets To pay back and To bill pills, an owed card (Owed to you for agents without financial access), who is owed what and marks on each row; Pay Mileage pays one driver for the ticked trips at the usual or a past rate as a mileage expense per client paid personally by them under the mileage category to a Mileage vendor made on first use, paid back there and then from an account or later with Reimburse; Unbilled Time has Travel to bill beside the expenses at an editable price going on the client's invoice with their tickets and expenses, billing every client includes trips and Not billable writes them off; the invoice gets a Travel card with Add Trips and Take off Invoice, and deleting the line or invoice makes a trip to bill again; paid back and billed trips keep their distance, driver, vehicle, client and billable and can't be deleted, and deleting the mileage expense puts its trips back to pay; bulk Set Vehicle, Set Billable and Pay Mileage; the trip quick look shows what it pays back and bills and the mileage expense lists its trips; dashboard Trips to bill and Mileage to pay back, client overview Trips to bill and the Unbilled Time count include trips; export Vehicle, Paid Back and Billing columns; the Mileage report and dashboard chart follow the unit and the report rate starts at the mileage rate; demo data with recent trips in own vehicles and billable when trips bill; database 3.0.4 with trip_own_vehicle, trip_expense_id, trip_billable, trip_invoice_id, trip_invoice_item_id and the mileage and trip billing settings; CHANGELOG updated
2026-10-16 20:35:51 -04:00
johnnyq
8d5e5091ad
Expenses stage 3: billable expenses and pass-through costs - mark an expense for a client billable with a markup (default in Admin > Settings > Invoice), expenses to bill sit beside the time in Unbilled Time and go on a new or draft invoice with the tickets as a line each at a price that can be changed, the invoice gets an Expenses card with cost against billed and the margin plus an Add Expenses window, taking one off or deleting its line or invoice makes it to bill again (paid invoices keep it, cancelled ones keep the line), the quick look and list link billed expenses to their invoice with To bill and Billed pills and Bulk Set Billable, recurring expenses can be billed on each time or covered by one of the client's recurring invoices with a Costs card showing the monthly margin, expenses to bill counted in the menu, dashboard and client overview, export Billing and Billed On columns, demo data with recent client expenses to bill, database 3.0.1
2026-10-16 18:36:43 -04:00
johnnyq
87c441b3b9
Billing stage 5: payment reminders on a schedule set in Invoice Settings (days before, on and after the due date, then every N days until paid, with a client opt-out on the Billing tab and no reminder for autopay invoices until late), Send Reminder and next-reminder status on the invoice page, a message and PDF attachment in the invoice, quote and statement Send windows, a statement PDF with aging and an optional monthly statement run, a new look for invoice, quote, reminder, receipt, statement and team notice emails sent to primary and billing contacts, late fee added as a proper invoice line, fixes for the quote answered notice link and batch payment receipts, database 2.9.8 and changelog
2026-10-16 17:12:10 -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
e2431748fa
Products makeover stage 3: sold hardware becomes client assets - products take an asset type, make, model and warranty in months, invoices with hardware get a Hardware card showing how many units are on the client's assets with their serials, an Add to Assets window with a row per unit for name, serial and assigned contact (Enter between serials for barcode scanning), make, model and warranty from the product counted from the invoice date, status and location for all, linking an asset the client already has or leaving rows for later, assets made this way are bought on the invoice date with its number as the order reference and link back to the invoice and product, a Client asset card and Assets tab on the product page, a Hardware tab and asset type on the products list, a dashboard Needs attention item for hardware sold in the last 90 days not yet on assets linking to a new invoices hardware filter, serials on the packing slip, asset type, make, model and warranty in product import and export, starter and demo hardware seeded with asset types, deleting a line or invoice unlinks its assets without removing them, database 2.9.6 with product asset columns and asset product, invoice and line links, CHANGELOG updated
2026-10-16 16:13:36 -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
1a51fc8dd6
Invoices, quotes and recurring invoices makeover stage 3: Unbilled Time page under Billing and in each client's menu with a count, listing every client's billable resolved or closed tickets not yet invoiced with time logged, hours to bill, rate, amount and oldest waiting, invoicing many clients at once onto a new draft each or each one's newest draft, and per client reviewing each ticket's hours before billing onto a new or existing draft with a line per ticket or one for all, live totals, and Not billable to write tickets off, Billing Time settings under Admin Settings Invoice for rounding to 6, 12, 15 or 30 minutes or the hour, nearest or always up, a per-ticket minimum and the line name, defaulting to the nearest 15 minutes, rebuilt ticket Invoice window showing time by agent, hours to bill and the client or default rate with add-to-draft and an open ticket warning, Add Tickets on an invoice now adds lines for the tickets' time with an option to attach without lines, client overview, dashboard and Unbilled Work report linking to it and counting unbilled time the same way, ticket billing written to ticket history instead of an internal note, invoices from tickets and copies due on the client's terms including On Receipt. Fixes ticket invoice line placed near the top of existing invoices, a ticket billable twice from two windows, no rate when the client had none set, and no hours filled in for tickets with 100 hours or more. Adds DB 2.9.2, billingTimeInvoice() as the one billing path with ticket claiming, billingUnbilledSql() and related helpers, unbilled_invoice, unbilled_invoice_clients and unbilled_write_off handlers, js/unbilled_time.js, and updates the 26.11 changelog
2026-10-16 13:42:06 -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
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
Wrongecho
cb262139ae
Invoicing - bug: fix not being able to add tickets to invoice; feature: add ability to remove tickets from invoice
2026-09-11 11:56:40 +00: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
Wrongecho
16b46c1f1a
Stripe Invoice Payments
...
- Add ability to refund Stripe payments rather than just deleting & manually refunding
- Limit refunding / deleting payments to Full/3 Sales&Financial permissions, as this is a delete rather than modify action
2026-08-30 22:54:01 +01: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
858acbcd30
Bump AdminLTE which brings back AdminLTE colors
2026-08-18 12:24:31 -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
108781db5b
Move more select * to column select for further optimization
2026-08-06 13:44:02 -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
1494d2cb5e
Backed out of Refunds which still keeps the fix to properly set the invoice status when payment is deleted
2026-07-28 22:03:35 -04:00
johnnyq
31921ee99b
Add Refunding capability along with Stripe Refunding
2026-07-28 21:34:06 -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
47a5825d3e
OAUTH Send Invoice 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 15:04:48 -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
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
4440581f14
Invoice: Add missing CSRF checks and missing permissions
2026-03-01 22:22:21 -05:00
wrongecho
5a274061f3
Invoice - add a basic picking/packaging slip
2026-01-15 13:58:53 +00: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
7737dbc65d
Migrate Invoice to Recurring Invoice to an ajax modal
2025-11-28 15:15:01 -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