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? |
---|
__v | Number | | | | | |
_deleted | Boolean | | | false | x | |
_id | ObjectID | | | function defaultId() {
return new oid();
} | | |
_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 | | | | | |
date | Date | | | | | |
date_created | Date | | | function now() { [native code] } | | |
date_paid | Date | | | | | |
discount | Number | | | | | |
due_date | Date | | | | x | |
ebucks_account | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
ebucks_submitted | Boolean | | | false | | |
fnb_txn_token | String | | | | | |
fnb_url | String | | | | | |
fulfilled | Boolean | | | false | | |
fulfilling | Boolean | | | false | | |
fulfillment_data | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
fulfillment_date | Date | | | | | |
invoice_id | String | | | | | |
invoice_number | String | | | | | |
line_items | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
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 | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
payment_result | Mixed | | | | | |
paypal_id | String | | | | x | |
personal_account | Boolean | | | false | | |
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 | | | | | |
tax | Number | | | | | |
total | Number | | | | | |
updatedAt | Date | | | | | |
user_id | ObjectID | User | | | x | |
xero_creditnote | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
xero_invoice_id | String | | | | x | |
xero_invoice_number | String | | | | | |
xero_updated_date_utc | String | | | | | |
Raw definition
{
"path": "__v",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"__v"
],
"options": {},
"_index": null
}
{
"path": "_deleted",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_deleted"
],
"options": {
"default": false,
"index": true
},
"_index": true,
"defaultValue": false
}
{
"path": "_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"_id"
],
"options": {
"auto": true,
"type": "ObjectId"
},
"_index": null
}
{
"path": "_owner_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_owner_id"
],
"options": {
"link": "User",
"map_to": "_owner",
"index": true
},
"_index": true
}
{
"path": "_updated_by_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_updated_by_id"
],
"options": {
"link": "User",
"map_to": "_updated_by",
"index": true
},
"_index": true
}
{
"path": "amount_due",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"amount_due"
],
"options": {},
"_index": null
}
{
"path": "amount_paid",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"amount_paid"
],
"options": {},
"_index": null
}
{
"path": "approved_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"approved_date"
],
"options": {},
"_index": null
}
{
"path": "approved_user_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"approved_user_id"
],
"options": {
"link": "User",
"map_to": "approved_user"
},
"_index": null
}
{
"path": "createdAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [
null,
null
],
"_presplitPath": [
"createdAt"
],
"options": {
"immutable": true
},
"_index": null,
"$immutable": true,
"$fullPath": "createdAt"
}
{
"path": "date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"date"
],
"options": {},
"_index": null
}
{
"path": "date_created",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"date_created"
],
"options": {},
"_index": null
}
{
"path": "date_paid",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"date_paid"
],
"options": {},
"_index": null
}
{
"path": "discount",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"discount"
],
"options": {},
"_index": null
}
{
"path": "due_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"due_date"
],
"options": {
"index": true
},
"_index": true
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "cru",
"primary_member": "r",
"user": "c"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "cru",
"user": "c",
"all": "",
"primary_member": "r"
},
"pluralization": true
},
"caster": {
"path": "ebucks_account",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"ebucks_account"
],
"options": {},
"_index": null,
"_arrayPath": "ebucks_account.$",
"_arrayParentPath": "ebucks_account"
},
"$embeddedSchemaType": {
"path": "ebucks_account",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"ebucks_account"
],
"options": {},
"_index": null,
"_arrayPath": "ebucks_account.$",
"_arrayParentPath": "ebucks_account"
},
"$isMongooseArray": true,
"path": "ebucks_account",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"ebucks_account"
],
"options": {
"type": [
null
]
},
"_index": null
}
{
"path": "ebucks_submitted",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"ebucks_submitted"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false
}
{
"enumValues": [],
"regExp": null,
"path": "fnb_txn_token",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fnb_txn_token"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "fnb_url",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fnb_url"
],
"options": {},
"_index": null
}
{
"path": "fulfilled",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fulfilled"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false
}
{
"path": "fulfilling",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fulfilling"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false,
"$fullPath": "fulfilling"
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "cru",
"primary_member": "r",
"user": "c"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "cru",
"user": "c",
"all": "",
"primary_member": "r"
},
"pluralization": true
},
"caster": {
"path": "fulfillment_data",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fulfillment_data"
],
"options": {},
"_index": null,
"_arrayPath": "fulfillment_data.$",
"_arrayParentPath": "fulfillment_data"
},
"$embeddedSchemaType": {
"path": "fulfillment_data",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fulfillment_data"
],
"options": {},
"_index": null,
"_arrayPath": "fulfillment_data.$",
"_arrayParentPath": "fulfillment_data"
},
"$isMongooseArray": true,
"path": "fulfillment_data",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fulfillment_data"
],
"options": {
"type": [
{}
]
},
"_index": null
}
{
"path": "fulfillment_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"fulfillment_date"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "invoice_id",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"invoice_id"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "invoice_number",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"invoice_number"
],
"options": {},
"_index": null
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "cru",
"primary_member": "r",
"user": "c"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "cru",
"user": "c",
"all": "",
"primary_member": "r"
},
"pluralization": true
},
"caster": {
"path": "line_items",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"line_items"
],
"options": {},
"_index": null,
"_arrayPath": "line_items.$",
"_arrayParentPath": "line_items"
},
"$embeddedSchemaType": {
"path": "line_items",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"line_items"
],
"options": {},
"_index": null,
"_arrayPath": "line_items.$",
"_arrayParentPath": "line_items"
},
"$isMongooseArray": true,
"path": "line_items",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"line_items"
],
"options": {
"type": [
null
]
},
"_index": null
}
{
"path": "location_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"index": true,
"link": "Location"
},
"_index": true
}
{
"path": "mail_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"mail_date"
],
"options": {},
"_index": null
}
{
"path": "mail_result",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"mail_result"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "method_paid",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"method_paid"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "mips_iframe",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"mips_iframe"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "mips_qr_code",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"mips_qr_code"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "mips_url",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"mips_url"
],
"options": {},
"_index": null
}
{
"path": "monthly_invoice",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"monthly_invoice"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false
}
{
"path": "organisation_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"organisation_id"
],
"options": {
"index": true,
"link": "Organisation"
},
"_index": true
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "cru",
"primary_member": "r",
"user": "c"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "cru",
"user": "c",
"all": "",
"primary_member": "r"
},
"pluralization": true
},
"caster": {
"path": "original_lineitems",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"original_lineitems"
],
"options": {},
"_index": null,
"_arrayPath": "original_lineitems.$",
"_arrayParentPath": "original_lineitems"
},
"$embeddedSchemaType": {
"path": "original_lineitems",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"original_lineitems"
],
"options": {},
"_index": null,
"_arrayPath": "original_lineitems.$",
"_arrayParentPath": "original_lineitems"
},
"$isMongooseArray": true,
"path": "original_lineitems",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"original_lineitems"
],
"options": {
"type": [
null
]
},
"_index": null
}
{
"path": "payment_result",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"payment_result"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "paypal_id",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"paypal_id"
],
"options": {
"index": true
},
"_index": true
}
{
"path": "personal_account",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"personal_account"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false
}
{
"enumValues": [],
"regExp": null,
"path": "reference",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"reference"
],
"options": {},
"_index": null
}
{
"path": "rejection_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"rejection_date"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "rejection_reason",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"rejection_reason"
],
"options": {},
"_index": null
}
{
"path": "sent",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"sent"
],
"options": {},
"_index": null
}
{
"path": "sent_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"sent_date"
],
"options": {},
"_index": null
}
{
"path": "sent_user_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"sent_user_id"
],
"options": {
"link": "User",
"map_to": "sent_user"
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "source",
"instance": "String",
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
"type": "user defined",
"validator": {}
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"source"
],
"options": {
"validate": {},
"index": true
},
"_index": true
}
{
"enumValues": [],
"regExp": null,
"path": "status",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"status"
],
"options": {
"index": true
},
"_index": true
}
{
"path": "sub_total",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"sub_total"
],
"options": {},
"_index": null
}
{
"path": "tax",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"tax"
],
"options": {},
"_index": null
}
{
"path": "total",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"total"
],
"options": {},
"_index": null
}
{
"path": "updatedAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updatedAt"
],
"options": {},
"_index": null,
"$fullPath": "updatedAt"
}
{
"path": "user_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"user_id"
],
"options": {
"index": true,
"link": "User"
},
"_index": true
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "cru",
"primary_member": "r",
"user": "c"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "cru",
"user": "c",
"all": "",
"primary_member": "r"
},
"pluralization": true
},
"caster": {
"path": "xero_creditnote",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_creditnote"
],
"options": {},
"_index": null,
"_arrayPath": "xero_creditnote.$",
"_arrayParentPath": "xero_creditnote"
},
"$embeddedSchemaType": {
"path": "xero_creditnote",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_creditnote"
],
"options": {},
"_index": null,
"_arrayPath": "xero_creditnote.$",
"_arrayParentPath": "xero_creditnote"
},
"$isMongooseArray": true,
"path": "xero_creditnote",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_creditnote"
],
"options": {
"type": [
null
]
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "xero_invoice_id",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_invoice_id"
],
"options": {
"index": true
},
"_index": true
}
{
"enumValues": [],
"regExp": null,
"path": "xero_invoice_number",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_invoice_number"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "xero_updated_date_utc",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_updated_date_utc"
],
"options": {},
"_index": null
}