Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   Tools Development (http://www.baanboard.com/baanboard/forumdisplay.php?f=8)
-   -   Displaying data after zoom on session (http://www.baanboard.com/baanboard/showthread.php?t=70338)

kingsley143 11th August 2017 09:21

Displaying data after zoom on session
 
1 Attachment(s)
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       
       
}


VishalMistry 23rd August 2017 10:55

Hi,

Can you check query.extend.where to specify the condition in the following way:

query.extend.where("tablename.cprj = :form.field.cprj",EXTEND_APPEND)
rebuild.query()

Vishal


All times are GMT +2. The time now is 14:55.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com