import { Prisma } from "../generated/prisma/client.js";
export declare class BoxReturnService {
    /**
     * Get supplier box ledger — outstanding tomato boxes per supplier
     */
    getSupplierBoxLedger(search?: string): Promise<{
        supplierId: bigint;
        supplierName: string;
        supplierTamilName: string | null;
        mobileNo: string;
        totalIncomingBoxes: number;
        totalReturnedBoxes: number;
        outstandingBoxes: number;
    }[]>;
    /**
     * Get incoming box purchases history (where unit == Unit.BOX and vegetableId in BOX_TRACKED_VEGETABLE_IDS)
     */
    getIncomingBoxHistory(filters: {
        supplierId?: string | bigint;
        startDate?: string;
        endDate?: string;
        search?: string;
    }, page?: number, limit?: number): Promise<{
        items: ({
            vegetable: {
                name: string;
                id: bigint;
                tamilName: string | null;
            };
            supplier: {
                name: string;
                id: bigint;
                tamilName: string | null;
            } | null;
        } & {
            unit: import("../generated/prisma/index.js").$Enums.PurchaseUnit;
            id: bigint;
            status: import("../generated/prisma/index.js").$Enums.PurchaseStatus;
            createdAt: Date;
            updatedAt: Date;
            createdBy: bigint | null;
            deletedAt: Date | null;
            supplierId: bigint | null;
            remarks: string | null;
            purchaseDate: Date;
            billNo: string | null;
            cashSupplierName: string | null;
            vegetableId: bigint;
            lotNo: string;
            purchaseType: import("../generated/prisma/index.js").$Enums.PurchaseType;
            rateType: import("../generated/prisma/index.js").$Enums.RateType;
            bags: Prisma.Decimal;
            weightPerBag: Prisma.Decimal | null;
            quantity: Prisma.Decimal;
            ratePerUnit: Prisma.Decimal;
            freight: Prisma.Decimal;
            extraFreight: Prisma.Decimal;
            associationFee: Prisma.Decimal;
            unloadingFee: Prisma.Decimal;
            miscellaneousFee: Prisma.Decimal;
            totalFreight: Prisma.Decimal;
            transportFee: Prisma.Decimal;
            loadingUnloadingFee: Prisma.Decimal;
            otherCharges: Prisma.Decimal;
            thaiyalCharges: Prisma.Decimal;
            extraCharges: Prisma.Decimal;
            goodsTotal: Prisma.Decimal;
            surchargeTotal: Prisma.Decimal;
            costPerUnit: Prisma.Decimal;
            grandTotal: Prisma.Decimal;
            dateOfDespatch: Date | null;
            arrivalDate: Date | null;
            placeOfDespatch: string | null;
            placeOfArrival: string | null;
            truckNo: string | null;
            agentName: string | null;
            advanceAmount: Prisma.Decimal;
            balanceAmount: Prisma.Decimal;
            remainingQuantity: Prisma.Decimal;
            remainingBags: Prisma.Decimal;
            closedAt: Date | null;
        })[];
        total: number;
        page: number;
        limit: number;
        totalPages: number;
    }>;
    /**
     * Get box return history
     */
    getBoxReturns(filters: {
        supplierId?: string | bigint;
        startDate?: string;
        endDate?: string;
        search?: string;
    }, page?: number, limit?: number): Promise<{
        items: {
            signatureUrl: string | null;
            createdByUser: {
                name: string;
                id: bigint;
            } | null;
            supplier: {
                name: string;
                id: bigint;
                tamilName: string | null;
            };
            id: bigint;
            createdAt: Date;
            updatedAt: Date;
            createdBy: bigint | null;
            supplierId: bigint;
            remarks: string | null;
            returnDate: Date;
            boxCount: Prisma.Decimal;
            signature: string | null;
        }[];
        total: number;
        page: number;
        limit: number;
        totalPages: number;
    }>;
    /**
     * Get a single box return record by ID
     */
    getBoxReturnById(id: bigint): Promise<{
        signatureUrl: string | null;
        createdByUser: {
            name: string;
            id: bigint;
        } | null;
        supplier: {
            name: string;
            id: bigint;
            tamilName: string | null;
        };
        id: bigint;
        createdAt: Date;
        updatedAt: Date;
        createdBy: bigint | null;
        supplierId: bigint;
        remarks: string | null;
        returnDate: Date;
        boxCount: Prisma.Decimal;
        signature: string | null;
    }>;
    /**
     * Create box return record with validation against available outstanding boxes
     */
    createBoxReturn(data: {
        supplierId: bigint;
        returnDate: string | Date;
        boxCount: number | Prisma.Decimal;
        remarks?: string;
        signature?: string | null;
        createdBy?: bigint | null;
    }): Promise<{
        supplier: {
            name: string;
            id: bigint;
            tamilName: string | null;
        };
    } & {
        id: bigint;
        createdAt: Date;
        updatedAt: Date;
        createdBy: bigint | null;
        supplierId: bigint;
        remarks: string | null;
        returnDate: Date;
        boxCount: Prisma.Decimal;
        signature: string | null;
    }>;
    /**
     * Update box return record with validation against available outstanding boxes
     */
    updateBoxReturn(id: bigint, data: {
        returnDate?: string | Date;
        boxCount?: number | Prisma.Decimal;
        remarks?: string;
        signature?: string | null;
    }): Promise<{
        supplier: {
            name: string;
            id: bigint;
            tamilName: string | null;
        };
    } & {
        id: bigint;
        createdAt: Date;
        updatedAt: Date;
        createdBy: bigint | null;
        supplierId: bigint;
        remarks: string | null;
        returnDate: Date;
        boxCount: Prisma.Decimal;
        signature: string | null;
    }>;
    /**
     * Delete box return record
     */
    deleteBoxReturn(id: bigint): Promise<{
        id: bigint;
        createdAt: Date;
        updatedAt: Date;
        createdBy: bigint | null;
        supplierId: bigint;
        remarks: string | null;
        returnDate: Date;
        boxCount: Prisma.Decimal;
        signature: string | null;
    }>;
}
//# sourceMappingURL=BoxReturnService.d.ts.map