how to skip the loop if same invoice id in purchase register report in ax 2009

Hi Krishna,

I have moved the code before super().

Still its not working…

have you debugged …invoiceIdOld carries any value or empty…

Hi Krishna,

InvoiceIdOld carries as empty only…

I have tried this:

IF (vendInvoiceTrans.LineNum == 1)

{

return vendInvoiceJour::findFromVendInvoiceTrans(vendinvoicetrans.PurchID, vendinvoicetrans.InvoiceId, vendinvoicetrans.InvoiceDate, vendinvoicetrans.numberSequenceGroup, vendinvoicetrans.InternalInvoiceId).InvoiceRoundOff;

}

Else

{

return 0.00;

}

It’s working, but my doubt is will the lineNumber be always start with 1 for all the invoices??

yes,its starts with 1

Hi Krishna,

Then Its fine for me.

the above code is working.

Thanks for ur help krishna and also thanks you martin for ur suggestions.

I hope i will get more help from all of u.