Class: OrderTransfer

OrderTransfer

OrderTransfer

new OrderTransfer()

OrderTransfer

Properties:
Name Type Description
id string

short UUID

by cr.User

who created this doc

created Date

when was this doc created

modified Date

when was this doc last modified

status string

creating, open, closed

items Array

list of items

started Date

when was the transfer started

accepted Date

when was the transfer accepted

fromOrder Date

from order

toOrder Date

to order

startedBy cr.User

who started the transfer

Extends

Members

accept

accept transfers the items to another customer

addBarcode

Adds a barcode

addItems

addItems adds items to transfer from an order (must be items of the same order)

clearFlag

Clears the flag of an item

clearLabel

Clears the label of an item

isDirty

Checks if the base is dirty and needs saving

isEmpty

Checks if the order transfer is empty

qr

getQRUrl returns path to transfer qr code

removeItems

removeItems removes items from transfer

setFlag

Sets the flag of an item

setLabel

Sets the label of an item

start

start puts the transfer in status "open"

undoStart

undoStart puts the transfer in status "creating" again

updateFields

Update fields of a document

Methods

inherited addComment(comment, skipRead){promise}

Adds a comment by string

Name Type Description
comment
skipRead

inherited attach(attachmentId, skipRead){promise}

attaches an Attachment object

Name Type Description
attachmentId
skipRead

inherited canDelete(){promise}

Checks via the api if we can delete the document

inherited clearCover(skipRead){promise}

Clears the cover image

Name Type Description
skipRead

inherited clearField(field, skipRead)

Clears a custom field

Name Type Description
field
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

inherited deleteComment(id, skipRead){promise}

Deletes a Comment by id

Name Type Description
id
skipRead

inherited detach(attachmentId, skipRead){promise}

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

inherited get(_fields){promise}

Gets an object by the default api.get

Name Type Description
_fields

inherited isValid(){boolean}

Checks if the object is valid

inherited reload(_fields){promise}

Reloads the object from db

Name Type Description
_fields

inherited reset(){promise}

Resets the object

inherited setCover(att, skipRead){promise}

Set the cover image to an Attachment

Name Type Description
att
skipRead

inherited setField(field, value, skipRead){promise}

Sets a custom field

Name Type Description
field
value
skipRead

inherited setFields(fields, skipRead){promise}

Sets multiple custom fields in a single call

Name Type Description
fields
skipRead

inherited update(skipRead){promise}

Updates an object by the default api.update

Name Type Description
skipRead

skips reading the response via _fromJson (false)

inherited updateComment(id, comment, skipRead){promise}

Updates a comment by id

Name Type Description
id
comment
skipRead