Saturday, December 12, 2015

Purchase Order Ship to Address Assignment or Why won't Purchase Order Ship to Address Auto Fill?

Purchase Order addressing requires several data points to auto assign the Ship to Address to line items on Purchase Orders.
First you need to select Standard, or Drop Ship – a selection here is of course mandatory. The shipping method selected works in combination with the PO Type selection to determine exactly where in the system to pull the default Ship to Address for Purchase Order Lines. These selections effect the behavior of the Ship to Address location as follows (KB 887113):
PO type
Shipping method - PO line
Address that is used for this combination of purchase order type and shipping method
Standard
Delivery
The address that is contained in theSite IDfield in the purchase order line
Standard
Pickup
The address that is contained in the vendorPurchase Address IDfield in the purchase order line
Drop-ship
Delivery
The address that is contained in the customerShip To Address IDfield in the purchase order line
Drop-ship
Pickup
The address that is contained in the vendorPurchase Address IDfield in the purchase order line

The most common options selected are Standard PO Type and Delivery Shipping Type. In this scenario, purchased materials are delivered to your organization by vendors via common carrier. 
If a Shipping Method is not selected, then the Ship to Address cannot be assigned automatically. 
Shipping Methods default from the Vendor record.
Shipping Methods have a setting for Delivery or Pickup. The selection of Pickup or Deliver assigned to a Shipping Method effects several functions in Dynamics GP, one of which is where in Dynamics GP the Purchase Order Ship to Address is pulled from. 
Shipping Type Options
For Standard Purchase Order Types, including Standard – Blanket, Shipping Methods with Shipping Type Pickup are assumed to be picked up at the Vendor’s Purchase Address. 
For Standard Purchase Order Types, including Drop Ship – Blanket, Shipping Methods with Shipping Type Delivery are assumed to be delivered to the PO Line Site ID Address. 
For Drop Ship Purchase Order Types, which Drop Ship to a particular Customer, Shipping Methods with a Shipping Type of Delivery are assumed to be delivered to the Customer’s Ship to Address. 
For Drop Ship Purchase Order Types, Shipping Methods with Shipping Type Pickup are assumed to be picked up at the Vendor’s Purchase Address. 
Both Standard and Drop Ship Purchase Orders, with a Shipping Type of Pickup with Default the Vendor’s Purchase Address ID.  Deliveries for Standard Purchase Order Types will use the Site ID address, while Delivery’s for Drop Ship Purchase Order Types will use the Customer’s Ship to Address.
Since Addresses in Dynamics GP only have one required field, Address ID, it is also possible for an Address ID to be selected and no address information to be captured. If this is the case, simply find the offending Address ID and fill in the address fields. In the image below, the Site ID link can be clicked, which will open the Site Maintenance window where Address information can be entered. 
Address Information Maintenance


So, if you find the Ship to Address is missing from a Purchase Order, start by checking the Shipping Method, as it's the likely cause. If the purchase order has a Shipping Method assigned, then you may have an Address ID which has no address information. Use the chart above as a reference to determine where the Purchase Order Address should be originate from.

Finally, if Dynamics GP isn't behaving as it should, it is entirely possible a customization is at fault.

I hope this helps get you where you're going.

Saturday, October 31, 2015

Sales Reporting for Vendor Items


From time-to-time, key vendors request sales figures on items they supply. Below is a SQL Query, which creates a view that can be used as a foundation for a SmartList or SSRS Report to support this effort.


USE [COMPANYID]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE View [dbo].[_Vendor_Item_Sales]
as
Select
ivv.VNDITNUM Vendor_Item,
ivv.VENDORID Vendor_ID,
pmv.VENDNAME Vendor_Name,
SHL.ITEMNMBR Item_ID,
case shl.soptype
       when 1 then 'Quote'
       when 2 then 'Order'
       when 3 then 'Invoice'
       when 4 then 'Return'
       when 5 then 'Back Order'
       when 6 then 'Fulfillment Order'
       else 'ERROR'
End Document_Type,
shl.SOPNUMBE Document_Number,
(shl.LNITMSEQ/16384) Line_Number,
SHL.ITEMDESC Item_Description,
shl.UOFM Unit_of_Measure,
convert(varchar(10),shh.DOCDATE,101) Document_Date,
CONVERT(varchar(10),shh.INVODATE,101) Invoice_Date,
shl.CNTCPRSN Ship_to_Contact,
shl.ShipToName Ship_to_Name,
shl.ADDRESS1 Address_1,
shl.ADDRESS2 Address_2,
shl.ADDRESS3 Address_3,
shl.CITY Ship_City,
shl.STATE Ship_State,
shl.ZIPCODE Ship_Zip,
shl.QUANTITY Quantity,
shl.QTYTOINV Invoice_Quantity,
cast(shl.UNITPRCE as money) Unit_Price,
cast(shl.XTNDPRCE as money) Extended_Price,
cast(shl.UNITCOST as money) Unit_Cost,
cast(shl.EXTDCOST as money) Extended_Cost
from SOP30200 SHH
left join SOP30300 SHL on SHH.SOPTYPE = SHL.SOPTYPE and SHH.SOPNUMBE = SHL.SOPNUMBE
left join IV00101 IVI on shl.ITEMNMBR = IVI.ITEMNMBR
left join IV00103 IVV on ivi.ITEMNMBR = ivv.ITEMNMBR
left join PM00200 PMV on ivv.VENDORID = pmv.VENDORID
GO

GRANT SELECT ON _Vendor_Item_Sales TO DYNGRP

GO

Wednesday, September 30, 2015

Engineering Change Request View SQL Script

Since Dynamics GP Manufacturing originally began its life as a third party product, some of the core features supporting Manufacturing modules never made it into the product. For instance, Quality Assurance, Engineering Change Management, Routings, Forecasting and Job Costing do not have any out-of-the-box SmartLists.

I typically wind up using SQL Views, SmartList Builder and now SmartList Designer to create custom built SmartLists for these modules. In this post, I have included a SQL Script, which can be used to create a SQL View as the foundation for SmartLists or SQL Server Reporting Services (SSRS) Reports for Engineering Change Requests. Here it is:

Create VIEW Engineering_Change_Request
AS

select
DATEENTERED_I Date_of_Request,
CASE WHEN CUST.CUSTNMBR is not null then CUST.CUSTNAME
       Else  ''
End Customer_Name,
CASE WHEN CUST.CUSTNMBR is not null then CUST.CUSTNMBR
       ELSE ''
End Customer_ID,
ECMH.ENDDATE ECR_Complete_by_Date,
ECMH.ITEMNMBR Part_Number,
ECMH.ITEMDESC Part_Description,
'' Old_Rev,
ECMH.REVISIONLEVEL_I New_Rev,
ECMH.ECM_Short_Description ECR_Description,
DoEC.text1 BOM_Changes,
RFC.text2 Reason_for_Change,
NCO.text3 Notify_Customer,
EI.text4 Expected_Impact,
ECML.DISPOSITIONNOTES_I WIP_Instructions
from EC010031 ECMH
inner join EC050031 ECML on ECMH.ECNumber = ECML.ECNumber
left join RM00101 CUST on ECMH.CUSTNMBR = CUST.CUSTNMBR
left join EC010100 DoEC on ECMH.ECNumber = DoEC.ECNumber
left join EC010200 RFC on ECMH.ECNumber = RFC.ECNumber
left join EC010300 NCO on ECMH.ECNumber = NCO.ECNumber
left join EC010400 EI on ECMH.ECNumber = EI.ECNumber

GO


Grant Select on Engineering_Change_Request to DYNGRP