From d323d8a5c973e557baaffa687a716d2f3dc05933 Mon Sep 17 00:00:00 2001 From: mikael-zakaria Date: Wed, 18 Feb 2026 09:12:56 +0800 Subject: [PATCH] update printLabel to add commented label if changing printer --- app/Controllers/PrintLabel.php | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/app/Controllers/PrintLabel.php b/app/Controllers/PrintLabel.php index d760b3f..c249359 100644 --- a/app/Controllers/PrintLabel.php +++ b/app/Controllers/PrintLabel.php @@ -104,6 +104,7 @@ class PrintLabel extends BaseController { $role = session()->get('userrole'); // Ruang Analis Printer POSTEK C168/200s + 16 untuk sudut if ($role == 'admin' || $role == 'user') { +/* $label = "N OD q400 @@ -120,6 +121,25 @@ A5,165,0,2,1,1,N,\"VN:$bv\" A5,182,0,2,1,1,N,\"RM:$uhid\" A195,182,0,2,1,1,N,\"$collectiondate\" +P1 +"; +*/ + $label = "N +OD +q400 +Q200,10+0 +I8,A,001 +D10 +A5,4,0,2,1,1,N,\"$title.$name1\" +A$jarak,21,0,2,1,1,N,\"$name2\" +A5,43,0,1,1,1,N,\"DoB: $birthdate\" +A337,43,0,1,1,1,N,\"$sex {$age}Y\" +B16,58,0,1,4,8,70,N,\"$access\" +A120,133,0,1,1,1,N,\"REQ# $access\" +A5,150,0,2,1,1,N,\"VN:$bv\" +A5,167,0,2,1,1,N,\"RM:$uhid\" +A195,167,0,2,1,1,N,\"$collectiondate\" + P1 "; $printer = $this->printerLab(); @@ -194,6 +214,7 @@ P1 } // Printer Posteck + 16 untuk sudut +/* $sampleLabel ="N OD q400 @@ -210,6 +231,25 @@ A115,161,0,2,1,1,N,\"SAM# $barcode\" A5,183,0,2,1,1,N,\"RM:$uhid\" A195,183,0,2,1,1,N,\"$collection_date\" +P1 +"; +*/ + $sampleLabel ="N +OD +q400 +Q200,10+0 +I8,A,001 +D10 +A5,6,0,2,1,1,N,\"$title.$name1\" +A$jarak,23,0,2,1,1,N,\"$name2\" +A325,28,0,2,1,1,N,\"$sex {$age}Y\" +A5,50,0,2,1,1,N,\"$sample\" +A204,50,0,2,1,1,N,\"DoB: $birthdate\" +B37,71,0,1,4,8,70,N,\"$barcode\" +A115,146,0,2,1,1,N,\"SAM# $barcode\" +A5,168,0,2,1,1,N,\"RM:$uhid\" +A195,168,0,2,1,1,N,\"$collection_date\" + P1 "; return $sampleLabel;