Compare commits
3
Commits
f04d146828
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
471589cc57 | ||
|
|
eab5acde17 | ||
|
|
4344b53de8 |
@@ -130,8 +130,9 @@ class IndexController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function index() {
|
public function index() {
|
||||||
$ajson['CabID'] = $this->id_cab ?? 0;
|
$this->app->json([
|
||||||
$ajson['html'] = '
|
'CabID' => $this->id_cab ?? 0,
|
||||||
|
'html' => '
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body my-bashboard">
|
<div class="card-body my-bashboard">
|
||||||
<div class="row h-100">
|
<div class="row h-100">
|
||||||
@@ -148,8 +149,8 @@ class IndexController {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>'
|
||||||
$this->app->json($ajson);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get401() {
|
public function get401() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Description : Transaksi Pembelian
|
Description : Transaksi Pembelian
|
||||||
Created By : Siau Pheng ([email protected]).
|
Created By : Siau Pheng ([email protected]).
|
||||||
Created Date : May 22th, 2010.
|
Created Date : May 22th, 2010.
|
||||||
Last Modified : September 20th, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -553,7 +553,7 @@ class BeliController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function Data_Beli(string $nomor="", bool $baru=false): array {
|
private function Data_Beli(string $nomor="", bool $baru=false): array {
|
||||||
$aparam = [ 'No_Beli'=>$nomor, 'PPN'=>0, 'Lunas'=>0 ];
|
$aparam = [ 'No_Beli'=>$nomor, 'PPN'=>1, 'Lunas'=>0 ];
|
||||||
if (empty($nomor)) {
|
if (empty($nomor)) {
|
||||||
if ($baru) $aparam['No_Beli'] = "BELI".$this->web_app['SERVER_ID'].(string) $this->id_cab.$this->app->user()->id(3)."#00";
|
if ($baru) $aparam['No_Beli'] = "BELI".$this->web_app['SERVER_ID'].(string) $this->id_cab.$this->app->user()->id(3)."#00";
|
||||||
$aparam['Tgl_Beli'] = tgl_ymd();
|
$aparam['Tgl_Beli'] = tgl_ymd();
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class CekhargaController {
|
|||||||
|
|
||||||
public function scan_produk() {
|
public function scan_produk() {
|
||||||
$tcari = Param::Get("Cari_Produk", "");
|
$tcari = Param::Get("Cari_Produk", "");
|
||||||
$scandata = ['Nama_Supplier'=>"BELUM ADA"];
|
$scandata = ['InvID'=>0, 'Kode_Barang'=>"KODE_SKU / KODE_BARCODE", 'Nama_Barang'=>"NAMA_BARANG", 'Nama_Satuan'=>"SATUAN", 'Harga_Jual'=>"", 'Nama_Supplier'=>"BELUM ADA"];
|
||||||
|
|
||||||
// Cari by SKU + Barcode
|
// Cari by SKU + Barcode
|
||||||
// InvID : Kode_SKU + Kode_Barcode : Nama_Lengkap : Satuan_Kemasan : Harga_Jual
|
// InvID : Kode_SKU + Kode_Barcode : Nama_Lengkap : Satuan_Kemasan : Harga_Jual
|
||||||
@@ -94,7 +94,7 @@ class CekhargaController {
|
|||||||
$_row = $this->db->fetchRow("SELECT Nama_Sup Nama_Supplier FROM para_supplier WHERE SupID=(SELECT SupID FROM inv_produk_sup WHERE InvID=? ORDER BY Aktif DESC LIMIT 1)", [$scandata['InvID']]);
|
$_row = $this->db->fetchRow("SELECT Nama_Sup Nama_Supplier FROM para_supplier WHERE SupID=(SELECT SupID FROM inv_produk_sup WHERE InvID=? ORDER BY Aktif DESC LIMIT 1)", [$scandata['InvID']]);
|
||||||
if ($_row) $scandata = array_merge($scandata, $_row->getData());
|
if ($_row) $scandata = array_merge($scandata, $_row->getData());
|
||||||
}
|
}
|
||||||
$this->app->json([ $scandata ]);
|
$this->app->json( $scandata );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update_sup() {
|
public function update_sup() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Description : Transaksi Penyesuaian Stok Per Barang
|
Description : Transaksi Penyesuaian Stok Per Barang
|
||||||
Created By : Siau Pheng ([email protected]).
|
Created By : Siau Pheng ([email protected]).
|
||||||
Created Date : October 22nd, 2014.
|
Created Date : October 22nd, 2014.
|
||||||
Last Modified : October 11th, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -98,13 +98,13 @@ class OpnamebarangController {
|
|||||||
|
|
||||||
public function scan_produk() {
|
public function scan_produk() {
|
||||||
$tcari = Param::Get("Cari_Produk", "");
|
$tcari = Param::Get("Cari_Produk", "");
|
||||||
$scandata = ['Nama_Supplier'=>"BELUM ADA"];
|
$scandata = [ 'InvID'=>0, 'SatuanID'=>0, 'VarianID'=>0, 'Kode_Barang'=>"KODE_SKU / KODE_BARCODE", 'Nama_Barang'=>"NAMA_BARANG", 'Nama_Satuan'=>"SATUAN", 'PPN'=>0, 'Harga_Beli'=>0, 'Stok_Sistem'=>0 ];
|
||||||
|
|
||||||
// Cari by SKU + Barcode
|
// Cari by SKU + Barcode
|
||||||
// Satuan : Varian : SKU + Barcode : Harga_Pokok : Satuan : PPN : Stok
|
// Satuan : Varian : SKU + Barcode : Harga_Pokok : Satuan : PPN : Stok
|
||||||
$_row = $this->db->fetchRow("SELECT P.InvID,P.SatuanID,P.VarianID,P.Nama_Lengkap Nama_Barang,CONCAT(P.Kode_SKU,' / ',P.Kode_Barcode) Kode_Barang,P.Harga_Pokok Harga_Beli,P.Satuan_Kemasan Nama_Satuan,P.PPN,FORMAT(IFNULL(X.Stok,0),2) Stok_Sistem FROM (SELECT * FROM inv_produk_join WHERE Aktif=1 AND (Kode_SKU=? OR Kode_Barcode=?) GROUP BY InvID,SatuanID,VarianID) P LEFT JOIN inv_stok X ON (X.CabID=? AND X.InvID=P.InvID)", [$tcari, $tcari, $this->id_cab]);
|
$_row = $this->db->fetchRow("SELECT P.InvID,P.SatuanID,P.VarianID,P.Nama_Lengkap Nama_Barang,CONCAT(P.Kode_SKU,' / ',P.Kode_Barcode) Kode_Barang,P.Harga_Pokok Harga_Beli,P.Satuan_Kemasan Nama_Satuan,P.PPN,FORMAT(IFNULL(X.Stok,0),2) Stok_Sistem FROM (SELECT * FROM inv_produk_join WHERE Aktif=1 AND (Kode_SKU=? OR Kode_Barcode=?) GROUP BY InvID,SatuanID,VarianID) P LEFT JOIN inv_stok X ON (X.CabID=? AND X.InvID=P.InvID)", [$tcari, $tcari, $this->id_cab]);
|
||||||
if ($_row) $scandata = array_merge($scandata, $_row->getData());
|
if ($_row) $scandata = array_merge($scandata, $_row->getData());
|
||||||
$this->app->json([ $scandata ]);
|
$this->app->json( $scandata );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function proses_simpan() {
|
public function proses_simpan() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Description : Laporan Margin Penjualan / Member
|
Description : Laporan Margin Penjualan / Member
|
||||||
Created By : Siau Pheng ([email protected]).
|
Created By : Siau Pheng ([email protected]).
|
||||||
Created Date : October 12nd, 2012.
|
Created Date : October 12nd, 2012.
|
||||||
Last Modified : October 7th, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ class MarginController {
|
|||||||
$ttipe = $form->radio("_", "Tipe", "R", true, false, ["R"=>"Rekap","D"=>"Detail"]);
|
$ttipe = $form->radio("_", "Tipe", "R", true, false, ["R"=>"Rekap","D"=>"Detail"]);
|
||||||
$tcab = $form->option_db("_", "CabID", $this->id_cab, true, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY CabID", [0,"SEMUA CABANG"]);
|
$tcab = $form->option_db("_", "CabID", $this->id_cab, true, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY CabID", [0,"SEMUA CABANG"]);
|
||||||
$tmem = $form->textauto("_", "Nama_Member", ['value'=>0,'text'=>"SEMUA MEMBER"], true, true, "nama member");
|
$tmem = $form->textauto("_", "Nama_Member", ['value'=>0,'text'=>"SEMUA MEMBER"], true, true, "nama member");
|
||||||
$turut = $form->radio("_", "Urut", "B", true, false, ['H'=>"Harga Jual",'M'=>"Margin"]);
|
$turut = $form->radio("_", "Urut", "M", true, false, ['H'=>"Harga Jual",'M'=>"Margin"]);
|
||||||
$tfrom = $form->datebox("_", "Tgl_From", tgl_ymd(), true, false);
|
$tfrom = $form->datebox("_", "Tgl_From", tgl_ymd(), true, false);
|
||||||
$tto = $form->datebox("_", "Tgl_To", tgl_ymd(), true, false);
|
$tto = $form->datebox("_", "Tgl_To", tgl_ymd(), true, false);
|
||||||
$ajson['html'] = '
|
$ajson['html'] = '
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Description : Laporan Stok Akhir Barang
|
Description : Laporan Stok Akhir Barang
|
||||||
Created By : Siau Pheng ([email protected]).
|
Created By : Siau Pheng ([email protected]).
|
||||||
Created Date : January 24th, 2011.
|
Created Date : January 24th, 2011.
|
||||||
Last Modified : November 2nd, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ class AkhirController {
|
|||||||
$apre = [
|
$apre = [
|
||||||
'id_sup' => Param::Int("SupID", 0),
|
'id_sup' => Param::Int("SupID", 0),
|
||||||
'id_grup_inv' => Param::Int("Grup_InvID", 0),
|
'id_grup_inv' => Param::Int("Grup_InvID", 0),
|
||||||
'ppn' => Param::Int("PPN", 9),
|
'ppn' => Param::Int("PPN", 0),
|
||||||
'tgl' => Param::Get("Tanggal"),
|
'tgl' => Param::Get("Tanggal"),
|
||||||
'urut' => Param::Get("Urut", "B"),
|
'urut' => Param::Get("Urut", "B"),
|
||||||
'min' => Param::Get("Min_Stok", "N"),
|
'min' => Param::Get("Min_Stok", "N"),
|
||||||
@@ -75,7 +75,7 @@ class AkhirController {
|
|||||||
$tsql2 .= " AND P.Grup_InvID=?";
|
$tsql2 .= " AND P.Grup_InvID=?";
|
||||||
array_push($asql2, $apre['id_grup_inv']);
|
array_push($asql2, $apre['id_grup_inv']);
|
||||||
}
|
}
|
||||||
if ($apre['ppn'] !== 9) {
|
if ($apre['ppn'] > 0) {
|
||||||
$tsql2 .= " AND P.PPN=?";
|
$tsql2 .= " AND P.PPN=?";
|
||||||
array_push($asql2, $apre['ppn']);
|
array_push($asql2, $apre['ppn']);
|
||||||
}
|
}
|
||||||
@@ -191,7 +191,7 @@ class AkhirController {
|
|||||||
$tcab = $form->option_db("_", "CabID", $this->id_cab, true, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY CabID", [0,"SEMUA CABANG"]);
|
$tcab = $form->option_db("_", "CabID", $this->id_cab, true, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY CabID", [0,"SEMUA CABANG"]);
|
||||||
$tsup = $form->option_db("_", "SupID", 0, true, false, "para_supplier", ["SupID","Nama_Sup"], "Aktif=1 ORDER BY Nama_Sup", [0,"SEMUA SUPPLIER"]);
|
$tsup = $form->option_db("_", "SupID", 0, true, false, "para_supplier", ["SupID","Nama_Sup"], "Aktif=1 ORDER BY Nama_Sup", [0,"SEMUA SUPPLIER"]);
|
||||||
$tgrup_inv = $form->option_db("_", "Grup_InvID", 0, true, false, "inv_produk_grup", ["Grup_InvID","Nama_Grup"], "Aktif=1 ORDER BY Nama_Grup", [0,"SEMUA GRUP"]);
|
$tgrup_inv = $form->option_db("_", "Grup_InvID", 0, true, false, "inv_produk_grup", ["Grup_InvID","Nama_Grup"], "Aktif=1 ORDER BY Nama_Grup", [0,"SEMUA GRUP"]);
|
||||||
$tppn = $form->option("_", "PPN", 9, true, false, [9 => "SEMUA STATUS"] + Invesa::PPN_Array());
|
$tppn = $form->option("_", "PPN", 9, true, false, [0 => "SEMUA STATUS"] + Invesa::PPN_Array());
|
||||||
$ttgl = $form->datebox("_", "Tanggal", tgl_ymd(), false, false);
|
$ttgl = $form->datebox("_", "Tanggal", tgl_ymd(), false, false);
|
||||||
$turut = $form->radio("_", "Urut", "B", true, false, ['B'=>"Nama Barang",'J'=>"Jumlah / Nilai"]);
|
$turut = $form->radio("_", "Urut", "B", true, false, ['B'=>"Nama Barang",'J'=>"Jumlah / Nilai"]);
|
||||||
$tstok = $form->radio("_", "Min_Stok", "N", true, false, ["Y"=>"Ya","N"=>"Tidak"], null, "RepoStokAkhirJS.oc_MinStok");
|
$tstok = $form->radio("_", "Min_Stok", "N", true, false, ["Y"=>"Ya","N"=>"Tidak"], null, "RepoStokAkhirJS.oc_MinStok");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Description : Laporan Mutasi Stok Barang
|
Description : Laporan Mutasi Stok Barang
|
||||||
Created By : Siau Pheng ([email protected]).
|
Created By : Siau Pheng ([email protected]).
|
||||||
Created Date : July 16th, 2011.
|
Created Date : July 16th, 2011.
|
||||||
Last Modified : October 12th, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -83,6 +83,18 @@ class MutasiController {
|
|||||||
$this->app->json($ajson);
|
$this->app->json($ajson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function scan_produk() {
|
||||||
|
$tcari = Param::Get("Cari_Produk", "");
|
||||||
|
$scandata = [ 'InvID'=>0, 'Nama_Produk'=>"" ];
|
||||||
|
|
||||||
|
// Cari by SKU + Barcode
|
||||||
|
// InvID : Nama_Produk
|
||||||
|
$_row = $this->db->fetchRow("SELECT P.InvID,P.Nama_Lengkap Nama_Produk FROM (SELECT * FROM vi_inv_produk WHERE Aktif=1 AND Barcode_Nama LIKE ?) P", ['%'.$tcari.'%']);
|
||||||
|
if ($_row) $scandata = array_merge($scandata, $_row->getData());
|
||||||
|
|
||||||
|
$this->app->json( $scandata );
|
||||||
|
}
|
||||||
|
|
||||||
private function prepare() {
|
private function prepare() {
|
||||||
$apre = [
|
$apre = [
|
||||||
'id_inv' => Param::Int("InvID", 0),
|
'id_inv' => Param::Int("InvID", 0),
|
||||||
@@ -198,7 +210,11 @@ class MutasiController {
|
|||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label class="col-sm-4 col-lg-3 col-form-label" for="CabID">Nama Cabang</label>
|
<label class="col-sm-4 col-lg-3 col-form-label" for="CabID">Nama Cabang</label>
|
||||||
<div class="col">'.$tcab.'</div>
|
<div class="col">'.$tcab.'</div>
|
||||||
</div>
|
</div>';
|
||||||
|
if (isMobile()) {
|
||||||
|
$ajson['html'] .= '<div class="row mb-1"><div class="col"><div id="qr-reader"></div></div></div>';
|
||||||
|
}
|
||||||
|
$ajson['html'] .= '
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label class="col-sm-4 col-lg-3 col-form-label" for="Nama_Produk">Nama Barang</label>
|
<label class="col-sm-4 col-lg-3 col-form-label" for="Nama_Produk">Nama Barang</label>
|
||||||
<div class="col"><div class="input-group">'.$tproduk.'<button id="butBrowProduk" class="btn btn-info" type="button"><i class="bi-bag"></i></button></div></div>
|
<div class="col"><div class="input-group">'.$tproduk.'<button id="butBrowProduk" class="btn btn-info" type="button"><i class="bi-bag"></i></button></div></div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Description : Master Barang
|
Description : Master Barang
|
||||||
Created By : Siau Pheng ([email protected]).
|
Created By : Siau Pheng ([email protected]).
|
||||||
Created Date : May 19th, 2010.
|
Created Date : May 19th, 2010.
|
||||||
Last Modified : September 10th, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ class ProdukController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function detail_produk() {
|
public function detail_produk() {
|
||||||
$atabel = ['InvID'=>0,'Nama_Produk'=>"",'Grup_InvID'=>0,'StokID'=>$this->def_satuan,'NormalID'=>$this->def_satuan,'Harga_Beli'=>0,'Harga_Tambah'=>0,'Harga_Pokok'=>0,'Stok_Min'=>0,'Stok_Max'=>0,'Aktif'=>1,'PPN'=>0];
|
$atabel = ['InvID'=>0,'Nama_Produk'=>"",'Grup_InvID'=>0,'StokID'=>$this->def_satuan,'NormalID'=>$this->def_satuan,'Harga_Beli'=>0,'Harga_Tambah'=>0,'Harga_Pokok'=>0,'Stok_Min'=>0,'Stok_Max'=>0,'Aktif'=>1,'PPN'=>1];
|
||||||
if ($this->id_inv > 0) {
|
if ($this->id_inv > 0) {
|
||||||
$atabel = $this->db->fetchRow("SELECT * FROM inv_produk WHERE InvID=?", [$this->id_inv]);
|
$atabel = $this->db->fetchRow("SELECT * FROM inv_produk WHERE InvID=?", [$this->id_inv]);
|
||||||
$this->Produk_Backup();
|
$this->Produk_Backup();
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ var OpnameBarangJS = {
|
|||||||
$('#butSimpan').click(() => this.proses_save());
|
$('#butSimpan').click(() => this.proses_save());
|
||||||
$('#butBrow').click(() => this.produk_brow());
|
$('#butBrow').click(() => this.produk_brow());
|
||||||
if (FoniaJS.WEB_MOBILE){
|
if (FoniaJS.WEB_MOBILE){
|
||||||
//html5QrcodeScanner = new Html5QrcodeScanner('qr-reader', { fps: 10, qrbox: 250, rememberLastUsedCamera: true, supportedScanTypes: [Html5QrcodeScanType.SCAN_TYPE_CAMERA] });
|
|
||||||
html5QrcodeScanner = new Html5Qrcode('qr-reader');
|
html5QrcodeScanner = new Html5Qrcode('qr-reader');
|
||||||
html5QrcodeScanner.start({ facingMode: 'environment' }, { fps: 10, qrbox: 250 }, OpnameBarangJS.ScanSukses);
|
html5QrcodeScanner.start({ facingMode: 'environment' }, { fps: 10, qrbox: 250 }, OpnameBarangJS.ScanSukses);
|
||||||
} else {
|
} else {
|
||||||
@@ -39,7 +38,7 @@ var OpnameBarangJS = {
|
|||||||
onSuccess: (ajson) => {
|
onSuccess: (ajson) => {
|
||||||
if (ajson.status === true){
|
if (ajson.status === true){
|
||||||
FoniaJS.showInfo('Sukses simpan penyesuaian Stok !');
|
FoniaJS.showInfo('Sukses simpan penyesuaian Stok !');
|
||||||
$('#InvID, #SatuanID, #VarianID, #Harga_Beli #PPN').val(0);
|
$('#InvID, #SatuanID, #VarianID, #Harga_Beli, #PPN').val(0);
|
||||||
$('#Nama_Produk, #Kode_Barang, #Nama_Barang, #Nama_Satuan').val('');
|
$('#Nama_Produk, #Kode_Barang, #Nama_Barang, #Nama_Satuan').val('');
|
||||||
$('#Stok_Sistem, #Stok_Fisik').val('0.00');
|
$('#Stok_Sistem, #Stok_Fisik').val('0.00');
|
||||||
if (FoniaJS.WEB_MOBILE){
|
if (FoniaJS.WEB_MOBILE){
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Description : Laporan Mutasi Stok Barang
|
Description : Laporan Mutasi Stok Barang
|
||||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||||
Created Date : July 16th, 2011.
|
Created Date : July 16th, 2011.
|
||||||
Last Modified : October 12th, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -13,14 +13,20 @@
|
|||||||
var RepoStokMutasiJS = {
|
var RepoStokMutasiJS = {
|
||||||
PHP: '',
|
PHP: '',
|
||||||
KODE: '',
|
KODE: '',
|
||||||
|
html5QrcodeScanner: null,
|
||||||
|
|
||||||
index() {
|
index() {
|
||||||
$('#butCetak').click(() => this.proses_print(true));
|
$('#butCetak').click(() => this.proses_print(true));
|
||||||
$('#butPreview').click(() => this.proses_print());
|
$('#butPreview').click(() => this.proses_print());
|
||||||
$('#butExcel').click(() => this.proses_dload());
|
$('#butExcel').click(() => this.proses_dload());
|
||||||
$('#butBrowProduk').click(() => this.produk_brow());
|
$('#butBrowProduk').click(() => this.produk_brow());
|
||||||
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', [], {'selectFunc':this.Produk_Comp});
|
if (FoniaJS.WEB_MOBILE){
|
||||||
|
html5QrcodeScanner = new Html5Qrcode('qr-reader');
|
||||||
|
html5QrcodeScanner.start({ facingMode: 'environment' }, { fps: 10, qrbox: 250 }, RepoStokMutasiJS.ScanSukses);
|
||||||
|
} else {
|
||||||
|
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', [], {'selectFunc': this.Produk_Comp});
|
||||||
FoniaJS.setFocus('#Nama_Produk');
|
FoniaJS.setFocus('#Nama_Produk');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
proses_print(prt) {
|
proses_print(prt) {
|
||||||
@@ -51,6 +57,18 @@ var RepoStokMutasiJS = {
|
|||||||
dload.download();
|
dload.download();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
ScanSukses(decodedText, decodedResult) {
|
||||||
|
new Request({
|
||||||
|
url: RepoStokMutasiJS.PHP + '/scan_produk',
|
||||||
|
sendParam: ['Cari_Produk='+decodedText],
|
||||||
|
onSuccess: (ajson) => {
|
||||||
|
$('#InvID').val(ajson.InvID);
|
||||||
|
$('#Nama_Produk').val(ajson.Nama_Produk);
|
||||||
|
$('#Tgl_From').focus();
|
||||||
|
}
|
||||||
|
}).send();
|
||||||
|
},
|
||||||
|
|
||||||
produk_brow() {
|
produk_brow() {
|
||||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowProduk"> </div>');
|
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowProduk"> </div>');
|
||||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||||
|
|||||||
@@ -115,4 +115,5 @@ var AboutJS = {
|
|||||||
}
|
}
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Description : Class umum untuk Aplikasi Invesa
|
Description : Class umum untuk Aplikasi Invesa
|
||||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||||
Created Date : February 10th, 2012.
|
Created Date : February 10th, 2012.
|
||||||
Last Modified : October 31st, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -18,7 +18,13 @@ namespace App\Utils;
|
|||||||
|
|
||||||
final class Invesa {
|
final class Invesa {
|
||||||
|
|
||||||
public const ppn = [ 0=>"Tanpa PPN", 1=>"PPN", 3=>"Spesial 1", 4=>"Spesial 2", 5=>"Spesial 3" ];
|
public const ppn = [
|
||||||
|
1 => "PPN",
|
||||||
|
2 => "Spesial 1", //Non PPN
|
||||||
|
3 => "Spesial 2", //Sembako
|
||||||
|
4 => "Spesial 3", //Rokok Legal
|
||||||
|
5 => "Spesial 4", //Rokok Ilegal
|
||||||
|
];
|
||||||
public const old_printer = [ "TM-U220" ];
|
public const old_printer = [ "TM-U220" ];
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
Desc. : Loading Routing Setup
|
Desc. : Loading Routing Setup
|
||||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||||
Created Date : November 23rd, 2019.
|
Created Date : November 23rd, 2019.
|
||||||
Last Modified : October 21st, 2026.
|
Last Modified : November 4th, 2026.
|
||||||
|
|
||||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -130,8 +130,13 @@ $router->group('', function(Router $router) use ($app, $session, $config) {
|
|||||||
$mimeType = 'application/octet-stream';
|
$mimeType = 'application/octet-stream';
|
||||||
if (str_ends_with($filePath, '.js')) $mimeType = 'application/javascript';
|
if (str_ends_with($filePath, '.js')) $mimeType = 'application/javascript';
|
||||||
if (str_ends_with($filePath, '.css')) $mimeType = 'text/css';
|
if (str_ends_with($filePath, '.css')) $mimeType = 'text/css';
|
||||||
$app->response()->header('Content-Type', $mimeType);
|
$app->response()->header('Content-Type', $mimeType.'; charset=utf-8');
|
||||||
echo file_get_contents($filePath);
|
$app->response()->header('Cache-Control', 'public, max-age=864000');
|
||||||
|
$app->response()->header('Pragma', 'cache');
|
||||||
|
if (function_exists('gzencode') && str_contains($_SERVER['HTTP_ACCEPT_ENCODING'] ?? '', 'gzip')) {
|
||||||
|
$app->response()->header('Content-Encoding', 'gzip');
|
||||||
|
echo gzencode(file_get_contents($filePath), 9);
|
||||||
|
} else echo file_get_contents($filePath);
|
||||||
} else {
|
} else {
|
||||||
$app->notFound();
|
$app->notFound();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user