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 comment
skipRead
-
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 items
skipRead
-
attaches an Attachment object
Name Type Description attachmentId
skipRead
-
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 itemIds
location
skipRead
skipErrorHandling
-
Checks out the order
Name Type Description skipRead
skipErrorHandling
-
inherited clearContact(skipRead){promise}
-
Clears the contact for this transaction
Name Type Description skipRead
skip 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 field
skipRead
-
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 skipRead
skip parsing the returned json response into the transaction
-
inherited clearName(skipRead){promise}
-
Clears transaction name
Name Type Description skipRead
skip 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 skipRead
skips 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 id
skipRead
-
detaches an Attachment by kvId (guid)
Name Type Description attachmentId
skipRead
-
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 template
string id
signature
string (base64)
skipRead
bool -
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 itemIds
array 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 items
skipRead
-
inherited reset(){promise}
-
Resets the object
-
Searches for items that could match this order
Name Type Description params
useAvailabilies
onlyUnbooked
skipItems
-
inherited setContact(contactId, skipRead){promise}
-
Sets the contact for this transaction
Name Type Description contactId
skipRead
skip parsing the returned json response into the transaction
-
Set the cover image to an Attachment
Name Type Description att
skipRead
-
Sets the order due date _checkFromDueDate will handle the special check for when the order is open
Name Type Description due
skipRead
-
Sets a custom field
Name Type Description field
value
skipRead
-
Sets multiple custom fields in a single call
Name Type Description fields
skipRead
-
Sets the Order from date
Name Type Description date
skipRead
-
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 from
due
(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 locationId
skipRead
skip parsing the returned json response into the transaction
-
inherited setName(name, skipRead){promise}
-
Sets transaction name
Name Type Description name
skipRead
skip parsing the returned json response into the transaction
-
inherited setToDate(date, skipRead){promise}
-
Sets the transaction to date
Name Type Description date
skipRead
-
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 m
Moment 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 fromItem
toItem
skipRead
-
Undoes the order checkout
Name Type Description skipRead
-
inherited update(skipRead){promise}
-
Updates an object by the default api.update
Name Type Description skipRead
skips reading the response via _fromJson (false)
-
Updates a comment by id
Name Type Description id
comment
skipRead