Wednesday, June 24, 2026

Get product receipt details from posted invoice

 code:-

sql:-

select DISTINCT vendPackingSlipTrans.PACKINGSLIPID from vendInvoiceTrans

inner join vendInvoiceJour

  on vendInvoiceTrans.PurchID = vendInvoiceJour.PurchId and

      vendInvoiceTrans.InvoiceId = vendInvoiceJour.InvoiceId and

      vendInvoiceTrans.InvoiceDate = vendInvoiceJour.InvoiceDate and

      vendInvoiceTrans.NumberSequenceGroup = vendInvoiceJour.NumberSequenceGroup and 

      vendInvoiceTrans.InternalInvoiceId = vendInvoiceJour.InternalInvoiceId

  inner join vendInvoicePackingSlipQuantityMatch

      on vendInvoicePackingSlipQuantityMatch.InvoiceSourceDocumentLIne = vendInvoiceTrans.SourceDocumentLine

  inner join vendPackingSlipTrans

      on vendPackingSlipTrans.SourceDocumentLine = vendInvoicePackingSlipQuantityMatch.PackingSlipSourceDocumentLine

  and vendInvoiceJour.LEDGERVOUCHER='pass your journal vocuher'


and also if you want reverse like if you have grn get invoices then code

sql:-

select vendPackingSlipTrans.DATAAREAID,vendPackingSlipTrans.ORIGPURCHID,vendPackingSlipTrans.PACKINGSLIPID,vendInvoiceTrans.INVOICEID from vendPackingSlipTrans
inner join vendInvoicePackingSlipQuantityMatch
on vendPackingSlipTrans.SourceDocumentLine = vendInvoicePackingSlipQuantityMatch.PackingSlipSourceDocumentLine
inner join vendInvoiceTrans
  on vendInvoicePackingSlipQuantityMatch.InvoiceSourceDocumentLIne = vendInvoiceTrans.SourceDocumentLine
  and vendPackingSlipTrans.ORIGPURCHID='passpurchid'and  vendPackingSlipTrans.DATAAREAID='pass dataareaid'

 

No comments:

Post a Comment

Get enumvalues through sql

 Generally in AOT sometimes we can not see tthe basenum values in properties so here is the query which helps  SELECT     EIT.NAME AS EnumNa...