Library MEN; {$O+,F+,V-,X+} uses delphionly, carlist, globals, phelper, helper, SysUtils, men2, // Factors men3; // Old rates Var Loop_IC,Loop_ID:integer; Type SortType = Array[1..4, 1..MaxCar] Of Real; MatrixType = Record BiPd, Pip, UmMed, Cmp, Cll: Real; End; DiscType = Record Matrix: MatrixType; AirBag, Abs, AntiTheft, Senior, Group: Real; End; TTier = (T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14); Var Tier : TTier; LSN, NoCovStr, NumAccPhys, NumArtisan, NumBusiness : Byte; InExpDvr,UnVerDvr,Susp : Array[1..4] of Boolean; Use_1_10 : array[1..4] of boolean; TermF:Real; Sr22, Sr22s, DBUse, VBUse, Sorting, VehicleU, NonOwners, SubmitRisk, BiReqWithMed, AllExcluded, AnyExcluded, MakeModelReq, ModelRequired, AnyDriverSr22, InspectVehicle, VehicleNotFound, OKFor1To4, InspectMsg, AnyACCorMAJ, PhysicianSt, MarriedWOSpouse, CreditNotOrdered, HasSR22S, ObtainLic, TruckWithBus, SpouseFound, PI : Boolean; AcvRequired : Array [1..4] of Boolean; NotAtFault,NumWithFullCov: Integer; DefaultTow,DefaultRent:String; Sp : Array[1..4] of integer; SpouseOfNI, Senior: array[1..4] of boolean; InvalidCredit:Boolean; {LB added 7/29/04 for 8/1/04 update - was not giving message} PipPdOnly: Boolean; InvalidClass:boolean; Function Is_Renewal:Boolean; Begin Is_renewal:= (Br.Client.co = Br.Cump) and (Br.Client.Renewal = 'Y'); end; function UseNew: boolean; begin Result := (not CompanyRenewal and IsDate(08,23,06)) or (CompanyRenewal and IsDate(10,07,06)); end; function SetMsg(Str : String) : Boolean; begin SetMsg := True; Br.MsgNum := 10; Br.Rope := Str; end; function UnAcceptable:Boolean; Var U:Boolean; begin Br.MsgNum := 0; U := False; if RequestCov(CollL) then begin If AcvRequired[Br.Ic] Then U := SetMsg('ACV REQUIRED FOR PHYS RATE'); If (Br.RealYear[Br.IC] - ToInteger(Br.Veh[Br.IC].VehYr) > 20) {and (Not Is_Renewal)} then Br.MsgNum:=2; end; if (Not (Br.MsgNum In [0,5,10])) Or (Not RequestCov(CollL)) then U := True; UnAcceptable := U; end; function TotalyUn: Boolean; Var U:Boolean; SaveMsgNum: Integer; begin U := False; SaveMsgNum := Br.MsgNum; Br.MsgNum := 0; If (Br.Client.PolPer='A') Then Begin Br.Allm := 1; Br.MsgNum := 11; If LSN = 4 Then U := True; End; if InvalidClass then U := setmsg('INVALID CLASS - PLEASE RERATE'); If SubmitRisk Then Br.MsgNum := 5; If VehicleNotFound Then Br.MsgNum:=16; If ModelRequired Then Br.MsgNum := 31; If MakeModelReq Then Br.MsgNum := 15; If HasSR22S Then U:=SetMsg('SR22S NOT WRITTEN'); If MarriedWOSpouse then U:=SetMsg('SPOUSE MUST BE INCLUDED ON POLICY'); If TruckWithBus Then U := SetMsg('VEHICLE UNACCEPTABLE FOR BUSINESS'); {Lisa took out 2/23/04 for 3/3/04 update-Not in new manual} {If (Br.NumC-ActualDrivers)>1 Then U := SetMsg('2 MORE CARS THAN DRIVERS UNACC');} If ((Br.Veh[1].Bi<>'0') And (Br.Veh[1].Pd<>'0') And (Br.Veh[1].Pip='NONE')) Then If (Not Br.Company_Allows_Non_Owners) Then Br.MsgNum:=45; {BGB> NEW NON OWNER FUTURE ENHANCEMENTS - until effective initialize proc with stay false; ·Non owner vehicles on owner policies are prohibited. ·Owner vehicles on non owner policies are prohibited. ·Non owner policies may not have more than one driver. ·Non owner policies may not have more than one vehicle.} //Note: remove NOT when effective. If NonOwners and (Save_NumD > 1) and (Not Br.Company_Allows_Non_Owners) then U := SetMsg('Non owner policies may not have more than one driver.'); If NonOwners and (Br.NumC > 1) and (Not Br.Company_Allows_Non_Owners) then U := SetMsg('Non owner policies may not have more than one vehicle.'); { 1) Then U := SetMsg('ONLY 1 BUS/ART USE VEHICLE ALLOWED'); If AllExcluded And (Not Sorting) Then U := SetMsg('NOT ALL DRIVERS CAN BE EXCLUDED'); If (AnyDriverSr22) and (AnyExcluded) Then U := SetMsg('EXCLUSIONS NOT ALLOWED WITH SR22'); If (Requestcov(MedL)) and (Not RequestCov(BiL)) Then U:=SetMsg('BI COVERAGE REQUIRED WITH MED'); If AnyDriverSr22 And (Not RequestCov(BiL)) And (Not Br.SecondCompany) then Br.MsgNum := 55; If DBUse And Not VBUse Then Br.MsgNum := 25; If Br.SecondCompany Or ((Not RequestCov(LiabL)) And RequestCov(PhysL)) then Br.MsgNum := 49; If InvalidCredit Then U:=SetMsg('INVALID CREDIT SCORE'); Check_Limits(DisAllow_15_30, Allow_25_50, Allow_50_100, Allow_100_300, DisAllow_250_500, Br.MsgNum); Case NoCovStr Of 1:Br.MsgNum := 58; 2:Br.MsgNum := 57; 3:Br.MsgNum := 59; End; If Br.SecondCompany or ((NumAccPhys>0) and Not RequestCov(PdL)) Then Br.MsgNum := 49; If FctNotAvail then Br.MsgNum := 43; If DriverU Then Br.MsgNum := 3; If VehicleU Then Br.MsgNum := 1; If InvalidTerr Then Br.MsgNum := 8; {Lisa added 2/18/04 for 10/01/03 v1.2} {If Not UseNew Then U:=SetMsg('CALL COMPANY FOR RATES EFF. 3/3/04');} if (Not (Br.MsgNum In [0,5,10,11])) then U := True; if (Br.MsgNum = 0) then Br.MsgNum := SaveMsgNum; if (Br.MsgNum > 0) then Br.TheMsgNum := Br.MsgNum; TotalyUn := U; end; {EXTENSIVE CHANGES WERE MADE TO GETPOINTS FOR 3/3/04 UPDATE} {Lisa wrote: The following was fixed on/around 2/29/04-3/2/04 1. They process Oldest to Newest now. Was opposite before. 2. Their internet rater uses 17 months instead of 18 months for the FL rule 3. Their internet rater is NOT considering REF as an alc/drug vio for eligibility 4. Majors and Alcohol/Drug related violations are NEVER waived for eligibility-per Michael Callahan emails 1/23/04 and 1/27/04. 5. SRL is now a 3-3 minor that follows the FL Rule-per Michael Callahan email 1/27/04. 6. SRL, SUS, ACN are not considered violations when assigning points for DUI-per Michael Callahan email 1/27/04. 7. SPU & SPH are now 2-3 FL Rule violations} procedure GetPoints; type ClassVioT = (C_NONE,C_MINOR2,C_INTER2,C_SPEED2,C_MAJ2_12,C_MAJ2_35, C_MINOR3,C_INTER3,C_SPEED3,C_ACC_12,C_ACC_35,C_MAJ3_12,C_MAJ3_35, C_MAJ4_12,C_MAJ4_35); MyVioRec = record vio : type3; pts : integer; VioDate : string; ClassVio:ClassVioT; DrugRel:Boolean; WaivedMaj:Boolean;{Lisa added for 10/1/03 v1.2} Chargeable:Boolean;{Lisa added for 10/1/03 v1.2} NeverWaived:Boolean; {Lisa added for 10/1/03 v1.2} end; Var NP, Major, Major12, AtFault, AtFault12, DrugRel, Speeding, OpCnt,NumDFE,NumDTF : integer; MyVioArray : array[1..MaxVio] of MyVioRec; OtherVios:Boolean; Minor,Minor18:Integer; Procedure InitVars; var I: integer; begin for I := 1 to MaxVio do begin MyVioArray[I].pts := 0; MyVioArray[I].VioDate := ''; MyVioArray[I].vio := ''; MyVioArray[I].ClassVio:=C_NONE; MyVioArray[I].DrugRel:=False; MyVioArray[I].WaivedMaj:=False; MyVioArray[I].Chargeable:=True; MyVioArray[I].NeverWaived:=False; end; end; procedure CancelSameDayVios; var I, J: integer; {Lisa removed RemoveVio function-counters no longer have to be adjusted - for 10/1/03 v1.2} Procedure DoAdjustMinWithMaj(X,Y:Integer); Begin {LB} If (MyVioArray[X].Chargeable=False) And (MyVioArray[Y].Chargeable=False) Then Begin MyVioArray[Y].Classvio:=C_NONE; MyVioArray[X].Classvio:=C_NONE; MyVioArray[Y].Chargeable:=False; MyVioArray[X].Chargeable:=False; End Else If (MyVioArray[X].Chargeable=False) or (MyVioArray[Y].Chargeable=False) Then Begin If (MyVioArray[X].ClassVio>MyVioArray[Y].ClassVio) Then Begin MyVioArray[Y].Classvio:=C_NONE; MyVioArray[Y].Chargeable:=False; MyVioArray[X].Chargeable:=True; End Else Begin MyVioArray[X].Classvio:=C_NONE; MyVioArray[X].Chargeable:=False; MyVioArray[Y].Chargeable:=True; End; End Else Begin If (MyVioArray[X].Pts>=MyVioArray[Y].Pts) AND (MyVioArray[X].ClassVio>MyVioArray[Y].ClassVio) Then Begin MyVioArray[Y].ClassVio:=C_NONE; End Else Begin MyVioArray[X].ClassVio:=C_NONE; End; End; End; begin for i := 1 to MaxVio-1 do for j := i + 1 to MaxVio do if (i <> j) and (MyVioArray[i].VioDate = MyVioArray[j].VioDate) and (MyVioArray[i].Vio <> '') and (MyVioArray[j].Vio <> '') then begin {If Minor with Waived Major or other minor-Do Seperate procedure-LB 10/1/03 v1.2} If ((MyVioArray[J].ClassVio in [C_MINOR2,C_MINOR3]) and (MyVioArray[I].WaivedMaj=True)) or ((MyVioArray[I].ClassVio in [C_MINOR2,C_MINOR3]) and (MyVioArray[J].WaivedMaj=True)) Then DoAdjustMinwithMaj(J,I) else If (Not MyVioArray[J].Chargeable) and (Not MyVioArray[I].Chargeable) Then Begin MyVioArray[J].ClassVio:=C_NONE; MyVioArray[I].ClassVio:=C_NONE; End Else If Ord(MyVioArray[J].ClassVio) >= Ord(MyVioArray[I].ClassVio) Then Begin If (Not MyVioArray[J].Chargeable) And ((MyVioArray[I].Pts>MyVioArray[J].Pts) Or (MyVioArray[I].NeverWaived)) Then Begin MyVioArray[J].ClassVio:=C_NONE; MyVioArray[I].Chargeable:=True; End Else Begin MyVioArray[I].ClassVio:=C_NONE; MyVioArray[I].Chargeable:=False; MyVioArray[J].Chargeable:=True; End; End Else {I Class>J Class} Begin If (Not MyVioArray[I].Chargeable) and ((MyVioArray[J].Pts>MyVioArray[I].Pts) or (MyVioArray[J].NeverWaived)) Then Begin MyVioArray[I].ClassVio:=C_NONE; MyVioArray[J].Chargeable:=True; End Else Begin MyVioArray[J].ClassVio:=C_NONE; MyVioArray[J].Chargeable:=False; MyVioArray[I].Chargeable:=True; End; End; end; end; procedure SetDriverPoints; var I: integer; begin Br.NumPoints[Br.ID] := 0; for I := 1 to MaxVio do begin MyVioArray[I].Pts:=0; {Have to reset, because of DoAdjustMinwithMaj-LB 10/1/03 v1.2} If MyVioArray[I].Chargeable Then Begin Case MyVioArray[I].ClassVio of C_MAJ4_12,C_MAJ4_35:Inc(MyVioArray[I].Pts,4); C_MAJ3_12, C_MAJ3_35,C_MINOR3,C_SPEED3,C_INTER3, C_ACC_12,C_ACC_35:Inc(MyVioArray[I].Pts,3); C_MAJ2_12,C_MAJ2_35, C_MINOR2,C_SPEED2,C_INTER2:Inc(MyVioArray[I].Pts,2); End; End; Br.ind_vio_pts[Br.id, I] := long2str(MyVioArray[I].pts); inc(Br.NumPoints[Br.id], MyVioArray[I].pts); end; end; Procedure GPoints(TempVio:type3;VioDate:String;TempVDate:Type2;VioNum:Integer); var VDate: Integer; NewVio:EVioType; begin Br.SPts := Br.NumPoints[Br.ID]; VDate := ToInteger(TempVDate); NewVio := GetVio(TempVio); If (NewVio=VSUS) Then Susp[Br.Id]:=True; If Br.Driver[br.id].Use='E' then Exit; if (VDate > 35) then Exit; If Not (NewVio in [VNONE,VDUI,VDWI,VACN,VPCS,VSUS,VSRL]) Then {Lisa added ACN,SUS,SRL for 10/1/03 v1.2} OtherVios:=True; {LB added PCS for 01/15/05 v1.2} MyVioArray[VioNum].Vio := TempVio; MyVioArray[VioNum].VioDate := Viodate; case NewVio Of {FELONY} //VFMV: DriverU:=True; {ACCIDENTS} VACC: Begin MyVioArray[VioNum].ClassVio:=C_ACC_35; Inc(AtFault); If (VDate<=12) Then Begin Inc(AtFault12); MyVioArray[VioNum].ClassVio:=C_ACC_12; End; End; {NOT AT-FAULT ACCIDENTS} VACN: Begin Inc(NotAtFault); MyVioArray[VioNum].Chargeable:=False; MyVioArray[VioNum].ClassVio:=C_NONE; End; {4-4 MAJORS-NOT waived under FL Rule} VFMV,VACR,VDSL,VFEP,VHIT,VLEA, VREC,VSUS,VREV: {LB added REV for 01/15/05 v1.2} Begin MyVioArray[VioNum].ClassVio:=C_MAJ4_35; Inc(Major); If (VDate<=12) Then Begin Inc(Major12); MyVioArray[VioNum].ClassVio:=C_MAJ4_12; End; If (NewVio=VSUS) Then begin Susp[Br.Id]:=True; Senior[br.id] := false; end; End; {DUI/DWI/VACD done in seperate procedure} {4-4 MAJORS-waived under FL Rule} VRAC: Begin MyVioArray[VioNum].ClassVio:=C_MAJ4_35; Inc(Major); Inc(MyVioArray[VioNum].Pts,4); MyVioArray[VioNum].WaivedMaj:=True; Inc(Minor); If (VDate<=17) Then Inc(Minor18); If (Minor>2) or (Minor18>1) Then Begin MyVioArray[VioNum].Chargeable:=True; If (VDate<=12) Then Begin Inc(Major12); MyVioArray[VioNum].ClassVio:=C_MAJ4_12; End; End Else Begin MyVioArray[VioNum].Chargeable:=False; If (VDate<=12) Then Inc(Major12); End; End; {2-3 MAJORS-These waive under FL Rule} VOCD,VOCP: Begin MyVioArray[VioNum].DrugRel:=True; MyVioArray[VioNum].WaivedMaj:=True; Inc(OpCnt); If (OpCnt=1) Then Inc(MyVioArray[VioNum].Pts,2) Else Inc(MyVioArray[VioNum].Pts,3); If (OpCnt=1) Then MyVioArray[VioNum].ClassVio:=C_MAJ2_35 Else MyVioArray[VioNum].ClassVio:=C_MAJ3_35; Inc(DrugRel); Inc(Major); Inc(Minor); If (VDate<=17) Then //LB 3/2/04 - Their rater is using 17 months, not 18 for FL Rule-for 3/3/04 update Inc(Minor18); If (Minor>2) or (Minor18>1) Then Begin MyVioArray[VioNum].Chargeable:=True; If (VDate<=12) Then Begin Inc(Major12); If (OpCnt=1) Then MyVioArray[VioNum].ClassVio:=C_MAJ2_12 Else MyVioArray[VioNum].ClassVio:=C_MAJ3_12; End; End Else Begin MyVioArray[VioNum].Chargeable:=False; If (VDate<=12) Then Inc(Major12); End; End; {SPEEDING OVER 15MPH} VSPO: Begin Inc(Speeding); MyVioArray[VioNum].NeverWaived:=True; If (Speeding=1) Then Begin MyVioArray[VioNum].ClassVio:=C_SPEED2; MyVioArray[VioNum].Pts:=2; End Else Begin MyVioArray[VioNum].ClassVio:=C_SPEED3; MyVioArray[VioNum].Pts:=3; End; End; {2-3 MINOR-Not waived under FL Rule} VDTF: Begin Inc(NumDTF); MyVioArray[VioNum].NeverWaived:=True; If (NumDTF=1) Then MyVioArray[VioNum].ClassVio:=C_INTER2 Else MyVioArray[VioNum].ClassVio:=C_INTER3; End; {2-3 MINOR-waived under FL Rule} {LB added DVO,LSI,VSWU for 01/15/05 v1.2} VDFE,VDFB,VSPU,VSPH,VSWZ,VDVO,VLSI,VSWU: Begin Inc(NumDFE); If (NumDFE=1) Then Inc(MyVioArray[VioNum].Pts,2) Else Inc(MyVioArray[VioNum].Pts,3); Inc(Minor); If (VDate<=17) Then Inc(Minor18); If (Minor>2) or (Minor18>1) Then Begin MyVioArray[VioNum].Chargeable:=True; If (NumDFE=1) Then MyVioArray[VioNum].ClassVio:=C_MINOR2 Else MyVioArray[VioNum].ClassVio:=C_MINOR3; End Else MyVioArray[VioNum].Chargeable:=False; End; {3-3 MINORS-These waive under FL Rule} VCAR,VDRW,VDWS,VDWW,VFTD,VFTS,VFTY, VFTC,VLCV,VMVI,VSCH,VREF,VRUN,VTUR, VSRL, {Lisa moved SRL from 4pt Major 1/27/04-for 10/1/03 v1.2} VUSC,VEOL,VFFR,VAWD,VFTE, {LB added AWD,FTE for 01/15/05 v1.2} VISP,VHWS,VRRC: {LB added new vios 1/18/06 for 8/24/05 v1.3} Begin If (NewVio=VSRL) Then Senior[br.id] := false; MyVioArray[VioNum].ClassVio:=C_MINOR3; Inc(MyVioArray[VioNum].Pts,3); Inc(Minor); If (VDate<=17) Then Inc(Minor18); If (Minor>2) or (Minor18>1) Then Begin MyVioArray[VioNum].Chargeable:=True; {If (NewVio=VREF) Then //LB 3/1/04-Their rater is NOT treating REF as alc/drug related vio Begin MyVioArray[vionum].DrugRel:=True; Inc(DrugRel); End;} End Else Begin MyVioArray[VioNum].Chargeable:=False; {If (NewVio=VREF) Then Inc(DrugRel);} End; End; {3-3 MINORS-These are NOT waived under FL Rule} VDWL,VFAL,VOBS: Begin MyVioArray[VioNum].NeverWaived:=True; MyVioArray[VioNum].ClassVio:=C_INTER3; End; {These are not charged points, but count toward FL Rule} {Lisa moved to 2-3 FL Rule vios above 3/1/04 for 3/3/04 update} {VSPU,VSPH: Begin MyVioArray[VioNum].ClassVio:=C_NONE; if (Vdate <= 36) Then Inc(FlaMinor36); if (Vdate <= 18) Then Inc(FlaMinor18); if (FlaMinor36 > 2) or ((FlaMinor18 > 1) and AllMinor18) then MyVioArray[VioNum].Chargeable:=True; End;} {NOT CHARGED VCPL,VCRV,VDAL,VEXP,VOBT,VSBV} end; end; Procedure DoDUIs(TempVio:type3;VioDate:String;TempVDate:Type2;VioNum:Integer); var VDate: Integer; NewVio:EVioType; begin If Br.Driver[Br.id].Use='E' Then exit; Br.SPts := Br.NumPoints[Br.ID]; VDate := ToInteger(TempVDate); NewVio := GetVio(TempVio); if (VDate > 35) then Exit; MyVioArray[VioNum].Vio := TempVio; MyVioArray[VioNum].VioDate := Viodate; If (NewVio in [VACD,VDUI,VDWI,VPCS]) Then Begin MyVioArray[vionum].DrugRel:=True; Inc(DrugRel); Inc(Major); If (OtherVios) Or (NewVio=VACD) Then MyVioArray[VioNum].ClassVio:=C_MAJ3_35 Else MyVioArray[VioNum].ClassVio:=C_MAJ2_35; If (VDate<=12) Then Begin Inc(Major12); If MyVioArray[VioNum].ClassVio=C_MAJ3_35 Then MyVioArray[VioNum].ClassVio:=C_MAJ3_12; If MyVioArray[VioNum].ClassVio=C_MAJ2_35 Then MyVioArray[VioNum].ClassVio:=C_MAJ2_12; End; End; end; procedure ResetVars; begin Np := 0; Major := 0; Major12 := 0; AtFault := 0; AtFault12 := 0; DrugRel := 0; Speeding := 0; OpCnt := 0; NumDFE := 0; NumDTF := 0; OtherVios := False; Minor :=0; Minor18 :=0; end; begin InitVars; With Br.Driver[Br.id] Do begin If (Br.Id=1) and (ToInteger(Age)<=20) Then OkFor1To4:=False; If Use = 'E' Then AnyExcluded := True; If (Br.HasSr22[Br.Id] Or Br.HasSr22s[Br.Id]) and (Use = 'E') Then DriverU := True; ResetVars; GPoints(Vio1, VioDate1,VDate1, 1); GPoints(Vio2, VioDate2,VDate2, 2); GPoints(Vio3, VioDate3,VDate3, 3); GPoints(Vio4, VioDate4,VDate4, 4); GPoints(Vio5, VioDate5,VDate5, 5); GPoints(Vio6, VioDate6,VDate6, 6); GPoints(Vio7, VioDate7,VDate7, 7); GPoints(Vio8, VioDate8,VDate8, 8 ); GPoints(Vio9, VioDate9,VDate9, 9 ); GPoints(Vio10,VioDate10,VDate10, 10); GPoints(Vio11,VioDate11,VDate11, 11); GPoints(Vio12,VioDate12,VDate12, 12); GPoints(Vio13,VioDate13,VDate13, 13); GPoints(Vio14,VioDate14,VDate14, 14); GPoints(Vio15,VioDate15,VDate15, 15); GPoints(Vio16,VioDate16, VDate16, 16); GPoints(Vio17,VioDate17, VDate17, 17); GPoints(Vio18,VioDate18, VDate18, 18); GPoints(Vio19,VioDate19, VDate19, 19); GPoints(Vio20,VioDate20, VDate20, 20); GPoints(Vio21,VioDate21, VDate21, 21); GPoints(Vio22,VioDate22, VDate22, 22); GPoints(Vio23,VioDate23, VDate23, 23); GPoints(Vio24,VioDate24, VDate24, 24); GPoints(Vio25,VioDate25, VDate25, 25); GPoints(Vio26,VioDate26, VDate26, 26); GPoints(Vio27,VioDate27, VDate27, 27); GPoints(Vio28,VioDate28, VDate28, 28); GPoints(Vio29,VioDate29, VDate29, 29); GPoints(Vio30,VioDate30, VDate30, 30); DoDUIs(Vio1, VioDate1,VDate1, 1); DoDUIs(Vio2, VioDate2,VDate2, 2); DoDUIs(Vio3, VioDate3,VDate3, 3); DoDUIs(Vio4, VioDate4,VDate4, 4); DoDUIs(Vio5, VioDate5,VDate5, 5); DoDUIs(Vio6, VioDate6,VDate6, 6); DoDUIs(Vio7, VioDate7,VDate7, 7); DoDUIs(Vio8, VioDate8,VDate8, 8 ); DoDUIs(Vio9, VioDate9,VDate9, 9 ); DoDUIs(Vio10,VioDate10,VDate10, 10); DoDUIs(Vio11,VioDate11,VDate11, 11); DoDUIs(Vio12,VioDate12,VDate12, 12); DoDUIs(Vio13,VioDate13,VDate13, 13); DoDUIs(Vio14,VioDate14,VDate14, 14); DoDUIs(Vio15,VioDate15,VDate15, 15); DoDUIs(Vio16,VioDate16, VDate16, 16); DoDUIs(Vio17,VioDate17, VDate17, 17); DoDUIs(Vio18,VioDate18, VDate18, 18); DoDUIs(Vio19,VioDate19, VDate19, 19); DoDUIs(Vio20,VioDate20, VDate20, 20); DoDUIs(Vio21,VioDate21, VDate21, 21); DoDUIs(Vio22,VioDate22, VDate22, 22); DoDUIs(Vio23,VioDate23, VDate23, 23); DoDUIs(Vio24,VioDate24, VDate24, 24); DoDUIs(Vio25,VioDate25, VDate25, 25); DoDUIs(Vio26,VioDate26, VDate26, 26); DoDUIs(Vio27,VioDate27, VDate27, 27); DoDUIs(Vio28,VioDate28, VDate28, 28); DoDUIs(Vio29,VioDate29, VDate29, 29); DoDUIs(Vio30,VioDate30, VDate30, 30); CancelSamedayVios; SetDriverPoints; If Use <> 'E' Then Begin AllExcluded:=False; If (Atfault+Major>1) {Or (Major>1)}Then AnyACCorMAJ:=True; //LB-not used as of 3/3/04 update If ToInteger(Age)>=19 Then Begin If (ToInteger(YrsLic)<3){ and (ToInteger(YrsFla) = 0) and (YrsFla <> 'L')} then //nathan fix for int'l license (tested from main) {not ((ToInteger(YrsFla) = 0) and ((YrsFla) <> 'L') and (YrsLic = 'I')) Then} InExpDvr[br.id]:=True Else If (ToInteger(YrsLic)>=3) and (ToInteger(YrsVerf)<3) Then UnVerDvr[Br.Id]:=True; // per nate 01.09.05 End; {If ToInteger(Age)>=72 Then PhysicianSt:=True; } //nathan 8-15-05 per new manual If (Use='B') Or (Use='A') Then DBUse:=True; If (ToInteger(YrsFla)=0) and (YrsFla<>'L') Then ObtainLic:=True; If (Br.HasSr22[Br.ID] Or Br.HasSr22s[Br.ID]) And (Not Br.SecondCompany) Then Begin IncSr22(15); br.Company_allows_paid_in_full := False; AnyDriverSr22:=True; if Br.HasSr22s[Br.ID] Then HasSR22S:=True; {Unacceptable} End; If ((ToInteger(YrsLic)=0) and (YrsLic <> 'L') and (YrsLic <> 'I')) or ((Susp[Br.Id]) and (Not Br.HasSr22[Br.Id])) or //(YrsLic='I') or {((ToInteger(Age)<=20) and (DrugRel>0)) or //nathan 8-15-05 per new manual (DrugRel>1) or} {(Major12>1) or (AtFault12>1) or ((Major12+AtFault12)>1) or } //Lisa took out 2/23/04 for 3/3/04 update-not in new manual (Br.NumPoints[Br.Id]>30){ or {(AtFault+NotAtFault>4) or} //Lisa took out 2/23/04 for 3/3/04 update-not in new manual //(Major+AtFault>2) nathan 8-15-05 per new manual {or (Br.Driver[br.id].Relation = 'N')} Then {LB took out non-relative 6/28/04 for 3/3/04 v1.2 per email 6/25/04} DriverU:=True; End Else Begin {Driver Excluded-New rules for Excluded NI and Spouses added 7/29/04 for 8/1/04 update} If (Br.Id=1) Then Begin If (Br.Driver[br.id].Sex[1]='S') Then {Single NI Excluded-always unaccept} DriverU:=True Else If (Br.Driver[br.id].Sex[1]='M') and (Not SpouseFound) Then {Married NI with No Spouse-always unaccept} DriverU:=True Else If ((Br.Driver[br.id].Sex[1]='M') and (SpouseFound)) And {Married NI w/Spouse-only if suspended or} ((Not Susp[br.id]) and ((ToInteger(Br.Driver[br.id].YrsLic)>0) or (Br.Driver[br.id].YrsLic='L'))) Then DriverU:=True End // MP per 09-07-05 email (08/24/05 v1.1) (* Else Begin {Spouse of NI can only be excluded if never licensed} If (SpouseOfNI[Br.id]) and (ToInteger(Br.Driver[br.id].YrsLic)>0) or (Br.Driver[br.id].YrsLic='L') Then DriverU:=True End; *) end; end; end; {Used In BiIncLimts, PdIncLimits, UmIncLimits, CmpDedF, CllDedF} Function SetLimit(Tr1,Tr2,Tr3,Tr4,Tr5,Tr6,Tr7,Tr8,Tr9,Tr10,Tr11,Tr12,Tr13,Tr14:Real):Real; Var F:Real; Begin Case Tier of T1: F:= Tr1; T2: F:= Tr2; T3: F:= Tr3; T4: F:= Tr4; T5: F:= Tr5; T6: F:= Tr6; T7: F:= Tr7; T8: F:= Tr8; T9: F:= Tr9; T10: F:= Tr10; T11: F:= Tr11; T12: F:= Tr12; T13: F:= Tr13; T14: F:= Tr14; End; SetLimit:=F; End; function BiIncLimits: Real; Var BiFirst:String[4]; Begin BiIncLimits:=1.00; BiFirst:=Extractword(1, Br.Veh[1].Bi, ['/']); Case ToInteger(BiFirst) Of {T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } 10: BiIncLimits:=SetLimit(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {10/20} 25: BiIncLimits:=SetLimit(1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45); {25/50} 50: BiIncLimits:=SetLimit(2.15, 2.15, 2.15, 2.15, 2.15, 2.15, 2.15, 2.15, 2.15, 2.15, 2.15, 2.37, 2.37, 3.37); {50/100} 100: BiIncLimits:=SetLimit(2.60, 2.60, 2.60, 2.60, 2.60, 2.60, 2.60, 2.60, 2.60, 2.60, 2.60, 2.86, 2.86, 2.86); {100/300} End; End; function PdIncLimits: Real; Begin PdIncLimits := 1.00; With Br.Veh[1] Do Case Tointeger(Pd) Of {T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } 10: PdIncLimits:=SetLimit(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); 25: PdIncLimits:=SetLimit(1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14, 1.14); 50: PdIncLimits:=SetLimit(1.22, 1.22, 1.22, 1.22, 1.22, 1.22, 1.22, 1.22, 1.22, 1.22, 1.22, 1.34, 1.34, 1.34); 100: PdIncLimits:=SetLimit(1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.35, 1.35, 1.35); end; End; function UmIncLimits: Real; Var UmFirst:String[4]; Stacked:Boolean; Multi:Boolean; Begin UmIncLimits:=1.00; {LB added 8/2/04 for 8/1/04 update. In-House uninitialized variable - effected pip/pd policies} UmFirst:=Extractword(1, Br.Veh[1].Um, ['/']); Stacked:=Br.StackedUm; Multi:=Br.NumC>1; {T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } If (UmFirst='10') AND (Not Stacked) Then UmIncLimits:=SetLimit(0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.69) Else If (UmFirst='25') AND (Not Stacked) Then UmIncLimits:=SetLimit(1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04, 1.04) Else If (UmFirst='50') AND (Not Stacked) Then UmIncLimits:=SetLimit(1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.38, 1.52, 1.52, 1.52) Else If (UmFirst='100') AND (Not Stacked) Then UmIncLimits:=SetLimit(1.73, 1.73, 1.73, 1.73, 1.73, 1.73, 1.73, 1.73, 1.73, 1.73, 1.73, 1.90, 1.90, 1.90) Else If (UmFirst='10') AND (Stacked) and (Not Multi) Then UmIncLimits:=SetLimit(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00) Else If (UmFirst='10') AND (Stacked) and (Multi) Then UmIncLimits:=SetLimit(1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32, 1.32) Else If (UmFirst='25') AND (Stacked) and (Not Multi) Then UmIncLimits:=SetLimit(1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50) Else If (UmFirst='25') AND (Stacked) and (Multi) Then UmIncLimits:=SetLimit(1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98) Else If (UmFirst='50') AND (Stacked) and (Not Multi) Then UmIncLimits:=SetLimit(2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.20, 2.20, 2.20) Else If (UmFirst='50') AND (Stacked) and (Multi) Then UmIncLimits:=SetLimit(2.64, 2.64, 2.64, 2.64, 2.64, 2.64, 2.64, 2.64, 2.64, 2.64, 2.64, 2.90, 2.90, 2.90) Else If (UmFirst='100') AND (Stacked) and (Not Multi) Then UmIncLimits:=SetLimit(2.50, 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, 2.75, 2.75, 2.75) Else If (UmFirst='100') AND (Stacked) and (Multi) Then UmIncLimits:=SetLimit(3.30, 3.30, 3.30, 3.30, 3.30, 3.30, 3.30, 3.30, 3.30, 3.30, 3.30, 3.63, 3.63, 3.63); End; Function CmpDedF:Real; Begin CmpDedF := 0.00; //Eddie in-house error 12-13-04 Case ToInteger(Br.Veh[Br.IC].Comp) Of {T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } 100: CmpDedF:=SetLimit(1.18, 1.18, 1.18, 1.18, 1.18, 1.18, 1.18, 1.18, 1.18, 1.18, 1.18, 1.24, 1.24, 1.24); 200: CmpDedF:=SetLimit(1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.16, 1.16, 1.16); 250: CmpDedF:=SetLimit(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); 500: CmpDedF:=SetLimit(0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88); 1000: CmpDedF:=SetLimit(0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72); End; End; Function CllDedF:Real; Begin CllDedF := 0.00; //Eddie in-house error 12-13-04 Case ToInteger(Br.Veh[Br.IC].Coll) Of {T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } 100: CllDedF:=SetLimit(1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.23, 1.29, 1.29, 1.29); 200: CllDedF:=SetLimit(1.05, 1.05, 1.05, 1.05, 1.05, 1.05, 1.05, 1.05, 1.05, 1.05, 1.05, 1.10, 1.10, 1.10); 250: CllDedF:=SetLimit(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); 500: CllDedF:=SetLimit(0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.80); 1000: CllDedF:=SetLimit(0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63); End; End; function MedIncLimits: Real; Var F: Real; begin F := 0; With Br.Veh[1] Do Case Tointeger(Med) Of 500: F := 0.93; 1000: F := 1.00; 2000: F := 1.52; 5000: F := 2.02; end; MedIncLimits := F; end; function PipDedFactor: Real; Var InsuredOnly,WorkLoss:Boolean; PipDed:Integer; Begin InsuredOnly:= Br.InsuredOnly; PipDed:=ToInteger(Br.Veh[1].Pip); WorkLoss:=br.PipWLE; if (Not Br.SecondCompany) then Begin If (PipDed=0) AND (Not WorkLoss) Then PipDedFactor := 1.00; If (PipDed=250) AND (InsuredOnly) AND (Not WorkLoss) Then PipDedFactor := 0.98; If (PipDed=250) AND (Not InsuredOnly) AND (Not WorkLoss) Then PipDedFactor := 0.96; If (PipDed=500) AND (InsuredOnly) AND (Not WorkLoss) Then PipDedFactor := 0.90; If (PipDed=500) AND (Not InsuredOnly) AND (Not WorkLoss) Then PipDedFactor := 0.88; If (PipDed=1000) AND (InsuredOnly) AND (Not WorkLoss) Then PipDedFactor := 0.82; If (PipDed=1000) AND (Not InsuredOnly) AND (Not WorkLoss) Then PipDedFactor := 0.80; If (PipDed=0) AND (InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.92; If (PipDed=0) AND (Not InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.84; If (PipDed=250) AND (InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.90; If (PipDed=250) AND (Not InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.81; If (PipDed=500) AND (InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.83; If (PipDed=500) AND (Not InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.74; If (PipDed=1000) AND (InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.75; If (PipDed=1000) AND (Not InsuredOnly) AND (WorkLoss) Then PipDedFactor := 0.63; End; End; Function BUseSurch:Real; Begin BUseSurch := 1.00; If P('50') then Begin Case Tier of T1..T2: BUseSurch:= 1.40; T3..T4: BUseSurch:= 1.30; T5..T14: BUseSurch:= 1.20; End; End; End; Function VehDrvMtrx(Cov:Byte):Real; Var NumVeh,NumDvr:Integer; Procedure SetFct(_Bi, _Pd, _Med, _Pip, _Um, _Cmp, _Cll:Real); Begin Case Cov of 1: VehDrvMtrx:=_Bi; 2: VehDrvMtrx:=_Pd; 3: VehDrvMtrx:=_Pip; 4: VehDrvMtrx:=_Med; 5: VehDrvMtrx:=_Um; 6: VehDrvMtrx:=_Cll; 7: VehDrvMtrx:=_Cmp; End; End; Begin NumVeh:=Br.NumC; NumDvr:=Save_NumD; {Bi Pd Med Pip Um Cmp Cll} If (NumVeh=1) and (NumDvr=1) and (Not AnyExcluded) Then SetFct (1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00) Else If (NumVeh=1) and (NumDvr=1) and (AnyExcluded) Then SetFct (1.00, 1.05, 1.00, 1.05, 1.00, 1.00, 1.00) Else If (NumVeh=1) and (NumDvr=2) and (Not AnyExcluded) Then SetFct (1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10) Else If (NumVeh=1) and (NumDvr=2) and (AnyExcluded) Then SetFct (1.10, 1.15, 1.10, 1.15, 1.10, 1.10, 1.10) Else If (NumVeh=1) and (NumDvr=3) and (Not AnyExcluded) Then SetFct (1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10) Else If (NumVeh=1) and (NumDvr=3) and (AnyExcluded) Then SetFct (1.10, 1.15, 1.10, 1.15, 1.10, 1.10, 1.10) Else If (NumVeh=1) and (NumDvr=4) and (Not AnyExcluded) Then SetFct (1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10) Else If (NumVeh=1) and (NumDvr=4) and (AnyExcluded) Then SetFct (1.10, 1.15, 1.10, 1.15, 1.10, 1.10, 1.10) Else If (NumVeh=2) and (NumDvr=1) and (Not AnyExcluded) Then SetFct (1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00) Else If (NumVeh=2) and (NumDvr=1) and (AnyExcluded) Then SetFct (1.00, 1.05, 1.00, 1.05, 1.00, 1.00, 1.00) Else If (NumVeh=2) and (NumDvr=2) and (Not AnyExcluded) Then SetFct (0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90) Else If (NumVeh=2) and (NumDvr=2) and (AnyExcluded) Then SetFct (0.90, 0.95, 0.90, 0.95, 0.90, 0.90, 0.90) Else If (NumVeh=2) and (NumDvr=3) and (Not AnyExcluded) Then SetFct (1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10) Else If (NumVeh=2) and (NumDvr=3) and (AnyExcluded) Then SetFct (1.10, 1.15, 1.10, 1.15, 1.10, 1.10, 1.10) Else If (NumVeh=2) and (NumDvr=4) and (Not AnyExcluded) Then SetFct (1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10) Else If (NumVeh=2) and (NumDvr=4) and (AnyExcluded) Then SetFct (1.10, 1.15, 1.10, 1.15, 1.10, 1.10, 1.10) Else If (NumVeh=3) and (NumDvr=1) and (Not AnyExcluded) Then SetFct (0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95) Else If (NumVeh=3) and (NumDvr=1) and (AnyExcluded) Then SetFct (0.95, 1.00, 0.95, 1.00, 0.95, 0.95, 0.95) Else If (NumVeh=3) and (NumDvr=2) and (Not AnyExcluded) Then SetFct (0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95) Else If (NumVeh=3) and (NumDvr=2) and (AnyExcluded) Then SetFct (0.95, 1.00, 0.95, 1.00, 0.95, 0.95, 0.95) Else If (NumVeh=3) and (NumDvr=3) and (Not AnyExcluded) Then SetFct (1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00) Else If (NumVeh=3) and (NumDvr=3) and (AnyExcluded) Then SetFct (1.00, 1.05, 1.00, 1.05, 1.00, 1.00, 1.00) Else If (NumVeh=3) and (NumDvr=4) and (Not AnyExcluded) Then SetFct (1.10, 1.10, 1.10, 1.10, 1.10, 1.10, 1.10) Else If (NumVeh=3) and (NumDvr=4) and (AnyExcluded) Then SetFct (1.10, 1.15, 1.10, 1.15, 1.10, 1.10, 1.10) Else If (NumVeh=4) and (NumDvr=1) and (Not AnyExcluded) Then SetFct (1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00) Else If (NumVeh=4) and (NumDvr=1) and (AnyExcluded) Then SetFct (1.00, 1.05, 1.00, 1.05, 1.00, 1.00, 1.00) Else If (NumVeh=4) and (NumDvr=2) and (Not AnyExcluded) Then SetFct (0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95) Else If (NumVeh=4) and (NumDvr=2) and (AnyExcluded) Then SetFct (0.95, 1.00, 0.95, 1.00, 0.95, 0.95, 0.95) Else If (NumVeh=4) and (NumDvr=3) and (Not AnyExcluded) Then SetFct (0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95) Else If (NumVeh=4) and (NumDvr=3) and (AnyExcluded) Then SetFct (0.95, 1.00, 0.95, 1.00, 0.95, 0.95, 0.95) Else If (NumVeh=4) and (NumDvr=4) and (Not AnyExcluded) Then SetFct (1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00) Else If (NumVeh=4) and (NumDvr=4) and (AnyExcluded) Then SetFct (1.00, 1.05, 1.00, 1.05, 1.00, 1.00, 1.00); End; Function HighPerf(Cov:Byte):Real; Procedure SetFct(_Liab, _Phys: Real); Begin If Cov=1 Then HighPerf:=_Liab Else HighPerf:=_Phys; End; Begin HighPerf:=1.00; If (Mk('PORSCHE')) Or (Mk('JAGUAR')) Then Begin Case Tier of {Liab Phys} T1..T2: SetFct(1.20, 1.25); T3..T4: SetFct(1.10, 1.25); T5..T6: SetFct(1.10, 1.20); T7..T14: SetFct(1.07, 1.20); End; End; End; Function InExpSurch:Real; Var Period:String; Begin InExpSurch:=1.00; if Br.Driver[Br.Id].YrsLic = 'I' then Period := Br.Driver[Br.Id].YrsFla else Period:=Br.Driver[Br.Id].YrsLic; If InExpDvr[Br.Id] Then Case Tier of T1..T2: Begin If (Period='L') or (ToInteger(Period)=1) Then InExpSurch:=1.25 Else InExpSurch:=1.15 End; T3..T5: Begin If (Period='L') or (ToInteger(Period)=1) Then InExpSurch:=1.20 Else InExpSurch:=1.10 End; T6..T7: Begin If (Period='L') or (ToInteger(Period)=1) Then InExpSurch:=1.15 Else InExpSurch:=1.05 End; T8..T9: Begin If (Period='L') or (ToInteger(Period)=1) Then InExpSurch:=1.10 Else InExpSurch:=1.05 End; End; End; Function Unverifiable:Real; Begin Unverifiable:=1.00; If UnVerDvr[Br.Id] and (br.Driver[br.id].YrsLic <> 'I') Then Case Tier of T1..T2: Unverifiable:=1.50; T3..T4: Unverifiable:=1.40; T5..T8: Unverifiable:=1.30; T9..T14: Unverifiable:=1.20; end; End; function ForeignLicSurch:real; begin Result := 1.00; if (br.Driver[br.id].YrsLic = 'I') and (br.Driver[br.id].Use <> 'E') and ((tointeger(Br.Driver[Br.id].yrsfla) = 0) and (Br.Driver[Br.id].yrsfla <> 'L')) then //nathan 12-21-05 int'l lic fix begin case Tier of T1..T4 : Result := 1.65; T5..T14: Result := 1.30; end; end; end; procedure Discount(var Disc: DiscType); Var MatrixValue: String[3]; Procedure GetBiPdDiscounts(_Tier:TTier; _Matrix:Integer); Const YNN = 100; YNF = 101; YYN = 110; YYF = 111; NNN = 000; NNF = 001; NYN = 010; NYF = 011; YNI = 102; YYI = 112; NNI = 002; NYI = 012; Procedure SetDisc(Tr1,Tr2,Tr3,Tr4,Tr5,Tr6,Tr7,Tr8,Tr9,Tr10,Tr11,Tr12,Tr13,Tr14:Real); Begin Case Tier of T1: Disc.Matrix.BiPd := Tr1; T2: Disc.Matrix.BiPd := Tr2; T3: Disc.Matrix.BiPd := Tr3; T4: Disc.Matrix.BiPd := Tr4; T5: Disc.Matrix.BiPd := Tr5; T6: Disc.Matrix.BiPd := Tr6; T7: Disc.Matrix.BiPd := Tr7; T8: Disc.Matrix.BiPd := Tr8; T9: Disc.Matrix.BiPd := Tr9; T10: Disc.Matrix.BiPd := Tr10; T11: Disc.Matrix.BiPd := Tr11; T12: Disc.Matrix.BiPd := Tr12; T13: Disc.Matrix.BiPd := Tr13; T14: Disc.Matrix.BiPd := Tr14; End; End; Begin Case _Matrix of{T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } YNN : SetDisc(0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.97, 0.97, 0.85, 0.85, 0.92, 0.92, 0.92, 0.92); {HO} YNF : SetDisc(0.87, 0.87, 0.87, 0.87, 0.87, 0.87, 0.88, 0.88, 0.85, 0.85, 0.81, 0.81, 0.81, 0.81); {HO-PF} YYN : SetDisc(0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.79, 0.79, 0.71, 0.71, 0.71, 0.71, 0.71, 0.71); {HO-MC} YYF : SetDisc(0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.73, 0.73, 0.65, 0.65, 0.65, 0.65, 0.65, 0.65); {HO-MC-PF} NNN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {NONE} NNF : SetDisc(0.92, 0.92, 0.92, 0.92, 0.92, 0.92, 0.92, 0.92, 0.88, 0.88, 0.94, 0.94, 0.94, 0.94); {PF} NYN : SetDisc(0.84, 0.84, 0.84, 0.84, 0.84, 0.84, 0.81, 0.81, 0.72, 0.72, 0.75, 0.75, 0.75, 0.75); {MC} NYF : SetDisc(0.77, 0.77, 0.77, 0.77, 0.77, 0.77, 0.75, 0.75, 0.69, 0.69, 0.71, 0.71, 0.71, 0.71); {MC-PF} YNI : SetDisc(0.87, 0.87, 0.87, 0.87, 0.87, 0.87, 0.80, 0.82, 0.66, 0.70, 0.86, 0.78, 0.81, 0.83); {HO-PI} YYI : SetDisc(0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.65, 0.67, 0.55, 0.59, 0.66, 0.60, 0.65, 0.64); {HO-MC-PI} NNI : SetDisc(0.92, 0.92, 0.92, 0.92, 0.92, 0.92, 0.82, 0.85, 0.77, 0.83, 0.94, 0.85, 0.94, 0.91); {PI} NYI : SetDisc(0.77, 0.77, 0.77, 0.77, 0.77, 0.77, 0.66, 0.69, 0.56, 0.59, 0.70, 0.63, 0.71, 0.68); {MC-PI} End; End; Procedure GetPipDiscounts(_Tier:TTier; _Matrix:Integer); Const YNN = 100; YNF = 101; YYN = 110; YYF = 111; NNN = 000; NNF = 001; NYN = 010; NYF = 011; YNI = 102; YYI = 112; NNI = 002; NYI = 012; Procedure SetDisc(Tr1,Tr2,Tr3,Tr4,Tr5,Tr6,Tr7,Tr8,Tr9,Tr10,Tr11,Tr12,Tr13,Tr14:Real); Begin Case Tier of T1: Disc.Matrix.Pip := Tr1; T2: Disc.Matrix.Pip := Tr2; T3: Disc.Matrix.Pip := Tr3; T4: Disc.Matrix.Pip := Tr4; T5: Disc.Matrix.Pip := Tr5; T6: Disc.Matrix.Pip := Tr6; T7: Disc.Matrix.Pip := Tr7; T8: Disc.Matrix.Pip := Tr8; T9: Disc.Matrix.Pip := Tr9; T10: Disc.Matrix.Pip := Tr10; T11: Disc.Matrix.Pip := Tr11; T12: Disc.Matrix.Pip := Tr12; T13: Disc.Matrix.Pip := Tr13; T14: Disc.Matrix.Pip := Tr14; End; End; Begin Case _Matrix of{T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } YNN : SetDisc(0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO} YNF : SetDisc(0.79, 0.79, 0.79, 0.79, 0.79, 0.79, 0.82, 0.82, 0.82, 0.82, 0.80, 0.80, 0.80, 0.80); {HO-PF} YYN : SetDisc(0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.79, 0.79, 0.72, 0.72, 0.70, 0.70, 0.70, 0.70); {HO-MC} YYF : SetDisc(0.62, 0.62, 0.62, 0.62, 0.62, 0.62, 0.66, 0.66, 0.62, 0.62, 0.61, 0.61, 0.61, 0.61); {HO-MC-PF} NNN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {NONE} NNF : SetDisc(0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.82, 0.82, 0.82, 0.82, 0.83, 0.83, 0.83, 0.83); {PF} NYN : SetDisc(0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.76, 0.76, 0.73, 0.73, 0.73, 0.73); {MC} NYF : SetDisc(0.66, 0.66, 0.66, 0.66, 0.66, 0.66, 0.68, 0.68, 0.63, 0.63, 0.66, 0.66, 0.66, 0.66); {MC-PF} YNI : SetDisc(0.79, 0.79, 0.79, 0.79, 0.79, 0.79, 0.63, 0.79, 0.68, 0.79, 0.88, 0.83, 0.80, 0.90); {HO-PI} YYI : SetDisc(0.62, 0.62, 0.62, 0.62, 0.62, 0.62, 0.50, 0.62, 0.49, 0.57, 0.61, 0.58, 0.61, 0.63); {HO-MC-PI} NNI : SetDisc(0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.63, 0.79, 0.68, 0.79, 0.88, 0.83, 0.83, 0.90); {PI} NYI : SetDisc(0.66, 0.66, 0.66, 0.66, 0.66, 0.66, 0.52, 0.65, 0.51, 0.60, 0.64, 0.60, 0.66, 0.66); {MC-PI} End; End; Procedure GetUMMedDiscounts(_Tier:TTier; _Matrix:Integer); Const YNN = 100; YNF = 101; YYN = 110; YYF = 111; NNN = 000; NNF = 001; NYN = 010; NYF = 011; YNI = 102; YYI = 112; NNI = 002; NYI = 012; Procedure SetDisc(Tr1,Tr2,Tr3,Tr4,Tr5,Tr6,Tr7,Tr8,Tr9,Tr10,Tr11,Tr12,Tr13,Tr14:Real); Begin Case Tier of T1: Disc.Matrix.UMMed := Tr1; T2: Disc.Matrix.UMMed := Tr2; T3: Disc.Matrix.UMMed := Tr3; T4: Disc.Matrix.UMMed := Tr4; T5: Disc.Matrix.UMMed := Tr5; T6: Disc.Matrix.UMMed := Tr6; T7: Disc.Matrix.UMMed := Tr7; T8: Disc.Matrix.UMMed := Tr8; T9: Disc.Matrix.UMMed := Tr9; T10: Disc.Matrix.UMMed := Tr10; T11: Disc.Matrix.UMMed := Tr11; T12: Disc.Matrix.UMMed := Tr12; T13: Disc.Matrix.UMMed := Tr13; T14: Disc.Matrix.UMMed := Tr14; End; End; Begin Case _Matrix of{T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } YNN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO} YNF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO-PF} YYN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO-MC} YYF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO-MC-PF} NNN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {NONE} NNF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {PF} NYN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {MC} NYF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {MC-PF} YNI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.63, 0.79, 0.68, 0.79, 0.88, 0.83, 1.00, 0.90); {HO-PI} YYI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.63, 0.79, 0.68, 0.79, 0.88, 0.83, 1.00, 0.90); {HO-MC-PI} NNI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.63, 0.79, 0.68, 0.79, 0.88, 0.83, 1.00, 0.90); {PI} NYI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.63, 0.79, 0.68, 0.79, 0.88, 0.83, 1.00, 0.90); {MC-PI} End; End; Procedure GetCompDiscounts(_Tier:TTier; _Matrix:Integer); Const YNN = 100; YNF = 101; YYN = 110; YYF = 111; NNN = 000; NNF = 001; NYN = 010; NYF = 011; YNI = 102; YYI = 112; NNI = 002; NYI = 012; Procedure SetDisc(Tr1,Tr2,Tr3,Tr4,Tr5,Tr6,Tr7,Tr8,Tr9,Tr10,Tr11,Tr12,Tr13,Tr14:Real); Begin Case Tier of T1: Disc.Matrix.Cmp := Tr1; T2: Disc.Matrix.Cmp := Tr2; T3: Disc.Matrix.Cmp := Tr3; T4: Disc.Matrix.Cmp := Tr4; T5: Disc.Matrix.Cmp := Tr5; T6: Disc.Matrix.Cmp := Tr6; T7: Disc.Matrix.Cmp := Tr7; T8: Disc.Matrix.Cmp := Tr8; T9: Disc.Matrix.Cmp := Tr9; T10: Disc.Matrix.Cmp := Tr10; T11: Disc.Matrix.Cmp := Tr11; T12: Disc.Matrix.Cmp := Tr12; T13: Disc.Matrix.Cmp := Tr13; T14: Disc.Matrix.Cmp := Tr14; End; End; Begin Case _Matrix of{T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } YNN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO} YNF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO-PF} YYN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO-MC} YYF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {HO-MC-PF} NNN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {NONE} NNF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {PF} NYN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {MC} NYF : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {MC-PF} YNI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.64, 0.78, 0.73, 0.84, 0.89, 0.87, 1.00, 0.90); {HO-PI} YYI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.64, 0.78, 0.73, 0.84, 0.89, 0.87, 1.00, 0.90); {HO-MC-PI} NNI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.64, 0.78, 0.73, 0.84, 0.89, 0.87, 1.00, 0.90); {PI} NYI : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.64, 0.78, 0.73, 0.84, 0.89, 0.87, 1.00, 0.90); {MC-PI} End; End; Procedure GetCollDiscounts(_Tier:TTier; _Matrix:Integer); Const YNN = 100; YNF = 101; YYN = 110; YYF = 111; NNN = 000; NNF = 001; NYN = 010; NYF = 011; YNI = 102; YYI = 112; NNI = 002; NYI = 012; Procedure SetDisc(Tr1,Tr2,Tr3,Tr4,Tr5,Tr6,Tr7,Tr8,Tr9,Tr10,Tr11,Tr12,Tr13,Tr14:Real); Begin Case Tier of T1: Disc.Matrix.Cll := Tr1; T2: Disc.Matrix.Cll := Tr2; T3: Disc.Matrix.Cll := Tr3; T4: Disc.Matrix.Cll := Tr4; T5: Disc.Matrix.Cll := Tr5; T6: Disc.Matrix.Cll := Tr6; T7: Disc.Matrix.Cll := Tr7; T8: Disc.Matrix.Cll := Tr8; T9: Disc.Matrix.Cll := Tr9; T10: Disc.Matrix.Cll := Tr10; T11: Disc.Matrix.Cll := Tr11; T12: Disc.Matrix.Cll := Tr12; T13: Disc.Matrix.Cll := Tr13; T14: Disc.Matrix.Cll := Tr14; End; End; Begin Case _Matrix of{T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 } YNN : SetDisc(0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.90, 0.90, 0.93, 0.93, 0.93, 0.93); {HO} YNF : SetDisc(0.85, 0.85, 0.85, 0.85, 0.85, 0.85, 0.87, 0.87, 0.87, 0.87, 0.82, 0.82, 0.82, 0.82); {HO-PF} YYN : SetDisc(0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.83, 0.83, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75); {HO-MC} YYF : SetDisc(0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.73, 0.73, 0.64, 0.64, 0.63, 0.63, 0.63, 0.63); {HO-MC-PF} NNN : SetDisc(1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00); {NONE} NNF : SetDisc(0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.94, 0.94, 0.91, 0.91, 0.92, 0.92, 0.92, 0.92); {PF} NYN : SetDisc(0.85, 0.85, 0.85, 0.85, 0.85, 0.85, 0.86, 0.86, 0.80, 0.80, 0.77, 0.77, 0.77, 0.77); {MC} NYF : SetDisc(0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.82, 0.82, 0.78, 0.78, 0.75, 0.75, 0.75, 0.75); {MC-PF} YNI : SetDisc(0.85, 0.85, 0.85, 0.85, 0.85, 0.85, 0.73, 0.81, 0.66, 0.73, 0.89, 0.76, 0.82, 0.84); {HO-PI} YYI : SetDisc(0.69, 0.69, 0.69, 0.69, 0.69, 0.69, 0.62, 0.68, 0.55, 0.61, 0.72, 0.61, 0.63, 0.68); {HO-MC-PI} NNI : SetDisc(0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.74, 0.82, 0.74, 0.81, 0.95, 0.81, 0.92, 0.91); {PI} NYI : SetDisc(0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.64, 0.71, 0.59, 0.65, 0.74, 0.63, 0.75, 0.70); {MC-PI} End; End; begin Disc.AirBag := 0; Disc.Abs := 0; Disc.AntiTheft := 0; Disc.Matrix.BiPd := 0; Disc.Matrix.Pip := 0; Disc.Matrix.UmMed:= 0; Disc.Matrix.Cmp := 0; Disc.Matrix.Cll := 0; Disc.Senior := 0; Disc.Group := 0; {POLICY LEVEL MATRIX} MatrixValue := '000'; {HOME} If Br.HomeOwner Then MatrixValue[1]:='1'; {MULTI} If Br.NumC > 1 Then MatrixValue[2]:='1'; {PAID IN FULL} if (Br.PaidInFull) and (Not AnyDriverSR22) then if PI then MatrixValue[3]:='2' else MatrixValue[3]:='1'; GetBiPdDiscounts(Tier,ToInteger(MatrixValue)); GetPipDiscounts(Tier,ToInteger(MatrixValue)); GetUMMedDiscounts(Tier,ToInteger(MatrixValue)); GetCompDiscounts(Tier,ToInteger(MatrixValue)); GetCollDiscounts(Tier,ToInteger(MatrixValue)); {ANTILOCK BRAKES} If P('V') Then Disc.Abs := 0.05; {AIRBAG} If P('TU') Then Disc.AirBag := 0.10; {ANTITHEFT} If P('3W') Then Disc.AntiTheft := 0.10; {ACCIDENT PREVENTION} If Br.SeniorDiscount[Br.ID] and (ToInteger(br.driver[br.id].Age) >= 55) and Senior[br.id] Then Disc.Senior := 0.05; Br.Disk[Br.IC].Bi := 1 - ((Disc.Matrix.BiPd) * (1-Disc.Abs) * (1-Disc.Senior)); Br.Disk[Br.IC].Pd := 1 - ((Disc.Matrix.BiPd) * (1-Disc.Abs) * (1-Disc.Senior)); Br.Disk[Br.IC].Pip := 1 - ((Disc.Matrix.Pip) * (1-Disc.Abs) * (1-Disc.AirBag) * (1-Disc.Senior)); Br.Disk[Br.IC].Med := 1 - ((Disc.Matrix.UmMed) * (1-Disc.Abs) * (1-Disc.AirBag)); Br.Disk[Br.IC].Um := 1 - ((Disc.Matrix.UmMed)); Br.Disk[Br.IC].Comp := 1 - ((Disc.Matrix.Cmp) * (1-Disc.AntiTheft)); Br.Disk[Br.IC].Coll := 1 - ((Disc.Matrix.Cll) * (1-Disc.Abs) * (1-Disc.Senior)); End; Procedure DoCustom; Var Cost:Integer; begin If P('8') Then Begin If (ToReal(Br.Veh[Br.Ic].CustomEquip)>3000) Then Begin Cost:=3000; Br.Veh[Br.Ic].CustomEquip:='3000'; End Else Cost := ToInteger(Br.Veh[Br.IC].CustomEquip); Case Cost of 1..250: Br.Custom[Br.Ic]:=15; 251..500: Br.Custom[Br.Ic]:=30; 501..750: Br.Custom[Br.Ic]:=39; 751..1000: Br.Custom[Br.Ic]:=45; 1001..1250: Br.Custom[Br.Ic]:=54; 1251..1500: Br.Custom[Br.Ic]:=60; 1501..1750: Br.Custom[Br.Ic]:=69; 1751..2000: Br.Custom[Br.Ic]:=75; 2001..2250: Br.Custom[Br.Ic]:=84; 2251..2500: Br.Custom[Br.Ic]:=90; 2501..2750: Br.Custom[Br.Ic]:=99; 2751..3000: Br.Custom[Br.Ic]:=105; End; If (LSN=3) Then Begin Custom6[Br.ic]:=Ground(0,Br.Custom[Br.ic]*1.00); {TERM} Br.Custom[Br.ic]:=Ground(0,Br.Custom[Br.ic]*2.04); End Else Br.Custom[Br.Ic] := GRound(0,Br.Custom[Br.Ic]*TermF); End Else Br.Custom[Br.Ic]:=0; end; {function SetToSingle:boolean; begin SetToSingle := false; if (br.ic <= Save_NumD) and (Br.Driver[Br.id].Use<>'E') and (Br.DClass[br.id]<>'EV') then begin if (Br.Driver[Br.id].Sex[1] = 'M') then begin if (Save_NumD = 1) then SetToSingle := true else if (Save_NumD >= 2) then begin if (Br.id <> Sp[Br.id]) and (Not SpouseFound) then SetToSingle := true; end; end; end; end;} {Lisa re-wrote 2/10/04 for 10/01/03 v1.2} function SetToSingle:boolean; begin SetToSingle := false; If (Br.id=1) and (Not SpouseFound) Then SetToSingle:=True; end; Procedure SetClassFct(var _BiPd, _PipMed, _Comp, _Coll:Real); Var DrvAge: integer; Procedure SetFct(BiPd, PipMed, Comp, Coll:Real); Begin _BiPd:=BiPd; _PipMed:=PipMed; _Comp:=Comp; _Coll:=Coll; End; begin DrvAge := ToInteger(Br.Driver[Br.ID].Age); {BGB> ·The edit requiring married named insured’s to have spouses will not apply to non owner policies. NONOWNERS:=FALSE; If SetToSingle {BGB>} and (not NonOwners) {Save_NumD))) then SetFct(1.10, 1.10, 1.10, 1.10) Else Begin with Br.Driver[Br.ID] do if (Sex = 'MF') then {**Pip is used for Med, Pip, and Um} case DrvAge of {BiPd Pip Comp Coll} 14..16:SetFct(2.43, 1.49, 1.46, 2.65); 17:SetFct(2.43, 1.49, 1.46, 2.65); 18:SetFct(2.43, 1.49, 1.46, 2.65); 19:SetFct(1.43, 1.26, 1.32, 1.61); 20:SetFct(1.30, 1.20, 1.24, 1.45); 21:SetFct(1.21, 0.91, 1.16, 1.30); 22:SetFct(1.08, 0.91, 1.06, 1.15); 23:SetFct(1.01, 1.00, 1.00, 1.04); 24:SetFct(0.95, 1.00, 0.97, 0.94); 25:SetFct(0.93, 0.91, 0.90, 0.93); 26:SetFct(0.93, 0.91, 0.90, 0.93); 27:SetFct(0.93, 0.91, 0.90, 0.93); 28:SetFct(0.93, 0.91, 0.90, 0.93); 29:SetFct(0.93, 0.91, 0.90, 0.93); 30..34:SetFct(0.93, 0.98, 0.78, 0.92); 35..39:SetFct(1.03, 1.02, 0.75, 1.03); 40..44:SetFct(1.03, 0.97, 0.71, 1.00); 45..49:SetFct(1.03, 0.97, 0.71, 1.00); 50..54:SetFct(0.96, 0.83, 0.63, 0.85); 55..59:SetFct(0.91, 0.72, 0.54, 0.81); 60..64:SetFct(0.91, 0.72, 0.54, 0.81); 65:SetFct(1.20, 0.73, 0.40, 0.89); 66:SetFct(1.20, 0.73, 0.40, 0.91); 67:SetFct(1.22, 0.73, 0.40, 0.94); 68:SetFct(1.25, 0.72, 0.40, 0.96); 69:SetFct(1.30, 0.71, 0.40, 0.99); 70:SetFct(1.33, 0.70, 0.40, 1.01); 71:SetFct(1.37, 0.69, 0.39, 1.04); 72:SetFct(1.40, 0.68, 0.38, 1.04); 73:SetFct(1.44, 0.67, 0.37, 1.04); 74:SetFct(1.44, 0.65, 0.35, 1.04); 75:SetFct(1.61, 0.63, 0.27, 1.12); 76:SetFct(1.61, 0.63, 0.27, 1.12); 77:SetFct(1.65, 0.61, 0.27, 1.14); 78:SetFct(1.65, 0.61, 0.27, 1.14); 79:SetFct(1.69, 0.60, 0.26, 1.15); 80:SetFct(1.69, 0.60, 0.26, 1.15); 81:SetFct(1.75, 0.59, 0.25, 1.19); 82:SetFct(1.75, 0.59, 0.25, 1.19); 83:SetFct(1.81, 0.58, 0.25, 1.20); 84:SetFct(1.81, 0.58, 0.25, 1.20); 85..99:SetFct(1.88, 0.57, 0.25, 1.22); end else if (Sex = 'MM') then {**Pip is used for Med, Pip, and Um} case DrvAge of {BiPd Pip Comp Coll} 14..16:SetFct(3.31, 1.63, 1.93, 2.93); 17:SetFct(3.31, 1.63, 1.93, 2.93); 18:SetFct(3.31, 1.63, 1.93, 2.93); 19:SetFct(2.30, 1.36, 1.66, 2.16); 20:SetFct(2.15, 1.27, 1.57, 1.97); 21:SetFct(1.72, 1.25, 1.45, 1.72); 22:SetFct(1.49, 1.22, 1.40, 1.49); 23:SetFct(1.41, 1.10, 1.36, 1.41); 24:SetFct(1.22, 1.05, 1.33, 1.31); 25:SetFct(1.11, 0.99, 1.15, 1.12); 26:SetFct(1.11, 0.99, 1.15, 1.12); 27:SetFct(1.11, 0.99, 1.15, 1.12); 28:SetFct(1.11, 0.99, 1.15, 1.12); 29:SetFct(1.11, 0.99, 1.15, 1.12); 30..34:SetFct(1.00, 1.00, 1.00, 1.00); 35..39:SetFct(1.03, 1.11, 0.86, 0.97); 40..44:SetFct(1.03, 1.09, 0.78, 0.97); 45..49:SetFct(1.03, 1.09, 0.78, 0.97); 50..54:SetFct(1.03, 0.97, 0.69, 0.95); 55..59:SetFct(1.03, 0.91, 0.72, 0.93); 60..64:SetFct(1.03, 0.91, 0.72, 0.93); 65:SetFct(1.28, 0.87, 0.69, 1.00); 66:SetFct(1.28, 0.87, 0.69, 1.04); 67:SetFct(1.29, 0.87, 0.68, 1.07); 68:SetFct(1.30, 0.87, 0.67, 1.09); 69:SetFct(1.35, 0.87, 0.65, 1.10); 70:SetFct(1.35, 0.87, 0.63, 1.12); 71:SetFct(1.37, 0.87, 0.61, 1.14); 72:SetFct(1.38, 0.87, 0.59, 1.17); 73:SetFct(1.40, 0.87, 0.57, 1.19); 74:SetFct(1.45, 0.87, 0.57, 1.21); 75:SetFct(2.11, 0.90, 0.46, 1.51); 76:SetFct(2.11, 0.90, 0.46, 1.51); 77:SetFct(2.17, 0.90, 0.45, 1.53); 78:SetFct(2.17, 0.90, 0.45, 1.53); 79:SetFct(2.25, 0.90, 0.44, 1.53); 80:SetFct(2.25, 0.90, 0.44, 1.53); 81:SetFct(2.30, 0.90, 0.43, 1.53); 82:SetFct(2.30, 0.90, 0.43, 1.53); 83:SetFct(2.30, 0.90, 0.41, 1.53); 84:SetFct(2.30, 0.90, 0.41, 1.53); 85..99:SetFct(2.30, 0.90, 0.40, 1.53); end else if (Sex = 'SF') then {**Pip is used for Med, Pip, and Um} case DrvAge of {BiPd Pip Comp Coll} 14..16:SetFct(3.94, 1.84, 1.06, 3.27); 17:SetFct(3.94, 1.84, 1.06, 3.27); 18:SetFct(3.94, 1.84, 1.06, 3.27); 19:SetFct(2.22, 1.33, 1.06, 2.06); 20:SetFct(2.01, 1.23, 1.06, 1.89); 21:SetFct(1.58, 1.06, 1.04, 1.67); 22:SetFct(1.48, 1.04, 1.00, 1.44); 23:SetFct(1.33, 1.04, 0.98, 1.33); 24:SetFct(1.25, 1.04, 0.98, 1.20); 25:SetFct(1.25, 1.13, 1.03, 1.22); 26:SetFct(1.25, 1.13, 1.03, 1.22); 27:SetFct(1.25, 1.13, 1.03, 1.22); 28:SetFct(1.25, 1.13, 1.03, 1.22); 29:SetFct(1.25, 1.13, 1.03, 1.22); 30..34:SetFct(1.25, 1.34, 0.99, 1.21); 35..39:SetFct(1.31, 1.40, 0.98, 1.24); 40..44:SetFct(1.25, 1.31, 0.93, 1.24); 45..49:SetFct(1.31, 1.38, 0.98, 1.30); 50..54:SetFct(1.22, 1.17, 0.85, 1.17); 55..59:SetFct(1.24, 1.12, 0.75, 1.16); 60..64:SetFct(1.24, 1.12, 0.75, 1.16); 65:SetFct(1.32, 0.94, 0.58, 1.15); 66:SetFct(1.33, 0.94, 0.58, 1.16); 67:SetFct(1.41, 0.93, 0.58, 1.18); 68:SetFct(1.45, 0.91, 0.58, 1.20); 69:SetFct(1.48, 0.89, 0.58, 1.21); 70:SetFct(1.50, 0.87, 0.58, 1.23); 71:SetFct(1.50, 0.84, 0.58, 1.25); 72:SetFct(1.50, 0.82, 0.57, 1.26); 73:SetFct(1.50, 0.80, 0.56, 1.26); 74:SetFct(1.50, 0.78, 0.55, 1.26); 75:SetFct(1.87, 0.77, 0.35, 1.42); 76:SetFct(1.87, 0.77, 0.35, 1.42); 77:SetFct(1.87, 0.76, 0.33, 1.42); 78:SetFct(1.87, 0.76, 0.33, 1.42); 79:SetFct(1.87, 0.75, 0.32, 1.42); 80:SetFct(1.87, 0.75, 0.32, 1.42); 81:SetFct(1.87, 0.75, 0.32, 1.42); 82:SetFct(1.87, 0.75, 0.32, 1.42); 83:SetFct(1.87, 0.74, 0.31, 1.42); 84:SetFct(1.87, 0.74, 0.31, 1.42); 85..99:SetFct(1.87, 0.74, 0.31, 1.42); end else if (Sex = 'SM') then {**Pip is used for Med, Pip, and Um} begin case DrvAge of {BiPd Pip Comp Coll} 14..16:SetFct(5.17, 1.69, 1.64, 4.48); 17:SetFct(5.17, 1.69, 1.64, 4.48); 18:SetFct(5.17, 1.69, 1.64, 4.48); 19:SetFct(2.96, 1.23, 1.72, 3.18); 20:SetFct(2.79, 1.15, 1.72, 3.14); 21:SetFct(1.99, 1.06, 1.54, 2.42); 22:SetFct(1.80, 0.96, 1.50, 2.27); 23:SetFct(1.57, 0.87, 1.35, 1.88); 24:SetFct(1.40, 0.82, 1.31, 1.65); 25:SetFct(1.27, 0.82, 1.23, 1.45); 26:SetFct(1.27, 0.82, 1.23, 1.45); 27:SetFct(1.27, 0.82, 1.23, 1.45); 28:SetFct(1.27, 0.82, 1.23, 1.45); 29:SetFct(1.27, 0.82, 1.23, 1.45); 30..34:SetFct(1.27, 0.96, 1.14, 1.39); 35..39:SetFct(1.26, 0.93, 1.03, 1.34); 40..44:SetFct(1.16, 0.93, 0.91, 1.18); 45..49:SetFct(1.16, 0.93, 0.91, 1.18); 50..54:SetFct(1.19, 0.83, 0.84, 1.18); 55..59:SetFct(1.18, 0.83, 0.76, 1.18); 60..64:SetFct(1.18, 0.83, 0.76, 1.18); 65:SetFct(1.64, 0.91, 0.72, 1.48); 66:SetFct(1.68, 0.91, 0.72, 1.51); 67:SetFct(1.71, 0.91, 0.71, 1.55); 68:SetFct(1.75, 0.91, 0.71, 1.55); 69:SetFct(1.78, 0.91, 0.70, 1.55); 70:SetFct(1.81, 0.91, 0.69, 1.55); 71:SetFct(1.82, 0.91, 0.69, 1.55); 72:SetFct(1.82, 0.91, 0.68, 1.55); 73:SetFct(1.82, 0.91, 0.67, 1.55); 74:SetFct(1.82, 0.91, 0.67, 1.55); 75:SetFct(2.95, 0.91, 0.50, 2.22); 76:SetFct(2.95, 0.91, 0.50, 2.22); 77:SetFct(2.95, 0.91, 0.48, 2.22); 78:SetFct(2.95, 0.91, 0.48, 2.22); 79:SetFct(2.95, 0.91, 0.46, 2.22); 80:SetFct(2.95, 0.91, 0.46, 2.22); 81:SetFct(2.95, 0.91, 0.46, 2.22); 82:SetFct(2.95, 0.91, 0.46, 2.22); 83:SetFct(2.95, 0.91, 0.46, 2.22); 84:SetFct(2.95, 0.91, 0.46, 2.22); 85..99:SetFct(2.95, 0.91, 0.46, 2.22); end; end else InvalidClass := true; End; end; procedure SetPointFct(var TBiPd, TPip, TColl:Real); procedure SetFct(_BiPd, _Pip, _Coll: real); begin TBiPd:=_BiPd; TPip:=_Pip; TColl:=_Coll; end; Begin If Tier In [T1..T4] Then {**Med & Pip both use Pip} Case Br.NumPoints[Br.Id] Of {BiPd Pip Coll} 0: SetFct(0.00, 0.00, 0.00); 1: SetFct(0.17, 0.06, 0.11); 2: SetFct(0.44, 0.11, 0.34); 3: SetFct(0.53, 0.19, 0.44); 4: SetFct(0.64, 0.22, 0.49); 5: SetFct(0.92, 0.24, 0.84); 6: SetFct(0.96, 0.44, 0.92); 7: SetFct(1.12, 0.46, 0.97); 8: SetFct(1.28, 0.50, 1.09); 9: SetFct(1.44, 0.64, 1.56); 10: SetFct(1.76, 0.68, 1.80); 11: SetFct(1.91, 0.73, 1.89); 12: SetFct(2.06, 0.77, 1.98); 13: SetFct(2.22, 0.81, 2.08); 14: SetFct(2.40, 0.86, 2.19); 15: SetFct(2.59, 0.92, 2.30); 16: SetFct(2.80, 0.97, 2.41); 17: SetFct(3.02, 1.03, 2.53); 18: SetFct(3.27, 1.09, 2.66); 19: SetFct(3.53, 1.16, 2.79); 20: SetFct(3.81, 1.22, 2.93); 21: SetFct(4.11, 1.30, 3.08); 22: SetFct(4.44, 1.38, 3.23); 23: SetFct(4.80, 1.46, 3.39); 24: SetFct(5.18, 1.55, 3.56); 25: SetFct(5.60, 1.64, 3.74); 26: SetFct(6.04, 1.74, 3.93); 27: SetFct(6.53, 1.84, 4.13); 28: SetFct(7.05, 1.95, 4.33); 29: SetFct(7.61, 2.07, 4.55); 30..99: SetFct(8.22, 2.19, 4.78); End Else Case Br.NumPoints[Br.Id] Of {BiPd Pip Coll} 0: SetFct(0.00, 0.00, 0.00); 1: SetFct(0.15, 0.05, 0.10); 2: SetFct(0.39, 0.10, 0.30); 3: SetFct(0.45, 0.16, 0.37); 4: SetFct(0.53, 0.18, 0.41); 5: SetFct(0.77, 0.20, 0.70); 6: SetFct(0.80, 0.37, 0.77); 7: SetFct(0.93, 0.38, 0.81); 8: SetFct(1.07, 0.42, 0.91); 9: SetFct(1.20, 0.53, 1.30); 10: SetFct(1.47, 0.57, 1.50); 11: SetFct(1.59, 0.60, 1.58); 12: SetFct(1.72, 0.64, 1.66); 13: SetFct(1.86, 0.68, 1.74); 14: SetFct(2.01, 0.72, 1.83); 15: SetFct(2.17, 0.76, 1.92); 16: SetFct(2.34, 0.81, 2.02); 17: SetFct(2.53, 0.86, 2.12); 18: SetFct(2.73, 0.91, 2.23); 19: SetFct(2.95, 0.96, 2.34); 20: SetFct(3.19, 1.02, 2.46); 21: SetFct(3.45, 1.08, 2.58); 22: SetFct(3.73, 1.14, 2.71); 23: SetFct(4.03, 1.21, 2.85); 24: SetFct(4.35, 1.28, 2.99); 25: SetFct(4.70, 1.36, 3.14); 26: SetFct(5.08, 1.44, 3.30); 27: SetFct(5.49, 1.53, 3.47); 28: SetFct(5.93, 1.62, 3.64); 29: SetFct(6.40, 1.72, 3.82); 30..99: SetFct(6.91, 1.82, 4.01); End End; Function TierFct(Cov:Byte):Real; Procedure SetFct(Bif,Pdf,Medf,Pipf,Cmpf,Collf:Real); Begin Case Cov of 1: TierFct:=Bif; 2: TierFct:=Pdf; 3: TierFct:=Medf; 4: TierFct:=Pipf; 5: TierFct:=Cmpf; 6: TierFct:=Collf; End; End; Begin Case Tier of {Bi Pd Med Pip/Um Comp Coll} T1: SetFct(0.47, 0.47, 0.38, 0.38, 0.39, 0.45); T2: SetFct(0.52, 0.52, 0.42, 0.42, 0.43, 0.50); T3: SetFct(0.57, 0.57, 0.47, 0.47, 0.47, 0.52); T4: SetFct(0.64, 0.64, 0.49, 0.49, 0.52, 0.58); T5: SetFct(0.69, 0.69, 0.64, 0.64, 0.66, 0.67); T6: SetFct(0.72, 0.72, 0.67, 0.67, 0.69, 0.70); T7: SetFct(0.78, 0.78, 0.78, 0.78, 0.81, 0.78); T8: SetFct(0.85, 0.85, 0.85, 0.85, 0.88, 0.85); T9: SetFct(0.93, 0.93, 0.99, 0.99, 0.95, 0.95); T10: SetFct(1.03, 1.03, 1.08, 1.08, 1.05, 1.05); T11: SetFct(1.10, 1.10, 1.23, 1.23, 1.18, 1.10); T12: SetFct(1.30, 1.30, 1.49, 1.49, 1.35, 1.35); T13: SetFct(1.57, 1.57, 1.74, 1.74, 1.69, 1.63); T14: SetFct(1.73, 1.73, 1.93, 1.93, 1.87, 1.80); End; End; procedure Calculate; Const {Base Rates} {LB 8/19/06 for 8/23/06 rate change} BiBase = 78.00; PdBase = 118.00; MedBase = 32.00; PipBase = 185.00; UmBase = 109.00; CompBase = 87.00; CollBase = 274.00; {Expense Loads} {LB 8/19/06 for 8/23/06 rate change} BiEx = 14; PdEx = 13; PipEx = 14; CmpEx = 5; CllEx = 25; Procedure CalcBothTerms(Var Ann,Semi:Real;Factor:Real;Dec:Integer); Begin Ann:=Ground(Dec,Ann*Factor); Semi :=Ground(Dec,Semi*Factor); if 1=1 then ; End; Var TLiab, TPhys: Real; BiPdCls,PipMedCls,CompCls,CollCls: Real; {Um uses PipMedCls} BiPdHSF,PipHSF,CompHSF,CollHSF: Real; {Pip,Med, & Um all sue PipHSF} BiPdPoint,PipPoint,CollPoint: Real; BiTerr,PdTerr,PipTerr,MedTerr,UmTerr,CmpTerr,CllTerr:Real; BiPdYear,PipYear,CmpYear,CllYear:Real; {Med,Pip & Um all use PipYear} Disc : DiscType; begin {Lisa added following initialization to eliminate negative rates for the batch rater- done 2/10/04} BiPdCls:=0; PipMedCls:=0; CompCls:=0; CollCls:=0; If Br.Client.PolPer='6' Then TermF:=1.00 Else TermF:=2.04; SetClassFct(BiPdCls, PipMedCls, CompCls, CollCls); SetPointFct(BiPdPoint,PipPoint,CollPoint); SetHSF(BiPdHSF, PipHSF, CollHSF, CompHSF); SetTerrFct(BiTerr, PdTerr, MedTerr, PipTerr, UmTerr, CmpTerr, CllTerr); SetModelYearFct(BiPdYear,PipYear,CmpYear, CllYear); Discount(Disc); {BI} Br.Bi[Br.Ic] := BiPdCls; {CLASS} Br.Bi[Br.Ic] := Br.Bi[Br.Ic]+BiPdPoint; {POINTS} Br.Bi[Br.Ic] := Br.Bi[Br.Ic]+BiPdHSF; {HOUSEHOLD} Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*BiBase); {BASE} Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*TierFct(1)); {TIER} Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*BiTerr); {TERRITORY} Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*SymbolFct(BiL)); {SYMBOL} Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*BiPdYear); {MODEL YEAR} //Future Enhancement currently 1.0 - Pending Company {BGB} Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*MakeModelAdjFctr(BiL)); {YR/MAKE/MODEL Adj Fctr} Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*BiIncLimits); {INC LIMITS} If (LSN=3) Then Begin Bi6[Br.ic]:=Ground(3,Br.Bi[Br.ic]*1.00); {TERM} Br.Bi[Br.ic]:=Ground(3,Br.Bi[Br.ic]*2.04); End Else Br.Bi[Br.Ic] := GRound(3,Br.Bi[Br.Ic]*TermF); CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],Disc.Matrix.Bipd,3); {MATRIX DISC} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],(1-Disc.Abs),3); {ABS} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],(1-Disc.Senior),3); {SENIOR} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],BUseSurch,3); {BUSINESS} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],InExpSurch,3); {INEXPERIENCE} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],HighPerf(1),3); {HIGH PERF} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],Unverifiable,3); {MVR} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],ForeignLicSurch,3); {FOREIGN LICENSE} CalcBothTerms(Br.Bi[Br.ic],Bi6[Br.ic],VehDrvMtrx(1),3); {VEH/DVR MATRIX} If (Br.Bi[Br.Ic] > 0)then Begin Br.Bi[Br.Ic] := GRound(0, Br.Bi[Br.Ic]+BiEx); {EXPENSE FEE} Bi6[Br.ic] :=Ground(0,Bi6[Br.ic]+BiEx); End; {PD} Br.Pd[Br.Ic] := BiPdCls; {CLASS} Br.Pd[Br.Ic] := Br.Pd[Br.Ic]+BiPdPoint; {POINTS} Br.Pd[Br.Ic] := Br.Pd[Br.Ic]+BiPdHSF; {HOUSEHOLD} Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*PdBase); {BASE} Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*TierFct(2)); {TIER} Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*PdTerr); {TERRITORY} Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*SymbolFct(PdL)); {SYMBOL} Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*BiPdYear); {MODEL YEAR} //Future Enhancement currently 1.0 - Pending Company {BGB} Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*MakeModelAdjFctr(PdL)); {YR/MAKE/MODEL Adj Fctr} Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*PdIncLimits); {INC LIMITS} If (LSN=3) Then Begin Pd6[Br.ic]:=Ground(3,Br.Pd[Br.ic]*1.00); {TERM} Br.Pd[Br.ic]:=Ground(3,Br.Pd[Br.ic]*2.04); End Else Br.Pd[Br.Ic] := GRound(3,Br.Pd[Br.Ic]*TermF); CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],Disc.Matrix.BiPd,3); {MATRIX DISC} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],(1-Disc.Abs),3); {ABS} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],(1-Disc.Senior),3); {SENIOR} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],BUseSurch,3); {BUSINESS} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],InExpSurch,3); {INEXPERIENCE} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],HighPerf(1),3); {HIGH PERF} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],Unverifiable,3); {MVR} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],ForeignLicSurch,3); {FOREIGN LICENSE} CalcBothTerms(Br.Pd[Br.ic],Pd6[Br.ic],VehDrvMtrx(2),3); {VEH/DVR MATRIX} If (Br.Pd[Br.Ic] > 0) then Begin Br.Pd[Br.Ic] := GRound(0, Br.Pd[Br.Ic]+PdEx); {EXPENSE FEE} Pd6[Br.ic]:=Ground(0,Pd6[br.ic]+PdEx); End; {PIP} Br.Pip[Br.Ic] := PipMedCls; {CLASS} Br.Pip[Br.Ic] := Br.Pip[Br.Ic]+PipPoint; {POINTS} Br.Pip[Br.Ic] := Br.Pip[Br.Ic]+PipHSF; {HOUSEHOLD} Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*PipBase); {BASE} Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*TierFct(4)); {TIER} Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*PipTerr); {TERRITORY} Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*SymbolFct(PipL)); {SYMBOL} Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*PipYear); {MODEL YEAR} //Future Enhancement currently 1.0 - Pending Company {BGB} Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*MakeModelAdjFctr(PipL)); {YR/MAKE/MODEL Adj Fctr} Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*PipDedFactor); {INC LIMITS} If (LSN=3) Then Begin Pip6[Br.ic]:=Ground(3,Br.Pip[Br.ic]*1.00); {TERM} Br.Pip[Br.ic]:=Ground(3,Br.Pip[Br.ic]*2.04); End Else Br.Pip[Br.Ic] := GRound(3,Br.Pip[Br.Ic]*TermF); CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],Disc.Matrix.Pip,3); {MATRIX DISC} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],(1-Disc.AirBag),3); {AIRBAG} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],(1-Disc.Abs),3); {ABS} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],(1-Disc.Senior),3); {SENIOR} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],BUseSurch,3); {BUSINESS} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],InExpSurch,3); {INEXPERIENCE} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],HighPerf(1),3); {HIGH PERF} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],Unverifiable,3); {MVR} CalcBothTerms(Br.Pip[Br.ic],Pip6[Br.ic],ForeignLicSurch,3); {FOREIGN LICENSE} CalcBothTerms(Br.Pip[br.ic],Pip6[br.ic],VehDrvMtrx(3),3); {VEH/DVR MATRIX} If (Br.Pip[Br.Ic] > 0) then Begin Br.Pip[Br.Ic] := GRound(0, Br.Pip[Br.Ic]+PipEx); {EXPENSE FEE} Pip6[br.ic]:=GRound(0,Pip6[br.ic]+PipEx); End; {MED} Br.Med[Br.Ic] := PipMedCls; {CLASS} Br.Med[Br.Ic] := Br.Med[Br.Ic]+PipPoint; {POINTS} Br.Med[Br.Ic] := Br.Med[Br.Ic]+PipHSF; {HOUSEHOLD} Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*MedBase); {BASE} Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*TierFct(3)); {TIER} Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*MedTerr); {TERRITORY} Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*SymbolFct(MedL)); {SYMBOL} Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*PipYear); {MODEL YEAR} //Future Enhancement currently 1.0 - Pending Company {BGB} Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*MakeModelAdjFctr(MedL)); {YR/MAKE/MODEL Adj Fctr} Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*MedIncLimits); {INC LIMITS} If (LSN=3) Then Begin Med6[Br.ic]:=Ground(3,Br.Med[Br.ic]*1.00); {TERM} Br.Med[Br.ic]:=Ground(3,Br.Med[Br.ic]*2.04); End Else Br.Med[Br.Ic] := GRound(3,Br.Med[Br.Ic]*TermF); CalcBothTerms(Br.Med[br.ic],Med6[br.ic],Disc.Matrix.UmMed,3); {MATRIX DISC} CalcBothTerms(Br.Med[br.ic],Med6[br.ic],(1-Disc.AirBag),3); {AIRBAG} CalcBothTerms(Br.Med[br.ic],Med6[br.ic],(1-Disc.Abs),3); {ABS} CalcBothTerms(Br.Med[br.ic],Med6[br.ic],BUseSurch,3); {BUSINESS} CalcBothTerms(Br.Med[br.ic],Med6[br.ic],InExpSurch,3); {INEXPERIENCE} CalcBothTerms(Br.Med[br.ic],Med6[br.ic],HighPerf(1),3); {HIGH PERF} CalcBothTerms(Br.Med[br.ic],Med6[br.ic],Unverifiable,3); {UNVERIFIABLE} CalcBothTerms(Br.Med[Br.ic],Med6[Br.ic],ForeignLicSurch,3); {FOREIGN LICENSE} CalcBothTerms(Br.Med[br.ic],Med6[br.ic],VehDrvMtrx(4),0); {VEH/DVR MATRIX} {UM} Br.Um[Br.Ic] := PipMedCls; {CLASS} Br.Um[Br.Ic] := Br.Um[Br.Ic]+PipHSF; {HOUSEHOLD} Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*UmBase); {BASE} Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*TierFct(4)); {TIER} Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*UmTerr); {TERRITORY} Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*SymbolFct(UmL)); {SYMBOL} Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*PipYear); {MODEL YEAR} //Future Enhancement currently 1.0 - Pending Company {BGB} Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*MakeModelAdjFctr(UmL)); {YR/MAKE/MODEL Adj Fctr} Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*UmIncLimits); {INC LIMITS} If (LSN=3) Then Begin Um6[Br.ic]:=Ground(3,Br.Um[Br.ic]*1.00); {TERM} Br.Um[Br.ic]:=Ground(3,Br.Um[Br.ic]*2.04); End Else Br.Um[Br.Ic] := GRound(3,Br.Um[Br.Ic]*TermF); CalcBothTerms(Br.Um[br.ic],Um6[br.ic],Disc.Matrix.UmMed,3); {MATRIX DISC} CalcBothTerms(Br.Um[br.ic],um6[br.ic],BUseSurch,3); {BUSINESS} CalcBothTerms(Br.Um[br.ic],um6[br.ic],InExpSurch,3); {INEXPERIENCE} CalcBothTerms(Br.Um[br.ic],um6[br.ic],HighPerf(1),3); {HIGH PERF} CalcBothTerms(Br.Um[br.ic],um6[br.ic],Unverifiable,3); {MVR} CalcBothTerms(Br.Um[Br.ic],Um6[Br.ic],ForeignLicSurch,3); {FOREIGN LICENSE} CalcBothTerms(Br.Um[br.ic],um6[br.ic],VehDrvMtrx(5),0);{VEH/DVR MATRIX} {COMP} Br.Comp[Br.Ic] := CompCls; {CLASS} Br.Comp[Br.Ic] := Br.Comp[Br.Ic]+CompHSF; {HOUSEHOLD} Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*CompBase); {BASE} Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*TierFct(5)); {TIER} Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*CmpTerr); {TERRITORY} Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*SymbolFct(CompL)); {SYMBOL} Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*CmpYear); {MODEL YEAR} //Future Enhancement currently 1.0 - Pending Company {BGB} Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*MakeModelAdjFctr(CompL)); {YR/MAKE/MODEL Adj Fctr} Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*CmpDedF); {INC LIMITS} If (LSN=3) Then Begin Comp6[Br.ic]:=Ground(3,Br.Comp[Br.ic]*1.00); {TERM} Br.Comp[Br.ic]:=Ground(3,Br.Comp[Br.ic]*2.04); End Else Br.Comp[Br.Ic] := GRound(3,Br.Comp[Br.Ic]*TermF); CalcBothTerms(Br.Comp[br.ic],Comp6[br.ic],Disc.Matrix.Cmp,3); {MATRIX DISC} CalcBothTerms(Br.Comp[br.ic],Comp6[br.ic],(1-Disc.AntiTheft),3); {ANTI-THEFT} CalcBothTerms(Br.Comp[br.ic],Comp6[br.ic],BUseSurch,3); {BUSINESS} CalcBothTerms(Br.Comp[br.ic],Comp6[br.ic],InExpSurch,3); {INEXPERIENCE} CalcBothTerms(Br.Comp[br.ic],Comp6[br.ic],HighPerf(2),3); {HIGH PERF} CalcBothTerms(Br.Comp[br.ic],Comp6[br.ic],Unverifiable,3); {MVR} CalcBothTerms(Br.Comp[Br.ic],Comp6[Br.ic],ForeignLicSurch,3); {FOREIGN LICENSE} CalcBothTerms(Br.Comp[br.ic],Comp6[br.ic],VehDrvMtrx(6),3); {VEH/DVR MATRIX} If (Br.Comp[Br.Ic] > 0) then Begin Br.Comp[Br.Ic] := GRound(0, Br.Comp[Br.Ic]+CmpEx); {EXPENSE FEE} Comp6[br.ic]:=Ground(0,Comp6[br.ic]+CmpEx); End; {COLL} Br.Coll[Br.Ic] := CollCls; {CLASS} Br.Coll[Br.Ic] := Br.Coll[Br.Ic]+CollPoint; {POINTS} Br.Coll[Br.Ic] := Br.Coll[Br.Ic]+CollHSF; {HOUSEHOLD} Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*CollBase); {BASE} Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*TierFct(6)); {TIER} Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*CllTerr); {TERRITORY} Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*SymbolFct(CollL)); {SYMBOL} Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*CllYear); {MODEL YEAR} //Future Enhancement currently 1.0 - Pending Company {BGB} Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*MakeModelAdjFctr(CollL)); {YR/MAKE/MODEL Adj Fctr} Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*CllDedF); {INC LIMITS} If (LSN=3) Then Begin Coll6[Br.ic]:=Ground(3,Br.Coll[Br.ic]*1.00); {TERM} Br.Coll[Br.ic]:=Ground(3,Br.Coll[Br.ic]*2.04); End Else Br.Coll[Br.Ic] := GRound(3,Br.Coll[Br.Ic]*TermF); CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],Disc.Matrix.Cll,3); {MATRIX DISC} CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],(1-Disc.Abs),3); {ABS} CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],(1-Disc.Senior),3); {SENIOR} CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],BUseSurch,3); {BUSINESS} CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],InExpSurch,3); {INEXPERIENCE} CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],HighPerf(2),3); {HIGH PERF} CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],Unverifiable,3); {MVR} CalcBothTerms(Br.Coll[Br.ic],Coll6[Br.ic],ForeignLicSurch,3); {FOREIGN LICENSE} CalcBothTerms(Br.Coll[br.ic],Coll6[br.ic],VehDrvMtrx(7),3); {VEH/DVR MATRIX} If (Br.Coll[Br.Ic] > 0) then Begin Br.Coll[Br.Ic] := GRound(0, Br.Coll[Br.Ic]+CllEx); {EXPENSE FEE} Coll6[br.ic]:=Ground(0,Coll6[br.ic]+CllEx); End; If (Br.Coll[Br.Ic]>0) and (Br.Comp[Br.ic]>0) then Begin {TOWING} If Br.Veh[Br.IC].Tow_Lim <> 'NONE' then Begin Case ToInteger(Br.Veh[br.ic].Tow_Lim) of 25,50: Begin Br.Towing[Br.ic]:=5; Br.Veh[br.ic].Tow_Lim:='50'; If (LSN=3) Then Begin Towing6[Br.ic]:=Ground(0,Br.Towing[Br.ic]*1.00); {TERM} Br.Towing[Br.ic]:=Ground(0,Br.Towing[Br.ic]*2.04); End Else Br.Towing[Br.Ic] := GRound(0,Br.Towing[Br.Ic]*TermF); End; 100: Begin Br.Towing[Br.ic]:=7; Br.Veh[br.ic].Tow_Lim:='75'; If (LSN=3) Then Begin Towing6[Br.ic]:=Ground(0,Br.Towing[Br.ic]*1.00); {TERM} Br.Towing[Br.ic]:=Ground(0,Br.Towing[Br.ic]*2.04); End Else Br.Towing[Br.Ic] := GRound(0,Br.Towing[Br.Ic]*TermF); End; End; End; {RENTAL} If Br.Veh[Br.IC].Rental_Lim <> 'NONE' then Begin Case ToInteger(Br.Veh[br.ic].Rental_Lim) of 15,25: Begin Br.Rental[Br.ic]:=25; Br.Veh[br.ic].Rental_Lim:='20'; If (LSN=3) Then Begin Rental6[Br.ic]:=Ground(0,Br.Rental[Br.ic]*1.00); {TERM} Br.Rental[Br.ic]:=Ground(0,Br.Rental[Br.ic]*2.04); End Else Br.Rental[Br.Ic] := GRound(0,Br.Rental[Br.Ic]*TermF); End; 50: Begin Br.Rental[Br.ic]:=35; Br.Veh[br.ic].Rental_Lim:='35'; If (LSN=3) Then Begin Rental6[Br.ic]:=Ground(0,Br.Rental[Br.ic]*1.00); {TERM} Br.Rental[Br.ic]:=Ground(0,Br.Rental[Br.ic]*2.04); End Else Br.Rental[Br.Ic] := GRound(0,Br.Rental[Br.Ic]*TermF); End; End; End; DoCustom; end; {Lisa added following to eliminate negative rates for the batch rater- done 2/10/04} {Some Household factors are negative numbers} If (Br.Bi[br.ic]<0) Then Br.Bi[Br.ic]:=0; If (Br.Pd[br.ic]<0) Then Br.Pd[Br.ic]:=0; If (Br.Pip[br.ic]<0) Then Br.Pip[Br.ic]:=0; If (Br.Comp[br.ic]<0) Then Br.Comp[Br.ic]:=0; If (Br.Coll[br.ic]<0) Then Br.Coll[Br.ic]:=0; if (Not Sorting) then begin CheckIt(UnAcceptable, TotalyUn); TPhys := Br.Comp[Br.Ic]+Br.Coll[Br.Ic]; TLiab := Br.Bi[Br.Ic]+Br.Pd[Br.Ic]+Br.Pip[Br.Ic]+Br.Med[Br.Ic]+Br.Um[Br.Ic]; Br.SubTotal[Br.Ic] := TLiab+Br.Comp[Br.Ic]+Br.Coll[Br.Ic]; Br.Liab := Br.Liab+TLiab; Br.Phys := Br.Phys+TPhys; end; end; {Procedure copied from TRA3.pas} Procedure SetExtraDrivers; var Old_Id : integer; EvClassF, dummy: real; Begin {CREATED DRIVER CLASS} Old_Id := Br.id; Br.id := Br.DvrN[1]; SetClassFct(EvClassF, dummy, dummy, dummy); Br.id := Old_Id; For Loop_ID := 1 To Br.NumD Do Begin Br.id := Loop_id; If Br.Driver[Br.Id].Use = 'E' Then Begin Br.NumPoints[Br.Id] := 0; End; If (Br.Id > Save_NumD) or (Br.Driver[Br.Id].Use = 'E') Then Begin Br.NumPoints[Br.Id] := 0; if not (EvClassF > 1.10) then begin Br.Driver[Br.Id].Sex := Br.Driver[Br.DvrN[1]].Sex; Br.Driver[Br.Id].Age := Br.Driver[Br.DvrN[1]].Age; Br.dClass[Br.id]:=Br.dClass[Br.DvrN[1]];//LB 3/29/04 end else Begin Use_1_10[br.id] := true; Br.dClass[Br.id]:='EV'; End; End; End; End; Procedure InitVars(Var SortTable:SortType); Begin FillChar(SortTable, SizeOf(SortTable), 0); Br.TheMsgNum:=0; Br.MsgNum:=0; Br.Liab:=0; Br.Phys:=0; End; Procedure GetHighest(Var Driver, Car: Integer; Var SortTable:SortType); Var HRate: Real; Hd, Hc: Integer; I,J: Byte; Begin HRate:=0; Hd:=Driver; Hc:=Car; For I:=1 To Br.NumD Do For J:=1 To Br.NumC Do Begin If (SortTable[I, J] > HRate) Then Begin HRate:=SortTable[I, J]; Hd:=I; Hc:=J; End; End; For I:=1 To Br.NumD Do SortTable[I, Hc]:=0; For I:=1 To Br.NumC Do SortTable[Hd, I]:=0; Driver:=Hd; Car:=Hc; End; Procedure DoSort; Var I,J:Integer; V:Array[1..MaxCar] Of Integer; D:Array[1..4] Of Integer; SortTable:SortType; Begin For I:=1 To Maxcar Do V[i]:=I; For I:=1 To 4 Do D[i]:=I; InitVars(SortTable); For I:=1 To Br.NumD Do For J:=1 To Br.NumC Do Begin Br.Id:=I; Br.Ic:=J; Calculate; If (UnAcceptable) And (Br.MsgNum<>3) Then Begin Br.Comp[Br.Ic]:=Br.Ic/100; Br.Coll[Br.Ic]:=0; End; If ((TotalyUn) And (Br.MsgNum<>3)) Or (Br.dClass[Br.Id]='?') Then Begin Br.Bi[Br.Ic]:=(Br.Ic/100*Ord(Not(Br.SecondCompany))); Br.Pd[Br.Ic]:=0; Br.Pip[Br.Ic]:=0; Br.Med[Br.Ic]:=0; Br.Um[Br.Ic]:=0; Br.Comp[Br.Ic]:=(Br.Ic/100*Ord(Br.SecondCompany)); Br.Coll[Br.Ic]:=0; End; If Not(Totalyun) and (Br.MsgNum=53) And (RequestCov(CollL)) Then Begin Br.Comp[Br.Ic]:=Br.Ic/100; Br.Coll[Br.Ic]:=0; End; If (Not Br.Split) Then SortTable[Br.Id, Br.Ic]:=Br.Bi[Br.Ic]+Br.Pd[Br.Ic]+Br.Pip[Br.Ic]+Br.Med[Br.Ic]+ Br.Um[Br.Ic]+Br.Comp[Br.Ic]+Br.Coll[Br.Ic] Else If (Not Br.SecondCompany) Then SortTable[Br.Id, Br.Ic]:=Br.Bi[Br.Ic]+Br.Pd[Br.Ic]+Br.Pip[Br.Ic]+Br.Med[Br.Ic]+Br.Um[Br.Ic] Else If (Br.SecondCompany) Then SortTable[Br.Id, Br.Ic]:=Br.Comp[Br.Ic]+Br.Coll[Br.Ic]; If Br.Driver[Br.Id].Use='E' Then SortTable[Br.Id, Br.Ic] := SortTable[Br.Id, Br.Ic] * 0.01; If Br.Id > Save_NumD then SortTable[Br.Id, Br.Ic]:=SortTable[Br.Id, Br.Ic] * 0.00002; End; For I:=1 To Br.NumC Do GetHighest(D[i], V[i], SortTable); InitVars(SortTable); Br.DvrN[1]:= D[1]; Br.DvrN[2]:= D[2]; Br.DvrN[3]:= D[3]; Br.DvrN[4]:= D[4]; Br.CarN[1]:= V[1]; Br.CarN[2]:= V[2]; Br.CarN[3]:= V[3]; Br.CarN[4]:= V[4]; Sorting:=False; End; procedure CheckLiabLimits; Var BiFirst:String[4]; begin NoCovStr:=0; if Br.Company_Only_Writes_Physical_Damage then Exit; With Br.Veh[1] Do if (Not Br.SecondCompany) then begin BiFirst:=Extractword(1, Bi, ['/']); Case ToInteger(BiFirst) Of 10: If Pd<>'0' Then Pd:='10'; 25: Begin If ToInteger(Pd) > 25 Then Pd:='25' Else If (ToInteger(Pd)=15) or (ToInteger(Pd)=20) Then Pd:='10'; End; 50: Begin If ToInteger(Pd) > 50 Then Pd:='50' Else If (ToInteger(Pd)=15) or (ToInteger(Pd)=20) Then Pd:='10'; End; 100: Begin If (ToInteger(Pd)=15) or (ToInteger(Pd)=20) Then Pd:='10'; End; End; If (ToInteger(Pd)>0) and (Pd<>'10') and (AnyExcluded) Then Pd:='10'; If RequestCov(MedL) then begin If (Med='3000') Then Med:='2000'; if Not RequestCov(BiL) then BiReqWithMed := true; end; if ((Pd='0') And ((Bi<>'0') Or (Pip<>'NONE'))) then NoCovStr := 1; If ToInteger(Pip)=2000 then Pip:='1000'; If ((Pip='NONE') And (Bi<>'0') And (Pd<>'0')) then Um := '0'; CheckUmLimit; if (Br.Veh[1].Um ='15/30') then Br.Veh[1].Um :='10/20'; if (Br.Company_Only_Writes_Pd_Pip) then begin if ((Pip='NONE') And (Pd<>'0')) then NoCovStr := 2; end else begin if (Not ((Br.Company_Allows_Non_Owners) And ((Pip='NONE') And (Bi<>'0') And (Pd<>'0')))) then begin if ((Pip='NONE') And ((Bi<>'0') Or (Pd<>'0'))) then NoCovStr := 3; end; end; end; end; procedure InvalidClassCheck; var I :integer; begin if (Command_Line_Contains('ClsTest1')) Then Br.dClass[1] := '!!'; if (Command_Line_Contains('ClsTest2')) Then Br.dClass[2] := '!!'; if (Command_Line_Contains('ClsTest3')) Then Br.dClass[3] := '!!'; if (Command_Line_Contains('ClsTest4')) Then Br.dClass[4] := '!!'; for I := 1 to br.NumD do begin if (Copy(Br.dClass[i],3,2) <> 'SM') and (Copy(Br.dClass[i],3,2) <> 'MM') and (Copy(Br.dClass[i],3,2) <> 'SF') and (Copy(Br.dClass[i],3,2) <> 'MF') and (br.DClass[i] <> 'EV') then InvalidClass := true; end; end; procedure RateCompany; Var I: Integer; D: Array[1..4] Of Integer; V: Array[1..MaxCar] Of Integer; begin V[1]:= Br.CarN[1]; V[2]:= Br.CarN[2]; V[3]:= Br.CarN[3]; V[4]:= Br.CarN[4]; D[1]:= Br.DvrN[1]; D[2]:= Br.DvrN[2]; D[3]:= Br.DvrN[3]; D[4]:= Br.DvrN[4]; SetExtraDrivers; InvalidClassCheck; For I := 1 To Br.NumC Do begin Br.Ic := V[i]; Br.Id := D[i]; Calculate; end; GetTotals(Br.NumPhysDiscs, LSN, False); end; procedure Initialize; var I:Integer; begin InvalidCredit:=False; NotAtFault:= 0; MarriedWOSpouse:=False; CreditNotOrdered:=False; TruckWithBus :=False; HasSR22s :=False; ObtainLic :=False; Br.PolFee := 0; {Per Michael Callahan email 1/12/04} PrincipalOps := 0; NumArtisan := 0; NumBusiness := 0; NumAccPhys := 0; NumWithFullCov := 0; PhysicianSt := False; Sr22 := False; DBUse := False; VBUse := False; Sr22s := False; Sorting := True; DriverU := False; FctNotAvail := False; VehicleU := False; NonOwners := False; InspectMsg := False; AllExcluded := True; SubmitRisk := False; BiReqWithMed := False; AnyExcluded := False; InvalidTerr := False; MakeModelReq := False; ModelRequired := False; AnyDriverSr22 := False; InspectVehicle := False; VehicleNotFound := False; OkFor1To4 := True; AnyACCorMAJ := False; PI := false; Br.Company_Uses_Credit_Scoring := True; {LB added 7/29/04 for 8/1/04 update} If (ToInteger(Br.Driver[1].Age)<19) then Br.Company_Uses_Credit_Scoring := False; Br.Company_Allows_Pd_Pip_Only := True; Br.Company_Allows_Non_Owners := false; //BGB: Flip on once effective Br.Company_Allows_Assigned_Drivers := False; Br.No_OutSide_Financing := True; br.Company_allows_paid_in_full := True; PipPdOnly := False; For I:=1 to 4 Do Begin Br.id:=I; SpouseOfNI[br.id]:=False; Senior[br.id] := true; End; {LB 6/20/05 for 01/15/05 v1.2. Excluded allowed on Pip/Pd with phys} With Br.Veh[1] Do begin PipPdOnly := (bi='0') and (pd<>'0') and (pip<>'NONE'); for i := 1 to Br.numc do begin Br.ic := i; if PipPdOnly and (RequestCov(CollL)) and (Not Unacceptable) Then PipPdOnly := False; end; end; {BGB - Initialization of NonOwner Status for Future Enhancement} With Br.Veh[1] Do NonOwners := (Bi<>'0') and (Pd<>'0') and (Pip = 'NONE') and not Br.SecondCompany; {BGB: Carlist only - 12/20/05 only. Future removal instructions:} NONOWNERS:=FALSE; //1. Remove this line once effective. Near Line 2565 //2. Note: remove "NOT" in Near Line 171,174 // i.e. (Not Br.Company_Allows_Non_Owners) //3. Toggle 'ON' Br.Company_Allows_Non_Owners Near Line 2533 InvalidClass := false; end; procedure CheckCars; begin If P('5') Then begin Inc(NumBusiness); VBUse:=True; end; If P('0') Then begin Inc(NumArtisan); VBUse:=True; end; //If (P('5')) and (P('NOPKLMZ')) Then // TruckWithBus:=True; If (Pos('PANEL',StUpcase(Br.CarStyle[Br.Ic]))>0) or (Pos('FORMAL',StUpcase(Br.CarStyle[Br.Ic]))>0) or (Pos('LIMO',Stupcase(Br.CarStyle[Br.Ic]))>0) or Nmd('Limo') or NMd('Fleetwood Limo') or NMd('Fleetwood Formal') or P('Q') or //modified (ToInteger(Br.Veh[Br.IC].CustomEquip)>3000) or { (Mk('ALFA')) or //nathan 8-15-05 per new manual (Mk('HUMMER')) or (Mk('CHRYSLR') and Nmd('TC')) or //Eddie 10-15-04 Nmd('NSX') or Nmd('A8') or Nmd('Z8') or Nmd('Viper') or Nmd('Prowler') or} Nmd('Vanagon Bus') (*or (Pos('Shelby',br.carmodel[br.ic])>0) or //nathan 8-15-05 per new manual (Pos('Slby',br.carmodel[br.ic])>0) or (Pos('Cobra',br.carmodel[br.ic])>0) or (Pos('Dual',br.carmodel[br.ic])>0) or {Lisa added Duals for 10/1/03 v1.1} (Pos('DRW',br.carmodel[br.ic])>0) or (Mk('DAEWOO')) or {Lisa added Daewoo & Yugo for 3/3/04 update per manual} (Mk('YUGO')) *) or (Mk('LOTUS')) Then VehicleU:=True; If ((Br.Veh[br.Ic].Comp<>'N/A') or (Br.Veh[br.Ic].Coll<>'N/A')) and (NumAccPhys > 0) Then InspectVehicle:=True; If RequestCov(PipL) And (Trim(Br.Veh[Br.Ic].Make)='') Then MakeModelReq:=True; If RequestCov(PipL) And (Trim(Br.carmodel[Br.Ic])='') Then ModelRequired:=True; End; procedure SetPhysDed; begin case ToInteger(Br.Veh[Br.Ic].Comp) of 750 : Br.Veh[Br.Ic].Comp := '500'; 2000 : Br.Veh[Br.Ic].Comp := '1000'; end; case ToInteger(Br.Veh[Br.Ic].Coll) of 750 : Br.Veh[Br.Ic].Coll := '500'; 2000 : Br.Veh[Br.Ic].Coll := '1000'; end; end; procedure InitializeCar; Const // ISO Territories for Counties that require Pre-insurance Inspection BROWARD = [74..76,79..81]; DADE = [50,53,67..71,90]; DUVAL = [39..41]; HILLSBOROUGH = [14,17,58,59,62,63]; ORANGE = [22,60,61]; PALMBEACH = [44..47,73]; PINELLAS = [06,19]; begin DefaultTow:=Br.Veh[1].Tow_Lim; DefaultRent:=Br.Veh[1].Rental_Lim; for Loop_IC := 1 To Br.NumC Do begin Br.Veh[Br.Ic].Tow_Lim:=DefaultTow; Br.Veh[br.ic].Rental_Lim:=DefaultRent; Br.ic:=Loop_ic; AcvRequired[Br.Ic] := False; If (RequestCov(PipL)) and (RequestCov(CompL)) Then Inc(NumWithFullCov); Liabsym[br.ic] := ToInteger(br.CompBiSym[Br.ic]); PipSym[br.ic] := ToInteger(br.CompPipsym[Br.ic]); CompSym[br.ic] := ToInteger(br.CompcmpSym[Br.ic]); Br.Veh[br.ic].IsoSym := br.CompcllSym[Br.ic]; If (Liabsym[br.ic]=0) Then Begin {Lisa changed to "88" and "99" 2/23/04. For 3/3/04 update} If(ToInteger(br.Veh[br.ic].VehYr)<81) and (ToInteger(br.Veh[br.ic].VehYr)>9) Then Begin Liabsym[br.ic]:=88; PipSym[br.ic]:=88; CompSym[br.ic]:=88; Br.CompCllSym[br.ic]:='88'; Br.Veh[br.ic].IsoSym:='88'; End Else Begin {VehicleNotFound:=True;} Liabsym[br.ic]:=99; PipSym[br.ic]:=99; CompSym[br.ic]:=99; Br.CompCllSym[br.ic]:='99'; Br.Veh[br.ic].IsoSym:='99'; End; End; {BGB> - NEW FURTURE ENHANCEMENT - NONOWNER SYMBOL INITIALIZATION "The symbol we will eventually use for Named Non-Owner will be 66. We are just getting it in place for Named Non-Owner in the future. We still have to file policy forms and rules." } If NonOwners then Begin Liabsym[br.ic]:=66; PipSym[br.ic]:=66; CompSym[br.ic]:=66; Br.CompCllSym[br.ic]:='66'; Br.Veh[br.ic].IsoSym:='66'; End; {NEW FURTURE ENHANCEMENT - NONOWNER SYMBOL INITIALIZATION 0) Then Dec(NumAccPhys); end; end; procedure SetMessage; var i : integer; PipSymbol,CompSymbol : String; begin if (Br.TheMsgNum = 0) And (RequestCov(LiabL) Or RequestCov(PhysL)) then begin Br.MsgNum := 0; If InspectVehicle Then SetMsg('INSPECT VEHICLE'); If PhysicianSt Then Br.MsgNum:=23; If ObtainLic Then SetMsg('MUST OBTAIN FL LIC. BEFORE RENEWAL'); If CreditNotOrdered Then SetMsg('CREDIT SCORE NOT ORDERED'); Br.TheMsgNum := Br.MsgNum; end; case Tier of T1 : Br.Company_Tier := '1'; T2 : Br.Company_Tier := '2'; T3 : Br.Company_Tier := '3'; T4 : Br.Company_Tier := '4'; T5 : Br.Company_Tier := '5'; T6 : Br.Company_Tier := '6'; T7 : Br.Company_Tier := '7'; T8 : Br.Company_Tier := '8'; T9 : Br.Company_Tier := '9'; T10 : Br.Company_Tier := '10'; T11 : Br.Company_Tier := '11'; T12 : Br.Company_Tier := '12'; T13 : Br.Company_Tier := '13'; T14 : Br.Company_Tier := '14'; end; If Command_Line_Contains('ShowSym') Then Begin For i := 1 to Br.Numc do begin Br.ic := i; PipSymbol := IntToStr(PipSym[Br.ic]); CompSymbol := IntToStr(CompSym[Br.Ic]); If Length(CompSymbol) = 1 then CompSymbol := '0' + CompSymbol; Br.Company_Tier := Br.Company_Tier + '-' + IntToStr(LiabSym[Br.Ic])+PipSymbol+CompSymbol; end; end; end; {LB changed code 9/6/06 for 8/23/06 v1.0} Procedure GetZipCode; Var T:String; Begin ExtendedTerr := 0; Terr := ''; Str(ExtendedTerr,T); If br.secondcompany Then Begin If br.client.PhysExtTerr<>'' Then ExtendedTerr := ToInteger(br.client.PhysExtTerr) else ExtendedTerr := -1; end else If br.client.LiabExtTerr<>'' Then ExtendedTerr := ToInteger(br.client.LiabExtTerr) else ExtendedTerr := -1; if ExtendedTerr = 0 then Terr := br.client.Terr else Terr := br.client.Terr + IntToStr(ExtendedTerr); end; Procedure SetTier; Var PriorIns:String[1];{0=No Prior Bi; 1=Prior Bi Min Limits; 2 >Min Limits} PriorLim:String[1]; {0=No Lapse; 1=1-30 Days, 2=31+ Days} Matrix:String[3]; CreditScr:String[2]; NCIs:Integer; BiFirst:String[4]; Procedure ST(_1A, _1B, _1C, _1D, _1E, _1F, _1G, _1H, _1I, _1J, _1K, _1L, _NS1, _NS2, _NS3, _NH1, _NH2, _NH3, _YPNI: TTier); Begin if command_line_contains('batch') then { Progressive batch rater } begin case Br.Company_Credit_Score[1] of 'A'..'B','U' : CreditScr:='1A'; 'C' : CreditScr:='1B'; 'D' : CreditScr:='1C'; 'E' : CreditScr:='1D'; 'F'..'G' : CreditScr:='1E'; 'H'..'I' : CreditScr:='1F'; 'J'..'K' : CreditScr:='1G'; 'L' : CreditScr:='1H'; 'M' : CreditScr:='1I'; 'N' : CreditScr:='1J'; 'O'..'P' : CreditScr:='1K'; 'Q'..'R','V', 'W','Y','Z' :CreditScr:= '1L'; 'X': Begin case Br.Company_Credit_Score[2] of '1','3': CreditScr:='IL'; '4': CreditScr:='1J'; '5': CreditScr:='1F'; end; End else CreditScr:='1L'; {leave this} end; end else {Lisa added BRATERQS 2/26/04} if (LSN=3) or (command_line_contains('BRATERQS')) or (trim(Br.Company_Credit_Score)='ERR') or (trim(Br.Credit_Score_Return)='NOT_REQ') or (Trim(Br.Company_Credit_Score) = '') then begin case Br.Default_Credit[1] of {LB changed defaults 6/15/04 for 01/15/05 v1.2} '1': CreditScr:= '1A'; '2': CreditScr:= '1C'; '3': CreditScr:= '1E'; '4': CreditScr:= '1G'; '5': CreditScr:= '1J'; end; CreditNotOrdered:=True; end Else CreditScr:=trim(Br.Company_Credit_Score); If ToInteger(Br.Driver[1].Age)<19 Then Tier:= _YPNI Else If CreditScr='1A' Then Tier:=_1A Else If CreditScr='1B' Then Tier:=_1B Else If CreditScr='1C' Then Tier:=_1C Else If CreditScr='1D' Then Tier:=_1D Else If CreditScr='1E' Then Tier:=_1E Else If CreditScr='1F' Then Tier:=_1F Else If CreditScr='1G' Then Tier:=_1G Else If CreditScr='1H' Then Tier:=_1H Else If CreditScr='1I' Then Tier:=_1I Else If CreditScr='1J' Then Tier:=_1J Else If CreditScr='1K' Then Tier:=_1K Else If CreditScr='1L' Then Tier:=_1L Else If (CreditScr='NS') or (Trim(Br.Company_Credit_Score) = 'NO_SCORE') Then Begin {LB 7/26/04 for 8/1/04 update. No score broken-down by age now} Case ToInteger(Br.Driver[1].Age) of 19..49: begin Tier:=_NS1; Pi:= true; end; 50..60: Tier:=_NS2; 61..99: Tier:=_NS3; end; End Else If (CreditScr='NH') or (Trim(Br.Company_Credit_Score) = 'NO_HIT') or (Trim(Br.Credit_score_return) = 'NOHIT') Then Begin Case ToInteger(Br.Driver[1].Age) of 19..49: begin Tier:=_NH1; Pi:= true; end; 50..60: Tier:=_NH2; 61..99: Tier:=_NH3; end; End Else InvalidCredit:=True; {LB added 7/29/04 for 8/1/04 update} {LB took out 6/20/05 for 01/15/05 v1.2} {Per Callahan email 6/20/05} {If (Tier in [T1, T2, T3, T4]) and (Not OkFor1To4) Then Tier:= T5;} End; Begin Matrix:='000'; BiFirst:=Extractword(1, Br.Veh[1].Bi, ['/']); {PRIOR INSURANCE} If (tointeger(Br.Client.mo)>=6) Then Begin If (ToInteger(Br.Client.Lp)<=0) Then PriorIns := '0' Else If ToInteger(Br.Client.lp)<=30 Then PriorIns := '1' Else PriorIns := '2'; End; If (tointeger(Br.Client.mo)<6) then PriorIns := '2'; If ToInteger(BiFirst)=0 Then PriorIns := '3'; {PRIOR LIMITS} if Pos('CSL',br.PriorLimit) <> 0 then // HS 09-21-2006 br.priorLimit:=Copy(br.priorLimit,1,Pos('CSL',br.PriorLimit)-2) // else // br.priorLimit:=Copy(br.priorLimit,1,Pos('/',br.PriorLimit)-1); // If (ToInteger(BiFirst)=0) or (ToInteger(Br.Client.Lp)>30) or (tointeger(Br.Client.mo)<6) Then PriorLim := '2' Else If (ToInteger(Br.PriorLimit) = 10) or (ToInteger(Br.PriorLimit) = 0) Then PriorLim:='1' Else PriorLim:='0'; {NCI'S} Case NotAtFault of 0: NCIs:=0; 1: NCIs:=1; 2..99: NCIs:=2; End; Matrix:=PriorIns+PriorLim+Long2Str(NCIs); {Lisa added age groupings for NS & NH 7/26/04 for 8/1/04 update} Case ToInteger(Matrix) of //1A 1B 1C 1D 1E 1F 1G 1H 1I 1J 1K 1L No Score No Score NoScore No Hit No Hit No Hit PNI Youthful // (19-49) (50-60) (61+) (19-49) (50-60) (61+) // 0 0 0 000 000: ST(T1, T1, T2, T2, T3, T4, T5, T6, T6, T7, T8, T9, T7, T4, T4, T7, T4, T4, T7); // NOLAPSE NOTMIN 0 NOLAPSENOTMIN0 001: ST(T1, T1, T2, T2, T3, T4, T5, T6, T6, T7, T8, T9, T7, T4, T4, T7, T4, T4, T7); // NOLAPSE NOTMIN 1 NOLAPSENOTMIN1 002: ST(T2, T2, T3, T3, T4, T5, T6, T7, T7, T8, T9, T10, T8, T5, T5, T8, T5, T5, T8); // NOLAPSE NOTMIN 2+ NOLAPSENOTMIN2+ 010: ST(T3, T3, T3, T4, T5, T6, T7, T7, T8, T8, T9, T10, T8, T6, T6, T8, T6, T6, T8); // NOLAPSE Min 0 NOLAPSEMin0 011: ST(T3, T3, T3, T4, T5, T6, T7, T8, T8, T9, T9, T10, T9, T6, T6, T9, T6, T6, T9); // NOLAPSE Min 1 NOLAPSEMin1 012: ST(T4, T4, T4, T5, T6, T7, T8, T8, T9, T9, T10, T11, T9, T7, T7, T9, T7, T7, T9); // NOLAPSE Min 2+ NOLAPSEMin2+ 100: ST(T4, T4, T4, T4, T5, T6, T7, T8, T9, T9, T8, T10, T9, T6, T6, T9, T6, T6, T9); // 1 To 30 NOTMIN 0 1 To 30NOTMIN0 101: ST(T4, T4, T4, T4, T5, T6, T7, T8, T9, T9, T8, T10, T9, T6, T6, T9, T6, T6, T9); // 1 To 30 NOTMIN 1 1 To 30NOTMIN1 102: ST(T5, T5, T5, T5, T6, T7, T8, T9, T10, T10, T9, T11, T10, T7, T7, T10, T7, T7, T10); // 1 To 30 NOTMIN 2+ 1 To 30NOTMIN2+ 110: ST(T7, T7, T8, T8, T8, T8, T8, T9, T10, T10, T10, T11, T10, T8, T8, T10, T8, T8, T10); // 1 To 30 Min 0 1 To 30Min0 111: ST(T7, T8, T8, T8, T8, T8, T8, T9, T10, T10, T10, T11, T10, T8, T8, T10, T8, T8, T10); // 1 To 30 Min 1 1 To 30Min1 112: ST(T8, T8, T8, T8, T9, T9, T9, T10, T11, T11, T11, T11, T11, T9, T9, T11, T9, T9, T11); // 1 To 30 Min 2+ 1 To 30Min2+ 220: ST(T8, T8, T9, T9, T9, T10, T10, T11, T11, T11, T12, T12, T11, T10, T10, T11, T10, T10, T11); // 31+ N/A 0 31+N/A0 221: ST(T9, T9, T9, T10, T10, T10, T11, T11, T11, T11, T12, T12, T11, T10, T10, T11, T10, T10, T11); // 31+ N/A 1 31+N/A1 222: ST(T10, T10, T10, T11, T11, T11, T11, T12, T12, T12, T12, T12, T12, T11, T11, T12, T11, T11, T12); // 31+ N/A 2+ 31+N/A2+ 320: ST(T12, T12, T12, T13, T13, T13, T13, T13, T14, T14, T14, T14, T14, T13, T13, T14, T13, T13, T14); // NO BI N/A 0 NO BIN/A0 321: ST(T12, T12, T12, T13, T13, T13, T13, T13, T14, T14, T14, T14, T14, T13, T13, T14, T13, T13, T14); // NO BI N/A 1 NO BIN/A1 322: ST(T13, T13, T13, T13, T13, T13, T13, T13, T14, T14, T14, T14, T14, T13, T13, T14, T13, T13, T14); // NO BI N/A 2+ NO BIN/A2+ End; End; {Assigns the married driver and his/her spouse to global variable Sp[]} {Per email from Michael Callahan 12/29/03-Rule Applies to NI only} {procedure FindSpousePosition; var i,j : integer; begin SpouseFound:=False; for i := 1 to Save_NumD do begin if (Br.Driver[i].Sex[1] = 'M') then begin for j:= 2 to Save_NumD do begin if (i = 1) then begin //Look for relationship "spouse" for named insured only if (Br.Driver[j].Relation = 'S')and (Br.Driver[j].Sex[1]= 'M') and (Br.Driver[j].Sex[2] <> Br.Driver[i].Sex[2]) and (Not SpouseFound)then begin if (Sp[i] = 0) and (Sp[j] = 0) then begin Sp[i]:= i; Sp[j]:= j; SpouseFound:=True; end; end; end; end; end; end; end;} {Lisa re-wrote 2/10/04 for 10/01/03 v1.2} procedure FindSpousePosition; var j : integer; begin SpouseFound:=True; if (Br.Driver[1].Sex[1] = 'M') then begin SpouseFound:=False; for j:= 2 to Save_NumD do begin if (Br.Driver[j].Relation = 'S')and (Br.Driver[j].Sex[1]= 'M') and (Br.Driver[j].Sex[2] <> Br.Driver[1].Sex[2]) and (Not SpouseFound)then Begin SpouseFound:=True; SpouseOfNI[j]:=True; End; end; end; end; procedure InitializeDriver; begin YouthOnPolicy := False; YouthPNI := False; ParentChildRel := False; YouthSpouse := False; CreateDrivers('35','EV'); FindSpousePosition; For Loop_ID := 1 To Save_NumD Do begin Br.id:=Loop_id; Sp[Br.Id] := 0; InExpDvr[Br.id]:=False; UnVerDvr[Br.id]:=False; Susp[Br.Id]:=False; Use_1_10[Br.id] := false; If (Br.Driver[Br.ID].Use <> 'E') Then Begin {YOUTH ON POLICY} If (ToInteger(Br.Driver[Br.ID].Age) <= 20) Then YouthOnPolicy := True; {YOUTH PRINCIPAL NAMED INSURED} If (Br.Id = 1) And (ToInteger(Br.Driver[Br.ID].Age) <= 20) Then YouthPNI := True; {PARENT CHILD RELATIONSHIP} If ((Br.Driver[Br.ID].Relation = 'C') And (ToInteger(Br.Driver[Br.ID].Age) <= 24)) OR ((ToInteger(Br.Driver[1].Age)<=24) And (Br.Driver[Br.id].Relation='P')) Then ParentChildRel := True; {YOUTH SPOUSE} If ((Br.Driver[Br.ID].Relation = 'S') And (ToInteger(Br.Driver[Br.ID].Age) <= 20)) Then YouthSpouse:=True; End; Br.dClass[Br.ID]:=Br.Driver[Br.ID].Age + Br.Driver[Br.ID].Sex; GetPoints; {Lisa moved this from above GetPoints 7/26/04 for 8/1/04 update. Need to see yrslic, vios, etc for excluded NI} {before setting him/her as excluded. Done because of new NI excluded rules} If (Br.Driver[Br.ID].Use = 'E') and (Br.Numc>ActualDrivers) and (Br.Driver[br.id].Relation <> 'S') then {Done for non-licensed excluded spouses} begin CreateExcluded('35','EV'); Br.Driver[Br.ID].Use := 'E'; end; SetTier; end; {FindSpousePosition;} end; procedure SetBillOptions; var FOpt : Real; Function SemiTot: Real; var ST : Real; begin ST := 0; for Loop_Ic := 1 to Br.NumC do begin br.ic := Loop_Ic; Bi6[Br.ic] := Bi6[Br.ic] * Ord(br.bi[Br.ic]>0); Pd6[Br.ic] := Pd6[Br.ic] * Ord(br.Pd[Br.ic]>0); Pip6[Br.ic] := Pip6[Br.ic] * Ord(br.Pip[Br.ic]>0); Um6[Br.ic] := Um6[Br.ic] * Ord(br.Um[Br.ic]>0); Med6[Br.ic] := Med6[Br.ic] * Ord(br.Med[Br.ic]>0); Comp6[Br.ic]:= Comp6[Br.ic]* Ord(br.Comp[Br.ic]>0); Coll6[Br.ic]:= Coll6[Br.ic]* Ord(br.Coll[Br.ic]>0); ST := ST + bi6[br.ic]+pd6[br.ic]+pip6[br.ic]+med6[br.ic]+um6[br.ic]+ comp6[br.ic]+coll6[br.ic]+towing6[br.ic]+rental6[br.ic]+custom6[br.ic]; end; SemiTot := ST + GRound(2,br.Sr22Charge+ToReal(Br.Client.Opt)+ToReal(Br.Client.Ap)+br.PolFee)+Misc6; end; function Down(d:real) : string; begin If (Br.Client.PolPer='S') OR ((LSN = 3) and (Br.TheMsgNum = 11)) Then Down := Real2Str(GRound(0, ((SemiTot-FOpt)*d)+FOpt),0,0) else Down := Real2Str(GRound(0, ((Br.Total-FOpt)*d)+FOpt),0,0); end; function Pay(d:real; p:integer; IsEFT:boolean) : string; Var IFee:Real; begin if IsEFT then IFee := 2 else IFee := Ground(0,(Br.Total-ToInteger(Down(d))) * 0.015); Pay := Real2Str(GRound(0, (Br.Total-ToInteger(down(d)))/p) + IFee,0,2); end; function GetBillString(dwn : real; pmnts : integer; EFT:Boolean) : string; var GBS : string[50]; begin GBS := '$' + Down(dwn) + ' DOWN; ' + Long2Str(pmnts) + ' '; if (pmnts = 1) then GBS := GBS + 'PAYMENT OF $' else GBS := GBS + 'PMNTS; FIRST $'; GBS := GBS + Pay(dwn, pmnts,EFT); If EFT Then GBS := GBS + ' EFT'; GetBillString := GBS; end; function GetRenBillString(dwn : real; pmnts : integer; EFT:boolean) : string; var GBS : string[50]; begin GBS := '$' + Down(dwn) + ' DOWN; ' + Long2Str(pmnts) + ' '; if (pmnts = 1) then GBS := GBS + 'PAYMENT OF $' else GBS := GBS + 'PMNTS; FIRST $'; GBS := GBS + Pay(dwn, pmnts,EFT); If EFT Then GBS := GBS + ' EFT'; GetRenBillString := GBS; end; begin FOpt := ToReal(Br.Client.Opt)+Br.PolFee+Br.Sr22Charge; if ((Br.Total > 0) and not Br.Split) then begin Br.FNum := 10; Br.String1 := ''; Br.String2 := ''; Br.String3 := ''; {LB updated bill plans 8/19/06 for 8/23/06 rate change} If Not Is_Renewal Then Begin Br.String1 := GetBillString(0.1667, 5,True); {LB added 8/2/04 for 8/1/04 update. Per email M. Callahan 8/2/04} Br.String2 := GetBillString(0.25, 5,True); Br.String3 := GetBillString(0.34, 4,False); Br.String4 := GetBillString(0.50, 1,False); End Else Begin Br.String1 := GetRenBillString(0.1667, 5, True); Br.String2 := GetRenBillString(0.25, 5, True); Br.String3 := GetRenBillString(0.20, 4,False); Br.String4 := GetRenBillString(0.50, 1,False); End; If (br.paidinfull) Then Begin Br.String1 := ''; Br.String2 := 'PAID IN FULL'; Br.String3 := ''; End; end; end; procedure DoRates; begin First; Initialize; GetZipCode; InitializeCar; InitializeDriver; CheckLiabLimits; DoSort; RateCompany; SetMessage; SetBillOptions; if (LSN = 3) then WriteAnswer; if (LSN = 4) then WriteBreakDown; Last; end; procedure menProc(ScreenNum: Integer); begin LSN:=ScreenNum; If Not UseNew Then MEN3Proc(ScreenNum) Else Begin Br.CumpName := 'MENDOTA 08/23/06 v1.1 '; DoRates; End; end; procedure runMEN(var qqbr:bigrectype;screennum:integer);SafeCall; export; begin br:=qqbr; Try menproc(screennum); qqbr:=br; Except on Exception do qqbr.CumpName := 'MEN.DLL Error'; end; end; exports runMEN; Begin End. (* Date Whom Tester Version Reason ------------------------------------------------------------------------------ 12/22/03 Lisa Tamara --- New Company(Used IQU as template) 01/12/04 Lisa Tamara 1.0 Pip should not default to NIRR when 1 driver and requesting NIO; No Policy Fee Lisa 1.1 Majors waived for FL Rule still count toward driver eligibility Majors waived for same day do NOT count toward driver eligibility Vehicles <1980 should be sym 99 SUS,SRL,ACN do not count as "other vios" for DUI Progammed "Dual" and "DRW" models as unacceptable 02/19/04 Lisa Jackie 1.2 Majors and Drug/Alc should never be waived for eligibility SRL is a 3 point minor vio Fixed FL Rule for newest to oldest Fixed Same-Day Waiving SUS,SRL,ACN do not count when assigning DUI points Changed NS & NH Tiering Fixed Married w/o Spouse DISABLE RATES AS OF 3/3/04 03/21/04 Lisa Tamara --- Update 3/3/04;4/6/04 including car list Extensive changes made to GetPoints procedure Gailen tested car list f05/05/04 Lisa Lucy 1.0 Changed Default Credit Scoring 05-19-04 Nathan QC 1.1 added new vios 07-08-04 Lisa Antonio 1.2 Updated car list 2004, 2003, and 1996 Non-Relatives are ok to rate 08/05/04 Lisa Adrian --- Update 8/1/04;9/15/04 New Rules for excluding NI UmIncLimits function fixed - was not initialize- change old v1.3 11/18/04 Nathan Antonio 1.0 Car list update 12/13/04 Eddie Eddie N/C fixed in-house error. unitialize variable - search for 12-13-04 01/06/05 Marc Antonio --- Update 01/15/05;03/01/05 02-18-05 Nathan 1.0 2006 MY 05-23-05 Marc Craig 1.1 Car list effective 6/15/05;07/30/05 06-22-05 Lisa Craig 1.2 Changed default credit mapping Added new FL violations 08-23-05 Nathan Adrian --- 8-24-05;10-04-05 09/27/05 Lisa Rocio 1.0 Added Lotus as unacceptable 10/29/05 Marc Rocio 1.1 Rate all excluded spouses 01/09/06 Brian Barry 1.2 Carlist NB: 01/18/06 RB 03/04/06 Nathan Int Surcharge. 01/27/06 Lisa Tamara 1.3 New FL Violations Nathan int lic fix 02/27/06 Lisa 1.4 2006-2007 Model Year 06/22/06 Marc Sheila 1.5 Added error trap for invalid driver classes 08/29/06 Lisa Martin --- Update 8/23/06; 10/7/06 09/06/06 Lisa Lucy 1.0 Fixed single-digit territories *)