private bool IsPaymentCycleWorkflow(IDocumentKey invoice) { var allRelatedBills = InvoiceDataProvider.GetAllBillsFromRetainageGroup(Base, invoice.RefNbr, invoice.DocType); return(allRelatedBills.Any(inv => JointPayeePaymentDataProvider.DoesAnyNonReleasedJointPayeePaymentExist(Base, inv))); }
public void ClosePaymentCycleWorkflowIfNeeded(APAdjust adjustment) { var invoice = InvoiceDataProvider.GetInvoice(graph, adjustment.AdjdDocType, adjustment.AdjdRefNbr); if (!JointPayeePaymentDataProvider.DoesAnyNonReleasedJointPayeePaymentExist(graph, invoice)) { UpdateIsPaymentCycleWorkflow(invoice, false); } }
public IEnumerable PayInvoice(PXAdapter adapter, Func <PXAdapter, IEnumerable> baseMethod) { InvoiceExtension.IsPaymentCycleWorkflow = JointPayeePaymentDataProvider .DoesAnyNonReleasedJointPayeePaymentExist(Base, Base.Document.Current); if (!IsPayInvoiceAvailable()) { return(adapter.Get()); } lienWaiverWarningDialogService.ShowWarningIfNeeded(); if (InvoiceExtension.IsJointPayees == false) { return(PayBillWithoutJointPayees(adapter, baseMethod)); } PayBillWithJointPayees(); return(adapter.Get()); }