Exemplo n.º 1
0
        private void SetCostCode()
        {
            var transactionCostCodeId =
                LienWaiverTransactionRetriever.GetTransactions(generationKey).SingleOrNull()?.CostCodeID;
            var costCodes = BudgetedCostCodeDataProvider.GetBudgetedCostCodes(Graph, generationKey.ProjectId,
                                                                              lienWaiver.CostTaskID ?? lienWaiver.RevenueTaskID);

            lienWaiver.CostCodeID = costCodes.FirstOrDefault(cc => cc.CostCodeID == transactionCostCodeId)?.CostCodeID;
        }
Exemplo n.º 2
0
        private void SetCostTask()
        {
            var transactionTaskId =
                LienWaiverTransactionRetriever.GetTransactions(generationKey).SingleOrNull()?.TaskID;
            var costTasks     = ProjectTaskDataProvider.GetProjectTasks <ProjectTaskType.cost>(Graph, generationKey.ProjectId);
            var combinedTasks =
                ProjectTaskDataProvider.GetProjectTasks <ProjectTaskType.costRevenue>(Graph, generationKey.ProjectId);
            var tasks = costTasks.Concat(combinedTasks);

            lienWaiver.CostTaskID = tasks.FirstOrDefault(t => t.TaskID == transactionTaskId)?.TaskID;
        }
Exemplo n.º 3
0
        private void SetTransactionDependentFields(APPayment payment, ComplianceAttribute complianceAttribute)
        {
            var transactions = LienWaiverTransactionRetriever.GetTransactions(generationKey).ToList();

            SetBillId(transactions);
            lienWaiver.LienWaiverAmount = GetLienWaiverAmount(transactions, complianceAttribute.Value);
            SetLienNoticeAmount();
            SetAccountId(transactions);
            ComplianceDocumentRefNoteAttribute.SetComplianceDocumentReference <ComplianceDocument.apCheckId>(
                Cache, lienWaiver, payment.DocType, payment.RefNbr, payment.NoteID);
            lienWaiver.PaymentDate = payment.AdjDate;
            lienWaiver.ThroughDate = GetThroughDate(complianceAttribute.Value, payment, transactions);
            lienWaiver.SourceType  = ComplianceDocumentSourceTypeAttribute.ApBill;
        }