Skip to main content

Order Parts Form (Order_Parts)

Field-by-field reference for the Order Parts form and its embedded Order Line Items subform — the structure that holds purchase-order line items. Includes a review of legacy/redundant fields (see Field Review).

  • Display name: Order Parts
  • Success message: "Data Added Successfully!"
  • Last documented: 25 July 2026

Background

Historically, purchase orders did not have line items as separate records — part descriptions were maintained as free text in a single Description field. The Order_Line_Items grid on this form introduced line items as proper child records (one record per part, with quantity, part number, supplier, and pricing). The Purchase Order Form's Order_Line_Items grid references these same child records — this subform is where they are defined and populated.

Because the form evolved from the older free-text approach, it carries fields from earlier iterations that may no longer be needed — flagged in the review below.


Order Source — Form Entry Points

The form behaves differently based on how it was opened. The Order_Source field (hidden) determines which fields are visible and how data is populated.

Order SourceEntry PointDescription
Direct_OrderManual entryUser creates order from scratch — must select Parts to be Ordered For first
Claim_Dhtml_RequestClaim DHTML buttonPre-populated from claim record, limited editing
From_Pending_RequestParts to Order reportPre-populated from selected Part_Item_Request records

Order Source Behavior Matrix

┌─────────────────────────────────────────────────────────────┐
│ ORDER SOURCE LOGIC │
└──────────────────────────┬──────────────────────────────────┘

┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Direct Order │ │ Claim DHTML │ │ From Pending │
│ │ │ Request │ │ Request │
└────────┬────────┘ └────────┬────────┘ └────────┬────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Show: │ │ Show: │ │ Iterates Parts │
│ Parts_to_be_ │ │ File_Number │ │ to Order recs │
│ ordered_for │ │ (disabled) │ │ │
│ │ │ │ │ Pre-populates │
│ Hide: │ │ Auto-populate │ │ Order_Line_Items│
│ Everything else │ │ from Claim │ │ from selected │
│ initially │ │ │ │ records │
└─────────────────┘ └─────────────────┘ └─────────────────┘

Direct Order — Parts to be Ordered For Selection

When Order_Source == Direct_Order, user must first select Parts to be Ordered For:

SelectionFields ShownFields HiddenBehavior
ClaimFile_Number, Registration, VIN_No, Make, Model, Date_Ordered, Ordered_By, Purchase_Order_No_I_Body, Order_Line_Items, Upload_Parts_Ordered, Total_CalculationFleet_Vehicle_Rego, Supplier, Part_Type, Parts_StatusRegistration/Make/Model disabled
Fleet VehicleFleet_Vehicle_Rego, VIN_No, Make, Model, Date_Ordered, Ordered_By, Order_Line_Items, Upload_Parts_Ordered, Supplier, Part_Type, Parts_Status, Total_CalculationRegistration, File_Number, Purchase_Order_No_I_BodyDate_Ordered enabled
Private JobRegistration, VIN_No, Make, Model, Colour, Date_Ordered, Ordered_By, Order_Line_Items, Upload_Parts_Ordered, Supplier, Part_Type, Parts_Status, Total_CalculationFile_Number, Fleet_Vehicle_Rego, Purchase_Order_No_I_BodyAll fields editable, Date_Ordered enabled

From Pending Request — Auto-Population

When opened from Parts to Order report with selected Part_Item_Request records:

  1. Clears existing Order_Line_Items
  2. Iterates through selected Parts_to_Order records
  3. Creates Order_Line_Items rows with:
    • Description, Quantity, Notes, Suppliers, Part_Number, Parts_Type
    • Unit_List_Ex_GST, Unit_Net_Ex_GST, Due_In_date, Upload_Evidence
    • Status set to Ordered
    • Calculates line totals
  4. Determines Parts_to_be_ordered_for from first record
  5. Auto-populates header fields from claim/fleet/private job record
  6. Calculates Total_Amount_Excl_GST, GST_Amount, Total_Amount_Incl_GST

Main Section — Order Details

