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.
Name |
COM Type |
DB Type |
Read/ Write |
Description |
---|---|---|---|---|
|
SHORT |
Smallint |
Yes/ Yes |
Unique group number |
|
Int |
Integer |
Yes/ Yes |
Unique department number |
|
VARIANT |
Numeric(20,4) |
Yes/ Yes |
Whether or not a preset amount for a given trans is initiated. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not a preset price can be modified at the POS terminal at the time of a sale. |
|
BSTR |
A40 |
Yes/ Yes |
Description uniquely identifies the department. |
|
BSTR |
A50 |
Yes/ Yes |
Generic column to hold an additional descriptions. |
|
VARIANT |
Numeric(20,4) |
Yes/ Yes |
An additional predefined amount assigned to a department. |
|
VARIANT |
Numeric(20,4) |
Yes/ Yes |
Minimum amount that can be accepted for a tender type or for an item amount within a department. |
|
VARIANT |
Numeric(20,4) |
Yes/ Yes |
Maximum amount that can be accepted for a tender type or for an item amount within a department. |
|
SHORT |
Smallint |
Yes/ Yes |
Whether or not the department is assigned to a department menu. |
|
BSTR |
A15 |
Yes/ Yes |
A description of the quantity type that will be printed on a receipt. For example ‘lb’. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not a zero price can be entered. |
|
BOOL |
A1 |
Yes/ Yes |
The item is a positive or negative value. |
|
SHORT |
Smallint |
Yes/ Yes |
Authority level for security. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not quantities of the given item type can be entered. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not quantity must be entered during the sale. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not a cost code must be entered during item entry. |
|
BOOL |
A1 |
Yes/ Yes |
Allow decimal quantities or not. |
|
BOOL |
A1 |
Yes/ Yes |
Allow discount or not. |
|
BOOL |
A1 |
Yes/ Yes |
Allow return or not. |
|
SHORT |
Smallint |
Yes/No |
Associated prompt. |
|
BOOL |
A1 |
Yes/No |
The use of a scale is required or not. |
|
SHORT |
Smallint |
Yes/No |
Indicate whether or not tare weight is used. |
|
BOOL |
A1 |
Yes/No |
Allow employee discount. |
|
BOOL |
A1 |
Yes/ Yes |
The slip print is used or not. |
|
SHORT |
Smallint |
Yes/ Yes |
How many line to advance before slip printing. |
|
BOOL |
A1 |
No/Yes |
Validation is required or not. |
|
BOOL |
A1 |
Yes/ Yes |
A sku, UPC, cross reference, bar code or any digit number used to look up a price. |
|
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. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not the regular price of items are printed on the receipt. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not to print suggested |
|
SHORT |
Smallint |
Yes/ Yes |
The number of lines to advance before printing another form. |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1. |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1. |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL |
A1 |
No/Yes |
Apply |
|
BOOL. |
A1 |
No/Yes |
Apply |
|
SHORT |
Smallint |
Yes/ Yes |
Unique mixmatch number |
|
SHORT |
Smallint |
Yes/ Yes |
Unique mixmatch number |
|
SHORT |
Smallint |
Yes/ Yes |
Unique mixmatch number |
|
SHORT |
Smallint |
Yes/ Yes |
Unique mixmatch number |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not a coupon will be automatically generated. |
|
BOOL |
A1 |
Yes/ Yes |
Whether or not the customer’s receipt is buffered. |
|
VARIANT |
Numeric(20,4) |
No/Yes |
Total amount of a deposit |
|
BSTR |
A20 |
No/Yes |
Deposit description |
|
SHORT |
Smallint |
No/Yes |
Whether or not the item is part of a frequent buyer program |
|
SHORT |
Smallint |
Yes/ Yes |
Reference to a particular discount in the discount table. |
|
SHORT |
Smallint |
No/Yes |
Uniquely identifies or references a loyalty program. |
|
SHORT |
Smallint . |
No/Yes |
Uniquely identifies or references a loyalty program. |
|
SHORT |
Smallint |
No/Yes |
Uniquely identifies or references a loyalty program. |
|
SHORT |
Smallint |
No/Yes |
Uniquely identifies or references a loyalty program. |
|
SHORT |
Smallint |
Yes/ Yes |
Validation number |
|
BOOL |
A1 |
No/Yes |
Allow return without receipt or not. |
|
BOOL |
A1 |
No/Yes |
Disallow in sale or not. |
|
BOOL |
A1 |
No/Yes |
Disallow in exchange or not. |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/ Yes |
Apply |
|
BOOL |
A1 |
Yes/No |
Apply |
|
BOOL |
A1 |
Yes/No |
Apply |
|
BOOL |
A1 |
Yes/No |
Apply |
|
BOOL |
A1 |
Yes/No |
Apply |
|
BOOL |
A1 |
Yes/No |
Apply |
|
BOOL |
A1 |
Yes/No |
Apply |
|
SHORT |
Smallint |
Yes/ Yes |
Remote printer number |
|
BOOL |
A1 |
Yes/ Yes |
Remote print control |
|
SHORT |
Smallint |
Yes/ Yes |
Automatically generated |
|
VARIANT |
Numeric(5,2) |
Yes/ Yes |
Employee discount percent |
|
SHORT |
Smallint |
Yes/ Yes |
Indent number for slip print. |
|
BSTR |
No/Yes |
Selected properties which clients prefer to put into Collection property. * “*” means all columns * empty means do not build Collection property. |
|
|
BSTR |
Yes/No |
A string contains those selected fields returned from inquiry method. |
|
|
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 |
|
|
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. |
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!
.
|
Department number |
|
If the record is successfully returned from the database. |
|
If an error occurs during inquiry. |
HRESULT UpdateDepartment (UpdateTypeEnum UpdateType)
|
|
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
.
|
If the record is successfully returned from the database. |
|
If an error occurs during inquiry. |
EmployeeAdd
and EmployeeModify
require that the following properties be defined:
1 |
|
Mandatory (M) |
2 |
|
M |
3 |
|
0 if not setup |
4 |
|
'N' if not setup |
5 |
|
Empty string if not setup |
6 |
|
Empty string if not setup |
7 |
|
0 if not setup |
8 |
|
0 if not setup |
9 |
|
0 if not setup |
10 |
|
0 if not setup |
11 |
|
Empty string if not setup |
12 |
|
'N' if not setup |
13 |
|
'Y' if not setup |
14 |
|
1 if not setup |
15 |
|
'Y' if not setup |
16 |
|
'Y' if not setup |
17 |
|
'N' if not setup |
18 |
|
'N' if not setup |
19 |
|
'Y' if not setup |
20 |
|
'Y' if not setup |
21 |
|
0 if not setup |
22 |
|
'N' if not setup |
23 |
|
0 if not setup |
24 |
|
'Y' if not setup |
25 |
|
'N' if not setup |
26 |
|
0 if not setup |
27 |
|
|
28 |
|
'Y' if not setup |
29 |
|
'Y' if not setup |
30 |
|
'Y' if not setup |
31 |
|
'N' if not setup |
32 |
|
0 if not setup |
33 |
|
'N' if not setup |
34 |
|
'N' if not setup |
35 |
|
'N' if not setup |
36 |
|
'N' if not setup |
37 |
|
'N' if not setup |
38 |
|
'N' if not setup |
39 |
|
'N' if not setup |
40 |
|
'N' if not setup |
41 |
|
'N' if not setup |
42 |
|
'N' if not setup |
43 |
|
'N' if not setup |
44 |
|
'N' if not setup |
45 |
|
'N' if not setup |
46 |
|
'N' if not setup |
47 |
|
'N' if not setup |
48 |
|
'N' if not setup |
49 |
|
'N' if not setup |
50 |
|
'N' if not setup |
51 |
|
'N' if not setup |
52 |
|
'N' if not setup |
53 |
|
0 if not setup |
54 |
|
0 if not setup |
55 |
|
0 if not setup |
56 |
|
0 if not setup |
57 |
|
'N' if not setup |
58 |
|
'N' if not setup |
59 |
|
0.0 if not setup |
60 |
|
Empty string if not setup |
61 |
|
0 if not setup |
62 |
|
NULL if not setup |
63 |
|
NULL if not setup |
64 |
|
NULL if not setup |
65 |
|
NULL if not setup |
66 |
|
NULL if not setup |
67 |
|
0 if not setup |
68 |
|
'Y' if not setup |
69 |
|
'N' if not setup |
70 |
|
'N' if not setup |
71 |
|
'N' if not setup |
72 |
|
'N' if not setup |
73 |
|
'N' if not setup |
74 |
|
'N' if not setup |
75 |
|
'N' if not setup |
76 |
|
'N' if not setup |
77 |
|
'N' if not setup |
78 |
|
'N' if not setup |
79 |
|
'N' if not setup |
80 |
|
'N' if not setup |
81 |
|
'N' if not setup |
82 |
|
'N' if not setup |
83 |
|
'N' if not setup |
84 |
|
'N' if not setup |
85 |
|
'N' if not setup |
86 |
|
'N' if not setup |
87 |
|
NULL if not setup |
88 |
|
NULL if not setup |
89 |
|
NULL if not setup |
90 |
|
NULL if not setup |
91 |
|
NULL if not setup |
DepartmentDelete
requires that the following properties be defined:
1 |
|
Mandatory (M) |
Note
DepartmentDeleteAll
will delete all of the records in the 'Department' table.
Name |
Type |
DB Type |
Read/ Write |
Description |
---|---|---|---|---|
|
SHORT |
Smallint |
Yes/Yes |
Unique group number |
|
SHORT |
Smallint |
Yes/Yes |
Identify a unique category |
|
BSTR |
A40 |
Yes/Yes |
Description of the department group. |
|
BSTR |
A40 |
Yes/Yes |
Category description |
HRESULT InquiryDeptGroup (SHORT GroupNumber)
|
Group number |
|
If the record is successfully returned from the database. |
|
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
HRESULT UpdateDeptGroup (UpdateTypeEnum UpdateType)
|
Add a Modify a
|
|
If the record is successfully returned from the database. |
|
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 |
Mandatory (M) |
2 |
SHORT |
M |
3 |
BSTR |
M |
DeptGroupDelete
requires that the following properties be defined:
Note
DeptGroupDeleteAll
will delete all records in the Dept_group
table.
HRESULT InquiryDeptCategory (SHORT CategoryNumber)
SHORT |
Category number |
|
If the record is successfully returned from the database. |
|
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
HRESULT UpdateDeptCategory (UpdateTypeEnum UpdateType)
|
|
|
If the record is successfully returned from the database. |
|
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:
1 |
SHORT |
Mandatory (M) |
2 |
BSTR |
M |
DeptCategoryDelete
requires the following properties defined:
1 |
SHORT |
Mandatory (M) |
Note
DeptCategoryDeleteAll
will delete all of the records in the 'Category' table.