ranjith-dev #327
@@ -2841,7 +2841,7 @@ class CharacteristicsController extends Controller
|
|||||||
$app2 = $pendingExists->approver_status2 ?? null;
|
$app2 = $pendingExists->approver_status2 ?? null;
|
||||||
$app3 = $pendingExists->approver_status3 ?? null;
|
$app3 = $pendingExists->approver_status3 ?? null;
|
||||||
|
|
||||||
if ($app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected' && $app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved') {
|
if ($app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved' && $app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected') {
|
||||||
$pendingCharacteristics[] = strtoupper($charNameUpp);
|
$pendingCharacteristics[] = strtoupper($charNameUpp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2887,7 +2887,6 @@ class CharacteristicsController extends Controller
|
|||||||
$lastWorkflow = RequestCharacteristic::where('work_flow_id', 'like', "{$prefix}%")
|
$lastWorkflow = RequestCharacteristic::where('work_flow_id', 'like', "{$prefix}%")
|
||||||
// ->where('plant_id', $plantId)
|
// ->where('plant_id', $plantId)
|
||||||
// ->where('machine_id', $MachineId)
|
// ->where('machine_id', $MachineId)
|
||||||
->where('work_flow_id', 'like', "{$prefix}%")
|
|
||||||
->orderByDesc('work_flow_id')
|
->orderByDesc('work_flow_id')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
@@ -2999,10 +2998,11 @@ class CharacteristicsController extends Controller
|
|||||||
$app2 = $pendingExists->approver_status2 ?? null;
|
$app2 = $pendingExists->approver_status2 ?? null;
|
||||||
$app3 = $pendingExists->approver_status3 ?? null;
|
$app3 = $pendingExists->approver_status3 ?? null;
|
||||||
|
|
||||||
if ($app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved') {// $app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected' &&
|
if ($app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved' && $app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected') {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status_code' => 'ERROR',
|
'status_code' => 'ERROR',
|
||||||
'status_description' => "Quality Approval is already pending for the Job Number : '{$jobNo}'",
|
'status_description' => "Quality Approval is already pending for the Job Number : '{$jobNo}'",
|
||||||
|
// 'status_error' => $pendingExists,
|
||||||
], 404);
|
], 404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3014,7 +3014,6 @@ class CharacteristicsController extends Controller
|
|||||||
$prefix = "WF-{$year}{$month}{$date}-";
|
$prefix = "WF-{$year}{$month}{$date}-";
|
||||||
|
|
||||||
$lastWorkflow = RequestCharacteristic::where('work_flow_id', 'like', "{$prefix}%")
|
$lastWorkflow = RequestCharacteristic::where('work_flow_id', 'like', "{$prefix}%")
|
||||||
->where('work_flow_id', 'like', "{$prefix}%")
|
|
||||||
->orderByDesc('work_flow_id')
|
->orderByDesc('work_flow_id')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
@@ -3583,15 +3582,9 @@ class CharacteristicsController extends Controller
|
|||||||
'requested_characteristics' => $response,
|
'requested_characteristics' => $response,
|
||||||
], 200);
|
], 200);
|
||||||
} else {
|
} else {
|
||||||
$filePath = '';
|
$extension = ($requestType == 'Characteristic') ? 'pdf' : 'png';
|
||||||
$filename = '';
|
$filePath = "uploads/LaserDocs/{$workFlowId}.{$extension}";
|
||||||
if ($requestType == 'Characteristic') {
|
$filename = "{$workFlowId}.{$extension}";
|
||||||
$filePath = "uploads/LaserDocs/{$workFlowId}.pdf";
|
|
||||||
$filename = "{$workFlowId}.pdf";
|
|
||||||
} else {
|
|
||||||
$filePath = "uploads/LaserDocs/{$workFlowId}.png";
|
|
||||||
$filename = "{$workFlowId}.png";
|
|
||||||
}
|
|
||||||
|
|
||||||
$workFlowIdExist = RequestCharacteristic::where('work_flow_id', $workFlowId)->first();
|
$workFlowIdExist = RequestCharacteristic::where('work_flow_id', $workFlowId)->first();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user