Sage 300

From DataSelf Knowledge Base
Jump to navigation Jump to search

Purchase Order Receipt History and Current

SQL Views:

1. View – Purchase Orders = vPurchase

SELECT dbo.POPORH1.PORHSEQ AS PORHSEQ1, dbo.POPORH1.NEXTLSEQ, dbo.POPORH1.LINES, dbo.POPORH1.LINESCMPL, dbo.POPORH1.RQNS, dbo.POPORH1.RQNSCMPL, dbo.POPORH1.ISPRINTED, dbo.POPORH1.TAXAUTOCAL, dbo.POPORH1.LABELPRINT, dbo.POPORH1.LABELCOUNT AS LABELCount1, dbo.POPORH1.ISCOMPLETE, dbo.POPORH1.DTCOMPLETE AS DTComplete1, dbo.POPORH1.POSTDATE, dbo.POPORH1.PONUMBER AS PONUMBERH, dbo.POPORH1.VDCODE, dbo.POPORH1.VDEXISTS, dbo.POPORH1.VDNAME, dbo.POPORH1.VDADDRESS1, dbo.POPORH1.VDADDRESS2, dbo.POPORH1.VDADDRESS3, dbo.POPORH1.VDCITY, dbo.POPORH1.VDADDRESS4, dbo.POPORH1.VDSTATE, dbo.POPORH1.VDZIP, dbo.POPORH1.VDCOUNTRY, dbo.POPORH1.VDPHONE, dbo.POPORH1.VDFAX, dbo.POPORH1.VDCONTACT, dbo.POPORL.PORHSEQ, dbo.POPORL.PORLREV, dbo.POPORL.AUDTDATE, dbo.POPORL.AUDTTIME, dbo.POPORL.AUDTUSER, dbo.POPORL.AUDTORG, dbo.POPORL.PORLSEQ, dbo.POPORL.PORCSEQ, dbo.POPORL.INDBTABLE, dbo.POPORL.CONSOLSEQ, dbo.POPORL.RQNHSEQ, dbo.POPORL.RQNLSEQ, dbo.POPORL.OEONUMBER, dbo.POPORL.POSTEDTOIC, dbo.POPORL.TOPOSTTOIC, dbo.POPORL.STPRINT, dbo.POPORL.COMPLETION, dbo.POPORL.DTCOMPLETE, dbo.POPORL.ITEMEXISTS, dbo.POPORL.ITEMNO, dbo.POPORL.LOCATION, dbo.POPORL.ITEMDESC, dbo.POPORL.EXPARRIVAL, dbo.POPORL.VENDITEMNO, dbo.POPORL.HASCOMMENT, dbo.POPORL.ORDERUNIT, dbo.POPORL.ORDERCONV, dbo.POPORL.ORDERDECML, dbo.POPORL.STOCKDECML, dbo.POPORL.OQORDERED, dbo.POPORL.OQRECEIVED, dbo.POPORL.OQCANCELED, dbo.POPORL.OQRCPEXTRA, dbo.POPORL.OQOUTSTAND, dbo.POPORL.SQORDERED, dbo.POPORL.SQRECEIVED, dbo.POPORL.SQCANCELED, dbo.POPORL.SQRCPEXTRA, dbo.POPORL.SQSETTLED, dbo.POPORL.SQOUTSTAND, dbo.POPORL.UNITWEIGHT, dbo.POPORL.EXTWEIGHT, dbo.POPORL.OQRCPDAYS, dbo.POPORL.EXTRECEIVE, dbo.POPORL.EXTCANCEL, dbo.POPORL.SRRECEIVED, dbo.POPORL.UNITCOST, dbo.POPORL.EXTENDED, dbo.POPORL.TAXBASE1, dbo.POPORL.TAXBASE2, dbo.POPORL.TAXBASE3, dbo.POPORL.TAXBASE4, dbo.POPORL.TAXBASE5, dbo.POPORL.TAXCLASS1, dbo.POPORL.TAXCLASS2, dbo.POPORL.TAXCLASS3, dbo.POPORL.TAXCLASS4, dbo.POPORL.TAXCLASS5, dbo.POPORL.TAXRATE1, dbo.POPORL.TAXRATE2, dbo.POPORL.TAXRATE3, dbo.POPORL.TAXRATE4, dbo.POPORL.TAXRATE5, dbo.POPORL.TAXINCLUD1, dbo.POPORL.TAXINCLUD2, dbo.POPORL.TAXINCLUD3, dbo.POPORL.TAXINCLUD4, dbo.POPORL.TAXINCLUD5, dbo.POPORL.TAXAMOUNT1, dbo.POPORL.TAXAMOUNT2, dbo.POPORL.TAXAMOUNT3, dbo.POPORL.TAXAMOUNT4, dbo.POPORL.TAXAMOUNT5, dbo.POPORL.TXALLOAMT1, dbo.POPORL.TXALLOAMT2, dbo.POPORL.TXALLOAMT3, dbo.POPORL.TXALLOAMT4, dbo.POPORL.TXALLOAMT5, dbo.POPORL.TXRECVAMT1, dbo.POPORL.TXRECVAMT2, dbo.POPORL.TXRECVAMT3, dbo.POPORL.TXRECVAMT4, dbo.POPORL.TXRECVAMT5, dbo.POPORL.TXEXPSAMT1, dbo.POPORL.TXEXPSAMT2, dbo.POPORL.TXEXPSAMT3, dbo.POPORL.TXEXPSAMT4, dbo.POPORL.TXEXPSAMT5, dbo.POPORL.TXBASEALLO, dbo.POPORL.TXINCLUDED, dbo.POPORL.TXEXCLUDED, dbo.POPORL.TAXAMOUNT, dbo.POPORL.TXRECVAMT, dbo.POPORL.TXEXPSAMT, dbo.POPORL.TXALLOAMT, dbo.POPORL.FCEXTENDED, dbo.POPORL.GLACEXPENS, dbo.POPORL.HASDROPSHI, dbo.POPORL.DROPTYPE, dbo.POPORL.IDCUST, dbo.POPORL.IDCUSTSHPT, dbo.POPORL.DLOCATION, dbo.POPORL.[DESC], dbo.POPORL.ADDRESS1, dbo.POPORL.ADDRESS2, dbo.POPORL.ADDRESS3, dbo.POPORL.ADDRESS4, dbo.POPORL.CITY, dbo.POPORL.STATE, dbo.POPORL.ZIP, dbo.POPORL.COUNTRY, dbo.POPORL.PHONE, dbo.POPORL.FAX, dbo.POPORL.CONTACT, dbo.POPORL.STOCKITEM, dbo.POPORL.EMAIL, dbo.POPORL.PHONEC, dbo.POPORL.FAXC, dbo.POPORL.EMAILC, dbo.POPORL.GLNONSTKCR, dbo.POPORL.MANITEMNO, dbo.POPORL.DISCPCT, dbo.POPORL.DISCOUNT, dbo.POPORL.[VALUES], dbo.POPORL.DISCOUNTF, dbo.POPORL.ISRECEIVED, dbo.POPORL.AGENTLSEQ, dbo.POPORL.CONTRACT, dbo.POPORL.PROJECT, dbo.POPORL.CCATEGORY, dbo.POPORL.COSTCLASS, dbo.POPORL.BILLTYPE, dbo.POPORL.BILLRATE, dbo.POPORL.BILLCURR, dbo.POPORL.ARITEMNO, dbo.POPORL.ARUNIT, dbo.POPORL.TFBASEALLO, dbo.POPORL.TFINCLUDE1, dbo.POPORL.TFINCLUDE2, dbo.POPORL.TFINCLUDE3, dbo.POPORL.TFINCLUDE4, dbo.POPORL.TFINCLUDE5, dbo.POPORL.TFALLOAMT1, dbo.POPORL.TFALLOAMT2, dbo.POPORL.TFALLOAMT3, dbo.POPORL.TFALLOAMT4, dbo.POPORL.TFALLOAMT5, dbo.POPORL.TFRECVAMT1, dbo.POPORL.TFRECVAMT2, dbo.POPORL.TFRECVAMT3, dbo.POPORL.TFRECVAMT4, dbo.POPORL.TFRECVAMT5, dbo.POPORL.TFEXPSAMT1, dbo.POPORL.TFEXPSAMT2, dbo.POPORL.TFEXPSAMT3, dbo.POPORL.TFEXPSAMT4, dbo.POPORL.TFEXPSAMT5, dbo.POPORL.TARAMOUNT1, dbo.POPORL.TARAMOUNT2, dbo.POPORL.TARAMOUNT3, dbo.POPORL.TARAMOUNT4, dbo.POPORL.TARAMOUNT5, dbo.POPORL.TRALLOAMT1, dbo.POPORL.TRALLOAMT2, dbo.POPORL.TRALLOAMT3, dbo.POPORL.TRALLOAMT4, dbo.POPORL.TRALLOAMT5, dbo.POPORL.TRRECVAMT1, dbo.POPORL.TRRECVAMT2, dbo.POPORL.TRRECVAMT3, dbo.POPORL.TRRECVAMT4, dbo.POPORL.TRRECVAMT5, dbo.POPORL.TREXPSAMT1, dbo.POPORL.TREXPSAMT2, dbo.POPORL.TREXPSAMT3, dbo.POPORL.TREXPSAMT4, dbo.POPORL.TREXPSAMT5, dbo.POPORL.UCISMANUAL, dbo.POPORL.WEIGHTUNIT, dbo.POPORL.WEIGHTCONV, dbo.POPORL.DEFUWEIGHT, dbo.POPORL.DEFEXTWGHT, dbo.POPORL.COPYDETAIL, dbo.POPORL.DETAILNUM FROM dbo.POPORL RIGHT OUTER JOIN dbo.POPORH1 ON dbo.POPORL.PORHSEQ = dbo.POPORH1.PORHSEQ

