SQL view for Inventory Price Levels in Dynamics GP

When you are creating prices for different price levels in Dynamics GP, there is no easy way to see these, or to see all the prices for a particular price level. Below is a view that can help with this.

~~~~~

CREATE VIEW view_Inventory_Price_Levels
AS

/*******************************************************************
view_Inventory_Price_Levels
Created on Aug 9, 2010 by Victoria Yudin - Flexible Solutions, Inc.
For updates visit http://victoriayudin.com/gp-reports/
*******************************************************************/

SELECT IV.ITEMNMBR Item_Number,
       IM.ITEMDESC Item_Description,
       IM.ITMCLSCD Item_Class,
       IV.PRCLEVEL Price_Level,
       CASE IM.PRICMTHD
       	  WHEN 1 THEN 'Currency Amount'
       	  WHEN 2 THEN '% of List Price'
	  WHEN 3 THEN '% Markup – Current Cost'
	  WHEN 4 THEN '% Markup – Standard Cost'
	  WHEN 5 THEN '% Margin – Current Cost'
	  WHEN 6 THEN '% Margin – Standard Cost'
	  END Price_Method,
       IV.CURNCYID Currency_ID,
       IV.UOFM U_of_M,
       CASE IM.PRICMTHD
	  WHEN 1 THEN IV.UOMPRICE
	  WHEN 2 THEN IV.UOMPRICE * IC.LISTPRCE / 100
	  ELSE 0
	  END Price,
       CASE IM.PRICMTHD
	  WHEN 1 THEN 0
	  ELSE IV.UOMPRICE
	  END Percent_of_List,
       IV.FROMQTY From_Qty,
       IV.TOQTY To_Qty,
       IV.QTYBSUOM Qty_In_Base_UofM

FROM   IV00108 IV

LEFT OUTER JOIN
       IV00101 IM
       ON IM.ITEMNMBR = IV.ITEMNMBR

LEFT OUTER JOIN
       IV00105 IC
       ON IC.ITEMNMBR = IV.ITEMNMBR
       AND IV.CURNCYID = IC.CURNCYID

/** the following will grant permissions to this view to DYNGRP,
leave this section off if you do not want to grant permissions **/
GO
GRANT SELECT ON view_Inventory_Price_Levels TO DYNGRP

~~~~~

If you are looking to see customer specific pricing, take a look at my Customer Pricing post.  You can also see a full list of my Dynamics GP SQL code on the GP Reports page of this blog.

Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.

SQL view for inventory items and dates

This view is a little bit of a twist on my previous SQL view for inventory quantities on hand. The results of this view will give you a list of your Microsoft Dynamics GP inventory items, current quantities and the last sales and purchase dates along with the vendor.

For other SQL views on Dynamics GP data, please visit my GP Reports page.

~~~~~

CREATE VIEW view_Inventory_with_Dates
AS
/********************************************************************
view_Inventory_with_Dates
Created on Dec 4, 2009 by Victoria Yudin - Flexible Solutions, Inc.
For updates see http://victoriayudin.com/gp-reports/
All inventory items with quantity on hand and last sale
     and receipt dates
Functional amounts only
Tables used:
I - IV00101 - Item Master
S - IV30300 - Transaction Amounts History with DOCTYPE = 6 (sales)
Q - IV00102 - Item Quantity Master
U - IV40201 - U of M Schedule Header
Updated Dec 22, 2009 to add WHERE clause at end
********************************************************************/

SELECT I.ITEMNMBR Item_Number,
       I.ITEMDESC Item_Description,
       Q.QTYONHND Quantity_on_Hand,
       U.BASEUOFM U_of_M,
       CASE I.ITEMTYPE
          WHEN 1 THEN 'Sales Inventory'
          WHEN 2 THEN 'Discontinued'
          WHEN 3 THEN 'Kit'
          WHEN 4 THEN 'Misc Charges'
          WHEN 5 THEN 'Services'
          WHEN 6 THEN 'Flat Fee'
          END Item_Type,
       I.CURRCOST Current_Cost,
       I.ITMCLSCD Item_Class,
       coalesce(S.LastSale,'1/1/1900') Last_Sale_Date,
       coalesce(Q.LSRCPTDT,'1/1/1900') Last_Receipt_Date,
       coalesce(Q.LSORDVND,'') Last_Vendor

FROM IV00101 I

INNER JOIN
     (SELECT ITEMNMBR, MAX(DOCDATE) LastSale
      FROM IV30300
      WHERE DOCTYPE = 6
      GROUP BY ITEMNMBR) S
     ON I.ITEMNMBR = S.ITEMNMBR

INNER JOIN
     IV00102 Q
     ON I.ITEMNMBR = Q.ITEMNMBR
     AND RCRDTYPE = 1

INNER JOIN
     IV40201 U
     ON U.UOMSCHDL = I.UOMSCHDL

WHERE Q.QTYONHND <> 0

/** the following will grant permissions to this view to DYNGRP,
leave this section off if you do not want to grant permissions **/
GO
GRANT SELECT ON view_Inventory_with_Dates TO DYNGRP

~~~~~

Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone

SQL view for inventory quantities on hand

I haven’t had much time to blog lately as we have added functionality to our GP Reports Viewer product that allows seamless replacement of SOP reports in Dynamics GP and the amount of interest has been overwhelming. 

However, I just needed to create a new SmartList to show current inventory quantities on hand with their costs and I wanted to share the view I used. Please bear in mind, this was only tested with our data and only FIFO Perpetual inventory items, so this may not work for all situations. And the average unit cost is simply the total cost divided by the quantity on hand.

For other GP SQL views, please take a look at my GP Reports page.

~~~~~

CREATE VIEW view_On_Hand_Inventory
AS

/********************************************************************
view_On_Hand_Inventory
Created on June 18, 2009 by Victoria Yudin - Flexible Solutions, Inc.
For updates see http://victoriayudin.com/gp-reports/
Inventory on hand quantities by site
Only tested with FIFO Perpetual inventory valuation method
I - IV00101 - Item Master
T - IV10200 - Purchase Receipts
Updated on June 24, 2009 to add Item Class
********************************************************************/


SELECT T.ITEMNMBR Item,
       I.ITEMDESC Description,
I.ITMCLSCD Item_Class,
       T.TRXLOCTN Site_ID,
       sum(T.QTYRECVD-T.QTYSOLD) Quantity,
       sum(T.UNITCOST*(T.QTYRECVD-T.QTYSOLD)) Total_Cost,
       sum(T.UNITCOST*(T.QTYRECVD-T.QTYSOLD))
          /sum(T.QTYRECVD-T.QTYSOLD) Avg_Unit_Cost


FROM IV10200 T
INNER JOIN
     IV00101 I
     ON I.ITEMNMBR = T.ITEMNMBR


WHERE T.QTYRECVD <> T.QTYSOLD
GROUP BY T.ITEMNMBR, T.TRXLOCTN, I.ITEMDESC, I.ITMCLSCD


/** the following will grant permissions to this view to DYNGRP,
leave this section off if you do not want to grant permissions **/
GO
GRANT SELECT ON view_On_Hand_Inventory TO DYNGRP

~~~~~

Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.

SQL view to show customer pricing

Here is a view to show customer specific item pricing in Dynamics GP when using standard pricing.  This will work either with SmartList Builder or Crystal Reports as I have made sure not to put any spaces in the names.  If you are using SmartList Builder this means you may want to go down the list of the column names and add spaces to make them more user friendly. 

For other SQL views on Dynamics GP data, please visit my GP Reports page.

~~~~~

CREATE VIEW view_Customer_Pricing
AS

/**
view_Customer_Pricing
Created Jan. 7 2009 by Victoria Yudin - Flexible Solutions, Inc.
For updates see http://victoriayudin.com/gp-reports/
Shows individual item pricing based on customer price level.
For use with standard pricing.
Excludes customers with no price level.
Updated Jan. 14 2009 to add price method, % column value if price list
is not currency amount and calculation for % of List Price price method.
Does not show actual price for % Margin or % Markup price methods.
**/

SELECT C.CUSTNMBR as 'CustomerID', C.CUSTNAME as 'CustomerName',
       C.PRCLEVEL as 'PriceLevel', IV.ITEMNMBR as 'ItemNumber',
       IM.ITEMDESC as 'ItemDescription',
       CASE IM.PRICMTHD
       	WHEN 1 THEN 'Currency Amount'
       	WHEN 2 THEN '% of List Price'
	WHEN 3 THEN '% Markup – Current Cost'
	WHEN 4 THEN '% Markup – Standard Cost'
	WHEN 5 THEN '% Margin – Current Cost'
	WHEN 6 THEN '% Margin – Standard Cost'
	END as 'PriceMethod',
       IV.CURNCYID as 'CurrencyID', IV.UOFM as 'UofM',
       CASE IM.PRICMTHD
	WHEN 1 THEN IV.UOMPRICE
	WHEN 2 THEN IV.UOMPRICE * IC.LISTPRCE / 100
	ELSE 0
	END as 'Price',
       CASE IM.PRICMTHD
	WHEN 1 THEN 0
	ELSE IV.UOMPRICE
	END as 'Percent',
       IV.FROMQTY as 'FromQty', IV.TOQTY as 'ToQty',
       IV.QTYBSUOM as 'QtyInBaseUofM'
FROM   RM00101 C
LEFT OUTER JOIN
       IV00108 IV
       ON C.PRCLEVEL = IV.PRCLEVEL
LEFT OUTER JOIN
       IV00101 IM
       ON IM.ITEMNMBR = IV.ITEMNMBR
LEFT OUTER JOIN
       IV00105 IC
       ON IC.ITEMNMBR = IV.ITEMNMBR AND IV.CURNCYID = IC.CURNCYID
WHERE  C.PRCLEVEL <> '' --excludes customers with no price level

/** the following will grant permissions to this view to DYNGRP,
leave this section off if you do not want to grant permissions **/
GO
GRANT SELECT ON view_Customer_Pricing TO DYNGRP

~~~~~

Disclaimer: I tested this on limited data, if you find an issue or have a suggestion for improvement, please let me know and I will post the update here for everyone.

Year end close in Dynamics GP

Every year we get a slew of phone calls about closing the year in GP.  Usually these start in December and I  thought I would beat the rush this year. Here are some resources and notes I have compiled over the years on the year end close. I will add to this post as I find more resources or if I get additional questions, so you can always find updated information here.

 

GP KnowledgeBase Articles

Microsoft publishes and updates articles that explain in great detail how the year end close should be done and all the implications and timing issues.  Here is order that the modules should be closed in and the related articles:

 

Other Resources

 

General Ledger – Common Questions

When?  The biggest question we get on the General Ledger close is when to do it.  On one hand you don’t want to close the GL before all your adjustments are in and/or the audit is done.  On the other hand, you hate not being able to see beginning balances for the GL accounts and having to use alternate FRx reports to add in last year’s numbers.  Since you can post to the last fiscal year even if it is closed there is no harm in closing the fiscal year sooner than later.  However, make sure that you won’t need to post to years prior to the last closed year, since you won’t be able to do it.  (In other words, once you close 2008, you can still update 2008, but 2007 is done at that point.)

I said I won’t need to, but how do I post to 2005?  If you absolutely positively have to post to more than one prior year, it is possible, but it will cost you.  The Microsoft Professional Services team has a procedure they can run on your system that will re-open prior years.  The cost will depend on the size of your data, how many companies and years you need to open and when you need to do this.  We have used this service a number of times and have never had an issue, so it definitely works.  To get more information on this, contact your GP Partner and show them this link.

How do I actually post to the last closed year?  Here are the steps:

  1. Go to Tools > Setup > Company > Fiscal Periods and make sure the period you want to post to is open (unchecked).
  2. Go to Tools > Setup > Financial > General Ledger and make sure Allow Posting to History is checked.
  3. Enter and post your transaction.  Read this before you look at your posting journal: the entry will look like it is posted twice.  It’s showing up on the report twice because it’s updating last year’s balances and then updating this year’s beginning balances.  This is ok.
  4. Go to Tools > Setup > Financial > General Ledger and uncheck Allow Posting to History.  While it is ok to leave this checked, I recommend disallowing posting to history to avoid mistakes.
  5. Go to Tools > Setup > Company > Fiscal Periods and close (check) the period you opened in step 1.  Again, you can leave the period open if you want.

What if one of my Balance Sheet accounts was set up as a P&L account?  If one of your accounts was set up with the wrong Posting Type and you did not catch this before performing the year close, you can use KB article 864913 to correct the problem. 

 

Other Common Questions / My 2 Cents

 

Payables and Receivables – to close or not to close?  Most companies we work with do not close the Payables and Receivables modules anymore.  Since it is virtually impossible to have a clean cut off between transactions for 2 years, it really does not add any value to perform the year end close for these modules.

Backups – do we really need them?  As far as I am concerned, one of the most important parts of the year end close is making a backup before starting.  I have only actually needed this backup twice, but we were sure glad we had it those two times.

What is the close procedure for other modules, like Bank Rec or SOP?  Other modules do not have a ‘year end close’ process, however, prior to performing the year end close on the modules that do make sure that everything for that year is posted. 

 

Updates:
01.08.2009: added link to Doug Pitcher’s blog post under Other Resources
01.07.2009: added link to Dynamicd GP Land blog under Other Resources
12.24.2008: added links to Mariano Gomez’s blog posts under Other Resources
11.17.2008: added links to the year end payroll updates under Other Resources
08.04.2010: added link to the GL Year End Open Service from Microsoft