ClearOfflinePOSData Stored Procedure

<< Click to Display Table of Contents >>

Navigation:  iVend Database Database > Stored Procedures >

ClearOfflinePOSData Stored Procedure

Navigation: iVend Database Database > Stored Procedures >

hm_btn_navigate_prevhm_btn_navigate_tophm_btn_navigate_next

iVend 6.6 Database Help

ClearOfflinePOSData Stored Procedure

Collapse All Expand All

iVend Database Database : ClearOfflinePOSData Stored Procedure

Properties

Creation Date

3/13/2019 6:27 PM

Encrypted

dbimages_boolean-false

Ansi Nulls

dbimages_boolean-true

Parameters

Parameter

Direction

Description

Data Type

Size

@RETURN_VALUE

Return Value

 

Integer

4

Objects that ClearOfflinePOSData depends on

 

Database Object

Object Type

Description

Dep Level

CfgAuditLog table

CfgAuditLog

Table

Stores system logs.

1

CfgSiteInformation table

CfgSiteInformation

Table

Stores the site information. Enterprise always has the site id as 1. System Table Warning : Should not be modified directly

1

RepObjectMapDB table

RepObjectMapDB

Table

System table. Do not modify

1

RepReplicationSendDump table

RepReplicationSendDump

Table

stores the information that has to be sent using replication service between store and HO.

1

RepReplicationTransaction table

RepReplicationTransaction

Table

Stores the Transaction details for them the data needs to be replicated

1

RepReplicationTransactionDetail table

RepReplicationTransactionDetail

Table

 

1

Procedure Source Code

CREATE PROCEDURE [dbo].[ClearOfflinePOSData]

AS

BEGIN

SET NOCOUNT ON;

declare @currentPOSSiteId int

select @currentPOSSiteId = ISNULL(POSSiteId,0) from CfgSiteInformation

if @currentPOSSiteId =0

return 0

--Delete the send dump of records which are replicated to HO/Store

Delete A

from RepReplicationSendDump A, RepReplicationTransactionDetail B

Where A.ReplicationSendDumpKey = B.ReplicationTransactionKey

And Status = 1

--This would mean that we are in the offline pos database

Delete from CfgAuditLog

Where AuditKey in

(

Select Distinct B.SourceKey

From RepObjectMapDB A Inner Join RepReplicationTransaction B On A.ObjectID = B.SourceType

And A.TableName = 'CfgAuditLog'

Inner Join RepReplicationTransactionDetail C On B.ReplicationTransactionKey = C.ReplicationTransactionKey

And C.Status = 1

)

END

See Also

Related Objects

iVend Database Database

 

 


© 2019 All Rights Reserved.

Send comments on this topic.