Show TOC

Object documentationTmxDepartment Interface

 

The interface is used to manage 'Department', 'Category' and Dept_Group tables in the database. It includes the following properties and methods. A property can be defined as Read or Write Only or both.

Properties

Name

COM Type

DB Type

Read/ Write

Description

GroupNumber

SHORT

Smallint

Yes/ Yes

Unique group number

DepartmentNumber

Int

Integer

Yes/ Yes

Unique department number

PresetAmount

VARIANT

Numeric(20,4)

Yes/ Yes

Whether or not a preset amount for a given trans is initiated.

ForcePreset

BOOL

A1

Yes/ Yes

Whether or not a preset price can be modified at the POS terminal at the time of a sale.

DepartmentDescription

BSTR

A40

Yes/ Yes

Description uniquely identifies the department.

AdditionalDescription

BSTR

A50

Yes/ Yes

Generic column to hold an additional descriptions.

AdditionalAmount

VARIANT

Numeric(20,4)

Yes/ Yes

An additional predefined amount assigned to a department.

MinimumAmount

VARIANT

Numeric(20,4)

Yes/ Yes

Minimum amount that can be accepted for a tender type or for an item amount within a department.

MaximumAmount

VARIANT

Numeric(20,4)

Yes/ Yes

Maximum amount that can be accepted for a tender type or for an item amount within a department.

MenuID

SHORT

Smallint

Yes/ Yes

Whether or not the department is assigned to a department menu.

QuantityDescription

BSTR

A15

Yes/ Yes

A description of the quantity type that will be printed on a receipt. For example ‘lb’.

AllowZero

BOOL

A1

Yes/ Yes

Whether or not a zero price can be entered.

POSAmount

BOOL

A1

Yes/ Yes

The item is a positive or negative value.

AuthorizationLevel

SHORT

Smallint

Yes/ Yes

Authority level for security.

AllowQuantity

BOOL

A1

Yes/ Yes

Whether or not quantities of the given item type can be entered.

QuantityRequired

BOOL

A1

Yes/ Yes

Whether or not quantity must be entered during the sale.

CostRequired

BOOL

A1

Yes/ Yes

Whether or not a cost code must be entered during item entry.

AllowDecimalQuantity

BOOL

A1

Yes/ Yes

Allow decimal quantities or not.

AllowDiscount

BOOL

A1

Yes/ Yes

Allow discount or not.

AllowReturn

BOOL

A1

Yes/ Yes

Allow return or not.

ProPromptID

SHORT

Smallint

Yes/No

Associated prompt.

UseScale

BOOL

A1

Yes/No

The use of a scale is required or not.

TareWeightID

SHORT

Smallint

Yes/No

Indicate whether or not tare weight is used.

EmployeeDiscountAllo wed

BOOL

A1

Yes/No

Allow employee discount.

PrintSlip

BOOL

A1

Yes/ Yes

The slip print is used or not.

SlipAdvance

SHORT

Smallint

Yes/ Yes

How many line to advance before slip printing.

ValidateFlag

BOOL

A1

No/Yes

Validation is required or not.

PluRequired

BOOL

A1

Yes/ Yes

A sku, UPC, cross reference, bar code or any digit number used to look up a price.

AllowPendingTransacti on

BOOL

A1

Yes/No Whether or not a item is allowed in a pending transaction.

Whether or not a item is allowed in a pending transaction.

PrintRetail

BOOL

A1

Yes/ Yes

Whether or not the regular price of items are printed on the receipt.

PrintSRP

BOOL

A1

Yes/ Yes

Whether or not to print suggested

SlipTotalLine

SHORT

Smallint

Yes/ Yes

The number of lines to advance before printing another form.

Itemizr1Apply

BOOL

A1

No/Yes

Apply Itermizer1 or not

Itemizr1Tax1

BOOL

A1

No/Yes

Apply Tax1 for Itermizer1 or not

Itemizr1Tax2

BOOL

A1.

No/Yes

Apply Tax2 for Itermizer1 or not

Itemizr1Tax3

BOOL

A1

No/Yes

Apply Tax3 for Itermizer1 or not

Itemizr1Tax4

