Download RDA2 Programmers Guide PDF

TitleRDA2 Programmers Guide
File Size1.1 MB
Total Pages165
Table of Contents
                            About this Guide
Introduction
	Revision History
The RDA2 Object Model
	RDA2 and the Retail Pro Database
	RDA2 Basics
	Nested Documents
	Fields
RDA2 Server Interface (IRdaDB)
	Properties and Methods
IRDATable Interface
	Properties and Methods
	IRdaHistory Interface
	Properties and Methods
IRdaDirectAccess Interface
	Properties and Methods
IRdaDocument Interface
	Properties and Methods
IRdaField Interface
	Properties and Methods
IRdaInventory Interface
	Properties and Methods
IRdaSO Interface
	Properties and Methods
IRdaVouTerms Interface
	Percent/Day Pairs
	Properties and Methods
IRdaTender Interface
	Properties and Methods
IRdaTenderItem Interface
	Associated Data Types
	Properties and Methods
IRdaStoreCredit Interface
	Properties and Methods
IRdaFC Interface
	Properties and Methods
IRdaCheck Interface
	Properties and Methods
IRdaCreditCard Interface
	Properties and Methods
IRdaCharge Interface
	Properties and Methods
IRdaPayments Interface
	Properties and Methods
IRdaGift Interface
	Properties and Methods
IRdaCollection Interface
	Properties and Methods
RDA2 Table Information
	Table ID Numbers and Names
	Table Indexes
	Nested Document Names and ID Numbers
	Table Schemas
XML Preferences
	Updating Preferences
Programming with RDA2
	Tips and Tricks
	Visual Basic Examples
	Create IRdaTender Objects
                        
Document Text Contents
Page 1

Retail Pro® 8 Series
RDA2 Programmers Guide










Retail Pro
3252 Holiday Court
La Jolla, CA 92037 USA

USA 1-800-738-2457
International +1-858-550-3355
www.retailpro.com

Page 2

Retail Pro® 8 RDA2 Programmers Guide


Copyright © 2008 Retail Pro. All rights reserved
ii

About this Guide
This document is intended to be a guide to help Software Developers use the Retail Pro APIs to
create extensions and customizations to the Retail Pro® software.

If you believe the information presented here is incomplete or inaccurate, we encourage you to
contact us at [email protected]


The software described herein is furnished under a license agreement.

Retail Pro
3252 Holiday Court

La Jolla, CA 92037 USA



USA 1-800-738-2457)
International +1-858-550-3355

www.retailpro.com





Copyright

Copyright © 2008 Intuit, Inc.® All rights reserved. Redistributed by Retail Pro under license.

Retail Pro
3252 Holiday Court
La Jolla, CA 92037
U.S.A.

Trademarks

Retail Pro and the Retail Pro logo are registered trademarks and/or registered service marks in the United States and other countries. Oracle
and Oracle 9i are registered trademarks and/or registered service marks of Oracle Corporation. All rights reserved. Other parties’ trademarks
or service marks are the property of their respective owners and should be treated as such.

Page 82

Retail Pro® 8 RDA2 Programmers Guide


Copyright © 2008 Retail Pro. All rights reserved
72

SubLocQtys
Index ID Index Name RDA2 Constant

1 Item SID

2 Item #

3 Sub-Loc ID

4 Sub-Loc Name

5 Last Rcvd



MovNotes
Index ID Index Name RDA2 Constant

-1 Default Order

1 Number

2 Date

3 Store

4 Associate

5 SID

6 Ref Doc #

7 UDF1

8 UDF2

9 UDF3

10 UDF4

11 Shipment Number

12 Carton Number

13 Type

14 Note Source

Page 83

Retail Pro® 8 RDA2 Programmers Guide


Copyright © 2008 Retail Pro. All rights reserved
73

MovOrders
Index ID Index Name RDA2 Constant

1 MO Number

2 Date

3 Store

4 Associate

5 SID

6 UDF1

7 UDF2

8 UDF3

9 UDF4

10 Shipment Number

11 Carton Number

12 Movement Date

13 Priority



TOs
Index ID Index Name RDA2 Constant

1 TO # idxTOrdNumber

2 PO #

3 Associate

Page 164

Retail Pro® 8 RDA2 Programmers Guide


Copyright © 2008 Retail Pro. All rights reserved
154

‘ Percent = 0 means NET.

If dblPcnt = 0 Then
strPcnt = "NET "
Else
strPcnt = Trim(Str(dblPcnt)) & "% "
End If
If lngIndex > 0 Then GetPDString = GetPDString & Chr(13)

‘ Add the percent/days to the return string.

GetPDString = GetPDString & strPcnt & Trim(Str(lngDays)) & " Days"
lngIndex = lngIndex + 1
Loop
End Function



Get the Tender Information for a Receipt
Dim rdaServer As New Rda2Server
Dim rdaTable As IRdaTable
Dim rdaTender As IRdaTender
Dim strInvNum As String
Dim blnFound As Boolean
Dim xmlRoot As IXMLDOMElement
Dim xmlElement As IXMLDOMElement
Dim strTender As String
'
rdaServer.Connect "C:\Retail\RPro", 1
Set rdaTable = rdaServer.CreateTableByName("Invoices")
rdaTable.Open
'
' Set the active index to 1 (Receipt#).
'
rdaTable.ActiveIndexID = 1
'
' Set the IRdaTender object.
'
Set rdaTender = rdaTable.Document.CustomInterface
'
' Get a receipt number, find the receipt and display the
' tender information.
'
Do
Do
strInvNum = InputBox("Enter a receipt number:")
Loop Until IsNumeric(strInvNum) Or strInvNum = ""
If strInvNum = "" Then Exit Do
'
' Find the receipt in the table.
'
blnFound = rdaTable.Find(strInvNum, False)
If blnFound Then
Set xmlRoot = rdaTender.XML.documentElement
'
' The root node of the tender XML is the TENDER node.
' Tender information is in the child nodes which are
' element type nodes with attributes.
' There will be a child node for each part of the
' tender information.
'
strTender = "Tender information:"
For Each xmlElement In xmlRoot.childNodes
strTender = strTender & Chr(13)
With xmlElement
'
' The node name of the child node is the
' tender type (i.e. cash, check, etc.).
'

Page 165

Retail Pro® 8 RDA2 Programmers Guide


Copyright © 2008 Retail Pro. All rights reserved
155

Select Case .nodeName
Case "Cash", "Check", "CreditCard"
strTender = strTender & .nodeName
'
' For these types, get the amount.
' The amount is an attribute of the child node.
' There are several ways to retrieve this value.
' This example uses the GetAttribute method for
' an element node.
'
strTender = strTender & " Amount=" & _
.getAttribute("Amount")
Case "FC"
'
' This tender is foreign currency. The name of the
' currency will be in the FCName attribute.
' In this case, get the name of the currency and
' the amount. There are other attributes that could
be
' retrieved including 'Take' and 'Give'.
'
' The FCName attribute has the name
' of the currency.
'
strTender = strTender & .getAttribute("FCName")
'
' Now get the amount.
'
strTender = strTender & " Amount=" & _
.getAttribute("Amount")
End Select
End With
Next
MsgBox strTender, vbOKOnly
End If
Loop
Set rdaTender = Nothing
rdaTable.Close

Similer Documents