update barcode DoB dan Nama v2
This commit is contained in:
parent
5c14c8f86a
commit
1c196d0b24
@ -129,7 +129,7 @@ class PrintLabelSby extends BaseController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function labelZebra($sample, $title, $name, $sex, $age, $barcode, $uhid, $bv, $collection_date) {
|
public function labelZebra($sample, $title, $name, $sex, $age, $barcode, $uhid, $bv, $collection_date, $birthdate) {
|
||||||
$fixName = $this->splitName($name);
|
$fixName = $this->splitName($name);
|
||||||
$name1 = $fixName['line1'];
|
$name1 = $fixName['line1'];
|
||||||
$name2 = $fixName['line2'];
|
$name2 = $fixName['line2'];
|
||||||
@ -207,6 +207,13 @@ class PrintLabelSby extends BaseController {
|
|||||||
|
|
||||||
$barcode = $item['BARCODE'];
|
$barcode = $item['BARCODE'];
|
||||||
$age = $item['AGE'];
|
$age = $item['AGE'];
|
||||||
|
$birthdate = $item['BIRTHDATE'];
|
||||||
|
$date = \DateTime::createFromFormat('Y-m-d H:i:s.v', $birthdate);
|
||||||
|
if ($date) {
|
||||||
|
$birthdate = $date->format('d/m/Y');
|
||||||
|
} else {
|
||||||
|
$birthdate = "";
|
||||||
|
}
|
||||||
$collectiondate = $item['COLLECTIONDATE'];
|
$collectiondate = $item['COLLECTIONDATE'];
|
||||||
$date = \DateTime::createFromFormat('Y-m-d H:i:s.v', $collectiondate);
|
$date = \DateTime::createFromFormat('Y-m-d H:i:s.v', $collectiondate);
|
||||||
if ($date) {
|
if ($date) {
|
||||||
@ -216,7 +223,7 @@ class PrintLabelSby extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$printer = $this->printerLab();
|
$printer = $this->printerLab();
|
||||||
$label = $this->labelZebra($sample, $title, $name, $sex, $age, $barcode, $uhid, $bv, $collectiondate);
|
$label = $this->labelZebra($sample, $title, $name, $sex, $age, $barcode, $uhid, $bv, $collectiondate, $birthdate);
|
||||||
|
|
||||||
// $folder = "C:/data/";
|
// $folder = "C:/data/";
|
||||||
$folder = $printer[0];
|
$folder = $printer[0];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user