Sales Orders - codbex/codbex-olympus GitHub Wiki

Sales Order confirms the sale of goods or services, once it is done, an invoice can be created.

SalesOrder

Entity Definition

Field Type Length Null? Calc? Ref? Description
Id INTEGER no - -
Number VARCHAR 10 no - -
Date DATE no - -
Due DATE - - -
Customer INTEGER no - yes Reference to Customer
Net DECMIAL - yes - SUM(SalesInvoiceItem.Net)
Currency INTEGER - - yes Reference to Currency
Gross DECMIAL - yes - SUM(SalesInvoiceItem.Gross)
Discount DECMIAL - - - % Discount
Taxes DECMIAL - - - % Taxes (other than VAT)
VAT DECMIAL - yes - SUM(SalesInvoiceItem.VAT) - %Discount
Total DECMIAL - yes - Gross - (Gross * Discount / 100) + (Gross * Taxes / 100) + VAT
Conditions VARCHAR 200 - - - Conditions about payment
PaymentMethod INTEGER - - yes Reference to Methods
SentMethod INTEGER - - yes Reference to Methods
Status INTEGER - - yes Reference to Invoice Status
Operator INTEGER - - yes Reference to Employees
Document VARCHAR 200 - - - Link to the scanned copy of the document
Company INTEGER - - yes Reference to Companies
Name VARCHAR 200 - yes - Customer.Name/Number/Date/Total
UUID VARCHAR 36 - yes - Random UUID generated
Reference VARCHAR 36 - - - Reference via UUID to the SalesOrder/WorkOrder

Custom Actions

  • Generate Invoice

SalesOrderItem

Entity Definition

Field Type Length Null? Calc? Ref? Description
Id INTEGER no - -
Sales Order INTEGER no - yes Reference to Sales Order
Name VARCHAR 2000 no - - Free text representing Product/Service
Quantity DOUBLE no - -
UoM INTEGER no - yes Reference to UoM
Price DECMIAL no - -
Net DECMIAL - yes - Quantity * Price
VAT DECMIAL - - - Net * 0.2(depends of the country, for now 20% VAT
Gross DECMIAL - yes - Net + VAT