Model invoices


Permissions

User GroupCreate?Read?Update?Delete?
adminxxxx
ownerxxx
primary_memberx
userx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?
__vNumber
_deletedBooleanfalsex
_idObjectIDfunction defaultId() { return new oid(); }
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
amount_dueNumber
amount_paidNumber
approved_dateDate
approved_user_idObjectIDUserapproved_user
createdAtDate
dateDate
date_createdDatefunction now() { [native code] }
date_paidDate
discountNumber
due_dateDatex
ebucks_accountArrayfunction() { // Leave it up to `cast()` to convert the array return fn ? defaultArr.call(this) : defaultArr != null ? [].concat(defaultArr) : []; }
ebucks_submittedBooleanfalse
fnb_txn_tokenString
fnb_urlString
fulfilledBooleanfalse
fulfillingBooleanfalse
fulfillment_dataArrayfunction() { // Leave it up to `cast()` to convert the array return fn ? defaultArr.call(this) : defaultArr != null ? [].concat(defaultArr) : []; }
fulfillment_dateDate
invoice_idString
invoice_numberString
line_itemsArrayfunction() { // Leave it up to `cast()` to convert the array return fn ? defaultArr.call(this) : defaultArr != null ? [].concat(defaultArr) : []; }
location_idObjectIDLocationx
mail_dateDate
mail_resultMixed
method_paidString
mips_iframeString
mips_qr_codeString
mips_urlString
monthly_invoiceBooleanfalse
organisation_idObjectIDOrganisationx
original_lineitemsArrayfunction() { // Leave it up to `cast()` to convert the array return fn ? defaultArr.call(this) : defaultArr != null ? [].concat(defaultArr) : []; }
payment_resultMixed
paypal_idStringx
personal_accountBooleanfalse
referenceString
rejection_dateDate
rejection_reasonString
sentBoolean
sent_dateDate
sent_user_idObjectIDUsersent_user
sourceStringx
statusStringx
sub_totalNumber
taxNumber
totalNumber
updatedAtDate
user_idObjectIDUserx
xero_creditnoteArrayfunction() { // Leave it up to `cast()` to convert the array return fn ? defaultArr.call(this) : defaultArr != null ? [].concat(defaultArr) : []; }
xero_invoice_idStringx
xero_invoice_numberString
xero_updated_date_utcString

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
}