import { DevicePaymentPlan } from "vr-models"; import { Transaction } from "sequelize"; export interface DeleteCheckResult { canDelete: boolean; reason?: string; } export declare const DPP_OperationsUtil: { /** * Check if a payment plan can be deleted * Rule: Can only delete if NO payments have been made */ canDeletePlan(planId: string, transaction?: Transaction): Promise; /** * Check if plan can be updated (before payments) */ canUpdatePlan(plan: DevicePaymentPlan): { canUpdate: boolean; reason?: string; }; /** * Validate payment amount against next pending installment */ validatePaymentAmount(plan: DevicePaymentPlan, amount: number, transaction?: Transaction): Promise<{ valid: boolean; reason?: string; nextInstallment?: any; }>; /** * Calculate new values after payment */ calculatePaymentEffects(plan: DevicePaymentPlan, amount: number): { newPaidAmount: number; newOutstandingAmount: number; isNowCompleted: boolean; progress: number; statusChanged: boolean; }; /** * Generate installments for a hire purchase plan * ✅ Updated to use unitPrice and create one installment at a time */ generateInstallments(plan: DevicePaymentPlan, transaction?: Transaction): Promise; /** * Format plan for operation response * ✅ Updated to use unitPrice and totalAmount */ formatPlanForOps(plan: DevicePaymentPlan | null): any; };