2. View – Receipts: vReceipts SELECT TOP (100) PERCENT dbo.PORCPH1.RCPHSEQ AS RCPHSEQ1, dbo.PORCPH1.PORHSEQ AS PORHSEQ1, dbo.PORCPH1.PONUMBER AS PONUMBER1, dbo.PORCPH1.INVNUMBER, dbo.PORCPH1.DATE, dbo.PORCPH1.FISCYEAR, dbo.PORCPH1.FISCPERIOD, dbo.PORCPH1.POSTDATE, dbo.PORCPH1.FOBPOINT, dbo.PORCPH1.RCPNUMBER, dbo.PORCPH1.VDCODE, dbo.PORCPH1.VDEXISTS, dbo.PORCPH1.VDNAME, dbo.PORCPH1.VDADDRESS1, dbo.PORCPH1.VDADDRESS2, dbo.PORCPH1.VDADDRESS3, dbo.PORCPH1.VDADDRESS4, dbo.PORCPH1.VDCITY, dbo.PORCPH1.VDSTATE, dbo.PORCPH1.VDZIP, dbo.PORCPH1.VDCOUNTRY, dbo.PORCPH1.VDPHONE, dbo.PORCPH1.VDFAX, dbo.PORCPH1.VDCONTACT, dbo.PORCPL.RCPHSEQ, dbo.PORCPL.RCPLREV, dbo.PORCPL.AUDTDATE, dbo.PORCPL.AUDTTIME, dbo.PORCPL.AUDTUSER, dbo.PORCPL.AUDTORG, dbo.PORCPL.RCPLSEQ, dbo.PORCPL.RCPCSEQ, dbo.PORCPL.OEONUMBER, dbo.PORCPL.INDBTABLE, dbo.PORCPL.POSTEDTOIC, dbo.PORCPL.COMPLETION, dbo.PORCPL.DTCOMPLETE, dbo.PORCPL.PORHSEQ, dbo.PORCPL.PORLSEQ, dbo.PORCPL.POCOMPLETE, dbo.PORCPL.ITEMEXISTS, dbo.PORCPL.ITEMNO, dbo.PORCPL.LOCATION, dbo.PORCPL.ITEMDESC, dbo.PORCPL.VENDITEMNO, dbo.PORCPL.HASCOMMENT, dbo.PORCPL.ORDERUNIT, dbo.PORCPL.ORDERCONV, dbo.PORCPL.ORDERDECML, dbo.PORCPL.RCPUNIT, dbo.PORCPL.RCPCONV, dbo.PORCPL.RCPDECML, dbo.PORCPL.STOCKDECML, dbo.PORCPL.OQORDERED, dbo.PORCPL.OQPREVRECV, dbo.PORCPL.OQOUTSTPO, dbo.PORCPL.RQRECEIVED, dbo.PORCPL.RQCANCELED, dbo.PORCPL.RQOUTSTAND, dbo.PORCPL.SQORDERED, dbo.PORCPL.SQPREVRECV, dbo.PORCPL.SQOUTSTPO, dbo.PORCPL.RQORDERED, dbo.PORCPL.RQPREVRECV, dbo.PORCPL.RQOUTSTPO, dbo.PORCPL.RQRCPEXTRA, dbo.PORCPL.SQRECEIVED, dbo.PORCPL.SQCANCELED, dbo.PORCPL.SQOUTSTAND, dbo.PORCPL.SQRCPEXTRA, dbo.PORCPL.OQRECEIVED, dbo.PORCPL.OQCANCELED, dbo.PORCPL.OQOUTSTAND, dbo.PORCPL.OQRCPEXTRA, dbo.PORCPL.RQRETURNED, dbo.PORCPL.SQRETURNED, dbo.PORCPL.OQRETURNED, dbo.PORCPL.RQSTOCKED, dbo.PORCPL.SQSTOCKED, dbo.PORCPL.OQSTOCKED, dbo.PORCPL.RQINADJUST, dbo.PORCPL.SQINADJUST, dbo.PORCPL.OQINADJUST, dbo.PORCPL.RQPOFILLED, dbo.PORCPL.SQPOFILLED, dbo.PORCPL.OQPOFILLED, dbo.PORCPL.RQSETTLED, dbo.PORCPL.SQSETTLED, dbo.PORCPL.OQSETTLED, dbo.PORCPL.RQUSTOCKED, dbo.PORCPL.SQUSTOCKED, dbo.PORCPL.OQUSTOCKED, dbo.PORCPL.UNITWEIGHT, dbo.PORCPL.EXTWEIGHT, dbo.PORCPL.UNITCOST, dbo.PORCPL.EXTENDED, dbo.PORCPL.TAXBASE1, dbo.PORCPL.TAXBASE2, dbo.PORCPL.TAXBASE3, dbo.PORCPL.TAXBASE4, dbo.PORCPL.TAXBASE5, dbo.PORCPL.TAXCLASS1, dbo.PORCPL.TAXCLASS2, dbo.PORCPL.TAXCLASS3, dbo.PORCPL.TAXCLASS4, dbo.PORCPL.TAXCLASS5, dbo.PORCPL.TAXRATE1, dbo.PORCPL.TAXRATE2, dbo.PORCPL.TAXRATE3, dbo.PORCPL.TAXRATE4, dbo.PORCPL.TAXRATE5, dbo.PORCPL.TAXINCLUD1, dbo.PORCPL.TAXINCLUD2, dbo.PORCPL.TAXINCLUD3, dbo.PORCPL.TAXINCLUD4, dbo.PORCPL.TAXINCLUD5, dbo.PORCPL.TAXAMOUNT1, dbo.PORCPL.TAXAMOUNT2, dbo.PORCPL.TAXAMOUNT3, dbo.PORCPL.TAXAMOUNT4, dbo.PORCPL.TAXAMOUNT5, dbo.PORCPL.TXRECVAMT1, dbo.PORCPL.TXRECVAMT2, dbo.PORCPL.TXRECVAMT3, dbo.PORCPL.TXRECVAMT4, dbo.PORCPL.TXRECVAMT5, dbo.PORCPL.TXEXPSAMT1, dbo.PORCPL.TXEXPSAMT2, dbo.PORCPL.TXEXPSAMT3, dbo.PORCPL.TXEXPSAMT4, dbo.PORCPL.TXEXPSAMT5, dbo.PORCPL.TXALLOAMT1, dbo.PORCPL.TXALLOAMT2, dbo.PORCPL.TXALLOAMT3, dbo.PORCPL.TXALLOAMT4, dbo.PORCPL.TXALLOAMT5, dbo.PORCPL.TXBASEALLO, dbo.PORCPL.TXINCLUDED, dbo.PORCPL.TXEXCLUDED, dbo.PORCPL.TAXAMOUNT, dbo.PORCPL.TXRECVAMT, dbo.PORCPL.TXEXPSAMT, dbo.PORCPL.TXALLOAMT, dbo.PORCPL.TFBASEALLO, dbo.PORCPL.TFINCLUDE1, dbo.PORCPL.TFINCLUDE2, dbo.PORCPL.TFINCLUDE3, dbo.PORCPL.TFINCLUDE4, dbo.PORCPL.TFINCLUDE5, dbo.PORCPL.TFALLOAMT1, dbo.PORCPL.TFALLOAMT2, dbo.PORCPL.TFALLOAMT3, dbo.PORCPL.TFALLOAMT4, dbo.PORCPL.TFALLOAMT5, dbo.PORCPL.TFRECVAMT1, dbo.PORCPL.TFRECVAMT2, dbo.PORCPL.TFRECVAMT3, dbo.PORCPL.TFRECVAMT4, dbo.PORCPL.TFRECVAMT5, dbo.PORCPL.TFEXPSAMT1, dbo.PORCPL.TFEXPSAMT2, dbo.PORCPL.TFEXPSAMT3, dbo.PORCPL.TFEXPSAMT4, dbo.PORCPL.TFEXPSAMT5, dbo.PORCPL.GLACEXPENS, dbo.PORCPL.DTARRIVAL, dbo.PORCPL.LABELCOUNT, dbo.PORCPL.MPRORATED, dbo.PORCPL.HASDROPSHI, dbo.PORCPL.DROPTYPE, dbo.PORCPL.IDCUST, dbo.PORCPL.IDCUSTSHPT, dbo.PORCPL.DLOCATION, dbo.PORCPL.[DESC], dbo.PORCPL.ADDRESS1, dbo.PORCPL.ADDRESS2, dbo.PORCPL.ADDRESS3, dbo.PORCPL.ADDRESS4, dbo.PORCPL.CITY, dbo.PORCPL.STATE, dbo.PORCPL.ZIP, dbo.PORCPL.COUNTRY, dbo.PORCPL.PHONE, dbo.PORCPL.FAX, dbo.PORCPL.CONTACT, dbo.PORCPL.STOCKITEM, dbo.PORCPL.PONUMBER, dbo.PORCPL.EMAIL, dbo.PORCPL.PHONEC, dbo.PORCPL.FAXC, dbo.PORCPL.EMAILC, dbo.PORCPL.GLNONSTKCR, dbo.PORCPL.MANITEMNO, dbo.PORCPL.DISCPCT, dbo.PORCPL.DISCOUNT, dbo.PORCPL.DISCOUNTF, dbo.PORCPL.XIRQRECEVD, dbo.PORCPL.XIEXTWGHT, dbo.PORCPL.XINETXTEND, dbo.PORCPL.INVLINES, dbo.PORCPL.[VALUES], dbo.PORCPL.CONTRACT, dbo.PORCPL.PROJECT, dbo.PORCPL.CCATEGORY, dbo.PORCPL.COSTCLASS, dbo.PORCPL.BILLTYPE, dbo.PORCPL.BILLRATE, dbo.PORCPL.BILLCURR, dbo.PORCPL.ARITEMNO, dbo.PORCPL.ARUNIT, dbo.PORCPL.RTGPERCENT, dbo.PORCPL.RTGDAYS, dbo.PORCPL.RTGAMOUNT, dbo.PORCPL.RTGAMTOVER, dbo.PORCPL.TARAMOUNT1, dbo.PORCPL.TARAMOUNT2, dbo.PORCPL.TARAMOUNT3, dbo.PORCPL.TARAMOUNT4, dbo.PORCPL.TARAMOUNT5, dbo.PORCPL.TRALLOAMT1, dbo.PORCPL.TRALLOAMT2, dbo.PORCPL.TRALLOAMT3, dbo.PORCPL.TRALLOAMT4, dbo.PORCPL.TRALLOAMT5, dbo.PORCPL.TRRECVAMT1, dbo.PORCPL.TRRECVAMT2, dbo.PORCPL.TRRECVAMT3, dbo.PORCPL.TRRECVAMT4, dbo.PORCPL.TRRECVAMT5, dbo.PORCPL.TREXPSAMT1, dbo.PORCPL.TREXPSAMT2, dbo.PORCPL.TREXPSAMT3, dbo.PORCPL.TREXPSAMT4, dbo.PORCPL.TREXPSAMT5, dbo.PORCPL.RAXBASE1, dbo.PORCPL.RAXBASE2, dbo.PORCPL.RAXBASE3, dbo.PORCPL.RAXBASE4, dbo.PORCPL.RAXBASE5, dbo.PORCPL.RAXAMOUNT1, dbo.PORCPL.RAXAMOUNT2, dbo.PORCPL.RAXAMOUNT3, dbo.PORCPL.RAXAMOUNT4, dbo.PORCPL.RAXAMOUNT5, dbo.PORCPL.RXRECVAMT1, dbo.PORCPL.RXRECVAMT2, dbo.PORCPL.RXRECVAMT3, dbo.PORCPL.RXRECVAMT4, dbo.PORCPL.RXRECVAMT5, dbo.PORCPL.RXEXPSAMT1, dbo.PORCPL.RXEXPSAMT2, dbo.PORCPL.RXEXPSAMT3, dbo.PORCPL.RXEXPSAMT4, dbo.PORCPL.RXEXPSAMT5, dbo.PORCPL.RXALLOAMT1, dbo.PORCPL.RXALLOAMT2, dbo.PORCPL.RXALLOAMT3, dbo.PORCPL.RXALLOAMT4, dbo.PORCPL.RXALLOAMT5, dbo.PORCPL.UCISMANUAL, dbo.PORCPL.WEIGHTUNIT, dbo.PORCPL.WEIGHTCONV, dbo.PORCPL.DEFUWEIGHT, dbo.PORCPL.DEFEXTWGHT, dbo.PORCPL.XIDEFEXTWT, dbo.PORCPL.FASDETAIL, dbo.PORCPL.SERIALQTY, dbo.PORCPL.LOTQTY, dbo.PORCPL.SLITEM, dbo.PORCPL.DETAILNUM FROM dbo.PORCPL INNER JOIN dbo.PORCPH1 ON dbo.PORCPL.RCPHSEQ = dbo.PORCPH1.RCPHSEQ ORDER BY PONUMBER1

