Added export serial method in production order controller
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Larastan / larastan (pull_request) Failing after 3m39s
Laravel Pint / pint (pull_request) Failing after 13m10s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Larastan / larastan (pull_request) Failing after 3m39s
Laravel Pint / pint (pull_request) Failing after 13m10s
This commit is contained in:
@@ -11,6 +11,8 @@ use Illuminate\Support\Facades\Log;
|
|||||||
use Mpdf\QrCode\QrCode;
|
use Mpdf\QrCode\QrCode;
|
||||||
use Mpdf\QrCode\Output;
|
use Mpdf\QrCode\Output;
|
||||||
use Barryvdh\DomPDF\Facade\Pdf;
|
use Barryvdh\DomPDF\Facade\Pdf;
|
||||||
|
use App\Exports\SerialExport;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
|
||||||
class ProductionOrderController extends Controller
|
class ProductionOrderController extends Controller
|
||||||
{
|
{
|
||||||
@@ -62,6 +64,7 @@ class ProductionOrderController extends Controller
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$pdf = Pdf::loadView('production-orders.print', compact('stickers'))
|
$pdf = Pdf::loadView('production-orders.print', compact('stickers'))
|
||||||
->setPaper([0, 0, 170, 40]);
|
->setPaper([0, 0, 170, 40]);
|
||||||
|
|
||||||
@@ -214,6 +217,24 @@ class ProductionOrderController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function exportSerial($production_order, $plantCode, $fromSerialNo, $toSerialNo){
|
||||||
|
$order = ProductionOrder::where('production_order', $production_order)->first();
|
||||||
|
|
||||||
|
if (!$order) {
|
||||||
|
abort(404, 'Production Order not found');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return Excel::download(
|
||||||
|
new SerialExport(
|
||||||
|
$order->item->code,
|
||||||
|
$fromSerialNo,
|
||||||
|
$toSerialNo
|
||||||
|
),
|
||||||
|
'serial_numbers.xlsx'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a newly created resource in storage.
|
* Store a newly created resource in storage.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user