\UnleashedOrderDOD
Customer is required (You can specify only the GUID or CustomerCode and the Customer has to already exist) DiscountRate is not required Tax is required. The TaxCode field which is supposed to be unique is not actually : Australia and New Zealand have the same GST code.
SalesOrderLines is required (SubTotal has to match the sum LineTotal of the order lines and vice versa)
If TaxTotal is specified, it has to match the sum of LineTax of order lines and vice versa
If Total is specified, it has to match the sum of SubTotal + TaxTotal and vice versa
--- SalesInvoiceLines ---
You can create new products by just entering a product code (it'll auto save the default purchase price as line Unit price and set GUID to 00000000-0000-0000-0000-000000000000)
Can you specifiy the details of all new product here ?
GUID is optional
Product is required, can not be null and can be identified by productCode or GUID just like Customer
DueDate is not required
DiscountRate is not required
OrderQuantity, UnitPrice and LineTotal have to match
LineTax is required if you have TaxTotal field in order
BC fields are not required
Note : POST order with XML : JSON does not work
OrderStatus is always required Add/Update
Synopsis
- // members
- public static string $u_class = 'SalesInvoices';
- public static array $unique_fields = ;
- public static string $post_format = 'xml';
- public static $u_tax_guid;
- public static $attribute_tax_class;
- public static array $exclude_attribute_classes = ;
- // Inherited members from UnleashedObjectDOD
- public static $u_class;
- public static $unique_fields;
- public static string $guid_format;
- public static string $guid_format_separator;
- public static boolean $update_after_write;
- public static string $post_format;
- public static array $errors;
- public static string $error_email_subject_prefix;
- public static string $error_email_body_prefix;
- public static string $error_email_body_suffix;
- public static $error_email_from;
- public static $error_email_to;
- // methods
- protected void onAfterWriteStart()
- public void synchroniseUDatabase()
- public void getUFields()
- public void getUCurrency()
- public void getUTax()
- // Inherited methods from UnleashedObjectDOD
- public void extraStatics()
- public void updateCMSFields()
- public void onAfterPublish()
- public void onAfterWrite()
- protected void onAfterWriteStart()
- public void checkDODSettings()
- public void synchroniseUDatabase()
- public void updateUDatabase()
- public void createGUID()
- public void getUObjectByGUID()
- public void getUObjectByUniqueField()
- public void getUFields()
- public void stat()
- public void notifyError()
Hierarchy
Extends
Members
public
- $attribute_tax_class
- $error_email_body_prefix
- $error_email_body_suffix
- $error_email_from
- $error_email_subject_prefix
- $error_email_to
- $errors
- $exclude_attribute_classes
- $guid_format
- $guid_format_separator
- $post_format
- $post_format
- $u_class
- $u_class
- $u_tax_guid
- $unique_fields
- $unique_fields
- $update_after_write
Methods
protected
public
- getUCurrency()
- getUFields() — Code generated for XML
- getUTax()
- synchroniseUDatabase()
Inherited from UnleashedObjectDOD
protected
public
- checkDODSettings()
- createGUID()
- extraStatics()
- getUFields()
- getUObjectByGUID() — Precondition : GUID is set
- getUObjectByUniqueField() — Precondition : hasUniqueField() is true and $this->owner->$ssField is set
- notifyError()
- onAfterPublish() — Syncronisation call for @see SiteTree only when published
- onAfterWrite() — Syncronisation call for @see DataObject which are not @see SiteTree
- stat()
- synchroniseUDatabase()
- updateCMSFields()
- updateUDatabase()