ASUAUVOU ;DSD/DFM - UTILITY ENTER VOUCHER NUMBER; [ 04/15/98 2:57 PM ]
;;3.0;SAMS;**1**;AUG 20, 1993
RDVOU ;
S DIR("A")=ASUV("ITEM #")_". ENTER VOUCHER NUMBER"
S DIR(0)="F^8:8^D EDIT^ASUAUVOU"
S DIR("?")="^D HELP^ASUAUVOU"
D ^DIR
Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
S ASUTRNS(ASUTRNS,"VOUCHER #")=X
EXIT ;RETURN TO CALLING ROUTINE
K DIR,X,Y
Q
HELP ;EP ;EXECUTABLE HELP FOR VOUCHER NUMBER
W !!,"Voucher Number must be 8 numeric digits, not all zeros in format FYMMSER#"
W !!,"Fiscal Year (FY) must be current fiscal year or previous fiscal year,"
W !,"Month (MM) must be 01 through 12,"
W !,"and Serial number (SER#) must be 0001 through 9999."
Q
EDIT ;EP ;VOUCHER EDIT SUB ROUTINE
I '$D(ASUK("DATE","FM")) N DN D DAYTIM^ASUAUTL1 S ASUF("DATE")=1
S Y("EY")=$E(X,1,2)
S Y("EM")=$E(X,3,4)
S Y("ES")=$E(X,5,8),Y("SB")=1
S Y("M1")="Voucher year not equal to current"
S Y("M2")=" "
S Y("M3")="or previous FY"
I ASUK("DATE","MO")="09" D
.S Y("SB")=2,Y("M2")=", next "
I Y("EM")<1!(Y("EM")>12) D
.W *7,!,"Month must be 01-12" K X
E D
.S Y("DIF")=ASUK("DATE","CFY")-Y("EY")
.I Y("DIF")>Y("SB")!(Y("DIF")<0) D
..W *7,!,Y("M1"),Y("M2"),Y("M3") K X
.E D
..I Y("ES")'>0 D
...W *7,!,"Voucher Serial Number may not be all zeros" K X
..E D
...I $L(Y("ES"))<4!($L(Y("ES"))>4) D
....W *7,!,"Voucher Number must be a total of 8 digits" K X
K:$D(ASUF("DATE")) ASUK("DATE")
K Y
Q
ASUAUVOU ;DSD/DFM - UTILITY ENTER VOUCHER NUMBER; [ 04/15/98 2:57 PM ]
+1 ;;3.0;SAMS;**1**;AUG 20, 1993
RDVOU ;
+1 SET DIR("A")=ASUV("ITEM #")_". ENTER VOUCHER NUMBER"
+2 SET DIR(0)="F^8:8^D EDIT^ASUAUVOU"
+3 SET DIR("?")="^D HELP^ASUAUVOU"
+4 DO ^DIR
+5 IF $DATA(DUOUT)!($DATA(DIROUT))!($DATA(DTOUT))
QUIT
+6 SET ASUTRNS(ASUTRNS,"VOUCHER #")=X
EXIT ;RETURN TO CALLING ROUTINE
+1 KILL DIR,X,Y
+2 QUIT
HELP ;EP ;EXECUTABLE HELP FOR VOUCHER NUMBER
+1 WRITE !!,"Voucher Number must be 8 numeric digits, not all zeros in format FYMMSER#"
+2 WRITE !!,"Fiscal Year (FY) must be current fiscal year or previous fiscal year,"
+3 WRITE !,"Month (MM) must be 01 through 12,"
+4 WRITE !,"and Serial number (SER#) must be 0001 through 9999."
+5 QUIT
EDIT ;EP ;VOUCHER EDIT SUB ROUTINE
+1 IF '$DATA(ASUK("DATE","FM"))
NEW DN
DO DAYTIM^ASUAUTL1
SET ASUF("DATE")=1
+2 SET Y("EY")=$EXTRACT(X,1,2)
+3 SET Y("EM")=$EXTRACT(X,3,4)
+4 SET Y("ES")=$EXTRACT(X,5,8)
SET Y("SB")=1
+5 SET Y("M1")="Voucher year not equal to current"
+6 SET Y("M2")=" "
+7 SET Y("M3")="or previous FY"
+8 IF ASUK("DATE","MO")="09"
Begin DoDot:1
+9 SET Y("SB")=2
SET Y("M2")=", next "
End DoDot:1
+10 IF Y("EM")<1!(Y("EM")>12)
Begin DoDot:1
+11 WRITE *7,!,"Month must be 01-12"
KILL X
End DoDot:1
+12 IF '$TEST
Begin DoDot:1
+13 SET Y("DIF")=ASUK("DATE","CFY")-Y("EY")
+14 IF Y("DIF")>Y("SB")!(Y("DIF")<0)
Begin DoDot:2
+15 WRITE *7,!,Y("M1"),Y("M2"),Y("M3")
KILL X
End DoDot:2
+16 IF '$TEST
Begin DoDot:2
+17 IF Y("ES")'>0
Begin DoDot:3
+18 WRITE *7,!,"Voucher Serial Number may not be all zeros"
KILL X
End DoDot:3
+19 IF '$TEST
Begin DoDot:3
+20 IF $LENGTH(Y("ES"))<4!($LENGTH(Y("ES"))>4)
Begin DoDot:4
+21 WRITE *7,!,"Voucher Number must be a total of 8 digits"
KILL X
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+22 IF $DATA(ASUF("DATE"))
KILL ASUK("DATE")
+23 KILL Y
+24 QUIT