FieldTypeSource / ValuesNotes
Parts_to_be_ordered_forPicklistClaim, Fleet Vehicle, Private JobDetermines which vehicle lookup applies.
File_Rego_SearchPicklist (lookup)Claim_Form.ID, displays [File_Number] - [Registration] - [Date_Received]New combined search field — replaces the old File_Number lookup. Shows File Number, Registration, and Date Received for easier claim identification.
Fleet_Vehicle_RegoPicklist (lookup)logistics_app.Add_Car.ID, displays [Registration]Populated for Fleet Vehicle orders. Cross-app lookup into the logistics app.
Ordered_ByPicklist (lookup)User.ID, displays full nameStaff member raising the order.
RegistrationTextFree textMandatory. Denormalised copy of vehicle rego.
VIN_NoTextFree textDenormalised copy of VIN.
MakeTextFree textDenormalised.
ModelTextFree textDenormalised.
ColourTextFree textDenormalised. Not present on the PO form.
Date_OrderedDateDefaults to ${zoho.currentdate}Mandatory (must have).
Purchase_Order_No_I_BodyTextFree textiBody purchase number — also exists on the PO form (see review).
Upload_Parts_OrderedFile uploadLocal drivePDF upload for Claude AI extraction. See Claude AI PDF Extraction.

Fleet Vehicle / Private Job Fields

These fields appear only when Parts_to_be_ordered_for is Fleet Vehicle or Private Job. They apply values to all line items in the subform.

FieldTypeSource / ValuesNotes
SupplierPicklist (lookup)Suppliers.ID, displays [Supplier_Name]When set, applies to all line items and locks the per-line Suppliers field.
Part_TypePicklistOEM, Parallel, Aftermatket, UsedWhen set, applies to all line items.
Parts_StatusPicklistOrdered, ArrivedWhen set, applies to all line items. Also sets Due_In_date (see below).

Parts Status — Due In Date Logic

Parts StatusDue In Date Set To
OrderedNext working day (skips weekends)
ArrivedCurrent date

Supplier Lock Behavior

┌─────────────────────────────────────────────────────────────┐
│ Main Form: Supplier = [Australian Automotive...] │
└──────────────────────────┬──────────────────────────────────┘

▼ (Auto-apply to all + Lock)
┌─────────────────────────────────────────────────────────────┐
│ Order Line Items Subform │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Part 1: Supplier = Australian Automotive (LOCKED) │ │
│ │ Part 2: Supplier = Australian Automotive (LOCKED) │ │
│ │ Part 3: Supplier = Australian Automotive (LOCKED) │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Order Line Items (embedded grid / subform)

One row per part. These are the records the invoice extraction module matches invoice lines against.

FieldTypeSource / ValuesNotes
Mark_as_DeletedCheckboxSoft-delete flag for the line item. When checked, the line is excluded from processing.
Parts_to_OrderPicklist (lookup)Parts_to_Order.ID, displays [ID]Back-link to the originating parts request line.
DescriptionTextFree textPart description — comparison target for the extracted invoice line description.
Quantity1Number (integer)Display name "Quantity" — the authoritative quantity field (review item 1).
QuantityDecimalDuplicate, displays as "Quantity" — to be removed from the form (review item 1).
Part_NumberTextFree textComparison target for the extracted invoice part_number.
SuppliersPicklist (lookup)Suppliers.ID, displays [Supplier_Name]Not used — supplier is taken from the PO header Supplier_Name (review item 2).
Parts_TypePicklistOEM, Parallel, Aftermatket, UsedNote the typo in the stored value "Aftermatket" — see review.
Request_StatusPicklistPart to Order, Part to RepairInitial value Part to Order. Triage-stage status — see review.
Unit_List_Ex_GSTDecimalList price ex GST — maps to extracted unit_list.
Unit_Net_Ex_GSTDecimalNet (agreed) price ex GST — maps to extracted unit_net. This is the price the supplier should invoice.
Due_In_dateDateAll days allowedExpected arrival.
StatusPicklistOrdered, Arrived, UnavailablePer-line fulfilment status.
NotesTextareaFree notes.
Upload_EvidenceFile uploadLocal driveSupporting attachment per line.
Invoice_NoTextFree textSupplier invoice number. Conditionally visible — only shown when Parts_Status == Arrived. See Field Rule: Show Invoice_No.
GSTDecimalComputed10% of line Total. Auto-calculated, disabled.
TotalDecimalComputedQuantity1 × Unit_Net_Ex_GST. Auto-calculated, disabled.
Total_Inc_GSTDecimalComputedTotal + GST. Auto-calculated, disabled.

Line Item Deletion Options

There are 3 deletion mechanisms for Order Line Items, controlled by Order Source:

Order SourceMark_as_Deleted CheckboxSubform Delete Button (Row Removal)
Direct_Order✅ Available✅ Available
Claim_Dhtml_Request❌ Hidden✅ Available
From_Pending_Request✅ Available❌ Hidden

Field Rule: Hide Subform Delete Entry

Execute only if:
Order_Source != "Direct Order" && Order_Source != "Claim Dhtml Request"

Action:
Hide subform delete entry [Order_Line_Items]

This means:

  • Direct Order / Claim DHTML: Users can physically remove rows using the delete button
  • From Pending Request: Users can only soft-delete using Mark_as_Deleted checkbox (original Part_Item_Request records need to be tracked)

Field Rule: Show Invoice_No

Execute only if:
Parts_to_be_ordered_for is not null && Parts_Status == "Arrived"

Action:
Show fields [Invoice_No]

This rule makes the Invoice_No field visible only when:

  1. A job type has been selected (Parts_to_be_ordered_for is not null)
  2. The parts have already arrived (Parts_Status == Arrived)

This allows users to record the supplier invoice number once the parts are received.

Mark as Deleted Behavior

When Mark_as_Deleted is checked on a line item:

  1. Calculation skipped — Total, GST, Total_Inc_GST are set to 0
  2. Excluded from totals — The line is excluded from main form total calculations
  3. Row remains visible — The line is not physically deleted, only flagged
┌─────────────────────────────────────────────────────────────┐
│ Mark_as_Deleted = ☑ (checked) │
├─────────────────────────────────────────────────────────────┤
│ │
│ • row.Total = 0 │
│ • row.GST = 0 │
│ • row.Total_Inc_GST = 0 │
│ • Excluded from Total_Amount_Excl_GST calculation │
│ • Row remains visible (soft delete) │
│ │
└─────────────────────────────────────────────────────────────┘

Subform Workflow Events

The Order Line Items subform has 3 workflow triggers:

1. On Add Row — Update Line Item Values

When a new row is added and Parts_to_be_ordered_for is Fleet Vehicle or Private Job:

┌─────────────────────────────────────────────────────────────┐
│ ON ADD ROW (Fleet Vehicle / Private Job only) │
└──────────────────────────┬──────────────────────────────────┘


┌────────────────────────┐
│ Copy from Main Form: │
│ │
│ row.Suppliers = │
│ input.Supplier │
│ │
│ row.Parts_Type = │
│ input.Part_Type │
│ │
│ row.Status = │
│ input.Parts_Status │
└────────────┬───────────┘


┌────────────────────────┐
│ Parts_Status set? │
└────────────┬───────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Ordered │ │ Arrived │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Due_In_date = │ │ Due_In_date = │
│ next working │ │ current date │
│ day │ │ │
└─────────────────┘ └─────────────────┘

2. On Add Row — GST Calculation

When a row is added, calculates line totals and updates main form totals:

StepCalculation
1row.Total = row.Quantity1 × row.Unit_Net_Ex_GST
2row.GST = row.Total × 0.10
3row.Total_Inc_GST = row.Total + row.GST
4Sum all line item Totals → Total_Amount_Excl_GST
5GST_Amount = Total_Amount_Excl_GST × 0.10
6Total_Amount_Incl_GST = Total_Amount_Excl_GST + GST_Amount

3. On Delete Row — GST Calculation

When a row is deleted, recalculates totals excluding the deleted row:

StepCalculation
1Sum all remaining line item Totals
2Deduct deleted row.Total from sum
3Update Total_Amount_Excl_GST
4GST_Amount = Total_Amount_Excl_GST × 0.10
5Total_Amount_Incl_GST = Total_Amount_Excl_GST + GST_Amount

Line Item Calculation Logic

When Quantity1 or Unit_Net_Ex_GST changes:

┌─────────────────────────────────────────────────────────────┐
│ ON CHANGE: Quantity1 or Unit_Net_Ex_GST │
└──────────────────────────┬──────────────────────────────────┘


┌────────────────────────┐
│ Mark_as_Deleted? │
└────────────┬───────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ YES (checked) │ │ NO (unchecked) │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Total = 0 │ │ Total = │
│ GST = 0 │ │ Qty × Unit_Net │
│ Total_Inc = 0 │ │ │
│ │ │ GST = Total×0.10│
│ RETURN (skip) │ │ │
└─────────────────┘ │ Total_Inc = │
│ Total + GST │
└────────┬────────┘


