enabled deleting orders
This commit is contained in:
@@ -46,6 +46,15 @@ class Order extends mfBaseModel {
|
||||
return $terminations;
|
||||
}
|
||||
|
||||
public function deletePositions() {
|
||||
if(!is_array($this->getProperty("products")) || !count($this->getProperty("products"))) {
|
||||
return true;
|
||||
}
|
||||
foreach($this->getProperty("products") as $position) {
|
||||
$position->delete();
|
||||
}
|
||||
}
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user