cancel
Showing results for 
Search instead for 
Did you mean: 

adding bp balance in following query

Former Member
0 Kudos

hello sir,

u given me good solution but we want to add two rows in following query

1. business parner closing balance

2. checks on account amount.

select

DocNum, CardCode, CardName, DocDate, DocDueDate

from

OINV

where

datediff(dd, DocDueDate, getdate()) >= 0

and CANCELED = 'N'

and PaidToDate < DocTotal

regards ,

Accepted Solutions (1)

Accepted Solutions (1)

former_member201110
Active Contributor
0 Kudos

Hi,

Here's the query with the BP account balance added. I'm not sure what you mean by the 'checks on account amount'. Please clarify.

select 
	T0.DocNum, T0.CardCode, T0.CardName, 
	T0.DocDate, T0.DocDueDate, T1.Balance
from 
	OINV T0
	inner join OCRD T1 on T0.CardCode = T1.CardCode
where 
	datediff(dd, T0.DocDueDate, getdate()) >= 0 
	and T0.CANCELED = 'N'
	and T0.PaidToDate < T0.DocTotal 

Kind Regards,

Owen

Answers (0)