BOOL

A1

No/Yes

Apply Tax3 for Itermizer1 or not

Itemizr2Apply

BOOL

A1

No/Yes

Apply Itermizer2 or not

Itemizr2Tax1

BOOL

A1

No/Yes

Apply Tax1 for Itermizer2 or not

Itemizr2Tax2

BOOL

A1

No/Yes

Apply Tax2 for Itermizer2 or not

Itemizr2Tax3

BOOL

A1

No/Yes

Apply Tax3 for Itermizer2 or not

Itemizr3Apply

BOOL

A1

No/Yes

Apply Itermizer3 or not

Itemizr3Tax1

BOOL

A1

No/Yes

Apply Tax1 for Itermizer3 or not

Itemizr3Tax2

BOOL

A1.

No/Yes

Apply Tax2 for Itermizer3 or not

Itemizr3Tax3

BOOL

A1

No/Yes

Apply Tax3 for Itermizer3 or not

Itemizr3Tax4

BOOL

A1

No/Yes

Apply Tax4 for Itermizer3 or not

Itemizr4Apply

BOOL

A1

No/Yes

Apply Itermizer4 or not

Itemizr4Tax1

BOOL

A1

No/Yes

Apply Tax1 for Itermizer4 or not

Itemizr4Tax2

BOOL

A1

No/Yes

Apply Tax2 for Itermizer4 or not

Itemizr4Tax3

BOOL

A1

No/Yes

Apply Tax3 for Itermizer4 or not

Itemizr4Tax4

BOOL.

A1

No/Yes

Apply Tax4 for Itermizer4 or not

MixMatchNumber1

SHORT

Smallint

Yes/ Yes

Unique mixmatch number

MixMatchNumber2

SHORT

Smallint

Yes/ Yes

Unique mixmatch number

MixMatchNumber3

SHORT

Smallint

Yes/ Yes

Unique mixmatch number

MixMatchNumber4

SHORT

Smallint

Yes/ Yes

Unique mixmatch number

GenerateCoupon

BOOL

A1

Yes/ Yes

Whether or not a coupon will be automatically generated.

SlipBuffered

BOOL

A1

Yes/ Yes

Whether or not the customer’s receipt is buffered.

DepositTotal

VARIANT

Numeric(20,4)

No/Yes

Total amount of a deposit

DepositDescription

BSTR

A20

No/Yes

Deposit description

FrequentBuyerCode

SHORT

Smallint

No/Yes

Whether or not the item is part of a frequent buyer program

AutoDiscountID

SHORT

Smallint

Yes/ Yes

Reference to a particular discount in the discount table.

Loyaltyid1

SHORT

Smallint

No/Yes

Uniquely identifies or references a loyalty program.

Loyaltyid2

SHORT

Smallint .

No/Yes

Uniquely identifies or references a loyalty program.

Loyaltyid3

SHORT

Smallint

No/Yes

Uniquely identifies or references a loyalty program.

Loyaltyid4

SHORT

Smallint

No/Yes

Uniquely identifies or references a loyalty program.

ValidateNumber

SHORT

Smallint

Yes/ Yes

Validation number

AllowReturnWithoutRe ceipt

BOOL

A1

No/Yes

Allow return without receipt or not.

DisallowSell

BOOL

A1

No/Yes

Disallow in sale or not.

DisallowExchange

BOOL

A1

No/Yes

Disallow in exchange or not.

Tax1

BOOL

A1

Yes/ Yes

Apply Tax1 or not

Tax2

BOOL

A1

Yes/ Yes

Apply Tax2 or not

Tax3

BOOL

A1

Yes/ Yes

Apply Tax3 or not

Tax4

BOOL

A1

Yes/ Yes

Apply Tax4 or no

Tax5

BOOL

A1

Yes/ Yes

Apply Tax5 or not

Tax6

BOOL

A1

Yes/ Yes

Apply Tax6 or not

Tax7

BOOL

A1

Yes/ Yes

Apply Tax7 or not

Tax8

BOOL

A1

Yes/ Yes

Apply Tax8 or not

Tax9

BOOL

A1

Yes/ Yes

Apply Tax9 or no

Tax10

