home *** CD-ROM | disk | FTP | other *** search
- ********************** ' MultiNet Source Code ' ***********************
- ** ' SBT Corporation ' **
- ** ' One Harbor Drive, Sausalito, California 94965 ' **
- ** ' Telephone (415) 331-9900 ' **
- ***********************************************************************
- ** ' (c) Copyright 1984, Revisions 1985 - 1990 SBT Corporation ' **
- ** ' All Rights Reserved by SBT Corporation ' **
- ** ' ' **
- ***********************************************************************
- ** ' 06/04/90 = Last Update ** ARPOSE.PRG ** Version 6.35.00 ' **
- ***********************************************************************
- * ' Revise current Invoice/Credit Memo - called by ARPOST, calls SYSIDSP
- *
- * ' Passed variables: minvoice, mcust, mform, mcompany, minvamt,
- * ' mtax, tinvt, tminvt
- *
- * ' Returns variable: mdone = 'S' to save Invoice
- * ' 'A' to add more items
- * ' 'C' to cancel Invoice
- *
- * ' Assumes files open: Area A: ARCUSTnn
- * ' with indexes active Area B: ARINVTnn
- * ' Area C: Temporary File for this Invoice
- * ' Area D: ARGLACnn if AR linked to GL
- *
- * ' Internal Variables: mfirst = .t. if on first screen
- * ' mlast = .t. if on last screen
- * ' mxpgrecno = rec # for top of screen
- *
- PRIVATE merase, mline
- SET ESCAPE OFF
- STORE 1 TO mxpgrecno
- STORE .t. TO merase
- DO WHILE .t.
- SELECT c
- IF merase
- CLEAR
- @ 1,0 SAY 'Edit Detail of Current ' + mform
- @ 2,0 SAY 'Customer Number / Name ' + SUBSTR(m0border,183,4) + ;
- TRIM(mcust) + ' / ' + TRIM(mcompany)
- @ 3,0 SAY 'Ln# ' + SUBSTR(m0border,91,4) + ' Item ' + ;
- SUBSTR(m0border,91,5) + ' ' + SUBSTR(m0border,91,9) + ;
- ' Description ' + SUBSTR(m0border,91,11) + ' Disc % Tax'
- IF SUBSTR(m0link,1,1) = 'Y'
- @ 3,70 SAY 'Sales/Cost'
- ENDIF
- DO CASE
- CASE minvoice .AND. m0lntax
- @ 4,3 SAY 'Order Qty Ship Qty Unit Cost Unit Price ' + ;
- ' Extended Price'
- CASE .NOT. minvoice .AND. mtxonly = 'N' .AND. m0lntax
- @ 4,12 SAY 'Returned Qty Unit Cost Unit Price ' + ;
- ' Extended Price'
- CASE minvoice
- @ 4,3 SAY 'Order Qty Ship Qty Unit Cost Unit Price ' + ;
- ' Extended Price'
- CASE .NOT. minvoice .AND. mtxonly = 'N'
- @ 4,12 SAY 'Returned Qty Unit Cost Unit Price ' + ;
- ' Extended Price'
- CASE .NOT. minvoice .AND. mtxonly = 'Y'
- @ 4,12 SAY 'Returned Qty Unit Cost Unit Price ' + ;
- 'Tax Credt Extended Price'
- ENDCASE
- @ 5,0 SAY SUBSTR(m0border,10,80)
- GO TOP
- IF RECNO() = mxpgrecno
- STORE .t. TO mfirst
- ELSE
- STORE .f. TO mfirst
- ENDIF
- GO BOTTOM
- IF RECNO() < mxpgrecno .OR. mdetcount = 0
- GO TOP
- STORE 1 TO mxpgrecno
- ELSE
- GO mxpgrecno
- ENDIF
- STORE LTRIM(STR(mxpgrecno,3,0)) TO spagerecno
- @ 6,0 CLEAR
- STORE 6 TO mline
- STORE 0 TO mgroup
- DO WHILE mline < 22 .AND. .NOT. EOF()
- SELECT b
- SEEK c->item
- SELECT c
- STORE STR(AT(STR(b->decnum,1,0),'123'),1,0) TO mxdec
- STORE mdecimal&mxdec TO mpict
- @ mline,0 SAY RECNO() PICTURE '999'
- @ mline,4 SAY c->item
- @ mline,21 SAY c->descrip
- @ mline,57 SAY c->disc PICTURE '###.###'
- IF m0lntax
- @ mline,67 SAY c->taxcode PICTURE '!'
- ELSE
- @ mline,67 SAY c->taxable PICTURE 'Y'
- ENDIF
- IF SUBSTR(m0link,1,1) = 'Y'
- @ mline,72 SAY c->glsale + '/' + c->glasst
- ENDIF
- IF minvoice
- @ mline + 1,2 SAY c->qtyord PICTURE "&mpict"
- @ mline + 1,16 SAY c->qtyshp PICTURE "&mpict"
- ELSE
- @ mline + 1,16 SAY 0 - c->qtyshp PICTURE "&mpict"
- ENDIF
- @ mline + 1,29 SAY c->cost PICTURE '#######.###'
- @ mline + 1,43 SAY c->price PICTURE '#######.##'
- @ mline + 1,67 SAY c->extprice PICTURE '999999999.99'
- CLEAR GETS
- STORE mgroup + 1 TO mgroup
- STORE mline + 2 TO mline
- SKIP
- ENDDO && WHILE mline < 22 .AND. .NOT. EOF()
- IF EOF()
- STORE .t. TO mlast
- ELSE
- STORE .f. TO mlast
- ENDIF
- @ 22,0 CLEAR
- @ 23,0 SAY 'Subtotal = Tax = ' + ;
- ' Total ='
- * ' minvamt does not include extended tax if not using line item tax
- @ 23,14 SAY minvamt - mtax PICTURE '99,999,999.99'
- @ 23,38 SAY mtax PICTURE '9,999,999.99'
- @ 23,66 SAY minvamt PICTURE '99,999,999.99'
- STORE .f. TO merase
- ENDIF && merase
- STORE 'A' TO mdone
- DO CASE
- CASE mgroup = 0 .AND. .NOT. mfirst .AND. mlast
- STORE '(Add/Back/Cancel)' TO msg
- STORE 'ABC' TO moptns
- CASE mgroup = 0 .AND. mfirst .AND. mlast
- STORE '(Add/Cancel)' TO msg
- STORE 'AC' TO moptns
- CASE mgroup > 0 .AND. .NOT. mfirst .AND. .NOT. mlast
- STORE '(Add/Edit line/Delete line/Inquiry/Fwd/Back/Save/Cancel)' TO msg
- STORE 'AEDIFBSC' TO moptns
- CASE mgroup > 0 .AND. mfirst .AND. .NOT. mlast
- STORE '(Add/Edit line/Delete line/Inquiry/Fwd/Save/Cancel)' TO msg
- STORE 'AEDIFSC' TO moptns
- CASE mgroup > 0 .AND. .NOT. mfirst .AND. mlast
- STORE '(Add/Edit line/Delete line/Inquiry/Back/Save/Cancel)' TO msg
- STORE 'AEDIBSC' TO moptns
- OTHERWISE
- STORE '(Add/Edit line/Delete line/Inquiry/Save/Cancel)' TO msg
- STORE 'AEDISC' TO moptns
- ENDCASE
- @ 22,0 SAY 'Enter Choice ' + msg + ' ' + SUBSTR(m0border,180,7) ;
- GET mdone PICTURE '!'
- READ SAVE
- DO WHILE .NOT. mdone $ moptns
- ?? CHR(7)
- READ SAVE
- ENDDO
- @ 22,0
- CLEAR GETS
- IF mdone $ 'ASC'
- STORE SPACE(15) TO mitem
- RETURN
- ENDIF
- IF mdone = 'B'
- GO mxpgrecno
- STORE 0 TO mcount
- DO WHILE mcount < 8 .AND. .NOT. BOF()
- STORE mcount + 1 TO mcount
- SKIP -1
- ENDDO
- IF BOF()
- STORE .t. TO mfirst
- GO TOP
- ENDIF
- STORE RECNO() TO mxpgrecno
- STORE .t. TO merase
- LOOP
- ENDIF
- IF mdone = 'F'
- STORE RECNO() TO mxpgrecno
- STORE .t. TO merase
- LOOP
- ENDIF && mdone = 'I'
- IF mdone = 'I'
- STORE 0 TO seqno
- STORE LTRIM(STR(mgroup + mxpgrecno - 1,3,0)) TO send
- IF mgroup > 1
- @ 22,1 SAY 'Enter Line Number to Inquire (' + spagerecno + '-' + ;
- send + ') ' + SUBSTR(m0border,180,7) GET seqno PICTURE '###'
- READ
- IF seqno < mxpgrecno .OR. seqno > mgroup + mxpgrecno - 1
- @ 22,0
- LOOP
- ENDIF
- ELSE
- STORE mxpgrecno TO seqno
- ENDIF
- @ 22,0
- SELECT c
- GO seqno
- IF EOF()
- LOOP
- ENDIF
- STORE (seqno - mxpgrecno) * 2 + 6 TO mxline
- STORE c->item TO mitem
- SELECT b
- SEEK mitem
- * ' Display item record
- DO sysidsp
- SELECT c
- STORE .t. TO merase
- LOOP
- ENDIF
- IF mdone = 'D'
- STORE 0 TO seqno
- STORE LTRIM(STR(mgroup + mxpgrecno - 1,3,0)) TO send
- IF mgroup > 1
- @ 22,0 SAY 'Enter Line Number to Delete (' + spagerecno + '-' + ;
- send + ') ' + SUBSTR(m0border,180,7) GET seqno PICTURE '###'
- READ
- IF seqno < mxpgrecno .OR. seqno > mgroup + mxpgrecno - 1
- @ 22,0
- LOOP
- ENDIF
- ELSE
- STORE mxpgrecno TO seqno
- ENDIF
- @ 22,0
- SELECT c
- GO seqno
- IF EOF()
- LOOP
- ENDIF
- STORE .t. TO merase
- STORE (seqno - mxpgrecno) * 2 + 6 TO mxline
- STORE c->item TO mitem
- SELECT b
- SET INDEX TO &m0invtf..ndx
- SEEK mitem
- SELECT c
- STORE STR(AT(STR(b->decnum,1,0),'123'),1,0) TO mxdec
- STORE mdecimal&mxdec TO mpict
- STORE RECNO() TO mrecno
- * ' display line in reverse video
- @ mxline,0 GET mrecno PICTURE '999'
- @ mxline,4 GET c->item
- @ mxline,21 GET c->descrip
- @ mxline,57 GET c->disc PICTURE '###.###'
- IF m0lntax
- @ mxline,67 SAY c->taxcode PICTURE '!'
- ELSE
- @ mxline,67 SAY c->taxable PICTURE 'Y'
- STORE c->taxable TO itaxcode
- ENDIF
- IF SUBSTR(m0link,1,1) = 'Y'
- @ mxline,72 GET c->glsale
- @ mxline,75 SAY '/'
- @ mxline,76 GET c->glasst
- ENDIF
- IF minvoice
- @ mxline + 1,2 GET c->qtyord PICTURE "&mpict"
- @ mxline + 1,16 GET c->qtyshp PICTURE "&mpict"
- ELSE
- STORE 0 - c->qtyshp TO iqtyshp
- @ mxline + 1,16 GET iqtyshp PICTURE "&mpict"
- ENDIF
- @ mxline + 1,29 GET c->cost PICTURE '#######.###'
- @ mxline + 1,43 GET c->price PICTURE '#######.##'
- @ mxline + 1,67 GET c->extprice PICTURE '999999999.99'
- CLEAR GETS
- ?? CHR(7)
- STORE 'N' TO mans
- @ 22,0 SAY 'Are you sure you want to Delete this Line ? (Y/N) ' + ;
- SUBSTR(m0border,181,7) GET mans PICTURE 'Y'
- READ
- IF mans = 'Y'
- * ' delete line and pack file
- SELECT b
- @ 22,0
- @ 22,0 SAY '***** Updating Inventory File *****'
- SET INDEX TO &m0invtf..ndx
- SEEK mitem
- DO p0rlockn
- REPLACE ptdqty WITH ptdqty - c->qtyshp, ytdqty WITH ytdqty - ;
- c->qtyshp, ptdsls WITH ptdsls - c->extprice, ytdsls WITH ;
- ytdsls - c->extprice
- STORE f0extlin(c->qtyshp, c->cost, 0) TO iextcost
- IF b->stkcode = 'Y'
- REPLACE onhand WITH onhand + c->qtyshp
- STORE tinvt - iextcost TO tinvt
- ELSE
- STORE tminvt - iextcost TO tminvt
- ENDIF
- UNLOCK
- SELECT c
- @ 22,0
- @ 22,0 SAY '***** Updating Temporary Detail File *****'
- DO p0linclc WITH 'D', minvsub, mtax, minvamt, -c->extprice, ;
- itaxcode
- DELETE
- PACK
- STORE mdetcount - 1 TO mdetcount
- ENDIF && mans = 'Y'
- @ 22,0
- LOOP
- ENDIF && mdone = 'D'
- IF mdone = 'E'
- STORE 0 TO seqno
- STORE LTRIM(STR(mgroup + mxpgrecno - 1,3,0)) TO send
- IF mgroup > 1
- @ 22,0 SAY 'Enter Line Number to Edit (' + spagerecno + '-' + ;
- send + ') ' + SUBSTR(m0border,180,7) GET seqno PICTURE '###'
- READ
- IF seqno < mxpgrecno .OR. seqno > mgroup + mxpgrecno - 1
- @ 22,0
- LOOP
- ENDIF
- ELSE
- STORE mxpgrecno TO seqno
- ENDIF
- @ 22,0
- SELECT c
- GO seqno
- IF EOF()
- LOOP
- ENDIF
- STORE .t. TO merase
- STORE (seqno - mxpgrecno) * 2 + 6 TO mxline
- STORE c->item TO mitem
- SELECT b
- SET INDEX TO &m0invtf..ndx
- SEEK mitem
- SELECT c
- STORE c->descrip TO idescrip
- STORE c->price TO iprice
- STORE c->cost TO icost
- STORE c->qtyord TO iqtyord
- STORE c->qtyshp TO iqtyshp
- IF minvoice
- STORE c->qtyord TO iqtyord
- STORE c->qtyshp TO iqtyshp
- ELSE
- STORE 0 - c->qtyshp TO iqtyshp, iqtyord
- ENDIF
- STORE c->glasst TO iglasst
- STORE c->glsale TO iglsale
- STORE c->disc TO idisc
- STORE c->taxable TO itaxable
- STORE itaxable TO itaxcode
- IF m0lntax
- STORE c->taxcode TO itaxcode
- ENDIF
- STORE STR(AT(STR(b->decnum,1,0),'123'),1,0) TO mxdec
- STORE mdecimal&mxdec TO mpict
- STORE b->class TO iclass
- @ 22,0 SAY 'On Hand ='
- @ 22,10 SAY b->onhand PICTURE '##&mpict'
- @ 22,27 SAY 'Allocated ='
- @ 22,39 SAY b->aloc PICTURE '##&mpict'
- @ 22,54 SAY 'Proj Stock ='
- @ 22,67 SAY b->onhand + b->onorder - b->aloc PICTURE '##&mpict'
- @ mxline,21 GET idescrip PICTURE 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
- @ mxline,57 GET idisc PICTURE '###.###'
- IF m0lntax
- @ mxline,67 GET itaxcode PICTURE '!'
- READ
- DO WHILE .t.
- IF itaxcode = ' '
- STORE -1 TO itaxrate
- ELSE
- STORE f0taxval('rate', ASC(itaxcode) - 64) TO itaxrate
- STORE f0taxval('acct', ASC(itaxcode) - 64) TO mtaxacct
- ENDIF
- IF itaxrate >= 0
- EXIT
- ENDIF
- DO p0reget WITH .t., 22, 0, mxline, 67, itaxcode, '!', ;
- 'Invalid Tax Code. Please reenter...'
- ENDDO
- @ 22,0
- STORE 'V' TO itaxable
- ELSE
- IF itaxrate = 0.00
- STORE 'N' TO itaxable
- @ mxline,67 SAY itaxable PICTURE 'Y'
- ELSE
- @ mxline,67 GET itaxable PICTURE 'Y'
- ENDIF
- ENDIF
- IF SUBSTR(m0link,1,1) = 'Y'
- @ mxline,72 GET iglsale PICTURE '!!!'
- @ mxline,75 SAY '/'
- @ mxline,76 GET iglasst PICTURE '!!!'
- ENDIF
- IF minvoice
- @ mxline + 1,2 GET iqtyord PICTURE "&mpict"
- @ mxline + 1,16 GET iqtyshp PICTURE "&mpict"
- ELSE
- @ mxline + 1,16 GET iqtyshp PICTURE "&mpict"
- ENDIF
- IF b->stkcode = 'N' .AND. minvoice
- @ mxline + 1,29 GET icost PICTURE '#######.###'
- ELSE
- @ mxline + 1,29 SAY icost PICTURE '9999999.999'
- ENDIF
- IF (b->level3 > 0 .OR. b->level2 > 0) .AND. ipricecode = 'L'
- READ
- IF (iqtyord >= b->level3 .AND. b->level3 > 0) .OR. ;
- (iqtyord >= b->level2 .AND. b->level2 > 0)
- @ 22,0
- STORE 'N' TO mans
- @ 22,0 SAY 'New Order Qty changes Price Category. Use New ' + ;
- 'Price (Y/N) ' + SUBSTR(m0border,181,6) GET mans PICTURE 'Y'
- READ
- @ 22,0
- DO CASE
- CASE mans = 'Y' .AND. iqtyord >= b->level3 .AND. b->level3 > 0
- STORE b->price3 TO iprice
- CASE mans = 'Y' .AND. iqtyord >= b->level2 .AND. b->level2 > 0
- STORE b->price2 TO iprice
- ENDCASE
- ENDIF
- ENDIF
- @ mxline + 1,43 GET iprice PICTURE '#######.##'
- READ
- IF m0lookup
- * ' Validate not over MAX values for QTY, COST, and PRICE in Lookup Table
- STORE 'iqtyshp' TO mvqty
- STORE 'icost' TO mvcost
- STORE 'iprice' TO mvprice
- STORE .t. TO num1ok, num2ok, num3ok
- IF minvoice
- @ mxline + 1,2 GET iqtyord PICTURE "&mpict"
- ENDIF
- @ mxline + 1,16 GET iqtyshp PICTURE "&mpict"
- IF b->stkcode = 'N'
- @ mxline + 1,29 GET icost PICTURE '#######.###'
- ENDIF
- @ mxline + 1,43 GET iprice PICTURE '#######.##'
- CLEAR GETS
- DO systblv WITH 'Maxclass', SUBSTR(m0comp,1,2), ;
- 'iclass', 'B', 22, .t.
- IF .NOT. num1ok
- ?? CHR(7)
- IF minvoice
- @ mxline + 1,2 GET iqtyord PICTURE "&mpict"
- ENDIF
- @ mxline + 1,16 GET iqtyshp PICTURE "&mpict"
- @ 22,0 CLEAR
- @ 22,0 SAY 'Qty Shipped is larger than Maximum Qty for this Class.'
- @ 23,0 SAY 'Enter new Qty or press <Enter> to continue...'
- READ
- ENDIF
- IF .NOT. num2ok .AND. b->stkcode = 'N'
- ?? CHR(7)
- @ mxline + 1,29 GET icost PICTURE '#######.###'
- @ 22,0 CLEAR
- @ 22,0 SAY 'Cost for item is larger than Maximum Cost for this Class.'
- @ 23,0 SAY 'Enter new Cost or press <Enter> to continue...'
- READ
- ENDIF
- IF .NOT. num3ok
- ?? CHR(7)
- @ mxline + 1,43 GET iprice PICTURE '#######.##'
- @ 22,0 CLEAR
- @ 22,0 SAY 'Price for item is larger than Maximum Price for ' + ;
- 'this Class.'
- @ 23,0 SAY 'Enter new Price or press <Enter> to continue...'
- READ
- ENDIF
- CLEAR GETS
- @ 22,0 CLEAR
- ENDIF && m0lookup
- IF .NOT. minvoice
- STORE 0 - iqtyshp TO iqtyshp, iqtyord
- ENDIF
- STORE f0extlin(iqtyshp, iprice, idisc) TO iextprice
- IF mtxonly = 'Y' .AND. .NOT. minvoice
- STORE 0.00 TO iextprice
- ENDIF
- @ mxline + 1,67 SAY iextprice PICTURE '999999999.99'
- CLEAR GETS
- IF icost > iprice
- STORE ' ' TO mans
- STORE 'Unit Cost greater than Unit Price. Press any key to continue.';
- TO mmsg
- DO p0reget WITH .t., 22, 0, 22, LEN(mmsg) + 1, mans, '', mmsg
- ENDIF
- STORE 'Y' TO mans
- @ 22,0
- @ 22,0 SAY 'Save Changes for this Line ? (Y/N) ' + ;
- SUBSTR(m0border,181,6) GET mans PICTURE 'Y'
- READ
- @ 22,0
- IF mans = 'N'
- LOOP
- ENDIF
- STORE .t. TO mok
- IF SUBSTR(m0link,1,1) = 'Y'
- SELECT d
- SET INDEX TO &m0glacf..ndx
- DO WHILE mok
- SEEK iglsale
- IF .NOT. (EOF() .OR. BOF())
- EXIT
- ENDIF
- DO p0reget WITH .t., 22, 0, mxline, 72, iglsale, '!!!', 'Invalid ' + ;
- 'Ledger sales linking code. Reenter or blanks to cancel...'
- IF iglsale = ' '
- STORE .f. TO mok
- ENDIF
- ENDDO
- CLEAR GETS
- DO WHILE mok
- SEEK iglasst
- IF .NOT. (EOF() .OR. BOF())
- EXIT
- ENDIF
- DO p0reget WITH .t., 22, 0, mxline, 76, iglasst, '!!!', 'Invalid ' + ;
- 'Ledger inventory linking code. Reenter or blanks to cancel...'
- IF iglasst = ' '
- STORE .f. TO mok
- ENDIF
- ENDDO
- SELECT c
- ENDIF && SUBSTR(m0link,1,1) = 'Y'
- IF mok .AND. minvoice .AND. b->stkcode = 'Y' .AND. ;
- b->onhand - b->aloc < iqtyshp - c->qtyshp
- STORE 'Y' TO mans
- ?? CHR(7)
- @ 22,0 SAY 'Ship Qty = '
- @ 22,12 SAY iqtyshp PICTURE '&mpict'
- IF b->onhand - b->aloc + c->qtyshp > 0
- @ 22,26 SAY 'On Hand Qty = '
- @ 22,42 SAY b->onhand - b->aloc + c->qtyshp PICTURE '&mpict'
- ELSE
- @ 22,30 SAY 'Out Of Stock'
- ENDIF
- @ 22,55 SAY 'Continue ? (Y/N) ' + SUBSTR(m0border,181,6) ;
- GET mans PICTURE 'Y'
- READ
- IF mans = 'N'
- STORE .f. TO mok
- ENDIF
- @ 22,0
- ENDIF
- IF mok .AND. minvoice .AND. a->limit - a->balance - minvamt - ;
- iextprice + c->extprice - (.01 * iextprice * itaxrate) < 0 ;
- .AND. TRIM(mcust) <> 'CASH'
- STORE 'Y' TO mans
- ?? CHR(7)
- STORE LTRIM(STR(a->balance + minvamt + iextprice - ;
- c->extprice - (.01 * iextprice * itaxrate) - a->limit,12,2)) TO mamount
- @ 22,0 SAY 'Credit limit exceeded by ' + mamount + ;
- ', Continue ? (Y/N) ' + SUBSTR(m0border,181,6) GET mans PICTURE 'Y'
- READ
- IF mans = 'N'
- STORE .f. TO mok
- ENDIF
- @ 22,0
- ENDIF
- IF .NOT. mok
- LOOP
- ENDIF
- IF mtxonly = 'N'
- SELECT b
- @ 22,0
- @ 22,0 SAY '***** Updating Inventory File *****'
- SET INDEX TO &m0invtf..ndx
- SEEK mitem
- DO p0rlockn
- REPLACE ptdqty WITH ptdqty + iqtyshp - c->qtyshp, ytdqty WITH ytdqty + ;
- iqtyshp - c->qtyshp, ptdsls WITH ptdsls + iextprice - c->extprice, ;
- ytdsls WITH ytdsls + iextprice - c->extprice
- STORE f0extlin(c->qtyshp, c->cost, 0) TO ixextcost
- STORE f0extlin(iqtyshp, icost, 0) TO iextcost
- IF b->stkcode = 'Y'
- REPLACE onhand WITH onhand - iqtyshp + c->qtyshp
- STORE tinvt - ixextcost + iextcost TO tinvt
- ELSE
- STORE tminvt - ixextcost + iextcost TO tminvt
- ENDIF
- UNLOCK
- ENDIF && mtxonly = 'N'
- @ 22,0
- @ 22,0 SAY '***** Updating Temporary Detail File *****'
- SELECT c
- IF .NOT. m0lntax
- STORE itaxable TO itaxcode
- ENDIF
- * ' get changed price and tax; total doesnt include tax if not line item tax
- DO p0linclc WITH 'E', minvsub, mtax, minvamt, iextprice, itaxcode
- REPLACE qtyord WITH iqtyord, qtyshp WITH iqtyshp, descrip WITH ;
- idescrip, glsale WITH iglsale, glasst WITH iglasst
- REPLACE disc WITH idisc, cost WITH icost, price WITH iprice, ;
- extprice WITH iextprice, taxable WITH itaxable
- IF mtxonly = 'Y' .AND. .NOT. minvoice
- STORE 'Tax Credit' TO iponum
- REPLACE ponum WITH 'Tax Credit'
- ENDIF
- IF m0lntax
- REPLACE taxrate WITH itaxrate, taxcode WITH itaxcode, ;
- taxacct WITH mtaxacct
- ELSE
- REPLACE taxrate WITH IIF(taxable = 'Y' .OR. mtxonly = 'Y', itaxrate, 0.00)
- ENDIF
- @ 22,0
- ENDIF && mdone = 'E'
- ENDDO && WHILE .t.
- RETURN
- *
- * ' $Revision: 1.25 $
- * ' $Date: 25 May 1990 16:20:50 $
- *********************
- ** ' ARPOSE.PRG ' **
- ** ' 615 Lines ' **
- *********************