The child-sale-element custom element provides modals for creating exchange orders, attached orders from a single parent, and bulk attached orders from multiple parents.
Creates an exchange order from a single parent order.
Creates a single attached order from a parent order with autopay due date, optional credit, and fee calculations.
Creates attached orders for multiple parent orders at once. All orders receive the same items, due date, credit, and optional description override.
Key features:
modal_type (required): "exchange", "linked_sale", or "bulk_linked_sale"org_id (required): organization ID for fetching items and credit reasonsparent_sale_id (required): order ID of the parent ordersalesperson_full_name (required): customer full namesales_number (required): sale number of the parent orderprocessing_fee: store processing fee ratetransaction_fee: store transaction fee amountservice_fee_definition_method: "org_pays", "org_pays_recouped", or "shared"shared_org_rate: organization share rate (shared method)shared_org_payment_plan_fee: org payment plan fee (shared method)shared_member_rate: member share rate (shared method)shared_member_payment_plan_fee: member payment plan fee (shared method)parent_sales (required): JSON string or array of parent order IDs, e.g. [123, 456]closeChildSaleModal: emitted when modal is closed (cancel, X, or close after results)success: emitted on successful order creationPOST v3/commerce/clare/orders/create_child_orderPOST v3/commerce/clare/orders/create_bulk_child_ordersGET finance/item_variationsGET v3/commerce/clare/tenants/{org_id}/credit_reasonsbulk-linked-orders: gates bulk selection UI, attached orders column, show/hide toggle, and button rename in consuming apps