diff --git a/CHANGELOG.md b/CHANGELOG.md index 76a910ef8..a6e247bad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -501,7 +501,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - Request forms in the client portal: a template can be offered there, under a title, a line about it and an icon of its own - "Onboard a new employee" - to everyone with portal access or the primary and technical contacts only, at every client or the ones you pick. The client answers its fill-ins (a fill-in can be kept for agents to answer instead), adds anything else and any files, and the ticket is raised set up as the template says: category, priority, billing, the agent it goes to (who is told), due time, tags and the tasks for those answers. With [Asset] in the template, the form asks which device. The template's page shows how it appears, who and where it is offered and how many requests it has brought in, and the list marks the ones in the portal. A copy of one starts off not offered. - Export and import: Admin > Ticket Templates exports every current template, the ones picked, or one from its page, as a file to import into another ITFlow or keep. Each goes with its tasks, fill-ins, request form, category and tags - not the agent it goes to or the clients its request form is for. Importing matches categories and tags by name and makes the ones missing, and one already here by name is left as it is, added as well under a name of its own, or replaced - keeping its tickets, its agent and its request form's switch and clients. A request form comes in turned off. - The MSP starter templates in Starter Content are rebuilt on all of this: each asks what it needs (New Hire Onboarding asks the start date, job title, manager, whose access to copy and whether they need a computer or a phone extension), is set up with its category, priority, tags and due time, adds the tasks for the answers given, and the ones clients raise come with a request form - Onboard a new employee, Someone is leaving, Ask for a new computer and Report a suspicious email. Two new ones, Software Request and Access Change Request, have request forms too. An install that added the starter templates before can bring them up to date with Update - their tickets, agent and request form switch stay. - - A ticket keeps which template it came from, and its history says so. Admin > Ticket Templates shows what each sets up, its tasks and their time, how many tickets it has raised and the recurring tickets and project templates that raise it. A template's page shows the ticket it starts with its placeholders marked, its tasks (added with their time, dragged into order) and its latest tickets, and New ticket from it opens New Ticket with it filled in. + - A ticket keeps which template it came from, and its history says so. Admin > Ticket Templates shows what each sets up, its tasks and their time, how many tickets it has raised and when it was last used, and the recurring tickets and project templates that raise it - searched, sorted by name, tasks, use or last use from the column headings, a page at a time, with Active and Archived tabs. A template's page shows the ticket it starts with its placeholders marked, its tasks (added with their time, dragged into order) and its latest tickets, and New ticket from it opens New Ticket with it filled in. - Templates can be copied, archived - not offered for new tickets, while the recurring tickets and project templates that use them keep them - restored and deleted. - **Assets** - The asset list has: @@ -776,7 +776,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - View as contact: on a contact's page, View portal as them opens the portal in a new tab as they see it, read only - nothing can be sent, paid or changed, opening an invoice doesn't mark it viewed, and a strip along the top says whose view it is, with Exit. It needs read access to clients and support and to the client; billing shows only when your role reads sales and financial too. Each one is in the audit log. - The agent's contact page shows whether a contact signs in with a code too, when they last signed in, and the ticket emails they chose. - **Taxes** (rebuilt) - - Admin > Taxes lists each rate with what it comes to, its parts, its registration number and what uses it: the invoices, quotes and recurring invoices with a line at it, and the products and clients that pick it. Current and Archived tabs, with what replaced a rate and when, Restore, Make default, and Delete for a rate nothing has used. + - Admin > Taxes lists each rate with what it comes to, its parts, its registration number and what uses it: the invoices, quotes and recurring invoices with a line at it, and the products and clients that pick it. Active and Archived tabs, with what replaced a rate and when, Restore, Make default, and Delete for a rate nothing has used. Sort by name, rate or use from the column headings. - A rate can be made of parts, such as a state's 6% and a county's 1%, or GST and QST. A part can be charged on top of the parts above it. The whole rate shows as you type. Invoices, quotes, their PDFs and the client's views show each part on its own line in the totals, such as Pennsylvania 6% and Allegheny County 1%. - Rates go to four decimal places, such as Quebec's 9.975%, and lines and the Tax Collected report show the exact rate. - Each rate takes a description and a registration number, and each part can have its own number. The numbers a document charges under print with your company's details on the invoice or quote and its PDF, such as GST No. 123456789 RT0001. @@ -799,7 +799,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - Demo data: both taxes have a registration number, Allegheny County Sales Tax is made of the state's 6% - named PA Sales Tax, so Tax Collected adds the two up together - and the county's 1%, each client has its rate, the church and the charter school are tax exempt, one with a certificate that has run out, and what the company buys for its own use pays sales tax. - **Tags** (rebuilt) - Admin > Tags lists each kind's tags - clients, locations, contacts, credentials, assets, vendors, domains, licenses, services, networks, documents and tickets, down the side with how many each has. Each tag shows as it looks on a record, with its description, how many records have it (and how many of those are archived), opening that list filtered by it, and the recurring invoice lines that count users or devices by it. - - Search by name or description, sort by name or by most used, and Current and Archived tabs. + - Search by name or description, sort by name or by how many records have each from the column headings, a page at a time, and Active and Archived tabs. - Each tag has Edit, Merge into..., a link to its records, Archive or Restore, and Delete, which asks first and says how many records lose the tag. Tick several for Merge into one, Archive or Restore, and Delete. - The tag window shows the tag as it will look while you change it: - its name, and what it is for, which can be changed while nothing has the tag yet @@ -819,9 +819,9 @@ If you are coming from 26.08 or earlier, the database update still has to be run - API: read the tags, one record's tags or the records with a tag, set a record's tags or add and take some off, and make a tag (admin keys only). Every record read now includes its tags. - Starter Content: the Tags pack has tags for licenses, services, networks, documents and tickets - We Resell, Managed, PCI, Runbook, Escalated and so on. Demo data tags its licenses, services, documents and tickets with them. - **Categories** (rebuilt) - - Admin > Categories lists each kind - expense, income, referral, ticket, network interface, asset status, software type, rack type, and contact and asset note types - down the side with how many each has, and says under the heading what the kind is for. + - Admin > Categories lists each kind - expense, income, referral, ticket, network interface, asset status, software type, rack type, and contact and asset note types - down the side with how many each has, and what each kind is for when you point at it. - Each category shows as it looks on records - its icon, or a dot, in its color, and an asset status as its badge - with its description and what uses it, such as "42 expenses · 3 recurring expenses · 24 budget months" (and how many of those are archived). Each opens its list filtered by the category where there is one: expenses, recurring expenses, invoices, other income, products, tickets, recurring tickets, and clients by referral. - - Search by name or description, sort by name or by most used, and Current and Archived tabs. The kinds offered in an order of their own - interface types, asset statuses, software types, rack types and note types - list in that order first, and are dragged into it, or moved with Move up and Move down. + - Search by name or description, sort by name or by what uses each most from the column headings, a page at a time, and Active and Archived tabs. The kinds offered in an order of their own - interface types, asset statuses, software types, rack types and note types - list in that order first (in order, next to the column heading, puts them back in it), and are dragged into it, or moved with Move up and Move down - on any page, the first of a page moving up past the last of the one before. - Each category has Edit, Merge into..., Archive or Restore, and Delete while nothing uses it - otherwise Delete is greyed out and says what uses it. Tick several for Merge into one, Archive or Restore, and Delete, which keeps the ones in use and says which. - The category window shows it as it will look while you change it: - its name and a description, shown when you point at it @@ -842,7 +842,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - Admin > Categories links what uses a category to these lists filtered by it too: quotes, recurring invoices, assets, licenses and racks. - API: read the categories - every kind the key can see, one kind, one by id or by name, archived ones too - with how many records have each. - **Roles** (rebuilt) - - Admin > Roles shows what each role opens at a glance - its level of each part of ITFlow in that level's color, or Admin - everything - and its agents, opening Users filtered to them. Search, and Current and Archived tabs. + - Admin > Roles shows what each role opens at a glance - its level of each part of ITFlow in that level's color, or Admin - everything - and its agents, opening Users filtered to them. Search, sort by name, agents or when it was last changed, and Active and Archived tabs. - New, Edit and Copy are one window. Admin is a switch; otherwise each part of ITFlow - Clients, Support, Credentials, Sales, Financial and Reports - gets None, Read, Modify or Full, with a line for each level saying what it lets them do, ticked as you pick. Reports only has None and Read, all it uses. A change reaches the role's agents from the next page they open. - Copy starts a new role from another's levels. - Archive a role nobody has to stop it being given out, and Restore it. Delete one no agent has, archived ones included. Archive and Delete are greyed out with the reason when they can't be used. @@ -859,7 +859,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - Accounting is the Accountant's job: with Financial and Sales at Read, a role can take payments - one, a saved card or a batch - change them and email receipts, reminders and statements, and with full access to Financial delete and refund them (see Breaking Changes, Roles). The invoice, the invoice list, Income and the payment quick looks offer what the role can do, and the reminder window offers only the reminder to a role that can't send the invoice itself. The built-in Accountant role now has full access to Financial. - Calendar events follow the role, through the client they are for (see Breaking Changes, Roles). A role that can't add to a client's calendar isn't offered New event there, or a client in the event window, which says why, and its events can't be dragged. - **API Keys** (rebuilt) - - Admin > API Keys shows, for each key, the agent it acts as and their role, what it can open and for which clients, whether it works and when it was last used. Whether it works reads Works until a day, Expires in so many days in its last two weeks, Expired, or Won't work with why: its agent is disabled, archived or has no role, or it acts as nobody. Search finds keys by their name or their agent's. + - Admin > API Keys shows, for each key, the agent it acts as and their role, what it can open and for which clients, whether it works and when it was last used. Whether it works reads Works until a day, Expires in so many days in its last two weeks, Expired, or Won't work with why: its agent is disabled, archived or has no role, or it acts as nobody. Search finds keys by their name or their agent's, and they sort by name, end date, agent or last use. Active and Expired tabs - a revoked key moves to Expired, where it can be deleted. - The New API Key and Edit windows show what the picked agent can open as you pick them, and offer only active agents. A new key lasts a year unless you change it, and its last day has to be after today. An expired key can be renamed and stays expired; a later day brings it back. - Create on the Details tab before ticking that the key and password were copied opens the Key tab, rather than doing nothing. - Revoke ends a key today. Delete is for expired keys, as before, one at a time or several from the bulk menu. @@ -1351,7 +1351,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - The new `functions/tax.php` (loaded after `billing_pay.php`): `taxSettings()`, `taxRow($tax_id)` (cached, with `components` - name, percent, compound, registration - and `grouped`) and `taxForget()`, `taxPercentText()`, `taxLabel()`, `taxEffectivePercent($components)`, `taxAmounts($base, $tax)` (`tax` and `parts` - label, name, percent, amount, registration, registration_for - each part to the cent), `taxCurrent($tax_id)` (follows `tax_replaced_by` to a current rate, else 0), `taxClient($client_id)`, `taxClientSetSql($in, $current)`, `taxExemptText($client, $with_expiry)`, `taxDocWarning($type, $doc_id, $client_id, $items, $open, $can_edit)`, `taxDefaultFor($client_id, $kind, $product_tax_id)` (`goods`, `time`, `trip`, `expense`, `product`), `TAX_USUAL` (-1) and `taxChoice($input, $client_id, $kind)`, `taxUsage()`, `taxUsageAll()`, `taxBilled($tax_id)` (on an invoice or quote past draft), `taxFromInput($in)`, `taxSameRate()`, `taxCreate()`, `taxUpdate($tax_id, $fields, $move_drafts)`, `taxChangeRate()`, `taxRepoint($from, $to, $move_drafts)`, `taxDocIds($type, $tax_id)`, `taxRecalcOpen()`, `taxArchive($tax_id, $move_to)`, `taxRestore()`, `taxUnused()`, `taxDelete()`, `taxSetDefault()`, `taxMovedText()`, `taxOptionsHtml($taxes, $selected, $usual_label, $usual_percent)` and `taxSelectOptions()`. - `functions/billing.php`: `billingLineTax($quantity, $price, $tax_id, $base)`, `billingLinesOpen($type, $status)`, `billingDiscountShares($items, $discount)` (by subtotal, to the cent, largest remainder), `billingRecalcTaxes($type, $doc_id, $discount)`, `billingTaxParts($items)`, `billingRemoveTax($type, $doc_id)` and `billingTaxRegistrationLines($totals)`. `billingRecalc()` works each line's tax out again while its lines can change - on a quote, the discount comes off the one-time group, else the first recurring one. `billingTotals()` `taxes` are by part, with `tax_registrations` added, and `quoteLineGroups()` the same per group. `billingBillTo()` adds `tax_exempt_text`. `recurringInvoiceRefresh()` updates quantities and subtotals and leaves the tax to `billingRecalc()`. `billingItemSave()` checks the rate exists. `billingTimeInvoice()`, `expenseBillInvoice()` and `tripBillInvoice()` take `TAX_USUAL`. - `getProductsForAutocomplete($mysqli, $client_id)` gives each product's `tax` and `tax_percent` for that client. The line windows, the add-a-line row, Unbilled Time and the ticket Invoice and Quote windows build their tax select with `taxOptionsHtml()`. - - Admin: `admin/tax_rates.php` is rebuilt, with `admin/modals/tax/tax_form.php` shared by `tax_add.php` and `tax_edit.php`, the new `tax_archive.php`, and `js/tax_form.js`. `admin/post/tax.php`: `add_tax` (`name`, `description`, `registration`, `percent`, or `part_name[key]`, `part_percent[key]`, `part_compound[key]` and `part_registration[key]`; `make_default`), `edit_tax` (`tax_id`, `drafts_asked`, `move_drafts`), `archive_tax` (now POST, `tax_id`, `move_to`), GET `restore_tax`, `default_tax` and `delete_tax`, and `edit_tax_settings` (`default_tax_id`, `tax_time`, `tax_trips`, `tax_expenses`, `tax_discount_before`). + - Admin: `admin/tax_rates.php` is rebuilt (`q`, `sort` - `tax_name`, `tax_percent` or `invoice_count` - `order`, `page` and `show=archived`, `archived=1` still taken), with `admin/modals/tax/tax_form.php` shared by `tax_add.php` and `tax_edit.php`, the new `tax_archive.php`, and `js/tax_form.js`. `admin/post/tax.php`: `add_tax` (`name`, `description`, `registration`, `percent`, or `part_name[key]`, `part_percent[key]`, `part_compound[key]` and `part_registration[key]`; `make_default`), `edit_tax` (`tax_id`, `drafts_asked`, `move_drafts`), `archive_tax` (now POST, `tax_id`, `move_to`), GET `restore_tax`, `default_tax` and `delete_tax`, and `edit_tax_settings` (`default_tax_id`, `tax_time`, `tax_trips`, `tax_expenses`, `tax_discount_before`). - Clients: `agent/modals/client/client_tax_fields.php` on the Billing tab of `client_add.php` and `client_edit.php` posts `tax_fields`, `default_tax_id`, `tax_exempt`, `tax_exempt_number` and `tax_exempt_expires`, saved by `agent/post/client.php` through `taxClientSetSql()`. `api/v1/clients/client_model.php` does the same from the API fields. GET `billing_remove_tax` (the document's id, `type`) in `agent/post/billing.php`, at Sales 2. - `api/v1/invoice_items/create.php` takes `tax_id` `default` (a product's line by `taxDefaultFor()` with `product`) and works the invoice out again with `billingRecalc()`. - Seeds: `demoDataTaxes()` rows add a description, registration number and parts, demo clients get `client_default_tax_id`, and a profile's `tax_exempt` (number, expiry) makes it exempt. `demoDataRemove()` counts clients using a rate and removes its parts. @@ -1370,7 +1370,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - `tagSetForRecord()` is the one save for a record form's `tags[]`: numeric values are tag ids, anything else (from an admin) a typed name, matched case-insensitively or made with `tagNextColor()`. Only that kind's tags are kept, each once, and an archived tag only on a record that already had it. `agent/post/client.php`, `contact.php` and `asset.php` call it, and `locationSetTags()`, `credentialSetTags()`, `vendorSetTags()` and `domainSetTags()` now wrap it. - The record forms' Tags fields are `` with `data-tags="true"` for admins, and their links to `admin/modals/tag/tag_add.php` are gone. The list pages' tag filters and the seven export windows leave out archived tags that aren't chosen. - `tagPills()` and `tagPill()` set `--itflow-tag-text` beside `--itflow-tag-color`, and a pill's title leads with the description. `agent/ajax.php`: `tag_picker` returns each tag's `description` (with "Archived"), `tag_picker_set` refuses putting an archived tag on (409), and `tag_picker_create` matches case-insensitively and restores an archived match. `js/tag_picker.js` shows and searches the description. - - Admin: `admin/tags.php` is rebuilt (`type`, `q`, `sort=use`, `archived`), with `admin/modals/tag/tag_form.php` shared by `tag_add.php` (`type`) and `tag_edit.php` (`id`), the new `tag_merge.php` (`tag_ids[]`), and `js/tag_form.js`. `admin/post/tag.php`: `add_tag` and `edit_tag` (`tag_id`, `name`, `type`, `description`, `color`, `icon`), GET `archive_tag`, `restore_tag` and `delete_tag`, POST `merge_tags` (`tag_ids[]`, `into_tag_id`), and `bulk_archive_tags`, `bulk_restore_tags` and `bulk_delete_tags` (`tag_ids[]`). Audit entries are Tag Create, Edit, Archive, Restore, Delete and Merge, naming the kind. + - Admin: `admin/tags.php` is rebuilt (`type`, `q`, `sort` - `tag_name` or `used` - `order`, `page` and `show=archived`, `archived=1` still taken; sorted and paged in PHP), with `admin/modals/tag/tag_form.php` shared by `tag_add.php` (`type`) and `tag_edit.php` (`id`), the new `tag_merge.php` (`tag_ids[]`), and `js/tag_form.js`. `admin/post/tag.php`: `add_tag` and `edit_tag` (`tag_id`, `name`, `type`, `description`, `color`, `icon`), GET `archive_tag`, `restore_tag` and `delete_tag`, POST `merge_tags` (`tag_ids[]`, `into_tag_id`), and `bulk_archive_tags`, `bulk_restore_tags` and `bulk_delete_tags` (`tag_ids[]`). Audit entries are Tag Create, Edit, Archive, Restore, Delete and Merge, naming the kind. - Removed: `agent/post/tag.php` and `agent/post/tag_model.php` (an older copy of `add_tag` for the window opened from agent pages), and `admin/post/tag_model.php`. - `agent/modals/billing/billing_item.php` adds a seat line's own tag to its choices when `recurringSeatOptions()` leaves it out. - CSS: `.itflow-tag` takes its text color from `--itflow-tag-text`; new `.itflow-tag-swatch`, `.itflow-tag-icons`, `.itflow-tag-icon` and `.itflow-tag-icon-custom`. @@ -1386,7 +1386,7 @@ If you are coming from 26.08 or earlier, the database update still has to be run - Categories (database 3.1.5): - The migration writes every `category_color` as `#rrggbb` - short hex grows, an eight-digit one loses its alpha, the 148 CSS color words become their own hex, anything else NULL - and every `category_icon` as `fa-` and the name (`fas fa-`, markup and anything but `a-z0-9-` taken off, NULL when empty), leaving `category_updated_at` alone. No column changes; `setup/seed_data.php` writes hex colors. - New `functions/categories.php`, loaded by `functions.php`: `categoryKinds()` - each `category_type` with `label`, `one`, `many`, `icon`, `about`, `by` (`id` or `name`), `ordered`, `max` (name length), and `uses` (`table`, `column`, `one`, `many`, `url` with `{id}` or `{name}`, `archived` and `updated` columns, and `text` for an id kept as text, `tickets.ticket_category` and `recurring_tickets.recurring_ticket_category`). Also `categoryKind()` (adds `kind`), `categoryKindPhrase()`, `categoryUseText()`, `CATEGORY_COLORS`, `CATEGORY_ICONS`, `categoryColor()` (`#rrggbb` or `''`), `categoryIcon()` (the bare name or `''`), `categoryNextColor()`, `categoryChip($row)`, `categoryRow()`, `categoryRows($kind)` (in picker order), `categoryNameKey()`, `categoryUsage($kind)` (id => `all`, `archived`, `uses`), `categoryLooseNames($kind)`, `categoryUsageFor()`, `categoryUsageHtml()`, `categoryUsageText()`, `categoryFromInput($in, $existing)` (`[$fields, $error]`: `type`, `name`, `description`, `color`, `icon`), `categorySetSql()`, `categoryCreate()` (last in the order), `categoryUpdate($row, $fields)` (renames a by-name kind on its records; returns how many), `categoryMoveRecords($config, $where_sql, $to_sql)` (keeps each record's `*_updated_at`), `categoryArchive()`, `categoryRestore()`, `categoryDeleteBlocker($row, $used)`, `categoryDelete($id, &$error)`, `categoryMerge($from_ids, $into_id)` (same kind; returns records moved), `categoryFoldBudget()` and `categoryReorder($kind, $ids)`. - - Admin: `admin/categories.php` is rebuilt (`category`, `q`, `sort` - `order`, `name` or `use` - and `archived`; no paging), with `admin/modals/category/category_form.php` shared by `category_add.php` (`category`, or none to pick the kind) and `category_edit.php` (`id`), the new `category_merge.php` (`category_ids[]`), and `js/category_form.js`. `admin/post/category.php`: `add_category` and `edit_category` (`category_id`, `type`, `name`, `description`, `color`, `icon`), GET `archive_category`, `restore_category`, `delete_category` and `move_category` (`direction` `up` or `down`), POST `merge_categories` (`category_ids[]`, `into_category_id`), `reorder_categories` (`category`, `category_ids[]`; answers JSON), and `bulk_archive_categories`, `bulk_restore_categories` and `bulk_delete_categories` (`category_ids[]`). Audit entries are Category Create, Edit, Archive, Restore, Delete and Merge, naming the kind. + - Admin: `admin/categories.php` is rebuilt (`category`, `q`, `sort` - `category_order`, `category_name` or `used` - `order`, `page` and `show=archived`, `archived=1` still taken; sorted and paged in PHP, as what uses each is counted there), with `admin/modals/category/category_form.php` shared by `category_add.php` (`category`, or none to pick the kind) and `category_edit.php` (`id`), the new `category_merge.php` (`category_ids[]`), and `js/category_form.js`. `admin/post/category.php`: `add_category` and `edit_category` (`category_id`, `type`, `name`, `description`, `color`, `icon`), GET `archive_category`, `restore_category`, `delete_category` and `move_category` (`direction` `up` or `down`), POST `merge_categories` (`category_ids[]`, `into_category_id`), `reorder_categories` (`category`, `category_ids[]` - a page of the current ones - and `offset`, how many come before them; answers JSON), and `bulk_archive_categories`, `bulk_restore_categories` and `bulk_delete_categories` (`category_ids[]`). Audit entries are Category Create, Edit, Archive, Restore, Delete and Merge, naming the kind. - Removed: `agent/post/category.php` (the + window posts to `admin/post.php` from any page), and `admin/post/category_model.php` and `agent/post/category_model.php`. - Pickers: `categoryPicker($kind, $keep, $opts)` - the current ones in the kind's order plus `$keep` (ids, or names for a kind held by name) even when archived, a kept name that is no category as a row with `loose` and no id, keyed by the value posted; `$opts` `since` (also those archived after then) and `exclude` (names). `categoryOptionHtml($row, $selected)` (`data-color` - an asset status's badge color, `data-icon` - a software type's icon from its name when it has none, `data-description`, and "(archived)" or "(not set up)"), `categoryOptionsHtml($kind, $selected, $opts)`. `expenseCategories()`, `incomeCategories()` and `billingCategories($since, $keep_id)` return `categoryPicker()`. Every record form and Bulk Action window that picks a category writes its options with `categoryOptionsHtml()`. - The +: `categoryAddButtonHtml($kind, $class)` - admins only, opening `admin/modals/category/category_add.php?category=&inline=1`, marked `data-category-add`. `js/app.js` notes the picker beside it in `window.itflowCategoryTarget`; `js/category_form.js` posts the inline window with fetch, and `add_category` with `inline` answers JSON - `ok`, `value`, `option` (the picker's `