Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BARUFTDN

BARUFTDN.m

Go to the documentation of this file.
BARUFTDN ; IHS/SD/SDR - Format TDN with FY ;
 ;;1.8;IHS ACCOUNTS RECEIVABLE;**6**;OCT 26, 2005
 ;
BATCH(Y,D0) ;EP - Add FY8 to FY08 TDNs
 ; Y=TDN
 ; D0=Collection Batch IEN
 N BARBDT,BARTDN
 S BARBDT=$P($P($G(^BARCOL(DUZ(2),D0,0)),U,4),".")
 S BARTDN=$P($G(^BARCOL(DUZ(2),D0,0)),U,28)
 S Y=$S($L(Y)<6:Y,(BARTDN["NONP"):Y,BARTDN["PRE-UFMS":Y,((BARBDT>3070930)&(BARBDT<3081001)):"FY8"_Y,1:Y)
 Q Y
ITEM(Y,D0,D1) ;EP - Add FY8 to FY08 TDNs
 ; Y=TDN
 ; D0=Collection Batch IEN
 ; D1=Item IEN
 N BARBDT,BARTDN
 S BARBDT=$P($P($G(^BARCOL(DUZ(2),D0,0)),U,4),".")
 S BARTDN=$S($P($G(^BARCOL(DUZ(2),D0,1,D1,0)),U,20)'="":$P(^BARCOL(DUZ(2),D0,1,D1,0),U,20),1:$P($G(^BARCOL(DUZ(2),D0,0)),U,28))
 S Y=$S($L(Y)<6:Y,(BARTDN["NONP"):Y,BARTDN["PRE-UFMS":Y,((BARBDT>3070930)&(BARBDT<3081001)):"FY8"_Y,1:Y)
 Q Y
TRANS(Y,D0) ;EP - Add FY8 to FY08 TDNs
 ; Y=TDN
 ; D0=A/R Transaction IEN
 N BARBDT,BARTDN,BARRDT,BARRCOL
 S BARRDT=$P($G(^BARTR(DUZ(2),D0,1)),U,10)
 Q:BARRDT="" Y
 S BARRCOL=$P($G(^BARTR(DUZ(2),BARRDT,0)),U,14)
 Q:BARRCOL="" Y
 S BARBDT=$P($P($G(^BARCOL(DUZ(2),BARRCOL,0)),U,4),".")
 S BARTDN=$P($G(^BARCOL(DUZ(2),BARRCOL,0)),U,28)
 S Y=$S($L(Y)<6:Y,BARTDN["NONP":Y,BARTDN["PRE-UFMS":Y,((BARBDT>3070930)&(BARBDT<3081001)):"FY8"_Y,1:Y)
 Q Y