| | |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | var cooperOrderDTO = _cooperOrderService.Get(id); |
| | | ViewData["Chedanid"] = id; |
| | | |
| | | ViewData["Money"] = cooperOrderDTO.Money.Value.ToString(); |
| | | |
| | | |
| | | return View(); |
| | | } |
| | | [CheckLogin] |
| | | public IActionResult chedantuihuan(string Chedanid, decimal Price=0) |
| | | public IActionResult chedantuihuan(string Chedanid, decimal Price=0,string Chedanyuany="") |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | |
| | | dto.ChedanStatus = "A"; |
| | | dto.Chedan = Price; |
| | | dto.ShouliStatus = "0"; |
| | | |
| | | if (!string.IsNullOrWhiteSpace(Chedanyuany)) |
| | | dto.Remark += " " + Chedanyuany; |
| | | resultEntity = _cooperOrderService.chedan(dto); |
| | | |
| | | |
| | |
| | | if (fiAccountRecordDTOs!= null && fiAccountRecordDTOs.Count > 0) |
| | | { |
| | | var sysCodeDtls = _liaotianService.GetSYScode("CooperVisit", "jtype"); |
| | | foreach (var fiAccountRecordDTO in fiAccountRecordDTOs) |
| | | { |
| | | //foreach (var fiAccountRecordDTO in fiAccountRecordDTOs) |
| | | //{ |
| | | |
| | | CooperatecustomCustomerDTO cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(dto.Khdw); |
| | | FiAccountRecordDTO data1 = new FiAccountRecordDTO(); |
| | |
| | | data1.Createtime = DateTime.Now; |
| | | data1.Modifier = curentuser.Id; |
| | | data1.Modifytime = DateTime.Now; |
| | | data1.SubjectId = fiAccountRecordDTO.SubjectId; |
| | | data1.SubjectId = fiAccountRecordDTOs[0].SubjectId; |
| | | |
| | | data1.AccountId = fiAccountRecordDTO.AccountId; |
| | | data1.Money = -fiAccountRecordDTO.Money; |
| | | data1.AccountId = fiAccountRecordDTOs[0].AccountId; |
| | | data1.Money = Price; |
| | | data1.PaymentUnit = cooperatecustomCustomerDTO.Name; |
| | | var ssss = sysCodeDtls.Where(x => x.CodeSn == dto.OrderType).FirstOrDefault(); |
| | | if (ssss!=null) |
| | |
| | | FiAccountDTO firmAccount = _fiAccountService.Get(data1.AccountId); |
| | | |
| | | |
| | | data1.RecordTypeId = "1";//退款 |
| | | data1.RecordTypeId = "2";//退款 |
| | | data1.Department = ""; |
| | | |
| | | |
| | | |
| | | firmAccount.AllIncome = (firmAccount.AllIncome ?? 0) - fiAccountRecordDTO.Money; |
| | | firmAccount.Balance = (firmAccount.Balance ?? 0) - fiAccountRecordDTO.Money; |
| | | firmAccount.AllIncome = (firmAccount.AllIncome ?? 0) - Price; |
| | | firmAccount.Balance = (firmAccount.Balance ?? 0) - Price; |
| | | |
| | | data1.AccountMoney = firmAccount.Balance; |
| | | resultEntity = _iFiAccountRecordService.save(data1); |
| | | resultEntity = _fiAccountService.save(firmAccount); |
| | | } |
| | | //} |
| | | } |
| | | scope.Complete(); |
| | | } |