/// <reference types="mongoose/types/aggregate" />
/// <reference types="mongoose/types/callback" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/cursor" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/expressions" />
/// <reference types="mongoose/types/helpers" />
/// <reference types="mongoose/types/middlewares" />
/// <reference types="mongoose/types/indexes" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/mongooseoptions" />
/// <reference types="mongoose/types/pipelinestage" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/schematypes" />
/// <reference types="mongoose/types/session" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/validation" />
/// <reference types="mongoose/types/virtuals" />
/// <reference types="mongoose/types/inferschematype" />
import mongoose from 'mongoose';
import { IReceivableItemDocPopulated } from '../models/ReceivableItem.model';
export interface IPartiallyPaidInvoice {
    invoiceNumber: string;
    invoiceDate: Date;
    customer: string;
    originalAmount: number;
    restatedAmount: number;
    changeCounter: number;
    lastChangeDate: Date;
    difference: number;
}
export declare const CUSTOMER_NUMBER_SEPARATOR = "~@~";
export declare const getLastDigitFromAllValues: (allBbcDates: {
    bbcDate: Date;
    ids: mongoose.Types.ObjectId[];
}[]) => Promise<any[]>;
export declare const getReceivableItemsSKUAndValue: (bbcDate: string, borrowerId: string) => Promise<{
    _id: string;
    qty: number;
}[]>;
export declare const getReceivablesAndTheirQtyByBorrowerId: (borrowerId: string, allBbcDates: {
    bbcDate: Date;
}[]) => Promise<{
    _id: string;
    qty: number;
}[]>;
export declare const aggregateSKUDateAgingPlot: (bbcSheetIds: mongoose.Types.ObjectId[]) => Promise<{
    '0-30': number;
    '30-60': number;
    '60-90': number;
    '90+': number;
}>;
export declare const aggregateAllValuesForBbc: (sheetIds: mongoose.Types.ObjectId[]) => Promise<any[]>;
export declare const aggregateBbcExposures: (bbcSheetIds: mongoose.Types.ObjectId[]) => Promise<{
    receivableTotal: any;
    topItemsForBbc: any[];
}>;
export declare const aggregateBbcExposuresGrouped: (bbcSheetIds: mongoose.Types.ObjectId[]) => Promise<{
    receivableTotal: any;
    topItemsForBbc: any[];
}>;
export declare const getAllCustomers: (borrowerId: string) => Promise<{
    customers: string[];
}[]>;
export declare const getAverageInvoiceSize: (borrowerId: string) => Promise<any[]>;
export declare const getAverageOverInvoiceSize: (borrowerId: string, averageInvoiceSize: any) => Promise<any[]>;
export declare const getPartialPaidTable: (bbcSheetIds: mongoose.Types.ObjectId[]) => Promise<IReceivableItemDocPopulated[]>;
export declare const getFirstLastBBCInvoiceWithNumberOccurrence: (bbcSheetIds: mongoose.Types.ObjectId[], { customerTitle, invoiceNumber, }: {
    customerTitle: any;
    invoiceNumber: any;
}, firstLast: 'first' | 'last') => Promise<any[]>;
export declare const getUniqInvoices: (bbcSheetIds: mongoose.Types.ObjectId[]) => Promise<{
    _id: null;
    uniqueNumbers: string[];
    uniqueValues: string[];
}[]>;
export declare const setReceivableManualInputsToggle: (bbcDateId: string, useManualInputs: boolean) => Promise<void>;
export declare const getReceivableItemsCustomerAndValue: (sheetIds: string[]) => Promise<{
    _id: string;
    totalAmount: number;
}[]>;
export declare const getDuplicates: (bbcDateId: string) => Promise<any[]>;
export declare const getAverageOver: (borrowerId: string) => Promise<any[]>;
export declare const compareInvoices: (items1: any[], items2: any[]) => {
    addedInvoices: any[];
    removedInvoices: any[];
};
