Extends
Members
-
addBarcode
-
Adds a barcode
-
archive
-
Archive a transaction
-
canArchive
-
Checks if we can archive a transaction (based on status)
-
canGenerateDocument
-
Checks if we can generate a document for this order (based on status)
-
canUndoArchive
-
Checks if we can unarchive a transaction (based on status)
-
clearFlag
-
Clears the flag of an item
-
clearLabel
-
Clears the label of an item
-
isValidDueDate
-
Checks if due date is valid for an creating order oterwise return true
-
setFlag
-
Sets the flag of an item
-
setLabel
-
Sets the label of an item
-
undoArchive
-
Undo archive of a transaction
-
updateFields
-
Update fields of a document
Methods
-
Adds a comment by string
Name Type Description commentskipRead -
inherited addItems(items, skipRead){promise}
-
addItems; adds a bunch of Items to the transaction using a list of item ids It creates the transaction if it doesn't exist yet
Name Type Description itemsskipRead -
attaches an Attachment object
Name Type Description attachmentIdskipRead -
Checks if items can be added to the checkout (based on status)
-
Checks if order can be checked in
-
Checks if order can be checked out
-
Checks if the order can be deleted (based on status)
-
Checks if a PDF document can be generated
-
Checks if the order has an reservation linked to it
-
Checks if items can be removed from the checkout (based on status)
-
Checks if items can be swapped in the checkout (based on status)
-
Checks if order can undo checkout
-
Checks in the order
Name Type Description itemIdslocationskipReadskipErrorHandling -
Checks out the order
Name Type Description skipReadskipErrorHandling -
inherited clearContact(skipRead){promise}
-
Clears the contact for this transaction
Name Type Description skipReadskip parsing the returned json response into the transaction
-
Clears the cover image
Name Type Description skipRead -
Clears the order due date
Name Type Description skipRead -
Clears a custom field
Name Type Description fieldskipRead -
Clears the order from date
Name Type Description skipRead -
inherited clearItems(skipRead){promise}
-
clearItems; removes all Items from the transaction It deletes the transaction if it's empty afterwards and autoCleanup is true
Name Type Description skipRead -
inherited clearLocation(skipRead){promise}
-
Clears the location for this transaction
Name Type Description skipReadskip parsing the returned json response into the transaction
-
inherited clearName(skipRead){promise}
-
Clears transaction name
Name Type Description skipReadskip parsing the returned json response into the transaction
-
inherited clearToDate(skipRead){promise}
-
Clear the transaction to date
Name Type Description skipRead -
inherited create(skipRead){promise}
-
Creates an object by the default api.create
Name Type Description skipReadskips reading the response via _fromJson (false)
-
inherited delete(){promise}
-
Deletes an object by the default api.delete
-
Deletes a Comment by id
Name Type Description idskipRead -
detaches an Attachment by kvId (guid)
Name Type Description attachmentIdskipRead -
inherited discardChanges(){promise}
-
Discards any changes made to the object from the previously loaded raw response or resets it when no old raw response was found
-
inherited existsInDb(){boolean}
-
Checks if the document exists in the database
-
Generates a PDF document for the order
Name Type Description templatestring id
signaturestring (base64)
skipReadbool -
inherited get(_fields){promise}
-
Gets an object by the default api.get
Name Type Description _fields -
Gets a moment duration object
-
Gets a friendly order duration or empty string
-
inherited getMaxDate(){Moment}
-
DEPRECATED Gets the latest possible date to end this transaction
Returns:
date
-
inherited getMaxDateDue(){Moment}
-
Gets the highest possible due date, by default same as getMaxDateDue
-
inherited getMaxDateFrom(){Moment}
-
Gets the highest possible from date, by default years from now
-
inherited getMaxDateTo(){Moment}
-
Gets the highest possible to date, by default years from now
-
inherited getMinDate(){Moment}
-
DEPRECATED Gets the lowest possible date to start this transaction
Returns:
date
-
inherited getMinDateDue(){Moment}
-
Gets the lowest possible due date, by default same as getMinDateTo
-
inherited getMinDateFrom(){Moment}
-
Gets the lowest possible from date, by default now
-
inherited getMinDateTo(){Moment}
-
Gets the lowest possible to date, by default from +1 timeslot
-
hasItems; Gets a list of items that are already part of the transaction
Name Type Description itemIdsarray of string values
-
inherited isDirty(){boolean}
-
Checks if the transaction is dirty and needs saving
-
inherited isEmpty(){boolean}
-
Checks if the transaction is empty
-
inherited isValid(){boolean}
-
Checks if the object is valid
-
inherited reload(_fields){promise}
-
Reloads the object from db
Name Type Description _fields -
inherited removeItems(items, skipRead){promise}
-
removeItems; removes a bunch of Items from the transaction using a list of item ids It deletes the transaction if it's empty afterwards and autoCleanup is true
Name Type Description itemsskipRead -
inherited reset(){promise}
-
Resets the object
-
Searches for items that could match this order
Name Type Description paramsuseAvailabiliesonlyUnbookedskipItems -
inherited setContact(contactId, skipRead){promise}
-
Sets the contact for this transaction
Name Type Description contactIdskipReadskip parsing the returned json response into the transaction
-
Set the cover image to an Attachment
Name Type Description attskipRead -
Sets the order due date _checkFromDueDate will handle the special check for when the order is open
Name Type Description dueskipRead -
Sets a custom field
Name Type Description fieldvalueskipRead -
Sets multiple custom fields in a single call
Name Type Description fieldsskipRead -
Sets the Order from date
Name Type Description dateskipRead -
Sets the Order from and due date in a single call _checkFromDueDate will handle the special check for when the order is open
Name Type Description fromdue(optional) if null, we'll take the default average checkout duration as due date
skipRead -
inherited setLocation(locationId, skipRead){promise}
-
Sets the location for this transaction
Name Type Description locationIdskipReadskip parsing the returned json response into the transaction
-
inherited setName(name, skipRead){promise}
-
Sets transaction name
Name Type Description nameskipReadskip parsing the returned json response into the transaction
-
inherited setToDate(date, skipRead){promise}
-
Sets the transaction to date
Name Type Description dateskipRead -
inherited suggestEndDate(m){*}
-
suggestEndDate, makes a new moment() object with a suggested end date, already rounded up according to the group.profile settings
Name Type Description mMoment a suggested end date for this transaction
-
inherited swapItem(fromItem, toItem, skipRead){promise}
-
swapItem; swaps one item for another in a transaction
Name Type Description fromItemtoItemskipRead -
Undoes the order checkout
Name Type Description skipRead -
inherited update(skipRead){promise}
-
Updates an object by the default api.update
Name Type Description skipReadskips reading the response via _fromJson (false)
-
Updates a comment by id
Name Type Description idcommentskipRead