public ContractPaymentModel preparePaymentbyContractAcceptanceSub(ContractAcceptanceSub acceptanceSub)
        {
            var model = new ContractPaymentModel();

            model.Amount       = acceptanceSub.TotalAmount.GetValueOrDefault(0).ToVNStringNumber();
            model.TaskId       = acceptanceSub.TaskId.GetValueOrDefault();
            model.TaskName     = acceptanceSub.task.Name;
            model.ContractName = acceptanceSub.task.contract.Name;
            return(model);
        }
        public ContractPaymentModel preparePaymentbyContractAcceptance(ContractAcceptance Accep)
        {
            var model = new ContractPaymentModel();

            model.Amount = (Accep.TotalAmount.GetValueOrDefault(0) * Accep.Ratio.GetValueOrDefault(0)).ToVNStringNumber();
            var map = _contractService.GetAllContractAcceptanceTaskMapping(AcepptanceId: Accep.Id).FirstOrDefault();

            model.TaskId       = map.task.Id;
            model.TaskName     = map.task.Name;
            model.ContractName = map.task.contract.Name;
            return(model);
        }