Add Custom Powder Order line item and fix CSV import FinalPrice crash

Custom powder/incoming powder material cost now flows into a separate
auto-generated 'Custom Powder Order' line item instead of rolling into
individual item prices, so users can add shipping charges before the
customer sees the total. A dashed yellow preview card in the wizard
shows the material cost and lets users edit the total (including shipping)
before saving. After first save the price is user-owned.

Also fixes a fatal CSV import crash when FinalPrice contains a non-numeric
value (e.g. 'false' from a spreadsheet formula): the job CSV importer now
streams rows one at a time with a lenient decimal converter, treating bad
values as $0 with a per-row warning instead of aborting the entire import.

Updated HelpKnowledgeBase.cs and Help articles (Jobs, Quotes) with
Custom Powder Order behavior and a new Data Import / Export section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 23:37:46 -04:00
parent e476b4744d
commit a7ad0e1de8
19 changed files with 721 additions and 78 deletions
@@ -213,6 +213,12 @@ public static class HelpKnowledgeBase
- Customer tier discount
- Tax (0% for tax-exempt customers)
**Custom Powder Order ordering costs as a separate line item:** When a coat is configured with a manually entered cost per lb (no inventory item selected) or with a powder color that must be ordered (the "Order this color" path), the material cost for that powder is NOT added to the individual item price. Instead, the system auto-generates a separate **"Custom Powder Order"** line item that collects all ordering costs in one place. This lets you add shipping/freight to the total before presenting it to the customer.
- While building the quote, a dashed yellow **Powder Order** preview card appears below the item cards. It shows the calculated material cost with an editable price field. Enter the final amount you want to charge material plus any shipping before saving.
- On the saved quote, the Custom Powder Order appears as its own line item with the color name(s) in its description (e.g. "Custom Powder Order (Gloss Black, Satin Silver)").
- A yellow banner on the Quote Details page reminds you when a Custom Powder Order is present so you don't forget to account for shipping.
- The Custom Powder Order is created only once (on first save). After that, the price is yours to edit the system will not overwrite it on subsequent saves.
**Per-item cost breakdown:** On the Quote Details page, each line item shows a collapsible cost breakdown click the row to expand it and see how material, labor, equipment, complexity, and markup were calculated for that specific item. This is useful for spotting which items are underpriced or where costs are concentrated.
**Inline item editing on quotes:** On the Quote Details page, any unit price, quantity, or item description can be edited in-place by clicking the value directly. Press Enter or click away to save; press Escape to cancel. The pricing summary (subtotal, discount, tax, and total) updates immediately without reloading the page.
@@ -338,6 +344,8 @@ public static class HelpKnowledgeBase
**Logging material usage from a PC (without QR scan):** On the Job Details page, expand the Materials Used section and click **Log Material**. A modal opens where you can: select any inventory item from a dropdown (current stock level shown), choose whether to enter the amount used or the amount remaining (the system calculates usage automatically), pick a reason (Job Usage or Waste/Spillage), and add optional notes. Saves immediately and updates inventory on hand.
**Custom Powder Order ordering costs as a separate line item:** Same behavior as quotes. When a coat uses a custom or incoming powder (manually entered cost per lb, or a color ordered through the "Order this color" path), the material cost is separated from the item price and collected into a single **"Custom Powder Order"** line item. While building the job, a dashed yellow Powder Order preview card appears; edit its price before saving to include shipping. After the first save the price is user-owned and will not be overwritten.
**Blank Work Order:** Print a pre-formatted paper work order to hand to a walk-in customer before creating a digital job record.
- Access: Jobs list page printer icon button "Blank Work Order" in the top-right toolbar. Or navigate directly to /WorkOrder/Blank.
- The PDF opens in a new tab ready to print. It includes: company logo and address, Drop Off Date field, Client Name / Client Phone / Due Date fields, 12-row parts table (Part Description / Color / Quote), Notes box, customizable Terms & Conditions text, and a Customer Signature line.
@@ -1196,6 +1204,26 @@ public static class HelpKnowledgeBase
---
## DATA IMPORT / EXPORT
**Where:** [Tools](/Tools) in the left sidebar under Admin Tools
**What it does:** Import records in bulk from CSV, or export your data for use in other systems (QuickBooks Desktop, QuickBooks Online, Excel/CSV). Use the step-by-step wizard: choose Import or Export choose format select data type upload or download.
**Importing Jobs from CSV:**
Required columns: JobNumber, CustomerEmail (or CustomerName), Status, Priority, ScheduledDate, DueDate, FinalPrice, CustomerPO, SpecialInstructions, Notes.
- **FinalPrice**: a number (e.g. 150.00) or blank for $0. Non-numeric values (e.g. a spreadsheet formula that resolves to "false") are treated as $0 with a warning the row is still imported.
- **CustomerEmail vs CustomerName**: email is tried first; if no match is found and CustomerName is provided, name is tried as a fallback. A warning is added when name-matching is used.
- **Status / Priority**: unrecognised values default to Pending / Normal with a warning.
- **Duplicate job numbers**: rows matching an existing job number are skipped with a warning.
After import, the results page shows a summary of rows imported, skipped, and any warnings or errors per row.
**Importing Customers, Inventory, Quotes, Appointments:** Use the same wizard select CSV format and then choose the record type. Each type has a downloadable template (click "Download Template" in the wizard) showing the expected column headers.
**Exporting data:** Choose Export format (CSV, QuickBooks Desktop .IIF, QuickBooks Online .CSV, Excel) select which data types to include download. All exports respect your company's tenant filter you only export your own data.
---
## AUDIT LOG
**Where:** [Audit Log](/AuditLog) under Admin Tools (CompanyAdmin and above)