Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10116

Query for blocking business partners with consolidated accounts

$
0
0

Kindly check on my script below:

 

 

SELECT Distinct 'TRUE' FROM OCRD T0

inner join OCRD t1 on t1.CardCode=t0.FatherCard

WHERE T0.CardCode =$[ORDR.CardCode] AND (t1.[Balance]+$[ORDR.DocTotal])>T1.[CreditLine]

AND ((T1.[Balance]+$[ORDR.DocTotal]) - T1.[CreditLine]) > T1.[CreditLine] *0.2

 

 

I have a business partner with multiple consolidated accounts. How I can I block it when creating sales order. the query should check all balances of all consolidated accounts for this business partners and block its Sales Order when the total balances is greater than the shared credit limit.


Viewing all articles
Browse latest Browse all 10116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>