public ActionResult All_GetUnit_Amount(Remit_WithdrawalRepo WithdrawalRepo) { try { if (WithdrawalRepo.Unit_Price == 0) { WithdrawalRepo.Unit_Price = 1; this.GetCmp <TextField>("Employee_PortInPartial_TotalPortIn_Display").SetValue(WithdrawalRepo.Employee_Amount / WithdrawalRepo.Unit_Price); this.GetCmp <TextField>("Employer_PortInPartial_TotalPortIn_Display").SetValue(WithdrawalRepo.Employer_Amount / WithdrawalRepo.Unit_Price); } else { this.GetCmp <TextField>("Employee_PortInPartial_TotalPortIn_Display").SetValue(WithdrawalRepo.Employee_Amount / WithdrawalRepo.Unit_Price); this.GetCmp <TextField>("Employer_PortInPartial_TotalPortIn_Display").SetValue(WithdrawalRepo.Employer_Amount / WithdrawalRepo.Unit_Price); } return(this.Direct()); } catch (Exception ex) { throw ex; } finally { } }
public ActionResult ApproveRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (WithdrawalRepo.PortOut_No == string.Empty) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! No record has been selected for approval.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); ///approve pending withdrawal WithdrawalRepo.Approve_Unit_PortOut(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Porting Out Successfully Approved.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); //ClearControls_Approve(); //Store store = X.GetCmp<Store>("ApproveRequestPortOutStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "PortOutApprovePartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } catch (Exception ex) { throw ex; } }
// Get Accrued Benefit for reversal public ActionResult GetUPriceReverse(Remit_WithdrawalRepo WithdrawalRepo) { try { this.GetCmp <TextField>("PortOutReverse_TotalB").SetValue(WithdrawalRepo.Unit_Price * WithdrawalRepo.Total_Unit_Balance); return(this.Direct()); } catch (Exception ex) { throw ex; } finally { } }
public ActionResult GetUPriceApprove(Remit_WithdrawalRepo WithdrawalRepo) { try { WithdrawalRepo.Get_UnitPrice(WithdrawalRepo); this.GetCmp <TextField>("WithdrawalApprove_TotalB").SetValue(WithdrawalRepo.Unit_Price * (WithdrawalRepo.Employee_Unit_Balance + WithdrawalRepo.Employer_Unit_Balance)); return(this.Direct()); } catch (Exception ex) { throw ex; } finally { } }
// Get Accrued Benefit public ActionResult GetUPricePay(Remit_WithdrawalRepo WithdrawalRepo) { try { //WithdrawalRepo.Get_UnitPrice(WithdrawalRepo); //this.GetCmp<TextField>("WithdrawalP_UnitP").SetValue(WithdrawalRepo.Unit_Price); this.GetCmp <TextField>("Withdrawal_TotalB").SetValue(WithdrawalRepo.Unit_Price * WithdrawalRepo.Total_Unit_Balance); this.GetCmp <TextField>("WithdrawalPartial_TotalWithdrawal_Display").SetValue(WithdrawalRepo.Total_Withdrawal_Temp * WithdrawalRepo.Unit_Price); return(this.Direct()); } catch (Exception ex) { throw ex; } finally { } }
public ActionResult GetUnit_Amount(Remit_WithdrawalRepo WithdrawalRepo) { try { //if (WithdrawalRepo.Type == "AMOUNT") //{ // this.GetCmp<TextField>("WithdrawalPartial_TotalWithdrawal_Display").SetValue(WithdrawalRepo.Total_Withdrawal_Temp / WithdrawalRepo.Unit_Price); //} //else { this.GetCmp <TextField>("WithdrawalPartial_TotalWithdrawal_Display").SetValue(WithdrawalRepo.Total_Withdrawal_Temp * WithdrawalRepo.Unit_Price); } return(this.Direct()); } catch (Exception ex) { throw ex; } finally { } }
public ActionResult PayTaxRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (string.IsNullOrEmpty(WithdrawalRepo.Withdrawal_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! No Benefit has been selected for Payment.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.GL_Account_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Please select Bank Account.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } WithdrawalRepo.GetESFList(WithdrawalRepo.ESF_Id); //get GL balance from GL_Account Table WithdrawalRepo.Get_GL_Balance(WithdrawalRepo); if (WithdrawalRepo.Tax > WithdrawalRepo.GL_Balance * -1) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! Insufficient Account Balance.Process aborted.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.Payment_Mode)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Payment Mode is required", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } //if (WithdrawalRepo.Payment_Mode != "CASH" && string.IsNullOrEmpty(WithdrawalRepo.Instrument_No)) //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Instrument Numebr is required.", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); // return this.Direct(); //} if (!WithdrawalRepo.Pay_Date_Benefit.HasValue) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Payment Date is required", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } // validate scheme date if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) { GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); if (WithdrawalRepo.Pay_Date_Benefit != GlobalValue.Scheme_Today_Date) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! Payment date must be equal to scheme working date ", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } } else { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Employee account cannot be verified.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); } ///pay pending tax WithdrawalRepo.PayTax_Unit_Withdrawal(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Benefit Tax Successfully Paid.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); //ClearControls_PayTax(); //Store store = X.GetCmp<Store>("PayTaxRequestWithStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "WithdrawalPayTaxPartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } catch (Exception ex) { throw ex; } }
//Reverse benefit payment public ActionResult ReversePayRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (string.IsNullOrEmpty(WithdrawalRepo.Withdrawal_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! No Benefit has been selected for reversal.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.Reverse_Reason)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Please enter Reason for Reversal. Process aborted", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } //// validate scheme date //if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) //{ GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); // if (WithdrawalRepo.Pay_Date_Benefit != GlobalValue.Scheme_Today_Date) // { // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Sorry! This transaction can not be reversed. Process aborted", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); // return this.Direct(); // } //} //else //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Employee account cannot be verified.", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); //} WithdrawalRepo.Reverse_Unit_Withdrawal(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Benefit Paid Successfully Reversed.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); //ClearControls_Reverse(); //Store store = X.GetCmp<Store>("ReverseRequestWithStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "WithdrawalReversePartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } catch (Exception ex) { throw ex; } }
public ActionResult DApproveRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (WithdrawalRepo.Withdrawal_No == string.Empty) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! No Request has been selected for approval.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } WithdrawalRepo.GetESFList(WithdrawalRepo.ESF_Id); //WithdrawalRepo.Total_Withdrawal_Unit = Math.Round(WithdrawalRepo.Total_Withdrawal_Unit, 4); //WithdrawalRepo.Total_Unit_Balance = Math.Round(WithdrawalRepo.Total_Unit_Balance, 4); //if (WithdrawalRepo.Total_Withdrawal_Unit > WithdrawalRepo.Total_Unit_Balance) //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Sorry!Total Withdrawal(Unit) can not be more than Total Unit.", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); // return this.Direct(); //} ///approve pending withdrawal WithdrawalRepo.DApprove_Unit_Withdrawal(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Benefit Request Successfully Disapproved.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); //ClearControls_Approve(); //Store store = X.GetCmp<Store>("ApproveRequestWithStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "WithdrawalApprovePartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MianArea").SetLastTabAsActive(); return(pvr); } catch (Exception ex) { throw ex; } }
//public ActionResult AddReversePurchaseTab(string containerId = "MainArea") //{ // var pvr = new Ext.Net.MVC.PartialViewResult // { // ViewName = "ReversePurchasePartial", // ContainerId = containerId, // RenderMode = RenderMode.AddTo, // }; // this.GetCmp<TabPanel>(containerId).SetLastTabAsActive(); // return pvr; //} public ActionResult SaveRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (!WithdrawalRepo.Trans_Request_Date.HasValue) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Actual Request Date is a required field", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } //if (string.IsNullOrEmpty(WithdrawalRepo.Type)) //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "'Amount / Unit' is a required field", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); // return this.Direct(); //} if (string.IsNullOrEmpty(WithdrawalRepo.Withdrawal_Reason)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Withdrawal Reason is a required field", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } //check if unit will move to employer if (this.GetCmp <Checkbox>("frmWD_Suspense").Checked == true) { WithdrawalRepo.Total_Withdrawal_Amount = Math.Round(WithdrawalRepo.Total_Withdrawal_Temp * WithdrawalRepo.Unit_Price, 2); WithdrawalRepo.Total_Withdrawal_Unit = WithdrawalRepo.Total_Withdrawal_Temp; WithdrawalRepo.To_Employer = Math.Round(WithdrawalRepo.Total_Unit_Balance - WithdrawalRepo.Total_Withdrawal_Unit, 4); } else { WithdrawalRepo.Total_Withdrawal_Amount = Math.Round(WithdrawalRepo.Total_Withdrawal_Temp * WithdrawalRepo.Unit_Price, 2); WithdrawalRepo.Total_Withdrawal_Unit = WithdrawalRepo.Total_Withdrawal_Temp; WithdrawalRepo.To_Employer = 0; } // check if there is a pending request for the employee scheme fund if (WithdrawalRepo.GetcheckESFList(WithdrawalRepo) == true) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! There is already a pending request for the Employee Account", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } // validate scheme date if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) { GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); if (WithdrawalRepo.Trans_Request_Date > GlobalValue.Scheme_Today_Date) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! Request date can not be above the scheme working date ", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } } else { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Employee account cannot be verified.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); } WithdrawalRepo.GetESFList(WithdrawalRepo.ESF_Id); WithdrawalRepo.Total_Withdrawal_Unit = Math.Round(WithdrawalRepo.Total_Withdrawal_Unit, 4); WithdrawalRepo.Total_Unit_Balance = Math.Round(WithdrawalRepo.Total_Unit_Balance, 4); if (WithdrawalRepo.Total_Withdrawal_Unit > WithdrawalRepo.Total_Unit_Balance) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry!Total Withdrawal(Unit) can not be more than Total Unit", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } if (ModelState.IsValid) { this.WithdrawalRepo.SaveRecord(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Withdrawal Successfully Processed.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); // ClearControls(); //Store store = X.GetCmp<Store>("WithdrawalESFStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "WithdrawalPartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } else { string messages = string.Join(Environment.NewLine, ModelState.Values .SelectMany(x => x.Errors) .Select(x => x.ErrorMessage)); X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = messages, // " Insufficient data. Operation Aborted", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } } catch (Exception ex) { throw ex; } }
//public ActionResult AddReversePurchaseTab(string containerId = "MainArea") //{ // var pvr = new Ext.Net.MVC.PartialViewResult // { // ViewName = "ReversePurchasePartial", // ContainerId = containerId, // RenderMode = RenderMode.AddTo, // }; // this.GetCmp<TabPanel>(containerId).SetLastTabAsActive(); // return pvr; //} public ActionResult SaveRecord(Remit_WithdrawalRepo WithdrawalRepo, Remit_ReceiptRepo ReceiptRepo) { try { if (string.IsNullOrEmpty(ReceiptRepo.ES_Id)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Please select Employer Account", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.GL_Account_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Please select Bank Account", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } if (!WithdrawalRepo.Trans_Request_Date.HasValue) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Actual Request Date is a required field", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.Withdrawal_Reason)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Withdrawal Reason is a required field", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } // check if there is a pending request for the employee scheme fund if (WithdrawalRepo.GetcheckESFListEmp(WithdrawalRepo) == true) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! There is already a pending request for the Employee Account", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } // validate scheme date if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) { GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); if (WithdrawalRepo.Trans_Request_Date != GlobalValue.Scheme_Today_Date) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! Request date must be equal to scheme working date ", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } } else { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Employee account cannot be verified.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); } ////get GL balance from GL_Account Table //WithdrawalRepo.Get_GL_Balance(WithdrawalRepo); //if (WithdrawalRepo.Total_Withdrawal_Amount > WithdrawalRepo.GL_Balance * -1) //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Sorry! Insufficient Account Balance.Process aborted.", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.ERROR, // Width = 350 // }); // return this.Direct(); //} WithdrawalRepo.GetESFList(WithdrawalRepo.ESF_Id); WithdrawalRepo.Total_Withdrawal_Unit = Math.Round(WithdrawalRepo.Total_Withdrawal_Unit, 4); WithdrawalRepo.Total_Unit_Balance = Math.Round(WithdrawalRepo.Total_Unit_Balance, 4); if (WithdrawalRepo.Total_Withdrawal_Unit > WithdrawalRepo.Total_Unit_Balance) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry!Total Withdrawal(Unit) can not be more than Total Unit", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } //if (ModelState.IsValid) //{ this.WithdrawalRepo.SaveRecord_TE(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Benefit Transfer Successfully Processed.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); // ClearControls(); //Store store = X.GetCmp<Store>("WithdrawalESFStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "WithdrawalPartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); //} //else //{ // string messages = string.Join(Environment.NewLine, ModelState.Values // .SelectMany(x => x.Errors) // .Select(x => x.ErrorMessage)); // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = messages, // " Insufficient data. Operation Aborted", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.ERROR, // Width = 350 // }); // return this.Direct(); //} } catch (Exception ex) { throw ex; } }
public ActionResult ReverseRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (WithdrawalRepo.Withdrawal_No == string.Empty) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! No Port In has been selected for reversal.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.Reverse_Reason)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Reversal Reason is required.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } WithdrawalRepo.GetESFList(WithdrawalRepo.ESF_Id); GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); //// validate scheme date //if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) //{ // GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); // if (WithdrawalRepo.Trans_Date != GlobalValue.Scheme_Today_Date) // { // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Sorry! This transaction can not be reversed. Process aborted", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); // return this.Direct(); // } //} //else //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Employee account cannot be verified.", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); //} ///reverse port in WithdrawalRepo.Reverse_Unit_PortIn(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Porting In Successfully Reversed.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "PortInReversePartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } catch (Exception ex) { throw ex; } }
//public ActionResult AddReversePurchaseTab(string containerId = "MainArea") //{ // var pvr = new Ext.Net.MVC.PartialViewResult // { // ViewName = "ReversePurchasePartial", // ContainerId = containerId, // RenderMode = RenderMode.AddTo, // }; // this.GetCmp<TabPanel>(containerId).SetLastTabAsActive(); // return pvr; //} public ActionResult SaveRecord_Port(Remit_WithdrawalRepo WithdrawalRepo) { try { if ((WithdrawalRepo.Employee_Amount + WithdrawalRepo.Employee_Amount) <= 0) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Total port-in amount must be more than 0", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } if (!WithdrawalRepo.Trans_Date.HasValue) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry!Invalid Date", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } // validate scheme date if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) { GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); if (WithdrawalRepo.Trans_Date != GlobalValue.Scheme_Today_Date) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry!Date must be equal to scheme working date ", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } } else { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Employee account cannot be verified.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); } if (string.IsNullOrEmpty(WithdrawalRepo.Previous_Trustee)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Previous Trustee is a required field", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.GL_Account_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Receiving Account is a required field", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } WithdrawalRepo.GetESFList(WithdrawalRepo.ESF_Id); if (WithdrawalRepo.ESF_Id != null) { this.WithdrawalRepo.SaveRecord_Port(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Port In Successfully Processed.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "PortInPartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } else { string messages = string.Join(Environment.NewLine, ModelState.Values .SelectMany(x => x.Errors) .Select(x => x.ErrorMessage)); X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = messages, // " Insufficient data. Operation Aborted", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } } catch (Exception ex) { throw ex; } }
// reverse port out public ActionResult ReverseRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (string.IsNullOrEmpty(WithdrawalRepo.PortOut_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! No record has been selected for Payment.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.GL_Account_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Problem with Bank Account.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.Reverse_Reason)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Reason for Reversal is required", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } // WithdrawalRepo.GetESFList(WithdrawalRepo.ESF_Id); //get GL balance from GL_Account Table WithdrawalRepo.Get_GL_Balance(WithdrawalRepo); //if (WithdrawalRepo.Total_Benefit > WithdrawalRepo.GL_Balance * -1) //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Sorry! Insufficient Account Balance.Process aborted.", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.ERROR, // Width = 350 // }); // return this.Direct(); //} //if (string.IsNullOrEmpty(WithdrawalRepo.Payment_Mode)) //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Payment Mode is required", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.ERROR, // Width = 350 // }); // return this.Direct(); //} //if (!WithdrawalRepo.Pay_Date_Benefit.HasValue) //{ // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Payment Date is required", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); // return this.Direct(); //} ///pay pending withdrawal /// //if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) //{ GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); // if (WithdrawalRepo.Pay_Date_Benefit != GlobalValue.Scheme_Today_Date) // { // X.Mask.Hide(); // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Sorry! This transaction can not be reversed. Process aborted", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); // return this.Direct(); // } //} //else //{ // X.Mask.Hide(); // X.Msg.Show(new MessageBoxConfig // { // Title = "Error", // Message = "Scheme cannot be verified.", // Buttons = MessageBox.Button.OK, // Icon = MessageBox.Icon.INFO, // Width = 350 // }); //} WithdrawalRepo.Reverse_Unit_PortOut(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Port-Out Successfully Reversed.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); //ClearControls_Reverse(); //Store store = X.GetCmp<Store>("ReverseRequestPortOutStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "PortOutReversePartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } catch (Exception ex) { throw ex; } }
public ActionResult PayRecord(Remit_WithdrawalRepo WithdrawalRepo) { try { if (string.IsNullOrEmpty(WithdrawalRepo.PortOut_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! No record has been selected for Payment.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.GL_Account_No)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Please select Bank Account.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } WithdrawalRepo.GetESFPortOutList(WithdrawalRepo.PortOut_No); //get GL balance from GL_Account Table WithdrawalRepo.Get_GL_Balance(WithdrawalRepo); if (WithdrawalRepo.Total_Benefit > WithdrawalRepo.GL_Balance * -1) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! Insufficient Account Balance.Process aborted.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (string.IsNullOrEmpty(WithdrawalRepo.Payment_Mode)) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Payment Mode is required", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.ERROR, Width = 350 }); return(this.Direct()); } if (!WithdrawalRepo.Pay_Date_Benefit.HasValue) { X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Payment Date is required", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } if (!string.IsNullOrEmpty(WithdrawalRepo.Scheme_Id)) { GlobalValue.Get_Scheme_Today_Date(WithdrawalRepo.Scheme_Id); if (WithdrawalRepo.Pay_Date_Benefit != GlobalValue.Scheme_Today_Date) { X.Mask.Hide(); X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Sorry! Transaction date must be equal to scheme working date of " + GlobalValue.Scheme_Today_Date.Date.ToString(), Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); return(this.Direct()); } } else { X.Mask.Hide(); X.Msg.Show(new MessageBoxConfig { Title = "Error", Message = "Scheme cannot be verified.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); } ///pay pending withdrawal WithdrawalRepo.Pay_Unit_PortOut(WithdrawalRepo); X.Msg.Show(new MessageBoxConfig { Title = "Success", Message = "Port-Out Successfully Paid.", Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Width = 350 }); //ClearControls_Pay(); //Store store = X.GetCmp<Store>("PayRequestPortOutStore"); //store.Reload(); //return this.Direct(); var pvr = new Ext.Net.MVC.PartialViewResult { ViewName = "PortOutPayPartial", ContainerId = "MainArea", RenderMode = RenderMode.AddTo, }; this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive(); return(pvr); } catch (Exception ex) { throw ex; } }