private bool DoesAnyOutstandingComplianceExistForPrimaryVendor() { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(graph); return(lienWaiverDataProvider.DoesAnyOutstandingComplianceExistForPrimaryVendor( graph.Document.Current.VendorID, projectIds)); }
public void ValidateVendorAndJointPayees(PXCache cache, APAdjust adjustment, List <JointPayee> jointPayees) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(adjustment, cache.Graph).ToList(); var doesAnyOutstandingComplianceExistForJointVendors = jointPayees.Any(jp => lienWaiverDataProvider.DoesAnyOutstandingComplianceExistForJointVendor(jp, projectIds)); var outstandingCompliances = lienWaiverDataProvider .GetOutstandingCompliancesForPrimaryVendor(adjustment.VendorID, projectIds).ToList(); if (outstandingCompliances.Any() && doesAnyOutstandingComplianceExistForJointVendors) { ValidateVendorAndJointPayees(cache, jointPayees, adjustment, projectIds, outstandingCompliances); } else if (outstandingCompliances.Any()) { ValidatePrimaryVendor(cache, adjustment, projectIds, outstandingCompliances); } else if (doesAnyOutstandingComplianceExistForJointVendors) { jointPayees.ForEach(jp => ValidateJointPayee(cache, jp, adjustment, projectIds)); } else { cache.ClearFieldErrors <APAdjust.adjdLineNbr>(adjustment); } }
private bool AreThereAnyOutstandingLienWaivers(JointPayee jointPayee) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(Graph, jointPayee); return(LienWaiverDataProvider.DoesAnyOutstandingComplianceExistForJointVendor( jointPayee.JointPayeeInternalId, projectIds)); }
private void CheckPaymentForOutstandingLienWaivers(APRegister document) { var adjustments = AdjustmentDataProvider.GetPaymentAdjustments(graph, document.RefNbr, document.DocType).ToList(); var projectIds = LienWaiverProjectDataProvider.GetProjectIds(graph, adjustments).ToList(); CheckPrimaryVendorForOutstandingLienWaivers(document, projectIds); adjustments.ForEach(adjust => CheckJointVendorsForOutstandingLienWaivers(adjust, projectIds)); }
private bool DoesAnyOutstandingLienWaiverExist(APAdjust adjustment) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(adjustment, Base).ToList(); return(lienWaiverDataProvider .DoesAnyOutstandingComplianceExistForPrimaryVendor(adjustment.VendorID, projectIds) || DoesAnyOutstandingLienWaiverExistForJointPayees(adjustment, projectIds)); }
protected virtual void _(Events.RowSelected <JointPayee> args) { var jointPayee = args.Row; if (jointPayee != null && LienWaiverSetup.Current.ShouldWarnOnBillEntry == true) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(Base, jointPayee); lienWaiverValidationService.ValidateJointPayee(args.Cache, jointPayee, projectIds.ToList(), ComplianceMessages.LienWaiver.JointPayeeHasOutstandingLienWaiver); } }
protected virtual void _(Events.RowSelected <APInvoice> args) { var invoice = args.Row; if (invoice != null && LienWaiverSetup.Current.ShouldWarnOnBillEntry == true) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(Base); lienWaiverValidationService.ValidatePrimaryVendor <APInvoice.vendorID>(args.Cache, invoice, invoice.VendorID, projectIds, ComplianceMessages.LienWaiver.VendorHasOutstandingLienWaiver); } }
protected virtual void _(Events.RowSelected <JointPayeePayment> args) { var jointPayeePayment = args.Row; if (jointPayeePayment?.JointAmountToPay > 0 && LienWaiverSetup.Current.ShouldWarnOnPayment == true && Base.Document.Current != null && !IsCheckReleasedOrVoided()) { var jointPayees = Base1.JointPayeePayments.Select <JointPayee>() .Where(jp => jp.JointPayeeId == jointPayeePayment.JointPayeeId).ToList(); var adjustment = Base.Adjustments.SelectMain().Single(adj => adj.AdjdDocType == jointPayeePayment.InvoiceDocType && adj.AdjdRefNbr == jointPayeePayment.InvoiceRefNbr && adj.AdjdLineNbr == jointPayeePayment.BillLineNumber); var projectIds = LienWaiverProjectDataProvider.GetProjectIds(adjustment, Base).ToList(); jointPayees.ForEach(jp => lienWaiverValidationService.ValidateJointPayee(Base.Caches <JointPayee>(), jp, projectIds, ComplianceMessages.LienWaiver.JointPayeeHasOutstandingLienWaiver)); } }
private bool DoesAnyOutstandingComplianceExistForJointCheck(JointPayee jointPayee) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(graph, jointPayee).ToList(); return(lienWaiverDataProvider.DoesAnyOutstandingComplianceExistForJointVendor(jointPayee, projectIds)); }