public void ValidateJointPayee(PXCache cache, JointPayee jointPayee, List <int?> projectIds, string message, PXErrorLevel errorLevel = PXErrorLevel.Warning) { if (jointPayee.JointPayeeExternalName == null || jointPayee.JointPayeeInternalId == null) { var doesAnyOutstandingComplianceExist = lienWaiverDataProvider .DoesAnyOutstandingComplianceExistForJointVendor(jointPayee.JointPayeeInternalId, projectIds); SetWarningIfNeeded <JointPayee.jointPayeeInternalId>(cache, jointPayee, message, doesAnyOutstandingComplianceExist, errorLevel); doesAnyOutstandingComplianceExist = lienWaiverDataProvider .DoesAnyOutstandingComplianceExistForJointVendor(jointPayee.JointPayeeExternalName, projectIds); SetWarningIfNeeded <JointPayee.jointPayeeExternalName>(cache, jointPayee, message, doesAnyOutstandingComplianceExist, errorLevel); } }
private bool AreThereAnyOutstandingLienWaivers(JointPayee jointPayee) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(Graph, jointPayee); return(LienWaiverDataProvider.DoesAnyOutstandingComplianceExistForJointVendor( jointPayee.JointPayeeInternalId, projectIds)); }
private bool DoesAnyOutstandingLienWaiverExistForJointPayees(APAdjust adjustment, List <int?> projectsIds) { var jointPayeePayments = JointPayeePaymentDataProvider.GetJointPayeePayments(Base, adjustment.AdjdRefNbr, adjustment.AdjdDocType, adjustment.AdjdLineNbr); var jointPayees = JointPayeeDataProvider.GetJointPayees(Base, jointPayeePayments, adjustment.AdjdLineNbr); return(jointPayees.Any(jp => lienWaiverDataProvider .DoesAnyOutstandingComplianceExistForJointVendor(jp, projectsIds))); }
private void CheckJointVendorsForOutstandingLienWaivers(APAdjust adjustment, List <int?> projectIds) { var jointPayeePayments = JointPayeePaymentDataProvider.GetJointPayeePayments(graph, adjustment) .Where(jpp => jpp.JointAmountToPay > 0); var jointPayees = JointPayeeDataProvider.GetJointPayees(graph, jointPayeePayments); if (jointPayees.Any(jp => lienWaiverDataProvider.DoesAnyOutstandingComplianceExistForJointVendor(jp, projectIds))) { throw new PXException(exceptionMessage); } }
private bool DoesAnyOutstandingComplianceExistForJointCheck(JointPayee jointPayee) { var projectIds = LienWaiverProjectDataProvider.GetProjectIds(graph, jointPayee).ToList(); return(lienWaiverDataProvider.DoesAnyOutstandingComplianceExistForJointVendor(jointPayee, projectIds)); }