| | |
| | | { |
| | | this.spanAllMoney.InnerHtml = "¥" + (AllMoney ?? 0).ToString("0.00"); |
| | | this.spanReceiveMoney.InnerHtml = "¥" + (ReceiveMoney ?? 0).ToString("0.00"); |
| | | this.hidReceiveMoney.Value = (ReceiveMoney ?? 0).ToString("0.0000"); |
| | | this.spanCountRe.InnerHtml = "1 单"; |
| | | |
| | | this.txtReciveMoney.Enabled = true; |
| | | this.txtReciveMoney.Text = (ReceiveMoney ?? 0).ToString("0.00"); |
| | | |
| | | this.txtReciveMoney.Value = (ReceiveMoney ?? 0).ToString("0.00"); |
| | | this.txtReciveMoney.Attributes.Add("max", (ReceiveMoney ?? 0).ToString("0.00")); |
| | | |
| | | } |
| | |
| | | { |
| | | this.spanAllMoney.InnerHtml = "¥" + (AllMoney ?? 0).ToString("0.00"); |
| | | this.spanReceiveMoney.InnerHtml = "¥" + ReceiveMoney.Value.ToString("0.00"); |
| | | this.hidReceiveMoney.Value = (ReceiveMoney ?? 0).ToString("0.0000"); |
| | | this.spanCountRe.InnerHtml = Keys.Count().ToString2() + " 单"; |
| | | |
| | | this.txtReciveMoney.Enabled = false; |
| | | this.txtReciveMoney.Text = (ReceiveMoney ?? 0).ToString("0.00"); |
| | | this.txtReciveMoney.Attributes["readonly"] = "readonly"; |
| | | this.txtReciveMoney.Value = (ReceiveMoney ?? 0).ToString("0.00"); |
| | | this.txtReciveMoney.Attributes.Add("max", (ReceiveMoney ?? 0).ToString("0.00")); |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | |
| | | |
| | | string[] Keys = Request["Keyid"].ToString2().Trim('|').Split('|'); |
| | | var molingmoney = this.txtMolingMoney.Value.ToDecimal2(); |
| | | decimal molingmoneyvalue = 0; |
| | | if (molingmoney.HasValue && molingmoney.Value > 0) |
| | | { |
| | | molingmoneyvalue = molingmoney.Value; |
| | | } |
| | | var remoney = this.txtReciveMoney.Value.ToDecimal2(); |
| | | var hidremoney = this.hidReceiveMoney.Value.ToDecimal2(); |
| | | |
| | | if (molingmoney.HasValue && molingmoney.Value > 0) |
| | | { |
| | | if ((remoney + molingmoney.Value) != hidremoney ) |
| | | { |
| | | JavaScript.MessageBox("操作金额加抹零金额必须等于剩余应付金额!", this); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | foreach (var item in Keys) |
| | | { |
| | | if (!string.IsNullOrEmpty(item)) |
| | |
| | | } |
| | | |
| | | int? SubjectId = this.selSubject.Value.ToInt32(); |
| | | |
| | | |
| | | decimal? money = ReceiveMoney; |
| | | if (Request["amount"].ToString2() == "one") |
| | | { |
| | | money = this.txtReciveMoney.Text.ToDecimal2(); |
| | | money = this.txtReciveMoney.Value.ToDecimal2(); |
| | | } |
| | | if (molingmoney.HasValue && molingmoney.Value > 0) |
| | | { |
| | | money = money - molingmoney.Value; |
| | | } |
| | | |
| | | int? AccountIdOut = Request["selAccountNameOut"].ToInt32(); |
| | |
| | | OA_Procurement m_OA_Procurement = bll_OA_ProcurementBLL.SelectSingleModel(item); |
| | | if (m_OA_Procurement != null) |
| | | { |
| | | if (Request["amount"].ToString2() == "one") |
| | | m_OA_Procurement.ReceiveMoney += money; |
| | | else |
| | | m_OA_Procurement.ReceiveMoney = m_OA_Procurement.AllMoney; |
| | | //if (Request["amount"].ToString2() == "one") |
| | | // m_OA_Procurement.ReceiveMoney += money; |
| | | //else |
| | | //{ |
| | | // m_OA_Procurement.ReceiveMoney = m_OA_Procurement.AllMoney; |
| | | //} |
| | | |
| | | if (m_OA_Procurement.ReceiveMoney == m_OA_Procurement.AllMoney) |
| | | m_OA_Procurement.ClearingStatusId = bll_Sys_DictionaryBLL.GetKeyIdByKeyid(1, "结账状态"); |
| | | |
| | | |
| | | m_OA_Procurement.Operator = CurrentUser.ShortName; |
| | | m_OA_Procurement.LastUpdateTime = DateTime.Now; |
| | |
| | | m_OA_FirmAccountRecordOut.RecordTypeId = 2;//支出 |
| | | |
| | | if (Request["amount"].ToString2() == "one") |
| | | { |
| | | m_OA_Procurement.ReceiveMoney += money; |
| | | m_OA_FirmAccountRecordOut.Money = money; |
| | | } |
| | | else |
| | | { |
| | | m_OA_FirmAccountRecordOut.Money = (m_OA_Procurement.AllMoney - m_OA_Procurement.ReceiveMoney); |
| | | m_OA_Procurement.ReceiveMoney = m_OA_Procurement.AllMoney; |
| | | |
| | | |
| | | if (molingmoneyvalue > 0) |
| | | { |
| | | if (m_OA_Procurement.AllMoney.Value >= molingmoneyvalue) |
| | | { |
| | | m_OA_Procurement.ReceiveMoney = m_OA_Procurement.AllMoney.Value - molingmoneyvalue; |
| | | m_OA_FirmAccountRecordOut.Money = m_OA_Procurement.AllMoney.Value - molingmoneyvalue; |
| | | molingmoneyvalue = 0; |
| | | } |
| | | else |
| | | { |
| | | m_OA_Procurement.ReceiveMoney = 0; |
| | | m_OA_FirmAccountRecordOut.Money = 0; |
| | | molingmoneyvalue = molingmoneyvalue - m_OA_Procurement.AllMoney.Value; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (Request["amount"].ToString2() == "one") |
| | | { |
| | | if (molingmoney.HasValue && molingmoney.Value > 0) |
| | | { |
| | | m_OA_Procurement.ClearingStatusId = bll_Sys_DictionaryBLL.GetKeyIdByKeyid(1, "结账状态"); |
| | | } |
| | | else |
| | | { |
| | | if (m_OA_Procurement.ReceiveMoney == m_OA_Procurement.AllMoney) |
| | | m_OA_Procurement.ClearingStatusId = bll_Sys_DictionaryBLL.GetKeyIdByKeyid(1, "结账状态"); |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | m_OA_Procurement.ClearingStatusId = bll_Sys_DictionaryBLL.GetKeyIdByKeyid(1, "结账状态"); |
| | | } |
| | | |
| | | |
| | | |
| | | m_OA_FirmAccountRecordOut.SubjectId = m_OA_SubjectSet.Keyid; |
| | | m_OA_FirmAccountRecordOut.OperationalMatters = "采购付款"; |