┌──────────────────────────────────┐
│ Recalculate Main Form Totals │
│ │
│ Total_Amount_Excl_GST = sum of │
│ all line item Totals │
│ │
│ GST_Amount = Total × 0.10 │
│ │
│ Total_Amount_Incl_GST = │
│ Total_Excl + GST_Amount │
└──────────────────────────────────┘

Totals Section

FieldTypeSource / ValuesNotes
Total_Amount_Excl_GSTCurrency (AUD)ComputedSum of Unit_Net_Ex_GST × Quantity for all line items.
GSTCurrency (AUD)Computed10% of Total Amount (Excl GST).
Total_Amount_Incl_GSTCurrency (AUD)ComputedTotal Amount (Excl GST) + GST.

System Section

FieldTypeSource / ValuesNotes
Parts_to_OrderList (multi-lookup)Part_Item_Request.ID, displays [ID]Order-level list of source request lines — used to pre-populate line items.
Order_SourcePicklistDirect_Order, Claim_Dhtml_Request, From_Pending_RequestHidden. Determines form behavior on load. See Order Source.
PO_PDF_ExtractionPicklist (lookup)PO_PDF_Extraction.IDHidden. Reference to the Claude AI extraction job record.
Check_StatusDecision BoxHidden until PDF uploaded. Click to check extraction status.
plainText (display only)Hidden. Shows processing message with Job ID.
Total_CalculationSectionHidden until line items exist. Contains total fields.
Auto_NumberAutonumberStarts at 1Internal sequence.

Claude AI PDF Extraction

The Upload Parts Ordered field enables Claude AI-powered PDF extraction for order confirmations.

Upload Process

  1. User uploads a PDF file (supplier order confirmation) using the Upload Parts Ordered field
  2. System creates a PO_PDF_Extraction record with the uploaded PDF
  3. System calls order_parts_pdf_extraction.extract_details_from_order_parts_pdf
  4. Shows processing message with Job ID
  5. Check Status checkbox appears
┌─────────────────────────────────────────────────────────────┐
│ ON UPLOAD: Upload_Parts_Ordered │
└──────────────────────────┬──────────────────────────────────┘


┌────────────────────────┐
│ Insert into │
│ PO_PDF_Extraction │
│ [Uploaded_PDF = file] │
└────────────┬───────────┘


┌────────────────────────┐
│ Call Claude AI │
│ extraction API │
└────────────┬───────────┘


┌────────────────────────┐
│ Show message: │
│ "PDF is still │
│ processing. Job ID: │
│ {job_id}. Click │
│ checkbox to check." │
└────────────┬───────────┘


┌────────────────────────┐
│ Clear existing │
│ Order_Line_Items │
│ (ready for extraction) │
└────────────────────────┘

Check Status Flow

┌─────────────────┐
│ Check Status │
│ (Click) │
└────────┬────────┘


┌─────────────────┐
│ API Call to │
│ get_job_status │
└────────┬────────┘

┌────┴────┐
│ │
▼ ▼
┌────────┐ ┌────────────────┐
│Complete│ │ Not Completed │
└───┬────┘ └───────┬────────┘
│ │
▼ ▼
┌────────────┐ ┌────────────┐
│ Process │ │ Reset │
│ Response │ │ Check_ │
│ JSON │ │ Status │
│ │ │ │
│ Validate │ │ Show Alert │
│ Rego match │ │ "Still │
│ │ │ processing"│
│ Populate │ │ │
│ Line Items │ └────────────┘
└────────────┘

Registration Mismatch Validation

If the form already has a Registration value and the extracted registration differs:

┌─────────────────────────────────────────────────────────────┐
│ REGISTRATION MISMATCH ALERT │
├─────────────────────────────────────────────────────────────┤
│ │
│ "Registration mismatch! Existing Rego: {existing} │
│ does not match Extracted Rego: {extracted}" │
│ │
│ • Alert shown to user │
│ • Existing Registration is NOT overwritten │
│ • User must manually verify │
│ │
└─────────────────────────────────────────────────────────────┘

Extracted Fields Mapping

