Model invoices
Permissions
| User Group | Create? | Read? | Update? | Delete? |
|---|
| admin | x | x | x | x |
| owner | x | x | x | |
| primary_member | | x | | |
| user | x | | | |
Fields
| Name | Type | Link | Maps To | Default | Indexed? | Unique? | Required? |
|---|
| __v | Number | | | | | | |
| _deleted | Boolean | | | false | x | | |
| _id | ObjectID | | | [Function] | | | |
| _owner_id | ObjectID | User | _owner | | x | | |
| _updated_by_id | ObjectID | User | _updated_by | | x | | |
| amount_due | Number | | | | | | |
| amount_paid | Number | | | | | | |
| approved_date | Date | | | | | | |
| approved_user_id | ObjectID | User | approved_user | | | | |
| createdAt | Date | | | | | | |
| currency_code | String | | | ZAR | x | | x |
| date | Date | | | | | | |
| date_created | Date | | | [Function] | | | |
| date_paid | Date | | | | | | |
| discount | Number | | | | | | |
| due_date | Date | | | | x | | |
| ebucks_account | Array of Mixed | | | [Function] | | | |
| ebucks_submitted | Boolean | | | false | | | |
| fnb_txn_token | String | | | | | | |
| fnb_url | String | | | | | | |
| fulfilled | Boolean | | | false | | | |
| fulfilling | Boolean | | | false | | | |
| fulfillment_data | Array of Mixed | | | [Function] | | | |
| fulfillment_date | Date | | | | | | |
| invoice_id | String | | | | | | |
| invoice_number | String | | | | | | |
| is_quote | Boolean | | | false | x | | |
| line_items | Array of Mixed | | | [Function] | | | |
| location_id | ObjectID | Location | | | x | | |
| mail_date | Date | | | | | | |
| mail_result | Mixed | | | | | | |
| method_paid | String | | | | | | |
| mips_iframe | String | | | | | | |
| mips_qr_code | String | | | | | | |
| mips_url | String | | | | | | |
| monthly_invoice | Boolean | | | false | | | |
| organisation_id | ObjectID | Organisation | | | x | | |
| original_lineitems | Array of Mixed | | | [Function] | | | |
| payment_link | String | | | | | | |
| payment_result | Mixed | | | | | | |
| paymentrequest_id | ObjectID | PaymentRequest | | | x | | |
| paypal_id | String | | | | x | | |
| personal_account | Boolean | | | false | | | |
| prorataApplied | Boolean | | | false | | | |
| quote_id | Number | | | | x | x | |
| quote_number | String | | | | x | x | |
| reference | String | | | | | | |
| rejection_date | Date | | | | | | |
| rejection_reason | String | | | | | | |
| sent | Boolean | | | | | | |
| sent_date | Date | | | | | | |
| sent_user_id | ObjectID | User | sent_user | | | | |
| source | String | | | | x | | |
| status | String | | | | x | | |
| sub_total | Number | | | | | | |
| summary | String | | | | | | |
| tax | Number | | | | | | |
| title | String | | | | | | |
| total | Number | | | | | | |
| updatedAt | Date | | | | | | |
| user_id | ObjectID | User | | | x | | |
| xero_creditnote | Array of Mixed | | | [Function] | | | |
| xero_invoice_id | String | | | | x | x | |
| xero_invoice_number | String | | | | | | |
| xero_updated_date_utc | 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": {
"link": "User",
"map_to": "_owner",
"index": true
},
"validators": []
}_updated_by_id
{
"path": "_updated_by_id",
"instance": "ObjectID",
"options": {
"link": "User",
"map_to": "_updated_by",
"index": true
},
"validators": []
}amount_due
{
"path": "amount_due",
"instance": "Number",
"options": {},
"validators": []
}amount_paid
{
"path": "amount_paid",
"instance": "Number",
"options": {},
"validators": []
}approved_date
{
"path": "approved_date",
"instance": "Date",
"options": {},
"validators": []
}approved_user_id
{
"path": "approved_user_id",
"instance": "ObjectID",
"options": {
"link": "User",
"map_to": "approved_user"
},
"validators": []
}createdAt
{
"path": "createdAt",
"instance": "Date",
"options": {
"immutable": true
},
"validators": []
}currency_code
{
"path": "currency_code",
"instance": "String",
"options": {
"required": true,
"default": "ZAR",
"index": true
},
"validators": [
{
"message": "Path `{PATH}` is required."
}
],
"isRequired": true,
"defaultValue": "ZAR"
}Validators
- : Path `{PATH}` is required.
date
{
"path": "date",
"instance": "Date",
"options": {},
"validators": []
}date_created
{
"path": "date_created",
"instance": "Date",
"options": {},
"validators": [],
"defaultValue": "[Function]"
}date_paid
{
"path": "date_paid",
"instance": "Date",
"options": {},
"validators": []
}discount
{
"path": "discount",
"instance": "Number",
"options": {},
"validators": []
}due_date
{
"path": "due_date",
"instance": "Date",
"options": {
"index": true
},
"validators": []
}ebucks_account
{
"path": "ebucks_account",
"instance": "Array",
"options": {
"type": [
null
]
},
"validators": [],
"defaultValue": "[Function]",
"arrayType": "Mixed"
}ebucks_submitted
{
"path": "ebucks_submitted",
"instance": "Boolean",
"options": {
"default": false
},
"validators": [],
"defaultValue": false
}fnb_txn_token
{
"path": "fnb_txn_token",
"instance": "String",
"options": {},
"validators": []
}fnb_url
{
"path": "fnb_url",
"instance": "String",
"options": {},
"validators": []
}fulfilled
{
"path": "fulfilled",
"instance": "Boolean",
"options": {
"default": false
},
"validators": [],
"defaultValue": false
}fulfilling
{
"path": "fulfilling",
"instance": "Boolean",
"options": {
"default": false
},
"validators": [],
"defaultValue": false
}fulfillment_data
{
"path": "fulfillment_data",
"instance": "Array",
"options": {
"type": [
{}
]
},
"validators": [],
"defaultValue": "[Function]",
"arrayType": "Mixed"
}fulfillment_date
{
"path": "fulfillment_date",
"instance": "Date",
"options": {},
"validators": []
}invoice_id
{
"path": "invoice_id",
"instance": "String",
"options": {},
"validators": []
}invoice_number
{
"path": "invoice_number",
"instance": "String",
"options": {},
"validators": []
}is_quote
{
"path": "is_quote",
"instance": "Boolean",
"options": {
"default": false,
"index": true
},
"validators": [],
"defaultValue": false
}line_items
{
"path": "line_items",
"instance": "Array",
"options": {
"type": [
null
]
},
"validators": [],
"defaultValue": "[Function]",
"arrayType": "Mixed"
}location_id
{
"path": "location_id",
"instance": "ObjectID",
"options": {
"index": true,
"link": "Location"
},
"validators": []
}mail_date
{
"path": "mail_date",
"instance": "Date",
"options": {},
"validators": []
}mail_result
{
"path": "mail_result",
"instance": "Mixed",
"options": {},
"validators": []
}method_paid
{
"path": "method_paid",
"instance": "String",
"options": {},
"validators": []
}mips_iframe
{
"path": "mips_iframe",
"instance": "String",
"options": {},
"validators": []
}mips_qr_code
{
"path": "mips_qr_code",
"instance": "String",
"options": {},
"validators": []
}mips_url
{
"path": "mips_url",
"instance": "String",
"options": {},
"validators": []
}monthly_invoice
{
"path": "monthly_invoice",
"instance": "Boolean",
"options": {
"default": false
},
"validators": [],
"defaultValue": false
}organisation_id
{
"path": "organisation_id",
"instance": "ObjectID",
"options": {
"index": true,
"link": "Organisation"
},
"validators": []
}original_lineitems
{
"path": "original_lineitems",
"instance": "Array",
"options": {
"type": [
null
]
},
"validators": [],
"defaultValue": "[Function]",
"arrayType": "Mixed"
}payment_link
{
"path": "payment_link",
"instance": "String",
"options": {},
"validators": []
}payment_result
{
"path": "payment_result",
"instance": "Mixed",
"options": {},
"validators": []
}paymentrequest_id
{
"path": "paymentrequest_id",
"instance": "ObjectID",
"options": {
"index": true,
"link": "PaymentRequest"
},
"validators": []
}paypal_id
{
"path": "paypal_id",
"instance": "String",
"options": {
"index": true
},
"validators": []
}personal_account
{
"path": "personal_account",
"instance": "Boolean",
"options": {
"default": false
},
"validators": [],
"defaultValue": false
}prorataApplied
{
"path": "prorataApplied",
"instance": "Boolean",
"options": {
"default": false
},
"validators": [],
"defaultValue": false
}quote_id
{
"path": "quote_id",
"instance": "Number",
"options": {
"index": true,
"unique": true,
"sparse": true
},
"validators": []
}quote_number
{
"path": "quote_number",
"instance": "String",
"options": {
"index": true,
"sparse": true,
"unique": true
},
"validators": []
}reference
{
"path": "reference",
"instance": "String",
"options": {},
"validators": []
}rejection_date
{
"path": "rejection_date",
"instance": "Date",
"options": {},
"validators": []
}rejection_reason
{
"path": "rejection_reason",
"instance": "String",
"options": {},
"validators": []
}sent
{
"path": "sent",
"instance": "Boolean",
"options": {},
"validators": []
}sent_date
{
"path": "sent_date",
"instance": "Date",
"options": {},
"validators": []
}sent_user_id
{
"path": "sent_user_id",
"instance": "ObjectID",
"options": {
"link": "User",
"map_to": "sent_user"
},
"validators": []
}source
{
"path": "source",
"instance": "String",
"options": {
"validate": {},
"index": true
},
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`"
}
]
}Validators
- : Validator failed for path `{PATH}` with value `{VALUE}`
status
{
"path": "status",
"instance": "String",
"options": {
"index": true
},
"validators": []
}sub_total
{
"path": "sub_total",
"instance": "Number",
"options": {},
"validators": []
}summary
{
"path": "summary",
"instance": "String",
"options": {},
"validators": []
}tax
{
"path": "tax",
"instance": "Number",
"options": {},
"validators": []
}title
{
"path": "title",
"instance": "String",
"options": {},
"validators": []
}total
{
"path": "total",
"instance": "Number",
"options": {},
"validators": []
}updatedAt
{
"path": "updatedAt",
"instance": "Date",
"options": {},
"validators": []
}user_id
{
"path": "user_id",
"instance": "ObjectID",
"options": {
"index": true,
"link": "User"
},
"validators": []
}xero_creditnote
{
"path": "xero_creditnote",
"instance": "Array",
"options": {
"type": [
null
]
},
"validators": [],
"defaultValue": "[Function]",
"arrayType": "Mixed"
}xero_invoice_id
{
"path": "xero_invoice_id",
"instance": "String",
"options": {
"index": true,
"unique": true
},
"validators": []
}xero_invoice_number
{
"path": "xero_invoice_number",
"instance": "String",
"options": {},
"validators": []
}xero_updated_date_utc
{
"path": "xero_updated_date_utc",
"instance": "String",
"options": {},
"validators": []
}