public ActionResult DuzenleIslem(toplu_borclandir model, hesap_hareket hesapModel, string tip)
        {
            hesapModel.para_birimi = _borcTipleri.paraBirimiGetir(hesapModel.borclandirma_turu);

            model.ay  = hesapModel.tarih.Month;
            model.yil = hesapModel.tarih.Year;
            model.gun = hesapModel.tarih.Day;

            try
            {
                var topluBorcandirListe = _topluBorclandirService.TopluBorclandirRefno(model.refno);
                if (topluBorcandirListe.tutar == 0)
                {
                    topluBorcandirListe.tutar = null;
                }

                if (topluBorcandirListe.ay == model.ay && topluBorcandirListe.yil == model.yil && topluBorcandirListe.yil == model.yil && topluBorcandirListe.tarih == model.tarih && topluBorcandirListe.sonodeme_tarihi == model.sonodeme_tarihi && topluBorcandirListe.tip == model.tip && topluBorcandirListe.aciklama == model.aciklama && topluBorcandirListe.dagitim_sekli == model.dagitim_sekli && topluBorcandirListe.borclandirma_turu == model.borclandirma_turu && topluBorcandirListe.tutar == model.tutar)
                {
                    return(Json(false, JsonRequestBehavior.AllowGet));
                }

                //bu toplu boçlandırmaya ait tahsilat varsa retun -1
                if (_borclandirService.TahsilatKontrolRefno(model.refno) == true)
                {
                    return(Json("-1", JsonRequestBehavior.AllowGet));
                }
                else
                {
                    _topluBorclandirService.TopluBorcSil(model.refno, model.borclandirma_turu);
                    var kaydetSonuc = _topluBorclandirService.TopluBorclandirKaydet(model, hesapModel, tip);

                    if (kaydetSonuc == true)
                    {
                        return(Json(true, JsonRequestBehavior.AllowGet));
                    }
                    else
                    {
                        return(Json(null, JsonRequestBehavior.AllowGet));
                    }
                }
            }
            catch (Exception msg)
            {
                throw msg;
            }
        }