BOOL

A1

Yes/ Yes

Apply Tax10 or not

Tax11

BOOL

A1

Yes/No

Apply Tax11 or not

Tax12

BOOL

A1

Yes/No

Apply Tax12 or not

Tax13

BOOL

A1

Yes/No

Apply Tax13 or not

Tax14

BOOL

A1

Yes/No

Apply Tax14 or not

Tax15

BOOL

A1

Yes/No

Apply Tax15 or not

Tax16

BOOL

A1

Yes/No

Apply Tax16 or not

RemotePrintNumebr

SHORT

Smallint

Yes/ Yes

Remote printer number

RemotePrintControl

BOOL

A1

Yes/ Yes

Remote print control

GenerateCouponID

SHORT

Smallint

Yes/ Yes

Automatically generated Coupon ID

EmployeeDiscountPerc ent

VARIANT

Numeric(5,2)

Yes/ Yes

Employee discount percent

SlipIndent

SHORT

Smallint

Yes/ Yes

Indent number for slip print.

CollectionFormat

BSTR

No/Yes

Selected properties which clients prefer to put into Collection property. * “*” means all columns * empty means do not build Collection property.

Collection

BSTR

Yes/No

A string contains those selected fields returned from inquiry method.

LastErrorNumber

VARIANT

Yes/No

The error code returned if there is an error. For known ADO error, the return value is the value returned from ADO function. If it is unknown ADO error, the value is 0x8000FFAAL.

LastError

BSTR

Yes/No

The message displayed if there is an error. If it is known ADO error, the description is return from ADO Error object. If it is unknown ADO error, the description specifies the method name where the error occurs.

Method

HRESULT InquiryDepartment (Int DepartmentNumber)

This method is used to retrieve a record from the 'Department' table. After the method is called, those retrievable properties defined in the interface are assigned to the value found in this record. You can get the value of these readable properties.

If you prefer to get a list of selected fields, the format should be defined in CollectionFormat property and retrieved from Collection property. If CollectionFormat is filled as '*', all retrievable fields will be put into Collection property. If CollectionFormat is empty, Collection property is not built. As such, CollectionFormat property should be defined before this method is called if you want to retrieve certain fields in one string.

For example, if you prefer to get certain columns, the CollectionFormat should be defined as:

DepartmentNumber, GroupNumber, DepartmentDescription, AdditionalDescription

When there is an error, two properties (LastErrorNumber and LastError) can be used to determine the code of the error and proper description. For LastErrorNumber, there are three error types: known ADO error, unknown ADO error and TmxApi error. For known ADO error, both LastErrorNumber and LastError are returned as the values returned from ADO. For unknown ADO error, the error code is 0x8000FFAAL and the description is based on which function causes the failure. For TmxApi error (such as wrong data type or cannot open the input file), the error code is defined as 0x8000FFBBL and the description is specified as TmxApi error and the reason.

If there is no record found in the database, the Collection property is defined as No Record Found, LastErrorNumber is defined as 0x8000FFCCL and LastError is defined as TmxApi Error: No Record Found in the Database!.

Parameters

Int DepartmentNumber

Department number

Return

S_OK

If the record is successfully returned from the database.

S_FALSE

If an error occurs during inquiry.

Method

HRESULT UpdateDepartment (UpdateTypeEnum UpdateType)

Parameters

UpdateTypeEnum UpdateType

DepartmentAdd – Add a department record

DepartmentModify – Modify a department record

DepartmentDelete – Delete a department record

DepartmentDeleteAll – Delete all department records

Return

This method is used to update a department record based on the UpdateType property. Before the method is called, certain properties have to be assigned to a valid or a default value. Clients can use Inquiry method to retrieve the record first and change certain fields. Then call this method. The fields passed to the stored procedure have to be checked to make sure that the value passed to the stored procedure is in the right data type format. If an error happens, the record will not be updated. LastErrorNumber and LastError should be used to capture the proper error when the return value is S_FALSE.

S_OK

If the record is successfully returned from the database.

S_FALSE

If an error occurs during inquiry.

EmployeeAdd and EmployeeModify require that the following properties be defined:

1

GroupNumber

Mandatory (M)

2

DepartmentNumber

M

3

PresetAmount

0 if not setup

4

ForcePreset

'N' if not setup

5

DepartmentDescription

Empty string if not setup

6

AdditianlDescription

Empty string if not setup

7

AdditonalAmount

0 if not setup

8

MinimumAmount

0 if not setup

9

MaximumAmount

0 if not setup

10

MenuID

0 if not setup

11

QuantityDescription

Empty string if not setup

12

AllowZero

'N' if not setup

13

POSAmount

'Y' if not setup

14

AuthorizationLevel

1 if not setup

15

AllowQuantity

'Y' if not setup

16

QuantityRequired

'Y' if not setup

17

CostRequired

'N' if not setup

18

AllowDecimalQuantity

'N' if not setup

19

AllowDiscount

'Y' if not setup

20

AllowReturn

'Y' if not setup

21

ProPromptID

0 if not setup

22

UseScale

'N' if not setup

23

TareWeightID

0 if not setup

24

EmployeeDiscountAllowed

'Y' if not setup

25

PrintSlip

'N' if not setup

26

SlipAdvance

0 if not setup

27

ValidateFlag

28

PluRequired

'Y' if not setup

29

AllowPendingTransaction

'Y' if not setup

30

PrintRetail

'Y' if not setup

31

PrintSRP

'N' if not setup

32

SlipTotalLine

0 if not setup

33

Itemizr1Apply

'N' if not setup

34

Itemizr1Tax1

'N' if not setup

35

Itemizr1Tax2

'N' if not setup

36

Itemizr1Tax3

'N' if not setup

37

Itemizr1Tax4

'N' if not setup

38

Itemizr2Apply

'N' if not setup

39

Itemizr2Tax1

'N' if not setup

40

Itemizr2Tax2

'N' if not setup

41

Itemizr2Tax3

'N' if not setup

42

Itemizr2Tax4

'N' if not setup

43

Itemizr3Apply

'N' if not setup

44

Itemizr3Tax1

'N' if not setup

45

Itemizr3Tax2

'N' if not setup

46

Itemizr3Tax3

'N' if not setup

47

Itemizr3Tax4

'N' if not setup

48

Itemizr4Apply

'N' if not setup

49

Itemizr4Tax1

'N' if not setup

50

Itemizr4Tax2

'N' if not setup

51

Itemizr4Tax3

'N' if not setup

52

Itemizr4Tax4

'N' if not setup

53

MixMatchNumber1

0 if not setup

54

MixMatchNumber2

0 if not setup

55

MixMatchNumber3

0 if not setup

56

MixMatchNumber4

0 if not setup

57

GenerateCoupon

'N' if not setup

58

SlipBuffered

'N' if not setup

59

DepositTotal

0.0 if not setup

60

DepositDescription

Empty string if not setup

61

FrequentBuyerCode

0 if not setup

62

AutoDiscountID

NULL if not setup

63

Loyaltyid1

NULL if not setup

64

Loyaltyid2

NULL if not setup

65

Loyaltyid3

NULL if not setup

66

Loyaltyid4

NULL if not setup

67

ValidateNumber

0 if not setup

68

AllowReturnWithoutReceipt

'Y' if not setup

69

DisallowSell

'N' if not setup

70

DisallowExchange

'N' if not setup

71

Tax1

'N' if not setup

72

Tax2

'N' if not setup

73

Tax3

'N' if not setup

74

Tax4

'N' if not setup

75

Tax5

'N' if not setup

76

Tax6

'N' if not setup

77

Tax7

'N' if not setup

78

Tax8

'N' if not setup

79

Tax9

'N' if not setup

80

Tax10

'N' if not setup

81

Tax11

'N' if not setup

82

Tax12

'N' if not setup

83

Tax13

'N' if not setup

84

Tax14

'N' if not setup

85

Tax15

'N' if not setup

86

Tax16

'N' if not setup

87

RemotePrintNumber

NULL if not setup

88

RemotePrintControl

NULL if not setup

89

GenerateCouponID

NULL if not setup

90

EmployeeDiscountPercent

NULL if not setup

91

SlipIndent

