Skip to main content
Solved

Retrieve Detail Total value from Invoices tab


Forum|alt.badge.img+2
  • Varsity I
  • 283 replies

Hi, 

I am trying to extract the value from Invoice  as it shown at screen 

But I need to take into account Reference Nbr of invoice from “Documents To Apply Tab”

So, I am going throw rows in Payment event which is called when user saves the Payment

  foreach (PXResult<AR.ARAdjust, AR.ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow in Base.Adjustments.Select())
                                {
                                    AR.ARAdjust _ARAdjust = gridRow;
                                    AR.ARInvoice _ARInvoice = gridRow;
                                 }

 But how to call necessary Invoice from this place ?                                  

Best answer by Naveen Boga

Hi @Ivan Please find the code below to fetch the Detail Total.

 foreach (PXResult<ARAdjust, ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow in Base.Adjustments.Select())
            {
                ARAdjust _ARAdjust = gridRow;
                ARInvoice _ARInvoice = gridRow;

                 ARInvoice objARInvoice = PXSelect<ARInvoice, Where<ARInvoice.refNbr, Equal<Required<ARInvoice.refNbr>>>>.Select(Base,_ARAdjust.AdjdRefNbr);
                if (objARInvoice != null)
                {
                    var invoiceDetailTotal = objARInvoice.CuryLineTotal;
                }


            }

 

View original
Did this topic help you find an answer to your question?

2 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3404 replies
  • Answer
  • January 14, 2022

Hi @Ivan Please find the code below to fetch the Detail Total.

 foreach (PXResult<ARAdjust, ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow in Base.Adjustments.Select())
            {
                ARAdjust _ARAdjust = gridRow;
                ARInvoice _ARInvoice = gridRow;

                 ARInvoice objARInvoice = PXSelect<ARInvoice, Where<ARInvoice.refNbr, Equal<Required<ARInvoice.refNbr>>>>.Select(Base,_ARAdjust.AdjdRefNbr);
                if (objARInvoice != null)
                {
                    var invoiceDetailTotal = objARInvoice.CuryLineTotal;
                }


            }

 


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • January 14, 2022
Naveen B wrote:

Hi @Ivan Please find the code below to fetch the Detail Total.

 foreach (PXResult<ARAdjust, ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow in Base.Adjustments.Select())
            {
                ARAdjust _ARAdjust = gridRow;
                ARInvoice _ARInvoice = gridRow;

                 ARInvoice objARInvoice = PXSelect<ARInvoice, Where<ARInvoice.refNbr, Equal<Required<ARInvoice.refNbr>>>>.Select(Base,_ARAdjust.AdjdRefNbr);
                if (objARInvoice != null)
                {
                    var invoiceDetailTotal = objARInvoice.CuryLineTotal;
                }


            }

 

Thanks a lot for your assistance 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings