public static bool DeleteVoucherTemplate(VoucherTemplateDto voucherTemplate)
        {
            try
            {
                var entity = new tVoucherTemplate
                {
                    CompanyId     = voucherTemplate.CompanyId,
                    CreditAccount = voucherTemplate.CreditAccountCode,
                    DebitAccount  = voucherTemplate.DebitAccountCode,
                    Narration     = voucherTemplate.Narration,
                    ShortCode     = voucherTemplate.ShortCode,
                };

                var result = AccountingDataProvider.DeleteVoucherTemplate(entity);

                if (result == 1)
                {
                    return(true);
                }
                return(false);
            }
            catch (Exception exception)
            {
                throw new Exception(exception.Message);
            }
        }
        public static int DeleteVoucherTemplate(tVoucherTemplate templates)
        {
            int rowsAdded;

            using (IDbConnection connection = DbConnectionHelper.GetConnection())
            {
                var query = SqlQueryHelper.GetDeleteQuery <tVoucherTemplate>();

                rowsAdded = connection.Execute(query, templates);
            }

            return(rowsAdded);
        }