Styles
Sample Lookup By Ref
Read-only lookup used by the Development (sample schedule) tab.
Given an MS code (master_style.ref_id) returns the info needed to auto-fill a sample-plan row: brand, product name, photo, and the collection/category/buyer parsed from the style’s description.
GET
Sample Lookup By Ref
Previous
Get Style True CostReturn the per-unit true cost for a style from its cost sheet.
Used by the sales order form to auto-fill (read-only) true cost when a style is
selected directly (i.e. not via quote conversion). True cost = material +
processing + logistics + overhead (unit price). Prefers the latest finalized
cost sheet (matching the deals pipeline); if none is finalized yet, falls back
to the latest cost sheet's current (e.g. draft) version. Returns nulls (not
404) when the style has no cost sheet at all. `source` is "final" or "draft".
Next
Sample Lookup By Ref