Skip to Content
0
Former Member
Nov 20, 2008 at 07:14 PM

Could not commit transaction

42 Views

Hi,

I am creating an approval procedure for SO, checking balance, due inovices and payment terms. The approval should not be trigger when the SO is cash basic. The payment term cash basic has code -1. This is my query. I got the error Could not commit transaction.

What is wrong?

SELECT CASE WHEN T0.Balance+$[$29.0.NUMBER] > T0.CreditLine AND

$[ORDR.GroupNum] <> (-1 ))

OR

(

(SELECT COUNT(*) FROM [dbo].[OINV] T1 WHERE T1.DocDueDate<GetDate() AND T1.DocStatus='O' AND T1.CardCode = $[ORDR.CardCode]) > 0

AND

$[ORDR.GroupNum] <> (-1 )

)

THEN 'TRUE'

ELSE 'FALSE' END

FROM [dbo].[OCRD] T0

WHERE T0.CardCode = $[ORDR.CardCode]

Tks

Adriana