Added operator_id and scanned_status filter fields to Invoice validaitons resources and Alignment changed in filter option for Production Quantity / Quality Validation
This commit is contained in:
@@ -1217,6 +1217,10 @@ class ProductionQuantityResource extends Resource
|
||||
$query->where('sap_msg_status', $data['sap_msg_status']);
|
||||
}
|
||||
|
||||
if (!empty($data['operator_id'])) {
|
||||
$query->where('operator_id', $data['operator_id']);
|
||||
}
|
||||
|
||||
if ($from = $data['created_from'] ?? null) {
|
||||
$query->where('created_at', '>=', $from);
|
||||
}
|
||||
@@ -1225,10 +1229,6 @@ class ProductionQuantityResource extends Resource
|
||||
$query->where('created_at', '<=', $to);
|
||||
}
|
||||
|
||||
if (!empty($data['operator_id'])) {
|
||||
$query->where('operator_id', $data['operator_id']);
|
||||
}
|
||||
|
||||
// return $query;
|
||||
})
|
||||
->indicateUsing(function (array $data) {
|
||||
@@ -1262,6 +1262,10 @@ class ProductionQuantityResource extends Resource
|
||||
$indicators[] = 'SAP Message Status: ' . $data['sap_msg_status'];
|
||||
}
|
||||
|
||||
if (!empty($data['operator_id'])) {
|
||||
$indicators[] = 'Created By: ' . $data['operator_id'];
|
||||
}
|
||||
|
||||
if (!empty($data['created_from'])) {
|
||||
$indicators[] = 'From: ' . $data['created_from'];
|
||||
}
|
||||
@@ -1270,10 +1274,6 @@ class ProductionQuantityResource extends Resource
|
||||
$indicators[] = 'To: ' . $data['created_to'];
|
||||
}
|
||||
|
||||
if (!empty($data['operator_id'])) {
|
||||
$indicators[] = 'Created By: ' . $data['operator_id'];
|
||||
}
|
||||
|
||||
return $indicators;
|
||||
})
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user