Purpose(用途): Main routine for NY Billing. This logic calculates the installments and provides all data necessary to print, display, and report billing status. The form will display the billing information. The main structure, InvoiceInfo, has all information including detail of Installments and Payment activities. Although the main object is a form, the form need not be shown in order to get billing information. This is the only billing logic for this version of the system. All billing inquiries should go through this routine.
Usage(用法): Nothing will be performed during the OnCreate event with the exception of setting some reference variables. All calculations are done by calling the main routine LoadAcctInfo. This routine can be called many times for different policies since it is fully initialized on each call. There are 5 parameters for the main functions and their usage is as follows:
bool LoadAcctInfo(
String policyNo - Supplies the logic with the targeted PolicyNo./t bool printInvoice - Set to true if you want to print the invoice./t bool nightRunning - If being called from the night, set to true./t bool payableRunning - If being called by accounting rpt, set to true. String masterPrintDate - This is a date. For more info on usage, see cpp. );
No preliminary logic needs to be performed and the function will return true in most cases. No structures are passed since the main structure is public. It is imperative that the LoadAcctInfo be called prior to displaying the screen or unexpected results can occur since the main structures will not be initialized.
struct InvoiceInfoStruct{ PaymentHistoryStruct Payments[30]; - Payment History int paymentCount; - Count of Payments InstallmentStruct Installments[30]; - Installment Information int installmentCount; - Count of Installments int currInstall; - The current due installment float totalPaid; - The total paid on file * float totalDue; - Total due on file float pastDue; - Total amount past due float totalBilled; - Total amount billed on file float totalApplied; - Amount applied to installments ** String equityDate; - The date the premium is paid to String dateDue; - Date the file is due a payment float annualizedPremium; - the annualized premium *** };
* Restricted to masterPrintDate ** Should equal total paid *** What the annualized premium is for the policy as stored in the tables if rated for one year.
Update History(更新歷史): 09/18/1999 - Scott - Completed 02/01/2000 ?C Scott - Fixed totalPaid error on cancelled file */