[613] | 1 | PRSALD ;HISC/MGD-Labor Distribution Codes Edit ;06/28/2003
|
---|
| 2 | ;;4.0;PAID;**82,114**;Sep 21, 1995;Build 6
|
---|
| 3 | Q
|
---|
| 4 | PAY ; Payroll Entry
|
---|
| 5 | N PPERIOD
|
---|
| 6 | S PRSTLV=7
|
---|
| 7 | P1 K DIC S DIC("A")="Select EMPLOYEE: ",DIC(0)="AEQM",DIC="^PRSPC("
|
---|
| 8 | W ! D ^DIC S DFN=+Y K DIC G:DFN<1 EX
|
---|
| 9 | S TLE=$P($G(^PRSPC(DFN,0)),"^",8)
|
---|
| 10 | D POST
|
---|
| 11 | G P1
|
---|
| 12 | Q
|
---|
| 13 | TL ; Timekeeper Entry. Select T & L Unit
|
---|
| 14 | N PP,PPE,PPI,PRSTLV,TLI
|
---|
| 15 | S PRSTLV=2 D ^PRSAUTL G:TLI<1 EX
|
---|
| 16 | ;
|
---|
| 17 | LASTPP ; Get Last PP received in 459
|
---|
| 18 | S PP="A"
|
---|
| 19 | S PP=$O(^PRST(459,PP),-1)
|
---|
| 20 | S PPE=$P($G(^PRST(459,PP,0)),"^",1)
|
---|
| 21 | S PPI=""
|
---|
| 22 | S PPI=$O(^PRST(458,"B",PPE,PPI))
|
---|
| 23 | S PPE=PPE_" "_$P($G(^PRST(458,PPI,2)),"^",1)_" -> "_$P($G(^PRST(458,PPI,2)),"^",14)
|
---|
| 24 | ;
|
---|
| 25 | NME ; Select individual employee
|
---|
| 26 | K DIC S DIC("A")="Select EMPLOYEE: ",DIC("S")="I $P(^(0),""^"",8)=TLE,$D(^PRST(458,PPI,""E"",+Y))",DIC(0)="AEQM",DIC="^PRSPC(",D="ATL"_TLE W ! D IX^DIC S DFN=+Y K DIC
|
---|
| 27 | G:DFN<1 EX S GLOB="" D POST D:GLOB]"" UNLOCK^PRSLIB00(GLOB) G NME
|
---|
| 28 | ;
|
---|
| 29 | EX ; Clean up variables and Exit
|
---|
| 30 | K D,DA,DDSFILE,DFN,DR,GLOB,LP,NN,TLE,Y,ZS,%
|
---|
| 31 | Q
|
---|
| 32 | ;
|
---|
| 33 | POST ; Edit & Post Labor Distribution Codes
|
---|
| 34 | Q:'DFN
|
---|
| 35 | S DA=DFN
|
---|
| 36 | S DDSFILE=450,DR="[PRSA LD POST]"
|
---|
| 37 | D ^DDS K DS Q:'$D(ZS)
|
---|
| 38 | Q
|
---|
| 39 | ;
|
---|
| 40 | ; The following code will be implemented in Phase 2 of the Labor Dist.
|
---|
| 41 | ;
|
---|
| 42 | D2 ; Select All or individual employee
|
---|
| 43 | W !!,"Would you like to edit the Labor Codes in alphabetical order"
|
---|
| 44 | S %=1 D YN^DICN I % S LP=% G EX:%=-1,LOOP:%=1,NME
|
---|
| 45 | W !!,"Answer YES if you want all RECORDs brought up for which no data"
|
---|
| 46 | W !,"has been entered." G D2
|
---|
| 47 | Q
|
---|
| 48 | ;
|
---|
| 49 | LOOP ; Loop through all employees in selected T & L
|
---|
| 50 | S LP=1,NN=""
|
---|
| 51 | F S NN=$O(^PRSPC("ATL"_TLE,NN)) Q:NN="" D
|
---|
| 52 | . F DFN=0:0 S DFN=$O(^PRSPC("ATL"_TLE,NN,DFN)) Q:DFN<1 D
|
---|
| 53 | . . S GLOB="" D POST D:GLOB]"" UNLOCK^PRSLIB00(GLOB) I 'LP G EX
|
---|
| 54 | G EX
|
---|
| 55 | Q
|
---|
| 56 | ;
|
---|
| 57 | PP ; Select Pay Period
|
---|
| 58 | S DIC="^PRST(458,",DIC(0)="AEQZ",D="B"
|
---|
| 59 | D IX^DIC
|
---|
| 60 | Q:Y=-1
|
---|
| 61 | S PPI=+Y,PPE="PP "_$P(Y,"^",2)_" "
|
---|
| 62 | S PPE=PPE_$P($G(^PRST(458,PPI,2)),"^",1)_" -> "_$P($G(^PRST(458,PPI,2)),"^",14)
|
---|
| 63 | ;
|
---|
| 64 | LDOUT ; Convert LABOR DIST CODE EDITED BY field into its external format.
|
---|
| 65 | ;
|
---|
| 66 | I "IETP"'[Y&('+Y) D Q
|
---|
| 67 | . S Y="Unknown"
|
---|
| 68 | I Y="I" S Y="Initial Download"
|
---|
| 69 | I Y="E" S Y="Edit & Update Download"
|
---|
| 70 | I Y="T" S Y="Transfer Download"
|
---|
| 71 | I Y="P" S Y="Payrun Download"
|
---|
| 72 | I +Y D
|
---|
| 73 | . S Y=$P($G(^VA(200,Y,0)),"^",1)
|
---|
| 74 | . I Y="" S Y="Unknown"
|
---|
| 75 | Q
|
---|