BARDL4FX ; IHS/SD/LSL - DEBT LETER FIX
;;1.8;IHS ACCOUNTS RECEIVABLE;**23**;OCT 26, 2005
;P.OTT New routine 5-SEP-2012 for Debt Letter Management
;AUG 2013 P.OTTIS FIXED DL4
;==================================================
;"DATA",90052.03,LETTER#,1,LINE#,0)= If you have any questions, you may contact (Collection clerk) at BARPH.
Q
FIXDL4 D FIXDL(1)
Q
FIXDL(BARMODE) ;BARMODE=2 SILENT FIX: CALLED FROM BUILD INSTALLATION PROCESS
I BARMODE=1 W !,"Fixing Debt letter text. Replacing '(Collection clerk)' with BARSTF."
N BARDLNUM,BARDLLIN,BARDLTXT,BARDLDEL,BARFIX
S BARFIX=0
S BARDLDEL="(Collection clerk)"
S BARDLNUM=0 F S BARDLNUM=$O(^BAR(90052.03,BARDLNUM)) Q:+BARDLNUM=0 D
. S BARDLLIN=0 F S BARDLLIN=$O(^BAR(90052.03,BARDLNUM,1,BARDLLIN)) Q:+BARDLLIN=0 D
. . S BARDLTXT=$G(^BAR(90052.03,BARDLNUM,1,BARDLLIN,0))
. . I BARDLTXT["If you have any questions, you may contact (Collection clerk) at BARPH" D Q
. . . S BARDLTXT=$P(BARDLTXT,BARDLDEL,1)_"BARSTF"_$P(BARDLTXT,BARDLDEL,2)
. . . S ^BAR(90052.03,BARDLNUM,1,BARDLLIN,0)=BARDLTXT,BARFIX=BARFIX+1
I BARMODE=1 W " ",BARFIX," ENTRIES FIXED."
Q
BARDL4FX ; IHS/SD/LSL - DEBT LETER FIX
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;**23**;OCT 26, 2005
+2 ;P.OTT New routine 5-SEP-2012 for Debt Letter Management
+3 ;AUG 2013 P.OTTIS FIXED DL4
+4 ;==================================================
+5 ;"DATA",90052.03,LETTER#,1,LINE#,0)= If you have any questions, you may contact (Collection clerk) at BARPH.
+6 QUIT
FIXDL4 DO FIXDL(1)
+1 QUIT
FIXDL(BARMODE) ;BARMODE=2 SILENT FIX: CALLED FROM BUILD INSTALLATION PROCESS
+1 IF BARMODE=1
WRITE !,"Fixing Debt letter text. Replacing '(Collection clerk)' with BARSTF."
+2 NEW BARDLNUM,BARDLLIN,BARDLTXT,BARDLDEL,BARFIX
+3 SET BARFIX=0
+4 SET BARDLDEL="(Collection clerk)"
+5 SET BARDLNUM=0
FOR
SET BARDLNUM=$ORDER(^BAR(90052.03,BARDLNUM))
IF +BARDLNUM=0
QUIT
Begin DoDot:1
+6 SET BARDLLIN=0
FOR
SET BARDLLIN=$ORDER(^BAR(90052.03,BARDLNUM,1,BARDLLIN))
IF +BARDLLIN=0
QUIT
Begin DoDot:2
+7 SET BARDLTXT=$GET(^BAR(90052.03,BARDLNUM,1,BARDLLIN,0))
+8 IF BARDLTXT["If you have any questions, you may contact (Collection clerk) at BARPH"
Begin DoDot:3
+9 SET BARDLTXT=$PIECE(BARDLTXT,BARDLDEL,1)_"BARSTF"_$PIECE(BARDLTXT,BARDLDEL,2)
+10 SET ^BAR(90052.03,BARDLNUM,1,BARDLLIN,0)=BARDLTXT
SET BARFIX=BARFIX+1
End DoDot:3
QUIT
End DoDot:2
End DoDot:1
+11 IF BARMODE=1
WRITE " ",BARFIX," ENTRIES FIXED."
+12 QUIT