Extracted JSON FieldMaps ToNotes
vinVIN_NoVehicle identification number
quote_noPurchase_Order_No_I_BodySupplier quote/order reference
registration_noRegistrationValidated against existing value
line_items[]Order_Line_ItemsArray of parts

Per Line Item:

JSON FieldMaps ToNotes
part_descriptionDescription
part_numberPart_Number
qtyQuantity1
supplierSuppliersLooks up Supplier by name
part_typeParts_TypeOEM/Parallel/Aftermarket/Used
cost_priceUnit_Net_Ex_GSTNet price
sell_priceUnit_List_Ex_GSTList price
commentNotes

Auto-Calculated on Extraction:

FieldValue
Due_In_dateCurrent date + 1 day
GSTTotal × 0.10
TotalQty × Unit_Net_Ex_GST
Total_Inc_GSTTotal + GST

Fleet Vehicle Auto-Lookup

If a registration is extracted, the system attempts to find a matching Fleet Vehicle:

vehicle_id = logistics_app.add_car.get_vehicle_id(Registration)
if vehicle_id exists:
Fleet_Vehicle_Rego = vehicle_id

Form Submission Validations

Claim Validation

When Parts_to_be_ordered_for == Claim:

FieldValidationError Message
File_NumberRequired"File / Rego Search' is mandatory field."

Fleet and Private Job Validation

When Parts_to_be_ordered_for == Fleet Vehicle OR Private Job:

Main Form Required Fields

FieldValidationError Message
SupplierRequired"Supplier is required field"
Part_TypeRequired"Part Type is required field"
Parts_StatusRequired"Parts status is required field"

Line Item Consistency Validation

Each line item must match the main form values:

Line Item FieldMust MatchError Message
Suppliersinput.Supplier"Line Item's supplier is not matching with selected supplier"
Parts_Typeinput.Part_Type"Line Item's Part Type is not matching with the selected Part Type"
Statusinput.Parts_Status"Line Item's Status is not matching with selected Parts status"
┌─────────────────────────────────────────────────────────────┐
│ ON SUBMIT: Fleet Vehicle / Private Job │
└──────────────────────────┬──────────────────────────────────┘


┌────────────────────────┐
│ Validate Main Form: │
│ • Supplier required │
│ • Part_Type required │
│ • Parts_Status req'd │
└────────────┬───────────┘


┌────────────────────────┐
│ For Each Line Item: │
│ │
│ • Suppliers must match │
│ main form Supplier │
│ │
│ • Parts_Type must │
│ match main Part_Type │
│ │
│ • Status must match │
│ main Parts_Status │
└────────────┬───────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ All Match │ │ Mismatch Found │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Submit proceeds │ │ Alert + Cancel │
│ │ │ Submit │
└─────────────────┘ └─────────────────┘

Note: This validation ensures that when a main form Supplier/Part_Type/Parts_Status is set, ALL line items must have matching values. This enforces the "apply to all" behavior documented in the Fleet Vehicle / Private Job Fields section.

Actions

EventButtons
On addSubmit
On editUpdate, Cancel

On Success Behavior

When the form is submitted successfully, the system calls parts_assessment.handle_Order_Parts_Form_Submission.

Post-Submission Actions

┌─────────────────────────────────────────────────────────────┐
│ ON SUCCESS │
└──────────────────────────┬──────────────────────────────────┘


┌────────────────────────┐
│ Call handle_Order_ │
│ Parts_Form_Submission │
└────────────┬───────────┘


┌────────────────────────┐
│ Check_Status == true? │
│ (PDF extraction used) │
└────────────┬───────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ YES │ │ NO │
└────────┬────────┘ └────────┬────────┘
│ │
▼ │
┌─────────────────┐ │
│ Mark original │ │
│ Part_Item_Req │ │
│ as Is_Deleted │ │
└────────┬────────┘ │
│ │
└────────────┬────────────┘


┌────────────────────────┐
│ Order_Source? │
└────────────┬───────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Claim_Dhtml_ │ │ Other │
│ Request │ │ │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Open Claim DHTML│ │ Refresh Parent │
│ with Parts tab │ │ │
└─────────────────┘ └─────────────────┘

handle_Order_Parts_Form_Submission — Processing Flow

┌─────────────────────────────────────────────────────────────┐
│ SUBMISSION PROCESSING │
└──────────────────────────┬──────────────────────────────────┘


