Download Magaya Software Customization Manual

Transcript
THE DATABASE OBJECT
This function receives the AESData node as a parameter, extracts the required
information from there, puts it all together separated by tabs and returns it to
the caller. Once returned, the line is concatenated to the previous ones and
stored in the result variable.
The rest of the code works in a very similar way. It collects the information of
possible vehicles present in the shipment as loose cargo.
The Database Object
The Database Object is a way to access the Magaya Database. It allows you to
query the Magaya Database for information not present in the XML transaction. Using this object, you can pull a full warehouse receipt, a shipment, or any
other transaction from the database and get all the information from it with a
single call. This information can then be put into a custom document.
The following list of methods is used to retrieve a specific transaction from the
database:
GetWarehouseReceipt(number, flags);
GetShipment(number, flags);
GetCargoRelease(number, flags);
GetPickupOrder(number, flags);
GetInvoice(number, flags);
GetItemDefinition(number, flags);
GetBooking(number, flags);
GetQuotation(number, flags);
GetBill(number, flags);
GetJob(number, flags);
GetPurchaseOrder(number, flags);
GetSalesOrder(number, flags);
GetWarehouseItem(number, flags);
Each one has two parameters:
•
The first parameter, number, is the global unique identifier (GUID) of
the transaction. This GUID uniquely identifies a given transaction.
•
The second parameter, flags, is used to customize the call. It allows you
to tell the method what kind of information to retrieve in the call. If you
don’t want to deal with this parameter, just pass a zero (0).
If you want to manipulate what is coming out from this call, here is a list of the
possible values for the flags:
217