Update Invesa class metadata and refactor Printer_Thermal method for improved clarity
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
Description : Class umum untuk Aplikasi Invesa
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : February 10th, 2012.
|
||||
Last Modified : September 1st, 2026.
|
||||
Last Modified : October 31st, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -16,11 +16,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Utils;
|
||||
|
||||
use flight\Session;
|
||||
|
||||
final class Invesa {
|
||||
|
||||
public const ppn = [ 0=>"Tanpa PPN", 1=>"PPN", 3=>"Spesial 1", 4=>"Spesial 2", 5=>"Spesial 3" ];
|
||||
public const old_printer = [ "TM-U220" ];
|
||||
|
||||
public function __construct() {
|
||||
}
|
||||
@@ -158,9 +157,9 @@ final class Invesa {
|
||||
|
||||
/************************* PRINTER THERMAL *************************/
|
||||
|
||||
public static function Printer_Thermal(Session $session, string $printer): bool {
|
||||
public static function Printer_Thermal(string $printer): bool {
|
||||
$is_thermal = true;
|
||||
foreach($session->get('APP_INV',['OLD_PRINTER'=>[]])['OLD_PRINTER'] as $old) {
|
||||
foreach (self::old_printer as $old) {
|
||||
if (str_contains($printer, $old)) {
|
||||
$is_thermal = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user