2 Commits

2 changed files with 29 additions and 16 deletions

View File

@@ -24,15 +24,15 @@ class PalletController extends Controller
$qrBinary = $output->output($qrCode, 100); $qrBinary = $output->output($qrCode, 100);
$qrBase64 = base64_encode($qrBinary); $qrBase64 = base64_encode($qrBinary);
$html = ' return '
<html> <html>
<head> <head>
<style> <style>
body { margin: 0; padding: 0; width: 60mm; height: 14mm; font-size: 10pt; font-family: DejaVu Sans, sans-serif; } body { margin: 0; padding: 0; width: 60mm; height: 14mm; font-size: 10pt; font-family: DejaVu Sans, sans-serif; }
.sticker-table { width: 60mm; height: 14mm; border-collapse: collapse; } .sticker-table { width: 60mm; height: 14mm; border-collapse: collapse; }
.qr-cell { width: 14mm; text-align: left; vertical-align: middle; padding-left: 6mm; padding-top: 2mm; } .qr-cell { width: 14mm; text-align: right; vertical-align: bottom; padding-left: 4mm; padding-top: -6mm; }
.text-cell { text-align: left; vertical-align: middle; font-size: 15pt; padding-left: 4mm; padding-top: 2mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; } .text-cell { text-align: left; vertical-align: middle; font-size: 16pt; padding-left: 4mm; padding-top: 2mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; }
img.qr { width: 18mm; height: 18mm; display: block; } img.qr { width: 13mm; height: 13mm; display: block; }
</style> </style>
</head> </head>
<body> <body>
@@ -46,23 +46,31 @@ class PalletController extends Controller
</td> </td>
</tr> </tr>
</table> </table>
<script>
window.onload = function () {
window.print();
setTimeout(function () {
window.close();
}, 500); // Wait 0.5 seconds before closing
};
</script>
</body> </body>
</html> </html>
'; ';
$mpdf = new Mpdf([ // $mpdf = new Mpdf([
'mode' => 'utf-8', // 'mode' => 'utf-8',
'format' => [60, 14], // 'format' => [60, 14],
'margin_left' => 0, // 'margin_left' => 0,
'margin_right' => 0, // 'margin_right' => 0,
'margin_top' => 0, // 'margin_top' => 0,
'margin_bottom' => 0, // 'margin_bottom' => 0,
'tempDir' => '/var/www/storage/mpdf-tmp', // // 'tempDir' => '/var/www/storage/mpdf-tmp',
]); // ]);
$mpdf->WriteHTML($html); // $mpdf->WriteHTML($html);
$mpdf->Output('qr-label.pdf', 'I'); // // Output PDF to browser for printing
exit; // $mpdf->Output('qr-label.pdf', 'I');
} }
/** /**

View File

@@ -127,6 +127,9 @@ class PermissionSeeder extends Seeder
Permission::updateOrCreate(['name' => 'view import mfm parameter']); Permission::updateOrCreate(['name' => 'view import mfm parameter']);
Permission::updateOrCreate(['name' => 'view export mfm parameter']); Permission::updateOrCreate(['name' => 'view export mfm parameter']);
Permission::updateOrCreate(['name' => 'view import mfm meter']);
Permission::updateOrCreate(['name' => 'view export mfm meter']);
//Dashboard Permissions //Dashboard Permissions
Permission::updateOrCreate(['name' => 'view invoice dashboard']); //invoice dashboard Permission::updateOrCreate(['name' => 'view invoice dashboard']); //invoice dashboard
Permission::updateOrCreate(['name' => 'view production hourly count dashboard']); //hourly production Permission::updateOrCreate(['name' => 'view production hourly count dashboard']); //hourly production
@@ -137,6 +140,8 @@ class PermissionSeeder extends Seeder
Permission::updateOrCreate(['name' => 'view guard patrol day count dashboard']); Permission::updateOrCreate(['name' => 'view guard patrol day count dashboard']);
Permission::updateOrCreate(['name' => 'view guard patrol hourly count dashboard']); Permission::updateOrCreate(['name' => 'view guard patrol hourly count dashboard']);
Permission::updateOrCreate(['name' => 'view invoice serial quantity dashboard']); Permission::updateOrCreate(['name' => 'view invoice serial quantity dashboard']);
Permission::updateOrCreate(['name' => 'create production sticker reprint page']);
//Send To Sap Permissions //Send To Sap Permissions
Permission::updateOrCreate(['name' => 'view quality data send to sap']); Permission::updateOrCreate(['name' => 'view quality data send to sap']);