enabled deleting orders

This commit is contained in:
Frank Schubert
2021-08-09 17:01:40 +02:00
parent 38d13c3326
commit 7302470771
3 changed files with 35 additions and 2 deletions
+9
View File
@@ -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) {