import { Prisma } from '@prisma/client';
import { CoaService } from './coa.service';
import { PostingService } from './posting.service';
import { NumberingService } from '../numbering/numbering.service';
/**
 * Phase 7 — order delivery accounting (gate 0.7 = revenue at DELIVERED):
 * 1. Creates the CustomerInvoice snapshot (INV series) for the order.
 * 2. Posts revenue: Dr AR (net) / Cr Tailoring Revenue + Cr Design Revenue.
 *    Design revenue = sum of design lines (capped at net); remainder tailoring.
 * 3. Applies pre-delivery customer money (ADVANCE/CREDIT allocations):
 *    Dr Customer Advances / Cr AR, and links those allocations to the invoice.
 * Runs inside the caller's transaction; idempotent per order.
 */
export declare class DeliveryPostingService {
    private readonly coa;
    private readonly posting;
    private readonly numbering;
    constructor(coa: CoaService, posting: PostingService, numbering: NumberingService);
    postDelivery(tx: Prisma.TransactionClient, args: {
        organizationId: string;
        orderId: string;
        actorUserId: string;
        deliveryDate?: Date;
    }): Promise<{
        invoiceId: string;
        invoiceNumber: string;
    } | null>;
}
//# sourceMappingURL=delivery-posting.service.d.ts.map