source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPSMA0.m@ 1638

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

initial load of WorldVistAEHR

File size: 1018 bytes
Line 
1PRCPSMA0 ;WISC/RFJ-isms adjustment transaction ;27 Apr 92
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6ADJUST(INVPTDA,ITEMDA,QTY,VALUE,AVGCOST,BACKORD) ;adjustment transaction
7 ; invptda = inventory internal entry number
8 ; itemda = item internal entry number
9 ; qty = quantity adjustment
10 ; value = value adjustment
11 ; avgcost = (optional) use this avgcost if defined
12 ; backord = set to null for version 4
13 ;
14 ; if qty, no value or avgcost.
15 ; if value, use avgcost but no qty
16 ;
17 ; returns 'string("at")' of code sheet
18 ;
19 N NSN,SKU
20 S NSN=$TR($$NSN^PRCPUX1(ITEMDA),"-"),SKU=$$SKU^PRCPUX1(INVPTDA,ITEMDA) I SKU["?"!(NSN="") S STRING("AT")="" Q
21 I VALUE S VALUE=$P(VALUE,".")_$P($J(VALUE,0,2),".",2)
22 I VALUE,'AVGCOST S AVGCOST=+$P($G(^PRCP(445,+INVPTDA,1,+ITEMDA,0)),"^",22)
23 I AVGCOST S AVGCOST=$P(AVGCOST,".")_$P($J(AVGCOST,0,2),".",2)
24 S STRING("AT")="AT^"_NSN_"^"_SKU_"^"_QTY_"^"_VALUE_"^"_AVGCOST_"^"_BACKORD_"^|"
25 Q
Note: See TracBrowser for help on using the repository browser.