source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/PRCASET.m@ 677

Last change on this file since 677 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PRCASET ;SF-ISC/YJK-SETUP A NEW ACCOUNTS RECEIVABLE ;4/1/96 2:24 PM
2 ;;4.5;Accounts Receivable;**16,25,40,51,67,158,153**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;This sets up a new account for A/R. The account is classified
5 ;with category.
6 ;
7 ;======================= SET UP NEW AR ==============================
8SETBIL K PRCABT D CKSITE^PRCAUDT Q:('$D(PRCA("CKSITE"))) D LOOK G:X="" END D ENT G SETBIL
9 ;
10LOOK S:'$D(^PRCA(430,0)) ^(0)="ACCOUNTS RECEIVABLE^430I^^"
11 R !!,"ACCOUNTS RECEIVABLE BILL NO. : ",X:DTIME Q:('$T)!(X="") I X["^" S X="" Q
12 I "Nn"[$E(X) D I $P(X,"^")=-1 W *7,!!,$P(X,"^",2),! G LOOK
13 . S X=$$BNUM^RCMSNUM
14 . I $P(X,"^")'=-1 S X=$P(X,"-",2)
15 I (X'?1UN1UN4.5UN) W *7,!!,"Please enter 7 character bill number.",!,"It must be in the following format: K400001, K481234 or '(N)ew' to get",!,"the next available number. (Enter ""^"" to exit)",! G LOOK
16 I ($D(^PRCA(430,"D",X)))!($D(^PRCA(430,"B",PRCA("SITE")_"-"_X))) W *7,!!,"SORRY ! THIS NUMBER HAS BEEN ALREADY ASSIGNED TO A BILL. IT MUST BE NEW ENTRY",! G LOOK
17 Q
18ENT S X=PRCA("SITE")_"-"_X W " ",X S DIC="^PRCA(430,",DIC(0)="XL",DLAYGO=430,DIC("DR")="97////^S X=DUZ" D ^DIC K DLAYGO,DIC
19 Q:Y<0 S (X,D0,PRCABN)=+Y,PRCA("MESS1")="THE ACCOUNT WILL BE INCOMPLETE.",PRCA("MESS2")="*** APPROVED AND RELEASED TO ACCOUNTING ***"
20 W " ...Bill Number '",$P(^PRCA(430,PRCABN,0),"^"),"' assigned!"
21 K PRCADEL,PRCADINO D EDT^PRCAEIN
22DELETE I $D(PRCADEL) S PRCACOMM="USER CANCELED" D DELETE^PRCABIL4 K PRCACOMM W !,*7,"DELETED",!
23END I $G(PRCABN),$P($G(^PRCA(430,PRCABN,0)),U,8)=$O(^PRCA(430.3,"AC",102,"")) D PREPAY^RCBEPAYP(PRCABN)
24 L -^PRCA(430,+$G(PRCABN)) K PRCADINO,PRCA("MESS1"),PRCA("MESS2"),PRCABN,PRCADEL,PRCA("CKSITE"),DIC
25 Q
Note: See TracBrowser for help on using the repository browser.