public static void Process(List <PMProforma> list, bool isMassProcess) { Stopwatch sw = new Stopwatch(); ProformaEntry rg = PXGraph.CreateInstance <ProformaEntry>(); rg.SuppressRowSeleted = true; for (int i = 0; i < list.Count; i++) { try { rg.Document.Current = PXSelect <PMProforma, Where <PMProforma.refNbr, Equal <Required <PMProforma.refNbr> > > > .Select(rg, list[i].RefNbr); rg.CalculateAvalaraTax(rg.Document.Current); PXProcessing <PMProforma> .SetInfo(i, ActionsMessages.RecordProcessed); } catch (Exception e) { if (isMassProcess) { PXProcessing <PMProforma> .SetError(i, e is PXOuterException?e.Message + "\r\n" + String.Join("\r\n", ((PXOuterException)e).InnerMessages) : e.Message); } else { throw new PXMassProcessException(i, e); } } } }
public virtual IEnumerable ViewProforma(PXAdapter adapter) { ProformaEntry target = PXGraph.CreateInstance <ProformaEntry>(); target.Clear(); target.Document.Current = PXSelect <PMProforma, Where <PMProforma.refNbr, Equal <Current <PMTran.proformaRefNbr> > > > .Select(this); throw new PXRedirectRequiredException(target, "Proforma") { Mode = PXBaseRedirectException.WindowMode.NewWindow }; }
public virtual IEnumerable ViewDocumentRef(PXAdapter adapter) { if (Items.Current != null) { ProformaEntry docgraph = PXGraph.CreateInstance <ProformaEntry>(); docgraph.Document.Current = docgraph.Document.Search <PMProforma.refNbr>(Items.Current.RefNbr, Items.Current.ARInvoiceDocType); throw new PXRedirectRequiredException(docgraph, true, "Order") { Mode = PXBaseRedirectException.WindowMode.NewWindow }; } return(adapter.Get()); }
public virtual IEnumerable ViewProforma(PXAdapter adapter) { if (Base.Document.Current != null && Base.Document.Current.ProformaExists == true) { ProformaEntry target = PXGraph.CreateInstance <ProformaEntry>(); target.Document.Current = PXSelect <PMProforma, Where <PMProforma.aRInvoiceDocType, Equal <Current <ARInvoice.docType> >, And <PMProforma.aRInvoiceRefNbr, Equal <Current <ARInvoice.refNbr> >, Or <PMProforma.aRInvoiceRefNbr, Equal <Current <ARInvoice.origRefNbr> > > > > > .Select(Base); throw new PXRedirectRequiredException(target, true, "ViewInvoice") { Mode = PXBaseRedirectException.WindowMode.NewWindow }; } return(adapter.Get()); }