The following properties define the dynamic behavior of the TmxPurchaseOrder
object:
Name |
COM Type |
Description |
---|---|---|
|
VARIANT |
This is the new purchase order number generated by the system and it can be retrieved after the method |
|
VARIANT |
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 |
|
VARIANT |
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 ValidatePurchaseOrderNumber(VARIANT Potransnum)
This method is used to validate a purchase order number with pending transaction status in the purchase_order
table.
When there is an error, two properties (LastErrorNumber
and LastError
) should be used to determine the code of the error and proper description. For LastErrorNumber
, there are mainly two categories:
known ADO error and unknown ADO 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. The error code is 0x8000FFCC
if the purchase order is not found.
VARIANT |
Purchase order number to be validated. |
|
If the purchase order number is successfully validated. |
|
If there is an error during the validation process or if the purchase order number is not found. |
HRESULT InsertPurchaseOrder(BSTR Txnstatus, VARIANT Txndate, VARIANT Orderdate, BSTR Note, BSTR Manual, BSTR Transmitted, VARIANT Modtime, BSTR Overflag, BSTR Origin, BSTR Plunum).
This method is used to insert a new purchase order into the purchase_order
table. The new purchase order number will be generated by the system automatically and will be returned through the property Potransnum
.
When there is an error, two properties (LastErrorNumber
and LastError
) should be used to determine the code of the error and proper description. For LastErrorNumber
, there are mainly two categories:
known ADO error and unknown ADO 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.
BSTR |
Purchase order transaction status. |
VARIANT |
Purchase order transaction date. |
VARIANT |
Purchase order ordered date. |
BSTR |
General comment |
BSTR |
Manual purchase order or catalogue purchase order. |
BSTR |
Purchase order transmitted or not. |
VARIANT |
Purchase order modified time. |
BSTR |
|
BSTR |
|
BSTR |
PLU number for this purchase order. |
|
If the purchase order number is successfully validated. |
|
If there is an error during the insertion process. |
HRESULT UpdatePurchaseOrder(VARIANT Potransnum, BSTR Plunum, VARIANT Qty)
This method is used to update an existing purchase order for a PLU. If the PLU to be ordered is already in the purchase order, then the quantity will be added. Otherwise a new record will be created.
When there is an error, two properties (LastErrorNumber
and LastError
) should be used to determine the code of the error and proper description. For LastErrorNumber
, there are mainly two categories:
known ADO error and unknown ADO 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.
VARIANT |
Valid purchase order number. |
BSTR |
PLU number to be added to the existing purchase order. |
VARIANT |
Number of quantity to be ordered. |
|
If the purchase order number is successfully validated. |
|
If there is an error during the update process. |