Skip to main content

Parts Awaiting Approval Report

The Parts Awaiting Approval report shows parts that are waiting for approval before ordering. This is typically used when the Order Parts field is set to "No" or is empty.


Report Location

  • Dashboard: Parts Dashboard
  • Panel: Parts Awaiting Approval

Key Columns

Column NameSource FieldDescription
Date AssessedPart Item Req → Parts Assessment DateDate when the Parts Assessment Form was submitted
Date TenderedPart Item Req → Parts Tendered DateDate when the tender process was completed (via Update Parts to Order, Request Parts, or Parts Assessment form)

Entry Criteria

Records appear in this report when EITHER of these condition groups are met:

Group A: Claim Parts

FormFieldCondition
Claims ManagementOrder Parts= No OR is null
Claims ManagementParts Assessment Status= Completed
Claims ManagementParts Tendered Status= Completed
Part Item ReqStatus= Awaiting Approval
Part Item ReqIs Deleted= false

Group B: Non-Claim Parts (Fleet/Private)

FormFieldCondition
Part Item ReqTender Status= Completed
Part Item ReqStatus= Awaiting Approval
Part Item ReqIs Deleted= false

Available Actions

Parts Approved to Order Button (Multi-Select)

Opens the Parts Approved to Order Form:

┌─────────────────────────────────────────────────────────────┐
│ PARTS APPROVED TO ORDER FORM │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Subform: Order Line Items │ │
│ │ - Individual parts to be ordered │ │
│ │ - Requested Status dropdown for each item │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Upload Parts Ordered [File Upload Field] │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ☐ Check Status (Decision Box) │
│ │
└─────────────────────────────────────────────────────────────┘

Claude AI PDF Extraction

Upload Process

  1. User uploads a PDF file using the Upload Parts Ordered field
  2. System sends the PDF to Claude AI for data extraction
  3. Claude AI processes the document and extracts order information

Check Status Flow

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


┌─────────────────┐
│ API Call to │
│ Check Job │
│ Status │
└────────┬────────┘

┌────┴────┐
│ │
▼ ▼
┌────────┐ ┌────────────────┐
│Complete│ │ Not Completed │
└───┬────┘ └───────┬────────┘
│ │
▼ ▼
┌────────────┐ ┌────────────┐
│ Insert │ │ Show Alert │
│ values │ │ "Still │
│ into Order │ │ processing"│
│ Line Items │ │ │
│ subform │ │ │
└────────────┘ └────────────┘

On Success Behavior

When the form is submitted, the system calls parts_assessment.handle_parts_approved_to_order_submission which orchestrates the entire ordering process.

Processing Flow

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


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


┌────────────────────────┐
│ 2. For Each Supplier: │
│ Create Purchase │
│ Order │
└────────────┬───────────┘


┌────────────────────────┐
│ 3. Process Line Items │
│ (per supplier) │
└────────────┬───────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Due In = NULL │ │ Due In FILLED │
│ │ │ │
│ Status = │ │ Status = │
│ "Unavailable" │ │ "Ordered" │
│ │ │ │
│ Skip PO line │ │ Create Parts │
│ item creation │ │ Order record │
└─────────────────┘ └─────────────────┘


┌────────────────────────┐
│ 4. Update Claims │
│ Management Counts │
│ (Claim only) │
└────────────┬───────────┘


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

Step 1: Collect Unique Suppliers

The system loops through all line items in Order_Line_Items_approval subform and creates a list of unique suppliers. One Purchase Order is created per supplier.

Step 2: Create Purchase Order (per supplier)

FieldSource
File_NumberFrom order record
Ordered_ByLogin user
Date_OrderedOrder record's Added_Time
Supplier_NameCurrent supplier
RegistrationFrom order record
Make, Model, VIN_NoFrom order record
Purchase_Order_No_I_BodyAuto-generated iBody sequence (Claims) OR manual entry (Fleet/Private)
Rego_PO_Number{Registration} - {iBody PO}
Parts_to_be_ordered_forClaim / Fleet Vehicle / Private Job

