Bad Debt Model Quarterly
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAnXcaZssOGB3qeH0dDUGGjrlQMap6qkaf_uUFEOs1VWD1k1FoxVgiP-DJvAc2HoMDamjPR4a_6k_v5dM5z5ivCF8jlL42pkzBUXKHXQRO0mUDI12H472-NzHg6t4MzZ57Kee9XsxpqwC1cQ_yiLhR8HV_dqpLNeq9ELk0IHqy73JFYv95ZoCiHuyOVOY_/w640-h584/BaddebtModelQuery.png)
One of my users requested this report to be able to get the specific list of accounts in one report instead of going to Summary Inquiry one at a time. Solution: 1. Create an SQL View in your SQL Server by running the SQL script below USE [CO100 - @yourcompanyID] GO /****** Object: View [dbo].[view_Open_Yr_GL_TB_Month_End] Script Date: 10/11/2023 2:15:51 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create view [dbo].[view_Open_Yr_GL_TB_Month_End] as -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -- Created July 9, 2014 by Victoria Yudin -- Flexible Solutions, Inc. -- For other code, please visit http://victoriayudin.com -- Only returns the first open year in GP -- Month names in columns use calendar fiscal year -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ select g.YEAR1 [Year], a.ACTNUMST Account, g.ACTDESCR [Description], c.ACCATDSC Category, sum(case g.PERIODID when 0 then g.PERDBLNC else 0 end) Beginning_Balance, sum(case wh