/// <summary>
 /// Ledger Posting Edit
 /// </summary>
 public void MasterLedgerPostingEdit()
 {
     try
     {
         LedgerPostingInfo InfoLedgerPosting = new LedgerPostingInfo();
         LedgerPostingBll BllLedgerPosting = new LedgerPostingBll();
         ExchangeRateBll BllExchangeRate = new ExchangeRateBll();
         InfoLedgerPosting.Credit = Convert.ToDecimal(txtTotal.Text);
         InfoLedgerPosting.Date = dtpDate.Value;
         InfoLedgerPosting.Debit = 0;
         InfoLedgerPosting.DetailsId = 0;
         InfoLedgerPosting.Extra1 = string.Empty;
         InfoLedgerPosting.Extra2 = string.Empty;
         InfoLedgerPosting.InvoiceNo = strInvoiceNo;
         InfoLedgerPosting.ChequeNo = string.Empty;
         InfoLedgerPosting.ChequeDate = DateTime.Now;
         InfoLedgerPosting.LedgerId = Convert.ToDecimal(cmbBankorCash.SelectedValue.ToString());
         if (!isAutomatic)
         {
             InfoLedgerPosting.VoucherNo = txtVoucherNo.Text.Trim();
         }
         else
         {
             InfoLedgerPosting.VoucherNo = strVoucherNo;
         }
         InfoLedgerPosting.VoucherTypeId = decPaymentVoucherTypeId;
         InfoLedgerPosting.YearId = PublicVariables._decCurrentFinancialYearId;
         BllLedgerPosting.LedgerPostingEditByVoucherTypeAndVoucherNo(InfoLedgerPosting);
     }
     catch (Exception ex)
     {
         MessageBox.Show("PV22:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }