Merge branch 'fronkdev' into 'master'
Ignoring cancelled orders when counting workorders in Preordercampaign See merge request fronk/thetool!1296
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user