import type { OrderCreateInput, OrderUpdateInput } from '@ali-ismail/contracts';
import { OrderStatus, Prisma } from '@prisma/client';
import { PrismaService } from '../prisma/prisma.service';
import { NumberingService } from '../numbering/numbering.service';
import { InventoryService } from '../inventory/inventory.service';
import { AuditService } from '../audit/audit.service';
import { BusinessEventsService } from '../notifications/events.service';
export declare class OrdersService {
    private readonly prisma;
    private readonly numbering;
    private readonly inventory;
    private readonly audit;
    private readonly businessEvents;
    constructor(prisma: PrismaService, numbering: NumberingService, inventory: InventoryService, audit: AuditService, businessEvents: BusinessEventsService);
    private include;
    private listInclude;
    list(organizationId: string, query: {
        page: number;
        pageSize: number;
        q?: string;
        orderType?: 'KS' | 'CP';
        status?: keyof typeof OrderStatus;
        customerId?: string;
    }): Promise<{
        items: ({
            customer: {
                id: string;
                customerNumber: string | null;
                name: string;
            };
            measurementVersion: {
                id: string;
                type: import("@prisma/client").$Enums.MeasurementType;
                versionNo: number;
            } | null;
        } & {
            id: string;
            organizationId: string;
            orderType: import("@prisma/client").$Enums.OrderType;
            orderNumber: string | null;
            legacyMeasureId: number | null;
            legacyCpMeasureId: number | null;
            customerId: string;
            personId: string | null;
            payerCustomerId: string | null;
            payerOverrideReason: string | null;
            measurementVersionId: string | null;
            status: import("@prisma/client").$Enums.OrderStatus;
            financialStatus: import("@prisma/client").$Enums.OrderFinancialStatus;
            deliveryStatusImported: string | null;
            source: import("@prisma/client").$Enums.OrderSource;
            bookingDate: Date | null;
            trialDate: Date | null;
            promisedDeliveryDate: Date | null;
            actualDeliveryDate: Date | null;
            urgentFlag: boolean;
            urgentReason: string | null;
            notes: string | null;
            internalNotes: string | null;
            kamizQty: string | null;
            kurtaQty: string | null;
            shalwarQty: string | null;
            pajamaQty: string | null;
            bshShirtQty: string | null;
            opShirtQty: string | null;
            safShirtQty: string | null;
            pantQty: string | null;
            subtotalAmount: Prisma.Decimal;
            discountAmount: Prisma.Decimal;
            adjustmentAmount: Prisma.Decimal;
            grandTotal: Prisma.Decimal;
            advanceAmount: Prisma.Decimal;
            balanceAmount: Prisma.Decimal;
            measurementSnapshot: Prisma.JsonValue | null;
            personSnapshot: Prisma.JsonValue | null;
            payerSnapshot: Prisma.JsonValue | null;
            fitSnapshot: Prisma.JsonValue | null;
            personNameSnapshot: string | null;
            personNumberSnapshot: string | null;
            payerNameSnapshot: string | null;
            payerNumberSnapshot: string | null;
            inventoryAppliedAt: Date | null;
            stockLocationId: string | null;
            idempotencyKey: string | null;
            sourceSystem: string | null;
            importBatchId: string | null;
            importedAt: Date | null;
            createdAt: Date;
            updatedAt: Date;
            archivedAt: Date | null;
            cancelledAt: Date | null;
        })[];
        page: number;
        pageSize: number;
        total: number;
        totalPages: number;
    }>;
    get(organizationId: string, id: string): Promise<{
        customer: {
            id: string;
            customerNumber: string | null;
            name: string;
        };
        person: {
            id: string;
            name: string;
            personNumber: string | null;
        } | null;
        payerCustomer: {
            id: string;
            customerNumber: string | null;
            name: string;
        } | null;
        measurementVersion: {
            id: string;
            type: import("@prisma/client").$Enums.MeasurementType;
            versionNo: number;
        } | null;
        garmentLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        designLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        inventoryLines: ({
            inventoryVariant: {
                id: string;
                name: string | null;
                variantCode: string;
                sku: string | null;
                isBase: boolean;
            };
        } & {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            inventoryItemId: string;
            itemName: string;
            qty: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
            inventoryVariantId: string;
            uom: string;
            unitSellPrice: Prisma.Decimal;
            unitCostSnapshot: Prisma.Decimal;
            sourceRuleId: string | null;
            sourceRuleCode: string | null;
            isAuto: boolean;
        })[];
        invoice: {
            id: string;
        } | null;
    } & {
        id: string;
        organizationId: string;
        orderType: import("@prisma/client").$Enums.OrderType;
        orderNumber: string | null;
        legacyMeasureId: number | null;
        legacyCpMeasureId: number | null;
        customerId: string;
        personId: string | null;
        payerCustomerId: string | null;
        payerOverrideReason: string | null;
        measurementVersionId: string | null;
        status: import("@prisma/client").$Enums.OrderStatus;
        financialStatus: import("@prisma/client").$Enums.OrderFinancialStatus;
        deliveryStatusImported: string | null;
        source: import("@prisma/client").$Enums.OrderSource;
        bookingDate: Date | null;
        trialDate: Date | null;
        promisedDeliveryDate: Date | null;
        actualDeliveryDate: Date | null;
        urgentFlag: boolean;
        urgentReason: string | null;
        notes: string | null;
        internalNotes: string | null;
        kamizQty: string | null;
        kurtaQty: string | null;
        shalwarQty: string | null;
        pajamaQty: string | null;
        bshShirtQty: string | null;
        opShirtQty: string | null;
        safShirtQty: string | null;
        pantQty: string | null;
        subtotalAmount: Prisma.Decimal;
        discountAmount: Prisma.Decimal;
        adjustmentAmount: Prisma.Decimal;
        grandTotal: Prisma.Decimal;
        advanceAmount: Prisma.Decimal;
        balanceAmount: Prisma.Decimal;
        measurementSnapshot: Prisma.JsonValue | null;
        personSnapshot: Prisma.JsonValue | null;
        payerSnapshot: Prisma.JsonValue | null;
        fitSnapshot: Prisma.JsonValue | null;
        personNameSnapshot: string | null;
        personNumberSnapshot: string | null;
        payerNameSnapshot: string | null;
        payerNumberSnapshot: string | null;
        inventoryAppliedAt: Date | null;
        stockLocationId: string | null;
        idempotencyKey: string | null;
        sourceSystem: string | null;
        importBatchId: string | null;
        importedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
        archivedAt: Date | null;
        cancelledAt: Date | null;
    }>;
    /**
     * Customer-facing invoice data. This deliberately reads the invoice by both
     * its owning order and organization rather than exposing an arbitrary invoice
     * lookup, and projects only invoice-safe customer and line facts.
     */
    invoicePrintDto(organizationId: string, orderId: string): Promise<{
        invoiceNumber: string;
        orderNumber: string | null;
        invoiceDate: Date;
        businessName: string;
        customerName: string;
        customerNumber: string | null;
        lines: {
            itemName: string;
            qty: string;
            unitPrice: string;
            lineTotal: string;
        }[];
        subtotal: string;
        discount: string;
        grandTotal: string;
        balance: string;
    }>;
    private resolvePricedLines;
    private resolveInventoryLines;
    private totals;
    /**
     * Idempotency strategy (documented for Phase 4.1):
     * The client sends a generated `clientRequestId` (UUID) with every create.
     * It is stored on the order as `idempotencyKey` with a DB-level unique
     * constraint on (organizationId, idempotencyKey). A retry of the same
     * logical create (browser double-submit, network retry, fetch retry)
     * either finds the existing order up front or hits the unique constraint
     * (P2002) inside the transaction — in both cases the original order is
     * returned and stock is consumed exactly once. The transaction guarantees
     * order + lines + stock movements commit or roll back atomically.
     */
    /**
     * Coordinated in-transaction resolution of a referenced measurement version.
     *
     * EVERY path that creates or changes an order's `measurementVersionId` MUST
     * call this INSIDE its transaction before writing the reference. It acquires
     * the same `FOR UPDATE` row lock the correction path takes, then validates
     * org scope + person/customer ownership + type, and finally reads the full
     * row (with KS/CP) to build the immutable order snapshot. Because the lock is
     * held for the remainder of the transaction, a concurrent in-place correction
     * cannot mutate this version between our validation and the reference write.
     *
     * `ownerId`/`ownerKind` express the ownership rule: when a wearer Person is on
     * the order the measurement must belong to that Person; otherwise it must
     * belong to the booking Customer.
     */
    private resolveMeasurementForOrderTx;
    create(organizationId: string, dto: OrderCreateInput, actorUserId: string): Promise<{
        customer: {
            id: string;
            customerNumber: string | null;
            name: string;
        };
        person: {
            id: string;
            name: string;
            personNumber: string | null;
        } | null;
        payerCustomer: {
            id: string;
            customerNumber: string | null;
            name: string;
        } | null;
        measurementVersion: {
            id: string;
            type: import("@prisma/client").$Enums.MeasurementType;
            versionNo: number;
        } | null;
        garmentLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        designLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        inventoryLines: ({
            inventoryVariant: {
                id: string;
                name: string | null;
                variantCode: string;
                sku: string | null;
                isBase: boolean;
            };
        } & {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            inventoryItemId: string;
            itemName: string;
            qty: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
            inventoryVariantId: string;
            uom: string;
            unitSellPrice: Prisma.Decimal;
            unitCostSnapshot: Prisma.Decimal;
            sourceRuleId: string | null;
            sourceRuleCode: string | null;
            isAuto: boolean;
        })[];
        invoice: {
            id: string;
        } | null;
    } & {
        id: string;
        organizationId: string;
        orderType: import("@prisma/client").$Enums.OrderType;
        orderNumber: string | null;
        legacyMeasureId: number | null;
        legacyCpMeasureId: number | null;
        customerId: string;
        personId: string | null;
        payerCustomerId: string | null;
        payerOverrideReason: string | null;
        measurementVersionId: string | null;
        status: import("@prisma/client").$Enums.OrderStatus;
        financialStatus: import("@prisma/client").$Enums.OrderFinancialStatus;
        deliveryStatusImported: string | null;
        source: import("@prisma/client").$Enums.OrderSource;
        bookingDate: Date | null;
        trialDate: Date | null;
        promisedDeliveryDate: Date | null;
        actualDeliveryDate: Date | null;
        urgentFlag: boolean;
        urgentReason: string | null;
        notes: string | null;
        internalNotes: string | null;
        kamizQty: string | null;
        kurtaQty: string | null;
        shalwarQty: string | null;
        pajamaQty: string | null;
        bshShirtQty: string | null;
        opShirtQty: string | null;
        safShirtQty: string | null;
        pantQty: string | null;
        subtotalAmount: Prisma.Decimal;
        discountAmount: Prisma.Decimal;
        adjustmentAmount: Prisma.Decimal;
        grandTotal: Prisma.Decimal;
        advanceAmount: Prisma.Decimal;
        balanceAmount: Prisma.Decimal;
        measurementSnapshot: Prisma.JsonValue | null;
        personSnapshot: Prisma.JsonValue | null;
        payerSnapshot: Prisma.JsonValue | null;
        fitSnapshot: Prisma.JsonValue | null;
        personNameSnapshot: string | null;
        personNumberSnapshot: string | null;
        payerNameSnapshot: string | null;
        payerNumberSnapshot: string | null;
        inventoryAppliedAt: Date | null;
        stockLocationId: string | null;
        idempotencyKey: string | null;
        sourceSystem: string | null;
        importBatchId: string | null;
        importedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
        archivedAt: Date | null;
        cancelledAt: Date | null;
    }>;
    private createTx;
    /**
     * Tx-aware order create used by the Booking Desk. Performs the SAME payer/
     * person/measurement ownership validation, line resolution, numbering, snapshot
     * capture, exact-once stock consumption and audit as the public create — but
     * entirely inside the caller's transaction (no nested transactions). Order
     * idempotencyKey is still set from clientRequestId for defense in depth; the
     * Booking Desk owns the outer idempotency via BookingSubmission.
     */
    createInTx(tx: Prisma.TransactionClient, organizationId: string, dto: OrderCreateInput, actorUserId: string): Promise<{
        customer: {
            id: string;
            customerNumber: string | null;
            name: string;
        };
        person: {
            id: string;
            name: string;
            personNumber: string | null;
        } | null;
        payerCustomer: {
            id: string;
            customerNumber: string | null;
            name: string;
        } | null;
        measurementVersion: {
            id: string;
            type: import("@prisma/client").$Enums.MeasurementType;
            versionNo: number;
        } | null;
        garmentLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        designLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        inventoryLines: ({
            inventoryVariant: {
                id: string;
                name: string | null;
                variantCode: string;
                sku: string | null;
                isBase: boolean;
            };
        } & {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            inventoryItemId: string;
            itemName: string;
            qty: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
            inventoryVariantId: string;
            uom: string;
            unitSellPrice: Prisma.Decimal;
            unitCostSnapshot: Prisma.Decimal;
            sourceRuleId: string | null;
            sourceRuleCode: string | null;
            isAuto: boolean;
        })[];
        invoice: {
            id: string;
        } | null;
    } & {
        id: string;
        organizationId: string;
        orderType: import("@prisma/client").$Enums.OrderType;
        orderNumber: string | null;
        legacyMeasureId: number | null;
        legacyCpMeasureId: number | null;
        customerId: string;
        personId: string | null;
        payerCustomerId: string | null;
        payerOverrideReason: string | null;
        measurementVersionId: string | null;
        status: import("@prisma/client").$Enums.OrderStatus;
        financialStatus: import("@prisma/client").$Enums.OrderFinancialStatus;
        deliveryStatusImported: string | null;
        source: import("@prisma/client").$Enums.OrderSource;
        bookingDate: Date | null;
        trialDate: Date | null;
        promisedDeliveryDate: Date | null;
        actualDeliveryDate: Date | null;
        urgentFlag: boolean;
        urgentReason: string | null;
        notes: string | null;
        internalNotes: string | null;
        kamizQty: string | null;
        kurtaQty: string | null;
        shalwarQty: string | null;
        pajamaQty: string | null;
        bshShirtQty: string | null;
        opShirtQty: string | null;
        safShirtQty: string | null;
        pantQty: string | null;
        subtotalAmount: Prisma.Decimal;
        discountAmount: Prisma.Decimal;
        adjustmentAmount: Prisma.Decimal;
        grandTotal: Prisma.Decimal;
        advanceAmount: Prisma.Decimal;
        balanceAmount: Prisma.Decimal;
        measurementSnapshot: Prisma.JsonValue | null;
        personSnapshot: Prisma.JsonValue | null;
        payerSnapshot: Prisma.JsonValue | null;
        fitSnapshot: Prisma.JsonValue | null;
        personNameSnapshot: string | null;
        personNumberSnapshot: string | null;
        payerNameSnapshot: string | null;
        payerNumberSnapshot: string | null;
        inventoryAppliedAt: Date | null;
        stockLocationId: string | null;
        idempotencyKey: string | null;
        sourceSystem: string | null;
        importBatchId: string | null;
        importedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
        archivedAt: Date | null;
        cancelledAt: Date | null;
    }>;
    private writeOrderRows;
    /**
     * Edit an order. Restrictions:
     * - Only DRAFT/CONFIRMED orders can be edited. Once production, delivery,
     *   cancellation or archival activity exists, edits are rejected (409).
     * - Payments beyond the order's own advance snapshot, worker assignments and
     *   earnings are Phase 5 scope; the status gate covers all of them because
     *   such activity always moves the order past CONFIRMED.
     * Line semantics (full desired set per provided array):
     * - line with `id`: existing line — stored price/cost snapshots preserved;
     *   qty/notes may change. Historical prices are never recalculated.
     * - line without `id`: new line — receives the current rate-list /
     *   inventory-item snapshot.
     * - stored line missing from the array: removed.
     * Inventory stock changes are delta movements only (ORDER_DELTA), computed
     * per item as (new qty − old qty); no full re-consume.
     */
    update(organizationId: string, id: string, dto: OrderUpdateInput, actorUserId: string): Promise<{
        customer: {
            id: string;
            customerNumber: string | null;
            name: string;
        };
        person: {
            id: string;
            name: string;
            personNumber: string | null;
        } | null;
        payerCustomer: {
            id: string;
            customerNumber: string | null;
            name: string;
        } | null;
        measurementVersion: {
            id: string;
            type: import("@prisma/client").$Enums.MeasurementType;
            versionNo: number;
        } | null;
        garmentLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        designLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        inventoryLines: ({
            inventoryVariant: {
                id: string;
                name: string | null;
                variantCode: string;
                sku: string | null;
                isBase: boolean;
            };
        } & {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            inventoryItemId: string;
            itemName: string;
            qty: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
            inventoryVariantId: string;
            uom: string;
            unitSellPrice: Prisma.Decimal;
            unitCostSnapshot: Prisma.Decimal;
            sourceRuleId: string | null;
            sourceRuleCode: string | null;
            isAuto: boolean;
        })[];
        invoice: {
            id: string;
        } | null;
    } & {
        id: string;
        organizationId: string;
        orderType: import("@prisma/client").$Enums.OrderType;
        orderNumber: string | null;
        legacyMeasureId: number | null;
        legacyCpMeasureId: number | null;
        customerId: string;
        personId: string | null;
        payerCustomerId: string | null;
        payerOverrideReason: string | null;
        measurementVersionId: string | null;
        status: import("@prisma/client").$Enums.OrderStatus;
        financialStatus: import("@prisma/client").$Enums.OrderFinancialStatus;
        deliveryStatusImported: string | null;
        source: import("@prisma/client").$Enums.OrderSource;
        bookingDate: Date | null;
        trialDate: Date | null;
        promisedDeliveryDate: Date | null;
        actualDeliveryDate: Date | null;
        urgentFlag: boolean;
        urgentReason: string | null;
        notes: string | null;
        internalNotes: string | null;
        kamizQty: string | null;
        kurtaQty: string | null;
        shalwarQty: string | null;
        pajamaQty: string | null;
        bshShirtQty: string | null;
        opShirtQty: string | null;
        safShirtQty: string | null;
        pantQty: string | null;
        subtotalAmount: Prisma.Decimal;
        discountAmount: Prisma.Decimal;
        adjustmentAmount: Prisma.Decimal;
        grandTotal: Prisma.Decimal;
        advanceAmount: Prisma.Decimal;
        balanceAmount: Prisma.Decimal;
        measurementSnapshot: Prisma.JsonValue | null;
        personSnapshot: Prisma.JsonValue | null;
        payerSnapshot: Prisma.JsonValue | null;
        fitSnapshot: Prisma.JsonValue | null;
        personNameSnapshot: string | null;
        personNumberSnapshot: string | null;
        payerNameSnapshot: string | null;
        payerNumberSnapshot: string | null;
        inventoryAppliedAt: Date | null;
        stockLocationId: string | null;
        idempotencyKey: string | null;
        sourceSystem: string | null;
        importBatchId: string | null;
        importedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
        archivedAt: Date | null;
        cancelledAt: Date | null;
    }>;
    private pricedFromExisting;
    /** Kept lines (matched by id) preserve their stored unitPrice snapshot; new lines get current rates. */
    private mergePricedLines;
    /** Kept inventory lines preserve sell/cost snapshots; new lines snapshot current item prices. */
    private mergeInventoryLines;
    cancel(organizationId: string, id: string, actorUserId: string, reason?: string): Promise<{
        customer: {
            id: string;
            customerNumber: string | null;
            name: string;
        };
        person: {
            id: string;
            name: string;
            personNumber: string | null;
        } | null;
        payerCustomer: {
            id: string;
            customerNumber: string | null;
            name: string;
        } | null;
        measurementVersion: {
            id: string;
            type: import("@prisma/client").$Enums.MeasurementType;
            versionNo: number;
        } | null;
        garmentLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        designLines: {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            rateItemId: string | null;
            itemName: string;
            qty: Prisma.Decimal;
            unitPrice: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
        }[];
        inventoryLines: ({
            inventoryVariant: {
                id: string;
                name: string | null;
                variantCode: string;
                sku: string | null;
                isBase: boolean;
            };
        } & {
            id: string;
            organizationId: string;
            notes: string | null;
            orderId: string;
            inventoryItemId: string;
            itemName: string;
            qty: Prisma.Decimal;
            lineTotal: Prisma.Decimal;
            sortOrder: number;
            inventoryVariantId: string;
            uom: string;
            unitSellPrice: Prisma.Decimal;
            unitCostSnapshot: Prisma.Decimal;
            sourceRuleId: string | null;
            sourceRuleCode: string | null;
            isAuto: boolean;
        })[];
        invoice: {
            id: string;
        } | null;
    } & {
        id: string;
        organizationId: string;
        orderType: import("@prisma/client").$Enums.OrderType;
        orderNumber: string | null;
        legacyMeasureId: number | null;
        legacyCpMeasureId: number | null;
        customerId: string;
        personId: string | null;
        payerCustomerId: string | null;
        payerOverrideReason: string | null;
        measurementVersionId: string | null;
        status: import("@prisma/client").$Enums.OrderStatus;
        financialStatus: import("@prisma/client").$Enums.OrderFinancialStatus;
        deliveryStatusImported: string | null;
        source: import("@prisma/client").$Enums.OrderSource;
        bookingDate: Date | null;
        trialDate: Date | null;
        promisedDeliveryDate: Date | null;
        actualDeliveryDate: Date | null;
        urgentFlag: boolean;
        urgentReason: string | null;
        notes: string | null;
        internalNotes: string | null;
        kamizQty: string | null;
        kurtaQty: string | null;
        shalwarQty: string | null;
        pajamaQty: string | null;
        bshShirtQty: string | null;
        opShirtQty: string | null;
        safShirtQty: string | null;
        pantQty: string | null;
        subtotalAmount: Prisma.Decimal;
        discountAmount: Prisma.Decimal;
        adjustmentAmount: Prisma.Decimal;
        grandTotal: Prisma.Decimal;
        advanceAmount: Prisma.Decimal;
        balanceAmount: Prisma.Decimal;
        measurementSnapshot: Prisma.JsonValue | null;
        personSnapshot: Prisma.JsonValue | null;
        payerSnapshot: Prisma.JsonValue | null;
        fitSnapshot: Prisma.JsonValue | null;
        personNameSnapshot: string | null;
        personNumberSnapshot: string | null;
        payerNameSnapshot: string | null;
        payerNumberSnapshot: string | null;
        inventoryAppliedAt: Date | null;
        stockLocationId: string | null;
        idempotencyKey: string | null;
        sourceSystem: string | null;
        importBatchId: string | null;
        importedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
        archivedAt: Date | null;
        cancelledAt: Date | null;
    }>;
}
//# sourceMappingURL=orders.service.d.ts.map