Solved

Retrieve Detail Total value from Invoices tab

  • 14 January 2022
  • 2 replies
  • 44 views

Userlevel 4
Badge +2

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 ?                                  

icon

Best answer by Naveen Boga 14 January 2022, 17:17

View original

2 replies

Userlevel 7
Badge +17

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;
}


}

 

Userlevel 4
Badge +2

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved