Merge branch 'fronkdev' into 'master'

Ignoring cancelled orders when counting workorders in Preordercampaign

See merge request fronk/thetool!1296
This commit is contained in:
Frank Schubert
2025-05-06 13:47:29 +00:00

View File

@@ -125,7 +125,7 @@ class Preordercampaign extends mfBaseModel {
if($this->$name == null) {
if($name == "workorder_count") {
$wo_count = PreorderModel::count(["rimo_workorder" => true, "preordercampaign_id" => $this->id]);
$wo_count = PreorderModel::countActive(["rimo_workorder" => true, "preordercampaign_id" => $this->id]);
if($wo_count) {
$this->workorder_count = $wo_count;
}