┌────────────────────────┐
│ 1. Collect Unique │
│ Suppliers │
└────────────┬───────────┘


┌────────────────────────┐
│ 2. Process Line Items │
│ with NULL Due_In │
└────────────┬───────────┘


┌────────────────────────┐
│ 3. Create Purchase │
│ Orders (per supplier│
└────────────┬───────────┘


┌────────────────────────┐
│ 4. Process Line Items │
│ → Create Parts_Order│
└────────────┬───────────┘


┌────────────────────────┐
│ 5. Update Claims Mgmt │
│ Counts (Claim only) │
└────────────┬───────────┘


┌────────────────────────┐
│ 6. Build Notes & │
│ Add Timeline │
└────────────────────────┘

Step 2: Line Items with NULL Due_In_date

ConditionAction
Parts_to_Order == nullCreate new Part_Item_Request with Status = Pending, Tender_Status = Completed
Parts_to_Order != nullUpdate existing Part_Item_Request to Status = Unavailable

Step 3: Create Purchase Order (per supplier)

FieldSource
File_NumberFrom order record
Ordered_ByLogin user
Date_OrderedOrder record's Added_Time
Supplier_NameCurrent supplier
Registration, Make, Model, VIN_NoFrom order record
Purchase_Order_No_I_BodyAuto-generated iBody sequence (Claim) OR {Rego}-{sequence} (Fleet/Private)
Rego_PO_Number{Registration} - {iBody} (Claim) OR just iBody (Fleet/Private)
Total_Amount_Excl_GST, GST, Total_Amount_Incl_GSTFrom order record

Step 4: Process Line Items

For each line item per supplier:

┌─────────────────────────────────────────────────────────────┐
│ FOR EACH LINE ITEM (per supplier) │
└──────────────────────────┬──────────────────────────────────┘

┌─────────────────┼─────────────────┬─────────────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│Mark_as_ │ │Request_ │ │Due_In_date │ │Normal │
│Deleted=true │ │Status= │ │== null │ │Processing │
│ │ │Part to │ │ │ │ │
│ │ │Repair │ │ │ │ │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│Part_Item_Req│ │Create Parts │ │SKIP │ │Create │
│.Is_Deleted │ │_to_Repair │ │(already │ │Parts_Order │
│= true │ │record │ │handled in │ │record │
│ │ │ │ │Step 2) │ │ │
│CONTINUE │ │Part_Item_Req│ │ │ │Update │
│(skip) │ │.Is_Deleted │ │ │ │Part_Item_Req│
│ │ │= true │ │ │ │ │
│ │ │ │ │ │ │Add to notes │
│ │ │CONTINUE │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘

Parts_Order Record Created

FieldSource
Purchase_Order_FormNew PO ID
Date_OrderedFrom order record
Job_TypeClaim / Loan Car / Private Job
SupplierCurrent supplier
Description, Part_NumberFrom line item
OrderedQuantity1
Part_TypeFrom line item
Unit_List_Ex_GST, Unit_Net_Ex_GSTFrom line item
Due_InFrom line item
StatusArrived (if Parts_Status=Arrived) or Ordered
Upload_EvidenceFrom line item
Claim_Form, Claims_Management_FormFrom order record
Loan_VehicleFleet vehicle ID (if Fleet Vehicle)
Total_Amount, Total_Amount_Inc_GSTFrom line item

Step 5: Update Claims Management Counts (Claim only)

FieldCount Logic
Parts_NeededPart_Item_Request where Tender_Status=Pending OR Status=Pending/Awaiting Approval
Parts_OrderedParts_Order where Status = Ordered/Back Ordered
Parts_at_Crash_ClaimParts_Order where Status = Arrived/Delivered Back to HQ
Parts_at_RepairerParts_Order where Status = Delivered to Repair Shop

Also updates:

  • Parts_Assessment_StatusCompleted
  • Parts_Tendered_StatusCompleted
  • Order_PartsYes

Step 6: Build Notes & Add Timeline

Notes Format (Ordered):

Parts Ordered - {date}
1. {Description} - {Supplier Name} - {Due In Date}
2. {Description} - {Supplier Name} - {Due In Date}
...

Notes Format (Unavailable):

Parts Unavailable - {date}
1. {Description} - {Quantity} - {Notes}
...

Actions by Job Type:

Job TypeActions
ClaimAdd claim note, Create timeline record (Parts_Ordered_date), Update Claim VIN
Fleet VehicleAdd notes via logistics_app.notes.add_notes_by_logged_in_user
Private JobNo notes logic

Field Review — Legacy and Redundant Fields

Fields flagged during the 12 June 2026 review, with decisions recorded. Do not delete any field without first auditing data and Deluge workflow references — removing a field that scripts read/write will break the parts flow silently.

#FindingDecision (12 Jun 2026)
1Duplicate quantity fields✅ Decided — remove Quantity (decimal); Quantity1 is authoritative
2Per-line Suppliers lookup✅ Decided — not needed; supplier comes from the PO header
3Purchase_Order_No_I_Body on both forms✅ Decided — PO form's value is authoritative
4Request_Status looks vestigial✅ Keep — used elsewhere in the app
5Parts_to_Order linked twice🟡 Pending verification against the live form
6Denormalised vehicle fields📋 Noted — revisit later
7Parts_Type typo "Aftermatket"📋 Noted — fix later (with record migration, see below)
8No line-total field📋 Noted — matcher computes it

1. Duplicate quantity fields — Quantity1 vs Quantity — RESOLVED

The grid has two quantity fields, both displaying as "Quantity" in the UI: Quantity1 (integer) and Quantity (decimal).

Decision: the decimal Quantity field will be removed from the form. Quantity1 (integer) is the live field — all code, including invoice line matching, reads Quantity1.

2. Per-line Suppliers vs PO-header Supplier_Name — RESOLVED

The PO form has a single supplier at header level; the line items each carry their own supplier lookup.

Decision: the per-line Suppliers field is not needed. The supplier is taken from the Purchase Order header (Supplier_Name) — that is what invoice supplier matching resolves against.

3. Purchase_Order_No_I_Body exists on both forms — RESOLVED

Both Order_Parts and Purchase_Order_Form carry the iBody number.

Decision: the Purchase Order form's value is authoritative — same principle as the supplier field. Invoice-to-PO matching reads Purchase_Order_No_I_Body from the PO form.

4. Request_Status (Part to Order / Part to Repair) — KEEP

Initially flagged as vestigial (a triage-stage decision). Decision: the field is used elsewhere in the app — keep as-is.

5. Parts_to_Order duplicated (per-line lookup + order-level list) — PENDING VERIFICATION

The exported form definition contains the link twice: a per-line picklist inside the Order_Line_Items grid (first grid field), and an order-level list field in the System section (row = 3, height = 60px). The team did not find the second field when reviewing — possibly hidden in the form builder's System section, or the export predates a removal. Action: check the live form builder's System section; if the list field is genuinely gone, update this page and the export.

6. Denormalised vehicle fields (Registration, VIN_No, Make, Model, Colour) — NOTED

Copied from the claim/fleet record rather than looked up. Standard Creator practice, but they can drift from the source record. Colour exists here but not on the PO form. To be revisited later; treat the claim record as the source of truth.

7. Typo in Parts_Type picklist: "Aftermatket" — NOTED, FIX LATER

Should be "Aftermarket". Caution for whoever fixes it: picklist values are stored as literal strings — fixing the option without migrating existing records leaves old rows holding the misspelled value, and any Deluge/report filters on "Aftermatket" will silently stop matching. Fix the value, update records, and grep workflows for the misspelling in one pass.

8. No line-total field — NOTED

Lines carry unit prices but no extended total (qty × unit_net); the PO form's Total_Value is presumably computed by workflow. Fine as-is — the invoice matcher computes line totals itself.


Relevance to Invoice Extraction

Line-item matching compares extracted invoice lines against Order_Line_Items records:

Extracted invoice fieldLine item fieldMatch approach
descriptionDescriptionNormalised text similarity (supplier wording differs from internal wording)
part_numberPart_NumberExact match after normalisation — strongest signal when both sides have it
quantityQuantity1Numeric exact match (Quantity decimal field is being removed)
unit_listUnit_List_Ex_GSTTolerance comparison
unit_net / unit_priceUnit_Net_Ex_GSTTolerance comparison — the price-discrepancy check that catches list-vs-net overbilling
total (per line)computed qty × Unit_Net_Ex_GSTComputed, no stored field

Both sides are ex-GST at line level, so no GST conversion is needed for line matching (header totals still need the GST basis of Total_Value confirmed).