Syntax
| SQL.CreateOrder(KlantNr, TextLines, Values [, ProjectRef][, OrderRef] _
[, NoPackingList][, NoUpdateStatus])
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Generates a new order in the specified project, performing credit verification and applying debtor and/or project-specific pricing agreements. When the function completes successfully, it also executes the SQL Server stored procedure.
'sp_genereerPaklijst' is executed, which automatically adjusts the inventory.
Returns the newly created order number on success, otherwise 0 (zero).
NOTE: The stored procedure only works with the default warehouse code.
| ||||||||||||||||
See Also
| |||||||||||||||||
Example
| Sub Main() Dim MyCode(5) As Long Dim MyText(5) As String Dim MyVals(5) As Currency Dim MyProject As String MyText(1) = "Creditering ivm bonus" MyVals(1) = -127.50 MyText(2) = "Administratiekosten" MyVals(2) = 8.25 MyText(3) = "Bedankt voor uw inzet!" MyVals(3) = 0 MyProject = InputBox$("Project?") Debug.Print SQL.CreateTextOrder("BL4998", MyText(), MyVals(), MyProject) End Sub | ||||||||||||||||