Step 3: Process Line Items

Condition: Due In Date is NULL

ActionResult
Line Item StatusUnavailable
Parts_Order recordNOT created
Part_Item_Request StatusUpdated to Unavailable
Next ReportParts to Order report (for re-ordering)

Condition: Due In Date is FILLED

ActionResult
Line Item StatusOrdered
Parts_Order recordCreated (see table below)
Part_Item_Request StatusUpdated to Ordered
Part_Item_Request.Purchase_Order_FormLinked to new PO
Next ReportOn Order report

Parts_Order Record Fields:

FieldSource
Purchase_Order_FormNew Purchase Order ID
Date_OrderedCurrent date
Job_TypeClaim / Loan Car / Private Job
SupplierSupplier name
DescriptionFrom line item
OrderedQuantity1 from line item
Part_NumberFrom line item
VINFrom order record
Part_TypeParts_Type from line item
Unit_List_Ex_GSTFrom line item
Unit_Net_Ex_GSTFrom line item
Due_InDue_In_date from line item
Rego, Make, ModelFrom order record
Upload_EvidenceFrom line item
Claim_FormFile_Number from order record
Claims_Management_FormFrom linked claim

Total Value Calculation:

The Purchase Order's Total_Value is calculated by summing Unit_Net_Ex_GST for all line items belonging to that supplier.

Step 4: Update Claims Management Counts (Claim only)

After processing, the system updates part counts on the Claims Management record:

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

Step 5: Build Notes & Add Timeline

Notes Format (Ordered Parts):

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

Notes Format (Unavailable Parts):

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

Actions by Job Type:

Job TypeActions
ClaimAdd claim note via Add_Notes.add_claim_note_with_user, 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 implemented

Requested Status Dropdown

In the Order Line Items subform, each item has a Requested Status dropdown:

Status ValueResult
Parts to OrderStandard ordering flow (as described above)
Parts to RepairCreates record in Parts to Repair report

Flow Diagram

┌─────────────────────────────────────────────────────────────┐
│ REQUESTED STATUS │
└──────────────────────────┬──────────────────────────────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Parts to Order │ │ Parts to Repair │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Standard Flow │ │ Parts to Repair │
│ (Due In check) │ │ Report │
└─────────────────┘ └─────────────────┘

Status Transitions

┌─────────────────────────────────────────────────────────────┐
│ Parts Awaiting Approval │
└──────────────────────────┬──────────────────────────────────┘


┌────────────────────────┐
│ Parts Approved to │
│ Order Form Submitted │
└────────────┬───────────┘


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

┌────────────┴────────────┐
│ For Each Supplier │
└────────────┬────────────┘


┌────────────────────────┐
│ Create Purchase Order │
└────────────┬───────────┘

┌────────────┴────────────┐
│ For Each Line Item │
└────────────┬────────────┘

┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Due In = NULL │ │ Due In FILLED │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Status: │ │ Status: Ordered │
│ Unavailable │ │ │
│ │ │ Create Parts │
│ NO Parts_Order │ │ Order record │
│ record created │ │ │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Parts to Order │ │ On Order Report │
│ Report │ │ │
│ (for re-order) │ │ PO + Parts │
│ │ │ Order created │
└─────────────────┘ └─────────────────┘


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


┌────────────────────────┐
│ Add Notes + Timeline │
│ (by Job Type) │
└────────────────────────┘

Key Points

  • One PO per supplier — if line items have multiple suppliers, multiple Purchase Orders are created
  • iBody sequence — auto-generated for Claims using i_body_sequense_no_for_purchase_order, manual entry for Fleet/Private
  • Total Value — calculated from Unit_Net_Ex_GST (net price, not list price)
  • Check_Status flag — when false, the Part_Item_Request status is updated