Added workorder team filter in Preorder/Index
This commit is contained in:
@@ -446,12 +446,20 @@ foreach($netowners as $apiOwner) {
|
||||
|
||||
$wo = \RimoWorkorderModel::getFirst(["rimo_id" => $rimo_workorder_id]);
|
||||
|
||||
if($wo && $workorder_status != $wo->rimo_status) {
|
||||
if($wo) {
|
||||
//echo "Updating Workorder $rimo_workorder_id ($workorder_home_id)\n";
|
||||
$wo->rimo_status = $workorder_status;
|
||||
if($team_id) $wo->rimo_team_id = $team_id;
|
||||
if($team_name) $wo->rimo_team_name = $team_name;
|
||||
$wo->save();
|
||||
if($workorder_status != $wo->rimo_status) {
|
||||
$wo->rimo_status = $workorder_status;
|
||||
$wo->save();
|
||||
}
|
||||
if($team_id != $wo->rimo_team_id) {
|
||||
$wo->rimo_team_id = $team_id;
|
||||
$wo->save();
|
||||
}
|
||||
if($team_name != $wo->rimo_team_name) {
|
||||
$wo->rimo_team_name = $team_name;
|
||||
$wo->save();
|
||||
}
|
||||
}
|
||||
|
||||
if(!$wo) {
|
||||
|
||||
Reference in New Issue
Block a user