/** * @deprecated Use `ApplyRecordDiscountAndTaxes` from `shareneus` * (src/accounting/discounts/record-discount.ts), which does everything this does. * Kept only until MainUI's callers migrate; delete it then. * * On migration: call `ApplyRecordDiscountAndTaxes(recordData, { TaxCodes: taxcodes })` * and use `.Record` where this return value was used. `isTaxable` is dropped -- * it was never read. What changes for the caller: * - `RecDisc` shares now sum exactly to the header amount, and match what the * server verifies to the paisa. This function's float split does not. * - Line order is kept; this function moves every `NoDisc` line to the end. * - A stale `RecDisc` on a `NoDisc` or return line is cleared to 0. * - A line discount above its amount, or a header discount above what remains, * comes back in `.Issues` with the record unchanged, instead of negative shares. * - The input is not mutated, and no `net`/`Perc`/`LPerc`/`PPerc` fields are added. */ export declare function DiscountAndTaxCalculation(recordData: any, isTaxable: boolean, taxcodes?: any): any; /** * @deprecated Use `CalculateRecordDiscountForLine` from `shareneus` * (src/accounting/discounts/record-discount.ts). Kept only until MainUI's callers * migrate; delete it then. * * On migration: pass the line in its stored shape (`{ _id, Qty, UnPr, Disc, NoDisc }`, * or `Pr` for a service line) with group `"ITEM"` or `"SERVICE"`, and read `.RecDisc`. * Ids are now compared as text: this function compares with ===, so an ObjectId * never matches a string id and it silently returns the LAST line's share. * * Calculates the record-level discount amount (RecDisc) for a single line. * * @param invoiceData Full invoice data containing Items, Ops and discount fields. * @param currentLine Normalised data for the line being edited. * @param lineType 'item' for parts/inventory lines, 'op' for service/labor lines. */ export declare function calculateRecordDiscountForLine(invoiceData: any, currentLine: { _id: any; noDisc: boolean; /** Item-only: quantity */ qty?: number; /** Item-only: unit price */ unpr?: number; /** Op-only: gross amount */ amt?: number; disc: number; }, lineType: 'item' | 'op'): number;