|
<< Click to Display Table of Contents >> Navigation: iVend Database Database > Stored Procedures > InventoryItemSerialStatusUpdates Stored Procedure |
Navigation: iVend Database Database > Stored Procedures >
iVend 6.6 Database Help
InventoryItemSerialStatusUpdates Stored Procedure
Collapse All Expand All
iVend Database Database : InventoryItemSerialStatusUpdates Stored Procedure |
Properties
Creation Date |
4/13/2015 12:00 PM |
Encrypted |
|
Ansi Nulls |
|
Parameters
Parameter |
Direction |
Description |
Data Type |
Size |
@pInventorySerialLogKey |
In |
Reference key of the Inventory Serial Log |
VarWChar |
50 |
@pDebug |
In |
Whether this procedure has to be executed in Debug mode or not |
VarChar |
1 |
@RETURN_VALUE |
Return Value |
|
Integer |
4 |
Objects that depend on InventoryItemSerialStatusUpdates
|
Database Object |
Object Type |
Description |
Dep Level |
|
Stored Procedure |
|
1 |
Objects that InventoryItemSerialStatusUpdates depends on
|
Database Object |
Object Type |
Description |
Dep Level |
|
Table |
Stores the basic configuration entries for the system . These settings are mandatory for the system to work properly. |
2 |
|
|
Table |
Stores the site information. Enterprise always has the site id as 1. System Table Warning : Should not be modified directly |
2 |
|
|
User Defined Function |
|
1 |
|
|
Table |
Serial details gets affected when doing any transaction with the item which has been serial tracked. |
1 |
|
|
Table |
Stores the Delta updates made to any serial in the system. This table gets affected when doing any inventory related transaction for a serial item. |
1 |
Procedure Source Code
--========================================================================= CREATE PROCEDURE [dbo].[InventoryItemSerialStatusUpdates] ( @pInventorySerialLogKey nvarchar(50), @pDebug CHAR(1) = 'N' ) AS BEGIN SET NOCOUNT ON Declare @ErrorDesc varchar(255) If @pDebug = 'Y' SELECT 'UPDATE THE INVENTORY STATUS OF THE SERIAL ITEM' UPDATE B SET B.Status = A.Status, B.Modified = dbo.GetCompanyDateTime() FROM InvSerialLog A, InvSerial B WHERE A.SerialKey = B.SerialKey AND A.InventorySerialLogKey = @pInventorySerialLogKey IF(@@ERROR <>0) BEGIN SET @ErrorDesc = 'Error while updating the status of serial item.' GOTO ERRORHANDLER END --THIS UPDATED THE IsProcessed FLAG OG LOG TABLE Update InvSerialLog SET IsProcessed = 'true' Where InventorySerialLogKey = @pInventorySerialLogKey RETURN ERRORHANDLER: RAISERROR('%s',16,-1,@ErrorDesc) RETURN END |
See Also
© 2019 All Rights Reserved.
Send comments on this topic.