MYOB Greentree

HideShow

  • Contents
  • Index
  • Search
 
Display results with all search words

 

gtSOSalesOrderINLine


This function supplies the information to add Inventory line items to Sales Order headers. The Reference parameter must be the unique ID returned by the gtSOSalesOrder function call.

Each Sales Order is uploaded to Greentree Desktop as a complete transaction set. The sales order either uploads in its entirety or nothing of the document is loaded into Greentree Desktop.

If the Inventory line being added is for a serial or lot item then the serial or lot numbers can be entered for the line using the gtINSerialLotLine function.

Reference

This must be the unique identifier generated by the gtSOSalesOrder function call. It has the format SOORD-nnn. This ensures the lines are of the correct order header. It also ensures Excel creates the header information before attempting to calculate and create the order line item details.

StockItem

The inventory item reference for the line item.

Location

The location of the inventory item.

Unit

The unit of measure of the inventory item.

PriceLevel

The pricing level that applies to the inventory item.

TransType

The transaction type for the line item.

TaxCode

The code that determines the tax rate for the transaction.

UnitPrice

Price per unit of quantity below.

TaxPercentage

Percentage of tax for the line item.

DeliveryDate

The delivery date for the line item.

Quantity

The number of units relevant for the line item.

DiscountPercentage

Percentage discount given.

BackOrderQuantity

The quantity of inventory to be put on back order for the line item.

Cost

The cost price of the inventory item.

Margin

The margin amount of the line item.

MarginPerc

The margin percentage of the line item.

IsHoldingPrice

Defaults to False. If set to True the unit price is held.

IsHoldingCost

Defaults to False. If set to True the cost price is held.

IsHoldingDiscount

Defaults to False. If set to True the discount percentage is held.

TaxType

Valid tax types are Inclusive or Exclusive.

Narration

Narration for the line item.

Returns

  • Ok - If there are no errors.
  • Error - If there is an error.

Example

gtSOSalesOrderINLine (SOORD-3,68SC SECRETARY,A01,EACH,RETAIL,ARINV,NZGST, 80.00,10.00,31/05/2001,3,,,,,,,,,)

Errors Returned

  • Invalid sales order header reference
  • Sales order header not found
  • Must have a stock item
  • Must have a location
  • Must have a unit of measure
  • Must have a price level
  • Must have a transaction type
  • Invalid quantity, must be a number or omitted
  • Invalid tax percentage, must be a number or omitted
  • Invalid discount percentage, must be a number or omitted
  • Invalid backorder quantity, must be a number or omitted
  • Invalid cost, must be a number or omitted
  • Invalid margin, must be a number or omitted
  • Invalid margin percentage, must be a number or omitted
  • Invalid IsHoldingPrice, must be True, False or omitted
  • Invalid IsHoldingCost, must be True, False or omitted