NULL if not setup

DepartmentDelete requires that the following properties be defined:

1

Int DepartmentNumber

Mandatory (M)

Note Note

DepartmentDeleteAll will delete all of the records in the 'Department' table.

End of the note.
Properties Related to Group and Category

Name

Type

DB Type

Read/ Write

Description

GroupNumber

SHORT

Smallint

Yes/Yes

Unique group number

CategoryNumber

SHORT

Smallint

Yes/Yes

Identify a unique category

DepartmentGroupDescription

BSTR

A40

Yes/Yes

Description of the department group.

CategoryDescription

BSTR

A40

Yes/Yes

Category description

Method

HRESULT InquiryDeptGroup (SHORT GroupNumber)

Parameters

SHORT GroupNumber

Group number

Return

S_OK

If the record is successfully returned from the database.

S_FALSE

If an error occurs during inquiry.

This method is used to retrieve a record from Dept_Group table. After the method is called, those retrievable properties defined in the interface will be assigned to the value found in this record. The client can get the value of these readable properties.

The properties which can be retrieved are as follows:

  • GroupNumber

  • DepartmentGroupDescription

  • CategoryNumber

Method

HRESULT UpdateDeptGroup (UpdateTypeEnum UpdateType)

Parameters

UpdateTypeEnum UpdateType

DeptGroupAdd

Add a dept_group record DeptGroupModify

Modify a dept_group record DeptGroupDelete – Delete a dept_group record

DeptGroupDeleteAll – Delete all dept_group records

Return

S_OK

If the record is successfully returned from the database.

S_FALSE

If an error occurs during inquiry.

This method is used to update a dept_group record based on the UpdateType property. Before the method is called, certain properties have to be assigned to a valid or a default value. Clients can use Inquiry method to retrieve the record first and change certain fields. Then call this method. The fields passed to the stored procedure have to be checked to make sure that the value passed to the stored procedure is in the right data type format. If an error happens, the record will not be updated. LastErrorNumber and LastError should be used to capture the proper error when the return value is S_FALSE.

DeptGroupAdd and DeptGroupModify require that the following properties be defined:

1

SHORT GroupNumber

Mandatory (M)

2

SHORT CategoryNumber

M

3

BSTR DepartmentGroupDescription

M

DeptGroupDelete requires that the following properties be defined:

Note Note

DeptGroupDeleteAll will delete all records in the Dept_group table.

End of the note.
Method

HRESULT InquiryDeptCategory (SHORT CategoryNumber)

Parameters

SHORT CategoryNumber

Category number

Return

S_OK

If the record is successfully returned from the database.

S_FALSE

If an error occurs during inquiry.

This method is used to retrieve a record from 'Category' table. After the method is called, those retrievable properties defined in the interface will be assigned to the value found in this record. The client can get the value of these readable properties.

The properties can be retrieved are:

  • CategoryNumber

  • CategoryDescription

Method

HRESULT UpdateDeptCategory (UpdateTypeEnum UpdateType)

Parameter

UpdateTypeEnum UpdateType

DeptCategoryAdd – Add a category record

DeptCategoryModify – Modify a category record

DeptCategoryDelete – Delete a category record

DeptCategoryDeleteAll – Delete all category records

Return

S_OK

If the record is successfully returned from the database.

S_FALSE

If an error occurs during inquiry.

This method is used to update a category record based on the UpdateType property. Before the method is called, certain properties have to be assigned to a valid or a default value. Clients can use Inquiry method to retrieve the record first and change certain fields. Then call this method. The fields passed to the stored procedure have to be checked to make sure that the value passed to the stored procedure is in the right data type format. If an error happens, the record will not be updated. LastErrorNumber and LastError should be used to capture the proper error when the return value is S_FALSE.

DeptCategoryAdd and DeptCategoryModify require the following properties defined:

Properties

1

SHORT CategoryNumber

Mandatory (M)

2

BSTR CategoryDescription

M

DeptCategoryDelete requires the following properties defined:

Properties

1

SHORT CategoryNumber

Mandatory (M)

Note Note

DeptCategoryDeleteAll will delete all of the records in the 'Category' table.

End of the note.