Overview
Scan any UPC/barcode into SalesPad and it will convert the barcode number to the stored customer item number on the sales document.
Setup
When the Enable Item Barcode Conversion setting is set to True, SalesPad will use a stored procedure to convert item numbers.
- With the default stored procedure (spvItemBarcode) in place, a vendor number added to a sales document will automatically be replaced by the actual (inventory) item number (See also: Vendor Items document).
- With a modified custom stored procedure (replace spvItemBarcode with spcpItemBarcode), any UPC barcode stored on a SalesPad user field can be scanned onto a sales document and converted to the Dynamics GP item number.
The following stored procedure, spcpItemBarcode, can be used to customize the way the item barcode conversion works. The example below assumes that the UPC/Barcode value is stored in a SalesPad Item user field called xUPC:
/****** Object: StoredProcedure [dbo].[spcpItemBarcode] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON GO
CREATE PROCEDURE [dbo].[spcpItemBarcode] @Barcode AS VARCHAR(100) = NULL
,@Customer_Number AS VARCHAR(100) = NULL
AS
BEGIN
SELECT TOP 1 Item_Number
,Barcode
FROM (
SELECT Item_Number = ISNULL(ivm.ITEMNMBR, '')
,Barcode = ISNULL(ivm.VNDITNUM, '')
FROM IV00103 AS ivm(NOLOCK) --item vendor master
UNION
SELECT Item_Number = ISNULL(ci.ITEMNMBR, '')
,Barcode = ISNULL(ci.CUSTITEMNMBR, '')
FROM SOP60300 AS ci(NOLOCK) --customer items
UNION
SELECT Item_Number = ISNULL(im.Item_Number, '')
,Barcode = ISNULL(im.xUPC, '')
FROM spvItemMaster AS im --item UPC codes
) AS a
WHERE Barcode = @Barcode
END
Example
- In the User Field Editor, create a user field on the Item Master (refer to the SalesPad User Defined Fields document) for storing UPC/barcodes (whatever you call the user field, the spcp must be edited to use this name. For example, in the procedure above, the user field iss named xUPC)
- In Inventory Lookup, select an item and enter or scan the UPC or other barcode id into the user field (repeat for each item as needed)
- Open a sales document (or use Counter Sales) and scan a barcode onto a new line item
Security
Enable Item Barcode Conversion - Allows the use of a procedure to translate a barcode value to an item number in SalesPad