public virtual void ReverseInvoiceProc(ARRegister doc, ReverseInvoiceProcDelegate baseMethod) { baseMethod(doc); Base.Document.SetValueExt <ARInvoiceRUTROT.isRUTROTDeductible>(Base.Document.Current, false); foreach (ARTran tran in Base.Transactions.Select()) { Base.Transactions.SetValueExt <ARTranRUTROT.isRUTROTDeductible>(tran, false); } }
public virtual void ReverseInvoiceProc(ARRegister doc, ReverseInvoiceProcDelegate baseMethod) { baseMethod(doc); ARInvoice reverce_invoice = Base.Document.Current; foreach (RUTROTDistribution rutrotDetail in PXSelect <RUTROTDistribution, Where <RUTROTDistribution.docType, Equal <Required <ARRegister.docType> >, And <RUTROTDistribution.refNbr, Equal <Required <ARRegister.refNbr> > > > > .Select(Base, doc.DocType, doc.RefNbr)) { RUTROTDistribution new_detail = (RUTROTDistribution)Base.RRDistribution.Cache.CreateCopy(rutrotDetail); new_detail.RefNbr = reverce_invoice.RefNbr; new_detail.DocType = reverce_invoice.DocType; Base.RRDistribution.Insert(new_detail); } }