Thursday, 18 April 2019

Dates in SAP Business One

For transactional recording needs, SAP Business One provides 3 different dates:
  • Posting Date.
    This date is use to post the transaction journal to general ledger. For example, when we create Delivery for items, the document will create a journal entry at posting date that will affect Inventory GL Account and COGS GL Account.
  • Document Date.
    This date is use as information when the document was created. In A/P Invoice, you can use this date to record when the invoice was originally created / sent by the vendor.
  • Due Date.
    In Sales Order and Purchase Order, this date will be shown as delivery date, used to indicate the delivery time. But in Invoice documents, this date is use to indicate the payment due date.

Daily Use Querry

No Transactions for Vendor in a Report

SELECT T0.CardCode, T0.CardName
FROM ocrd T0
WHERE T0.CardType= 'S' and T0.CardCode NOT IN (SELECT cardcode FROM OPOR WHERE DateDiff(dd,docdate,GetDate()) < 180)


Want query for ,All suppliers that have had NO transactions

 

SELECT T0.[CardCode], T0.[CardName], sum(T1.[Debit] - T1.[Credit]) FROM OCRD T0 left join JDT1 T1 on  T1.[ShortName]  = T0.cardcode WHERE T0.[CardType] = 'S' and  T1.[RefDate] >= [%0] GROUP BY T0.[CardCode], T0.[CardName] having sum(T1.[Debit] - T1.[Credit]) = '0'

 T0.[GroupCode]