private void insertUpdatedVoucherDetails()
        {
            if (cmdSubmit.CommandName.ToLower() == "SAVE".ToLower())
            {
                core_petty_cash_settlement pcvsObj = new core_petty_cash_settlement();
                core_petty_cash_settlement_Objects objPCVS = new core_petty_cash_settlement_Objects();
                objPCVS.Id_Petty_Cash_Voucher = Convert.ToInt32(idPrePV.Text);
                //objPCVS.Id_Petty_Cash_Book = Convert.ToInt32(ddlPCBName.Text);
                objPCVS.Id_Petty_Cash_Book = Convert.ToInt32(hfPCBID.Value);
                //objPCVS.Id_Petty_Cash_Category = Convert.ToInt32(ddlPCCName.Text);
                objPCVS.Id_Petty_Cash_Category = Convert.ToInt32(hfPCCID.Value);
                objPCVS.Cash_Out_Amount = Convert.ToDouble(cashOutAmount.Text);
                objPCVS.Cash_In_Amount = Convert.ToDouble(cashInAmount.Text);
                objPCVS.Net_Cash_Out_Amount = Convert.ToDouble(hfnetcashOutAmount.Value);
                objPCVS.Petty_Cash_Voucher_Remark = PCV_Remark.Text;
                objPCVS.Created_Date = DateTime.Now;
                pcvsObj.Insert(objPCVS);

                //Inserting Ledger Entry & Updating Ledger Account BCF
                core_ledger_entry leObj = new core_ledger_entry();
                core_ledger_entry_Objects objLE = new core_ledger_entry_Objects();

                objLE.Id_Petty_Cash_Book = Convert.ToInt32(hfPCBID.Value);
                objLE.Id_Petty_Cash_Category = Convert.ToInt32(hfPCCID.Value);
                objLE.Id_Ledger_Account = Convert.ToInt32(hfIDLedgerAccount.Value);
                objLE.Id_Petty_Cash_Voucher = Convert.ToInt32(idPrePV.Text);

                double x = Convert.ToDouble(hfIDLedgerAccountBCF.Value);
                double y = Convert.ToDouble(cashInAmount.Text);
                objLE.Credit_Amount = Convert.ToDouble(cashInAmount.Text);
                objLE.Balance_Carried_Forward = (x - y);
                double z = (x - y);

                objLE.Created_Date = DateTime.Now;
                objLE.Post_Payment = 1;
                leObj.Insert(objLE);

                core_ledger_account laObj = new core_ledger_account();
                laObj.UpdateMethod(@"UPDATE `core_ledger_account`
                                        SET
                                        `Balance_Carried_Forward` = '" + z + @"'
                                        WHERE `Id_Ledger_Account` = '" + Convert.ToInt32(hfIDLedgerAccount.Value) + @"';");
            }

            clearFields();
            loadGrid();
        }