Skip to main content

Zymba Documentation

ZeyOS.ObjectTransaction

Text
object @ZeyOS.ObjectTransaction(@ZeyOS.Object) {
construct(?int $id) {}
book(): bool {}
calculateTaxes(): object {}
calculateTotals(): object {}
canCancel(): bool {}
cancel(): bool {}
canClose(): bool {}
close(): bool {}
fromEinvoice(string $document): object {}
fromXML(string $xml): object {}
getBalance(): float {}
getItems(): object {}
isBilling(): bool {}
isProcurement(): bool {}
isProduction(): bool {}
process(object $fields, object $serials): bool {}
setItems(object $items): $this {}
toEinvoice(object $extra): string {}
toXML(string $format, string $context, object $extra): string {}
}

Prototype

ZeyOS.Object

Methods

CODE
$this.construct(?int $id): void
Parameters
NameTypeValueDefault
id?intnew
CODE
$this.book(): bool
Returns
TypeValue
bool
CODE
$this.calculateTaxes(): object
Returns
TypeValue
object[[taxrate: ..., totalnet: ..., totalgross: ..., tax: ...], ...]
CODE
$this.calculateTotals(): object
Returns
TypeValue
object[discount: ..., netamount: ..., tax:: ..., costs: ..., weight: ...]
CODE
$this.canCancel(): bool
Returns
TypeValue
bool
CODE
$this.cancel(): bool
Returns
TypeValue
bool
CODE
$this.canClose(): bool
Returns
TypeValue
bool
CODE
$this.close(): bool
Returns
TypeValue
bool
CODE
$this.fromEinvoice(string $document): object
Parameters
NameTypeValueDefault
documentstring""
Returns
TypeValue
object
CODE
$this.fromXML(string $xml): object
Parameters
NameTypeValueDefault
xmlstring""
Returns
TypeValue
object
CODE
$this.getBalance(): float
Returns
TypeValue
float
CODE
$this.getItems(): object
Returns
TypeValue
object
CODE
$this.isBilling(): bool
Returns
TypeValue
bool
CODE
$this.isProcurement(): bool
Returns
TypeValue
bool
CODE
$this.isProduction(): bool
Returns
TypeValue
bool
CODE
$this.process(object $fields, object $serials): bool
Parameters
NameTypeValueDefault
fieldsobject[name: value, ...][]
serialsobject[serialnum, ...][]
Returns
TypeValue
bool
CODE
$this.setItems(object $items): this
Parameters
NameTypeValueDefault
itemsobject[]
Returns
TypeValue
$this
CODE
$this.toEinvoice(object $extra): string
Parameters
NameTypeValueDefault
extraobject[name: value, ...][]
Returns
TypeValue
string
CODE
$this.toXML(string $format, string $context, object $extra): string
Parameters
NameTypeValueDefault
formatstring"CII"
contextstring""
extraobject[name: value, ...][]
Returns
TypeValue
string