View Single Post
  #1  
Old 11th August 2017, 10:21
kingsley143's Avatar
kingsley143 kingsley143 is offline
Member
 
Join Date: Feb 2008
Location: INDIA
Posts: 34
kingsley143 is on a distinguished road
Baan: Baan LN 6.1 - DB: Microsoft SQL server 2000 - OS: windows server 2003
Displaying data after zoom on session

Hi,

I have developed new maintain session on which input will be project No. and based on that i want to display all the invoice numbers for that project and user will enter RA Bill no. against any invoice no.
In this case, only last invoice is getting displayed. How can I display all the invoices related to project.

Screenshot of session is attached.
Below is my code:

Please help
Code:
field.cprj:
after.input:
	serial.num = serial.num + 1	
	get.details()
	get.contract()
	get.invoice.number()
	sern = serial.num
	serial.num = 0


function get.invoice.number()
{
	select	cisli310.*
	from	cisli310
	where	cisli310.cprj = {:cprj}
	selectdo
		invn = cisli310.tran&(str$(cisli310.idoc))
		display.curr.occ()
		select	cisli305.*
		from	cisli305
		where	cisli305._index1 = {:cisli310.sfcp,:cisli310.tran,:cisli310.idoc}
		selectdo
			if cisli305.stat = tcsli.stat.posted then
				flag = true
			endif
			bdte = cisli305.idat
		selectempty
			bdte = 0
		endselect	
	selectempty
		invn = ""
		bdte = 0
		serial.num = 0
		sern = 0
	endselect	
	
}
Attached Images
File Type: png Invoice_no.PNG (21.0 KB, 9 views)

Last edited by mark_h : 11th August 2017 at 22:47. Reason: add code tags
Reply With Quote