public static VoucherType ToVoucherType(this BaseVoucherTypeModel voucherType)
        {
            VoucherType _result = new VoucherType();

            if (voucherType.Id.HasValue)
            {
                _result.Id = voucherType.Id.GetValueOrDefault();
            }
            _result.VoucherTypeName          = voucherType.VoucherTypeName;
            _result.TypeOfVoucher            = voucherType.TypeOfVoucher;
            _result.MethodOfVoucherNumbering = voucherType.MethodOfVoucherNumbering;
            _result.IsTaxApplicable          = voucherType.IsTaxApplicable;
            _result.Narration    = voucherType.Narration;
            _result.IsActive     = voucherType.IsActive;
            _result.IsDefault    = voucherType.IsDefault;
            _result.Declaration  = voucherType.Declaration;
            _result.HeadingOne   = voucherType.HeadingOne;
            _result.HeadingTwo   = voucherType.HeadingTwo;
            _result.HeadingThree = voucherType.HeadingThree;
            _result.HeadingFour  = voucherType.HeadingFour;
            _result.CreatedDate  = voucherType.CreatedDate;
            _result.ModifiedDate = voucherType.ModifiedDate;
            _result.MasterId     = voucherType.MasterId;
            return(_result);
        }
        public static BaseVoucherTypeModel ToBaseVoucherType(this VoucherType voucherType)
        {
            BaseVoucherTypeModel _result = new BaseVoucherTypeModel();

            _result.Id = voucherType.Id;
            _result.VoucherTypeName          = voucherType.VoucherTypeName;
            _result.TypeOfVoucher            = voucherType.TypeOfVoucher;
            _result.MethodOfVoucherNumbering = voucherType.MethodOfVoucherNumbering;
            _result.IsTaxApplicable          = voucherType.IsTaxApplicable;
            _result.Narration    = voucherType.Narration;
            _result.IsActive     = voucherType.IsActive;
            _result.IsDefault    = voucherType.IsDefault;
            _result.Declaration  = voucherType.Declaration;
            _result.HeadingOne   = voucherType.HeadingOne;
            _result.HeadingTwo   = voucherType.HeadingTwo;
            _result.HeadingThree = voucherType.HeadingThree;
            _result.HeadingFour  = voucherType.HeadingFour;
            _result.CreatedDate  = voucherType.CreatedDate;
            _result.ModifiedDate = voucherType.ModifiedDate;
            _result.MasterId     = voucherType.MasterId;
            return(_result);
        }