3. View to combine: SELECT dbo.vReceipt.RCPHSEQ1, dbo.vReceipt.PORHSEQ1 AS PORHSEQ1, dbo.vReceipt.PONUMBER1, dbo.vReceipt.INVNUMBER, dbo.vReceipt.DATE, dbo.vPurchase.PORHSEQ1, dbo.vPurchase.NEXTLSEQ, dbo.vPurchase.LINES, dbo.vPurchase.LINESCMPL, dbo.vPurchase.RQNS, dbo.vPurchase.RQNSCMPL, dbo.vPurchase.ISPRINTED, dbo.vPurchase.TAXAUTOCAL, dbo.vPurchase.LABELPRINT, dbo.vPurchase.LABELCount1, dbo.vPurchase.ISCOMPLETE, dbo.vPurchase.DTComplete1, dbo.vPurchase.POSTDATE, dbo.vPurchase.PONUMBERH, dbo.vPurchase.VDCODE, dbo.vPurchase.VDEXISTS, dbo.vPurchase.VDNAME, dbo.vPurchase.VDADDRESS1, dbo.vPurchase.VDADDRESS2, dbo.vPurchase.VDADDRESS3, dbo.vPurchase.VDCITY, dbo.vPurchase.VDADDRESS4, dbo.vPurchase.VDSTATE, dbo.vPurchase.VDZIP, dbo.vPurchase.VDCOUNTRY, dbo.vPurchase.VDPHONE, dbo.vPurchase.VDFAX, dbo.vPurchase.VDCONTACT, dbo.vPurchase.PORHSEQ, dbo.vPurchase.PORLREV, dbo.vPurchase.AUDTDATE, dbo.vPurchase.AUDTTIME, dbo.vPurchase.AUDTUSER, dbo.vPurchase.AUDTORG, dbo.vPurchase.PORLSEQ, dbo.vPurchase.PORCSEQ, dbo.vPurchase.INDBTABLE, dbo.vPurchase.CONSOLSEQ, dbo.vPurchase.RQNHSEQ, dbo.vPurchase.RQNLSEQ, dbo.vPurchase.OEONUMBER, dbo.vPurchase.POSTEDTOIC, dbo.vPurchase.TOPOSTTOIC, dbo.vPurchase.STPRINT, dbo.vPurchase.COMPLETION, dbo.vPurchase.DTCOMPLETE, dbo.vPurchase.ITEMEXISTS, dbo.vPurchase.ITEMNO, dbo.vPurchase.LOCATION, dbo.vPurchase.ITEMDESC, dbo.vPurchase.EXPARRIVAL, dbo.vPurchase.VENDITEMNO, dbo.vPurchase.HASCOMMENT, dbo.vPurchase.ORDERUNIT, dbo.vPurchase.ORDERCONV, dbo.vPurchase.ORDERDECML, dbo.vPurchase.STOCKDECML, dbo.vPurchase.OQORDERED, dbo.vPurchase.OQRECEIVED, dbo.vPurchase.OQCANCELED, dbo.vPurchase.OQRCPEXTRA, dbo.vPurchase.OQOUTSTAND, dbo.vPurchase.SQORDERED, dbo.vPurchase.SQRECEIVED, dbo.vPurchase.SQCANCELED, dbo.vPurchase.SQRCPEXTRA, dbo.vPurchase.SQSETTLED, dbo.vPurchase.SQOUTSTAND, dbo.vPurchase.UNITWEIGHT, dbo.vPurchase.EXTWEIGHT, dbo.vPurchase.OQRCPDAYS, dbo.vPurchase.EXTRECEIVE, dbo.vPurchase.EXTCANCEL, dbo.vPurchase.SRRECEIVED, dbo.vPurchase.UNITCOST, dbo.vPurchase.EXTENDED, dbo.vPurchase.TAXBASE1, dbo.vPurchase.TAXBASE2, dbo.vPurchase.TAXBASE3, dbo.vPurchase.TAXBASE4, dbo.vPurchase.TAXBASE5, dbo.vPurchase.TAXCLASS1, dbo.vPurchase.TAXCLASS2, dbo.vPurchase.TAXCLASS3, dbo.vPurchase.TAXCLASS4, dbo.vPurchase.TAXCLASS5, dbo.vPurchase.TAXRATE1, dbo.vPurchase.TAXRATE2, dbo.vPurchase.TAXRATE3, dbo.vPurchase.TAXRATE4, dbo.vPurchase.TAXRATE5, dbo.vPurchase.TAXINCLUD1, dbo.vPurchase.TAXINCLUD2, dbo.vPurchase.TAXINCLUD3, dbo.vPurchase.TAXINCLUD4, dbo.vPurchase.TAXINCLUD5, dbo.vPurchase.TAXAMOUNT1, dbo.vPurchase.TAXAMOUNT2, dbo.vPurchase.TAXAMOUNT3, dbo.vPurchase.TAXAMOUNT4, dbo.vPurchase.TAXAMOUNT5, dbo.vPurchase.TXALLOAMT1, dbo.vPurchase.TXALLOAMT2, dbo.vPurchase.TXALLOAMT3, dbo.vPurchase.TXALLOAMT4, dbo.vPurchase.TXALLOAMT5, dbo.vPurchase.TXRECVAMT1, dbo.vPurchase.TXRECVAMT2, dbo.vPurchase.TXRECVAMT3, dbo.vPurchase.TXRECVAMT4, dbo.vPurchase.TXRECVAMT5, dbo.vPurchase.TXEXPSAMT1, dbo.vPurchase.TXEXPSAMT2, dbo.vPurchase.TXEXPSAMT3, dbo.vPurchase.TXEXPSAMT4, dbo.vPurchase.TXEXPSAMT5, dbo.vPurchase.TXBASEALLO, dbo.vPurchase.TXINCLUDED, dbo.vPurchase.TXEXCLUDED, dbo.vPurchase.TAXAMOUNT, dbo.vPurchase.TXRECVAMT, dbo.vPurchase.TXEXPSAMT, dbo.vPurchase.TXALLOAMT, dbo.vPurchase.FCEXTENDED, dbo.vPurchase.GLACEXPENS, dbo.vPurchase.HASDROPSHI, dbo.vPurchase.DROPTYPE, dbo.vPurchase.IDCUST, dbo.vPurchase.IDCUSTSHPT, dbo.vPurchase.DLOCATION, dbo.vPurchase.[DESC], dbo.vPurchase.ADDRESS1, dbo.vPurchase.ADDRESS2, dbo.vPurchase.ADDRESS3, dbo.vPurchase.ADDRESS4, dbo.vPurchase.CITY, dbo.vPurchase.STATE, dbo.vPurchase.ZIP, dbo.vPurchase.COUNTRY, dbo.vPurchase.PHONE, dbo.vPurchase.FAX, dbo.vPurchase.CONTACT, dbo.vPurchase.STOCKITEM, dbo.vPurchase.EMAIL, dbo.vPurchase.PHONEC, dbo.vPurchase.FAXC, dbo.vPurchase.EMAILC, dbo.vPurchase.GLNONSTKCR, dbo.vPurchase.MANITEMNO, dbo.vPurchase.DISCPCT, dbo.vPurchase.DISCOUNT, dbo.vPurchase.[VALUES], dbo.vPurchase.DISCOUNTF, dbo.vPurchase.ISRECEIVED, dbo.vPurchase.AGENTLSEQ, dbo.vPurchase.CONTRACT, dbo.vPurchase.PROJECT, dbo.vPurchase.CCATEGORY, dbo.vPurchase.COSTCLASS, dbo.vPurchase.BILLTYPE, dbo.vPurchase.BILLRATE, dbo.vPurchase.BILLCURR, dbo.vPurchase.ARITEMNO, dbo.vPurchase.ARUNIT, dbo.vPurchase.TFBASEALLO, dbo.vPurchase.TFINCLUDE1, dbo.vPurchase.TFINCLUDE2, dbo.vPurchase.TFINCLUDE3, dbo.vPurchase.TFINCLUDE4, dbo.vPurchase.TFINCLUDE5, dbo.vPurchase.TFALLOAMT1, dbo.vPurchase.TFALLOAMT2, dbo.vPurchase.TFALLOAMT3, dbo.vPurchase.TFALLOAMT4, dbo.vPurchase.TFALLOAMT5, dbo.vPurchase.TFRECVAMT1, dbo.vPurchase.TFRECVAMT2, dbo.vPurchase.TFRECVAMT3, dbo.vPurchase.TFRECVAMT4, dbo.vPurchase.TFRECVAMT5, dbo.vPurchase.TFEXPSAMT1, dbo.vPurchase.TFEXPSAMT2, dbo.vPurchase.TFEXPSAMT3, dbo.vPurchase.TFEXPSAMT4, dbo.vPurchase.TFEXPSAMT5, dbo.vPurchase.TARAMOUNT1, dbo.vPurchase.TARAMOUNT2, dbo.vPurchase.TARAMOUNT3, dbo.vPurchase.TARAMOUNT4, dbo.vPurchase.TARAMOUNT5, dbo.vPurchase.TRALLOAMT1, dbo.vPurchase.TRALLOAMT2, dbo.vPurchase.TRALLOAMT3, dbo.vPurchase.TRALLOAMT4, dbo.vPurchase.TRALLOAMT5, dbo.vPurchase.TRRECVAMT1, dbo.vPurchase.TRRECVAMT2, dbo.vPurchase.TRRECVAMT3, dbo.vPurchase.TRRECVAMT4, dbo.vPurchase.TRRECVAMT5, dbo.vPurchase.TREXPSAMT1, dbo.vPurchase.TREXPSAMT2, dbo.vPurchase.TREXPSAMT3, dbo.vPurchase.TREXPSAMT4, dbo.vPurchase.TREXPSAMT5, dbo.vPurchase.UCISMANUAL, dbo.vPurchase.WEIGHTUNIT, dbo.vPurchase.WEIGHTCONV, dbo.vPurchase.DEFUWEIGHT, dbo.vPurchase.DEFEXTWGHT, dbo.vPurchase.COPYDETAIL, dbo.vPurchase.DETAILNUM FROM dbo.vPurchase LEFT OUTER JOIN dbo.vReceipt ON dbo.vPurchase.ITEMNO = dbo.vReceipt.ITEMNO AND dbo.vPurchase.PONUMBERH = dbo.vReceipt.PONUMBER1