Model lineitems
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| finance | x | x | x | x |
| manager | x | x | x | x |
| line_manager | x | x | x | x |
| admin | | x | | |
| owner | | x | | |
| primary_member | | x | | |
| user | | x | | |
| all | | | | |
Fields
| Name | Type | Link | Maps To | Default | Indexed? | Unique? | Required? |
|---|
| __v | Number | | | | | | |
| _deleted | Boolean | | | false | x | | |
| _id | ObjectID | | | [Function] | | | |
| _owner_id | ObjectID | | | | | | |
| _updated_by_id | ObjectID | User | _updated_by | | x | | |
| _version | Number | | | 0 | | | |
| account_code | String | | | | | | |
| account_description | String | | | | | | |
| account_item_code | String | | | | x | | |
| account_tracking_code | String | | | | | | |
| amount | Number | | | | | | x |
| booking_id | ObjectID | Booking | | | | | |
| comment | String | | | | | | |
| contract_id | ObjectID | Contract | | | | | |
| contract_status | String | | | | x | | |
| createdAt | Date | | | | | | |
| date_created | Date | | | [Function] | | | |
| date_end | Date | | | | x | | |
| date_start | Date | | | | x | | |
| description | String | | | | | | |
| discount | Number | | | 0 | | | |
| discount_comment | String | | | | | | |
| discount_date_end | Date | | | | | | |
| discount_date_start | Date | | | | | | |
| discount_description | String | | | | | | |
| invoice_id | ObjectID | Invoice | | | | | |
| is_quote | Boolean | | | | | | |
| license_id | ObjectID | License | | | | x | |
| location_id | ObjectID | Location | | | x | | |
| order | Number | | | | | | |
| organisation_id | ObjectID | Organisation | | | x | | |
| price | Number | | | | | | x |
| price_customised | Boolean | | | false | | | |
| price_customised_date | Date | | | | | | |
| price_customised_reason | String | | | | | | |
| price_customised_user_id | ObjectID | User | price_customised_user | | | | |
| pro_rata | Boolean | | | false | x | | |
| product_id | ObjectID | Product | | | | | |
| sublocation | String | | | | | | |
| tax_type | String | | | | | | |
| updatedAt | Date | | | | | | |
| user_id | ObjectID | User | | | | | |
| wallet_id | ObjectID | Wallet | | | x | | |
| xero_id | String | | | | | | |
Field Details
__v
{
"path": "__v",
"instance": "Number",
"options": {},
"validators": []
}_deleted
{
"path": "_deleted",
"instance": "Boolean",
"options": {
"default": false,
"index": true
},
"validators": [],
"defaultValue": false
}_id
{
"path": "_id",
"instance": "ObjectID",
"options": {
"auto": true,
"type": "ObjectId"
},
"validators": [],
"defaultValue": "[Function]"
}_owner_id
{
"path": "_owner_id",
"instance": "ObjectID",
"options": {},
"validators": []
}_updated_by_id
{
"path": "_updated_by_id",
"instance": "ObjectID",
"options": {
"link": "User",
"map_to": "_updated_by",
"index": true
},
"validators": []
}_version
{
"path": "_version",
"instance": "Number",
"options": {
"default": 0
},
"validators": [],
"defaultValue": 0
}account_code
{
"path": "account_code",
"instance": "String",
"options": {},
"validators": []
}account_description
{
"path": "account_description",
"instance": "String",
"options": {},
"validators": []
}account_item_code
{
"path": "account_item_code",
"instance": "String",
"options": {
"index": true
},
"validators": []
}account_tracking_code
{
"path": "account_tracking_code",
"instance": "String",
"options": {},
"validators": []
}amount
{
"path": "amount",
"instance": "Number",
"options": {
"required": true
},
"validators": [
{
"message": "Path `{PATH}` is required."
},
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`"
}
],
"isRequired": true
}Validators
- : Path `{PATH}` is required.
- : Validator failed for path `{PATH}` with value `{VALUE}`
booking_id
{
"path": "booking_id",
"instance": "ObjectID",
"options": {
"link": "Booking"
},
"validators": []
}comment
{
"path": "comment",
"instance": "String",
"options": {},
"validators": []
}contract_id
{
"path": "contract_id",
"instance": "ObjectID",
"options": {
"link": "Contract"
},
"validators": []
}contract_status
{
"path": "contract_status",
"instance": "String",
"options": {
"validate": {},
"index": true,
"default": null
},
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`"
}
],
"defaultValue": null
}Validators
- : Validator failed for path `{PATH}` with value `{VALUE}`
createdAt
{
"path": "createdAt",
"instance": "Date",
"options": {
"immutable": true
},
"validators": []
}date_created
{
"path": "date_created",
"instance": "Date",
"options": {},
"validators": [],
"defaultValue": "[Function]"
}date_end
{
"path": "date_end",
"instance": "Date",
"options": {
"validate": {
"message": "Line Item end date cannot exceed 10 years from Line Item start date."
},
"max": "9999-12-31",
"min": "1800-01-01",
"index": true
},
"validators": [
{
"message": "Line Item end date cannot exceed 10 years from Line Item start date."
},
{
"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31)."
},
{
"message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01)."
}
]
}Validators
- : Line Item end date cannot exceed 10 years from Line Item start date.
- : Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).
- : Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).
date_start
{
"path": "date_start",
"instance": "Date",
"options": {
"max": "9999-12-31",
"min": "1800-01-01",
"index": true
},
"validators": [
{
"message": "Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31)."
},
{
"message": "Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01)."
}
]
}Validators
- : Path `{PATH}` ({VALUE}) is after maximum allowed value (9999-12-31).
- : Path `{PATH}` ({VALUE}) is before minimum allowed value (1800-01-01).
description
{
"path": "description",
"instance": "String",
"options": {},
"validators": []
}discount
{
"path": "discount",
"instance": "Number",
"options": {
"default": 0
},
"validators": [],
"defaultValue": 0
}discount_comment
{
"path": "discount_comment",
"instance": "String",
"options": {},
"validators": []
}discount_date_end
{
"path": "discount_date_end",
"instance": "Date",
"options": {},
"validators": []
}discount_date_start
{
"path": "discount_date_start",
"instance": "Date",
"options": {},
"validators": []
}discount_description
{
"path": "discount_description",
"instance": "String",
"options": {},
"validators": []
}invoice_id
{
"path": "invoice_id",
"instance": "ObjectID",
"options": {
"link": "Invoice"
},
"validators": []
}is_quote
{
"path": "is_quote",
"instance": "Boolean",
"options": {},
"validators": []
}license_id
{
"path": "license_id",
"instance": "ObjectID",
"options": {
"link": "License",
"unique": true,
"sparse": true
},
"validators": []
}location_id
{
"path": "location_id",
"instance": "ObjectID",
"options": {
"link": "Location",
"index": true
},
"validators": []
}order
{
"path": "order",
"instance": "Number",
"options": {},
"validators": []
}organisation_id
{
"path": "organisation_id",
"instance": "ObjectID",
"options": {
"link": "Organisation",
"index": true
},
"validators": []
}price
{
"path": "price",
"instance": "Number",
"options": {
"required": true
},
"validators": [
{
"message": "Path `{PATH}` is required."
}
],
"isRequired": true
}Validators
- : Path `{PATH}` is required.
price_customised
{
"path": "price_customised",
"instance": "Boolean",
"options": {
"default": false
},
"validators": [],
"defaultValue": false
}price_customised_date
{
"path": "price_customised_date",
"instance": "Date",
"options": {},
"validators": []
}price_customised_reason
{
"path": "price_customised_reason",
"instance": "String",
"options": {},
"validators": []
}price_customised_user_id
{
"path": "price_customised_user_id",
"instance": "ObjectID",
"options": {
"link": "User",
"map_to": "price_customised_user"
},
"validators": []
}pro_rata
{
"path": "pro_rata",
"instance": "Boolean",
"options": {
"default": false,
"index": true
},
"validators": [],
"defaultValue": false
}product_id
{
"path": "product_id",
"instance": "ObjectID",
"options": {
"link": "Product"
},
"validators": []
}sublocation
{
"path": "sublocation",
"instance": "String",
"options": {},
"validators": []
}tax_type
{
"path": "tax_type",
"instance": "String",
"options": {},
"validators": []
}updatedAt
{
"path": "updatedAt",
"instance": "Date",
"options": {},
"validators": []
}user_id
{
"path": "user_id",
"instance": "ObjectID",
"options": {
"link": "User"
},
"validators": []
}wallet_id
{
"path": "wallet_id",
"instance": "ObjectID",
"options": {
"link": "Wallet",
"index": true
},
"validators": []
}xero_id
{
"path": "xero_id",
"instance": "String",
"options": {},
"validators": []
}