Compare commits

...
20 Commits
Author SHA1 Message Date
siaupheng 471589cc57 Add Cache-Control and Pragma headers for improved caching in routes 2026-11-04 15:35:32 +07:00
siaupheng eab5acde17 Update various controllers and scripts; modify last modified dates, enhance JSON responses, and adjust PPN handling for improved functionality 2026-11-04 11:14:12 +07:00
siaupheng 4344b53de8 Update scan_produk method in CekhargaController to enhance response structure with detailed product information 2026-11-03 16:53:54 +07:00
siaupheng f04d146828 Update CekhargaController last modified date and refactor SQL query; remove old cekharga.js script and add new cek_harga.js script 2026-11-03 16:35:10 +07:00
siaupheng b6da9303a5 Update AboutController to change label from "Composer Packages" to "Repositori Composer" for improved clarity 2026-11-03 13:38:13 +07:00
siaupheng 695028581f Fix version display in AboutController and improve log output in CacheCommand; update routing for constant PROJECT_ROOT 2026-11-03 13:35:51 +07:00
siaupheng 03e281d671 Update command usage syntax in CacheCommand, PPOBCommand, and ProdukCommand for consistency 2026-11-03 09:48:16 +07:00
siaupheng 0db288c404 Update IndexController and CacheCommand; add missing DateInterval and DateTime imports, and change info message to white for better visibility 2026-11-03 08:45:57 +07:00
siaupheng d5b44789fe Update last modified dates in PosController, NotaController, and AkhirController; enhance printing logic for thermal printers 2026-11-02 16:09:57 +07:00
siaupheng a5fd32ba79 Update last modified date in AboutController and about.js; enhance version display logic in about.js for better readability 2026-11-02 15:23:36 +07:00
siaupheng dcd13bb9df Refactor printing logic across multiple scripts to use method chaining for improved readability and consistency
- Updated Printer and PrinterPos instantiation to use method chaining with addParam instead of add_param.
- Refactored print functions in various modules including opname.js, pos.js, tukar.js, ppobtx.js, prabayar.js, and multiple report scripts.
- Enhanced code clarity and maintainability by standardizing parameter addition for print jobs.
2026-11-02 14:03:32 +07:00
siaupheng 5d246e039e Refactor parameter naming in download functions across multiple scripts for consistency 2026-11-02 09:24:13 +07:00
siaupheng 70595b835d Add composer package information retrieval to AboutController and update UI in about.js 2026-11-01 16:34:09 +07:00
siaupheng aaaf0a9215 Refactor member and product scripts to use concise method definitions
- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
2026-11-01 14:57:54 +07:00
siaupheng be2091eddd Refactor function declarations in pos.js to use concise method syntax for improved readability 2026-11-01 14:46:50 +07:00
siaupheng 465f88bcbc Add tabindex to input fields and enhance autocomplete functionality with breakFocus option 2026-11-01 14:12:45 +07:00
siaupheng 7a585ab7c2 Refactor AJAX requests from Request.JSONF to Request_JSF across multiple scripts for consistency and improved functionality. 2026-11-01 13:11:40 +07:00
siaupheng 52897c25c5 Update Invesa class metadata and refactor Printer_Thermal method for improved clarity 2026-11-01 12:56:45 +07:00
siaupheng dd6f0dea12 Update labels in AboutController for clarity on application commit and server status 2026-10-31 09:55:46 +07:00
siaupheng f901042cf5 Remove redundant assignment of APP_VER from APP_BUILD in app configuration 2026-10-31 09:21:06 +07:00
112 changed files with 1618 additions and 1498 deletions
+7 -4
View File
@@ -16,6 +16,8 @@ declare(strict_types=1);
namespace App\Controller; namespace App\Controller;
use DateInterval;
use DateTime;
use flight\Engine; use flight\Engine;
use flight\Session; use flight\Session;
use flight\database\SimplePdo; use flight\database\SimplePdo;
@@ -128,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">
@@ -146,8 +149,8 @@ class IndexController {
</div> </div>
</div> </div>
</div> </div>
</div>'; </div>'
$this->app->json($ajson); ]);
} }
public function get401() { public function get401() {
+2 -2
View File
@@ -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();
+4 -4
View File
@@ -6,7 +6,7 @@
Description : Informasi Barang & Harga Jual Description : Informasi Barang & Harga Jual
Created By : Siau Pheng ([email protected]). Created By : Siau Pheng ([email protected]).
Created Date : October 22nd, 2014. Created Date : October 22nd, 2014.
Last Modified : September 27th, 2026. Last Modified : November 3rd, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM. (c) 3FONIA Software; WWW.3FONIA.COM.
@@ -83,18 +83,18 @@ 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
$_row = $this->db->fetchRow("SELECT P.InvID,CONCAT(K.Kode_SKU,' / ',K.Kode_Barcode) Kode_Barang,P.Nama_Produk_Varian Nama_Barang,P.Satuan_Kemasan Nama_Satuan,CONVERT(FORMAT(P.Harga_Jual,2) USING UTF8) Harga_Jual FROM (SELECT * FROM inv_produk_join WHERE Aktif=1 AND Harga_Jual>0 AND Grup_MemberID=? AND (Kode_SKU=? OR Kode_Barcode=?)) P", [$this->id_grup_member, $tcari, $tcari]); $_row = $this->db->fetchRow("SELECT P.InvID,CONCAT(P.Kode_SKU,' / ',P.Kode_Barcode) Kode_Barang,P.Nama_Produk_Varian Nama_Barang,P.Satuan_Kemasan Nama_Satuan,CONVERT(FORMAT(P.Harga_Jual,2) USING UTF8) Harga_Jual FROM (SELECT * FROM inv_produk_join WHERE Aktif=1 AND Harga_Jual>0 AND Grup_MemberID=? AND (Kode_SKU=? OR Kode_Barcode=?)) P", [$this->id_grup_member, $tcari, $tcari]);
if ($_row) $scandata = array_merge($scandata, $_row->getData()); if ($_row) $scandata = array_merge($scandata, $_row->getData());
if (isset($scandata['InvID']) && $scandata['InvID'] > 0) { if (isset($scandata['InvID']) && $scandata['InvID'] > 0) {
$_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() {
+3 -3
View File
@@ -373,7 +373,7 @@ class JualController {
$ttglnota = $form->datebox("_", "Tgl_Jual", $atabel['Tgl_Jual'], $enable, true); $ttglnota = $form->datebox("_", "Tgl_Jual", $atabel['Tgl_Jual'], $enable, true);
$ttgllunas = $form->datebox("_", "Tgl_Lunas", $atabel['Tgl_Lunas'], false, false); $ttgllunas = $form->datebox("_", "Tgl_Lunas", $atabel['Tgl_Lunas'], false, false);
$tcab = $form->option_db("_", "CabID", $atabel['CabID'], $enable, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY Nama_Cab", [0,"&nbsp;"]); $tcab = $form->option_db("_", "CabID", $atabel['CabID'], $enable, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY Nama_Cab", [0,"&nbsp;"]);
$tmember = $form->textauto("_", "Nama_Member", ['value'=>$atabel['MemberID'],'text'=>$atabel['Nama_Member']], true, true, "nama member"); $tmember = $form->textauto("_", "Nama_Member", ['value'=>$atabel['MemberID'],'text'=>$atabel['Nama_Member']], $enable, true, "nama member");
$tpiutang = $form->textbox("_", "Total_Piutang", 0, false, false, "double"); $tpiutang = $form->textbox("_", "Total_Piutang", 0, false, false, "double");
$ajson['html'] = ' $ajson['html'] = '
<div class="row"> <div class="row">
@@ -409,10 +409,10 @@ class JualController {
<div class="row mb-1"><div class="col"><hr class="my-1"></div></div> <div class="row mb-1"><div class="col"><hr class="my-1"></div></div>
<div class="row mb-1'.(in_array($this->mode, ['add','edit']) ? '' : ' d-none').'"> <div class="row mb-1'.(in_array($this->mode, ['add','edit']) ? '' : ' d-none').'">
<div class="col-sm-9 col-lg-10"> <div class="col-sm-9 col-lg-10">
<input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" /> <input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" tabindex="1" />
</div> </div>
<div class="col-sm-3 col-lg-2"> <div class="col-sm-3 col-lg-2">
<input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" /> <input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" tabindex="2" />
</div> </div>
</div> </div>
<input type="hidden" id="MemberID" value="'.$atabel['MemberID'].'" > <input type="hidden" id="MemberID" value="'.$atabel['MemberID'].'" >
@@ -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() {
+2 -2
View File
@@ -587,10 +587,10 @@ class PosController {
<div class="col-sm-12 col-md-9 col-lg-10 mt-3 mt-md-0"> <div class="col-sm-12 col-md-9 col-lg-10 mt-3 mt-md-0">
<div class="row mb-1"> <div class="row mb-1">
<div class="col-sm-9 col-lg-10"> <div class="col-sm-9 col-lg-10">
<input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" /> <input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" tabindex="1" />
</div> </div>
<div class="col-sm-3 col-lg-2"> <div class="col-sm-3 col-lg-2">
<input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" /> <input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" tabindex="2" />
</div> </div>
</div> </div>
<div id="divPOS1">&nbsp;</div> <div id="divPOS1">&nbsp;</div>
+8 -3
View File
@@ -6,7 +6,7 @@
Description : Laporan Penerimaan Dana POS / Kasir Description : Laporan Penerimaan Dana POS / Kasir
Created By : Siau Pheng ([email protected]). Created By : Siau Pheng ([email protected]).
Created Date : September 8th, 2012. Created Date : September 8th, 2012.
Last Modified : October 9th, 2026. Last Modified : November 2nd, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM. (c) 3FONIA Software; WWW.3FONIA.COM.
@@ -16,6 +16,7 @@ declare(strict_types=1);
namespace App\Controller\Report\Dana; namespace App\Controller\Report\Dana;
use App\Utils\Invesa;
use flight\Engine; use flight\Engine;
use flight\database\SimplePdo; use flight\database\SimplePdo;
use flight\Session; use flight\Session;
@@ -91,8 +92,12 @@ class PosController {
$tot_dana = $tot_jual + $tot_pulsa - $tot_potong - $tot_diskon; $tot_dana = $tot_jual + $tot_pulsa - $tot_potong - $tot_diskon;
$pre = new PrintPOS($this->app); $pre = new PrintPOS($this->app);
$pre->set_fontsize(2);//thermal if (Invesa::Printer_Thermal(Param::Get("Printer", ""))) {
$pre->set_header_logo("logo-nota.png");//thermal $pre->set_fontsize(2);
$pre->set_header_logo("logo-nota.png");
} else {
$pre->add_header($this->reg_name);
}
if ($this->app_inv['PRINT_OPENCD'] === 1) $pre->set_opendrawer(); if ($this->app_inv['PRINT_OPENCD'] === 1) $pre->set_opendrawer();
if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper(); if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper();
$pre->add_empty(); $pre->add_empty();
@@ -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'] = '
+32 -7
View File
@@ -6,7 +6,7 @@
Description : Cetak Struk / Nota POS Description : Cetak Struk / Nota POS
Created By : Siau Pheng ([email protected]). Created By : Siau Pheng ([email protected]).
Created Date : April 12th, 2011. Created Date : April 12th, 2011.
Last Modified : October 3rd, 2026. Last Modified : November 2nd, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM. (c) 3FONIA Software; WWW.3FONIA.COM.
@@ -16,6 +16,7 @@ declare(strict_types=1);
namespace App\Controller\Report; namespace App\Controller\Report;
use App\Utils\Invesa;
use App\Utils\PPOBClient; use App\Utils\PPOBClient;
use flight\Engine; use flight\Engine;
use flight\database\SimplePdo; use flight\database\SimplePdo;
@@ -29,6 +30,7 @@ class NotaController {
private array $app_inv; private array $app_inv;
private string $no_cetak; private string $no_cetak;
private int $op_cash; private int $op_cash;
private bool $is_thermal;
protected Engine $app; protected Engine $app;
protected SimplePdo $db; protected SimplePdo $db;
@@ -39,6 +41,7 @@ class NotaController {
$this->app_inv = (array) $session->get('APP_INV'); $this->app_inv = (array) $session->get('APP_INV');
$this->no_cetak = Param::Get("Nomor_Cetak", ""); $this->no_cetak = Param::Get("Nomor_Cetak", "");
$this->op_cash = Param::Int("Open_Cash", 0); $this->op_cash = Param::Int("Open_Cash", 0);
$this->is_thermal = Invesa::Printer_Thermal(Param::Get("Printer", ""));
} }
public function pos(): void { public function pos(): void {
@@ -60,13 +63,18 @@ class NotaController {
if (count($aitem) === 0) return; if (count($aitem) === 0) return;
$pre = new PrintPOS($this->app); $pre = new PrintPOS($this->app);
$pre->set_fontsize(2);//thermal if ($this->is_thermal) {
$pre->set_header_logo("logo-nota.png");//thermal $pre->set_fontsize(2);
$pre->set_header_logo("logo-nota.png");
} else {
$pre->add_header($this->web_app['REG_NAME'], $this->web_app['REG_CITY']);
}
if ($this->app_inv['PRINT_OPENCD'] === 1 && $this->op_cash === 1) $pre->set_opendrawer(); if ($this->app_inv['PRINT_OPENCD'] === 1 && $this->op_cash === 1) $pre->set_opendrawer();
if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper(); if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper();
if (!empty($this->app_inv['TITLE_BEGIN'])) { if (!empty($this->app_inv['TITLE_BEGIN'])) {
$_ahead = explode("[br]", stripslashes($this->app_inv['TITLE_BEGIN'])); $_ahead = explode("[br]", stripslashes($this->app_inv['TITLE_BEGIN']));
foreach($_ahead as $val) $pre->addc($val); foreach ($_ahead as $val) $pre->addc($val);
} }
if ($is_member) { if ($is_member) {
@@ -81,6 +89,7 @@ class NotaController {
$items = 0; $qty = 0; $items = 0; $qty = 0;
foreach ($aitem as $item) { foreach ($aitem as $item) {
if ($item['Qty'] === 0) continue;
if ($item['Promo'] > 1) { if ($item['Promo'] > 1) {
$apromo[] = rupiah($item['Qty'])." ".$item['Nama_Satuan']." ".$item['Nama_Produk_Varian']; $apromo[] = rupiah($item['Qty'])." ".$item['Nama_Satuan']." ".$item['Nama_Produk_Varian'];
continue; continue;
@@ -338,8 +347,12 @@ class NotaController {
if (count($aitem) === 0) return; if (count($aitem) === 0) return;
$pre = new PrintPOS($this->app); $pre = new PrintPOS($this->app);
if ($this->is_thermal) {
$pre->set_fontsize(2); $pre->set_fontsize(2);
$pre->set_header_logo("logo-nota.png"); $pre->set_header_logo("logo-nota.png");
} else {
$pre->add_header($this->web_app['REG_NAME'], $this->web_app['REG_CITY']);
}
if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper(); if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper();
$pre->add([$ainfo['No_Mutasi'],20,"L"], [tgl_sql2str($ainfo['Tgl_Mutasi']),20,"R"]); $pre->add([$ainfo['No_Mutasi'],20,"L"], [tgl_sql2str($ainfo['Tgl_Mutasi']),20,"R"]);
$pre->add(["Dari Cabang : ",14,"L"], [$ainfo['Cabang1'],36,"L"]); $pre->add(["Dari Cabang : ",14,"L"], [$ainfo['Cabang1'],36,"L"]);
@@ -362,12 +375,16 @@ class NotaController {
$ainfo = $this->db->fetchRow("SELECT T.*,DATE_FORMAT(T.Tgl_TX,'%d-%m-%Y') Tgl_TX2,DATE_FORMAT(T.DateStamp,'%H:%i:%s') Jam_TX,UCASE(O.Nama) Nama_User,M.Kode_Member,M.Nama_Member,M.IM,B.Nama_Barang,UPPER(P.Nama_Tipe) Nama_Tipe FROM (SELECT * FROM inv_point_tx WHERE No_TX=?) T LEFT JOIN app_operator O ON (T.UserID=O.UserID) LEFT JOIN para_member M ON (M.MemberID=T.MemberID) LEFT JOIN inv_point_barang B ON (T.InvPID=B.InvPID) LEFT JOIN inv_point_tipe P ON (P.Point_TipeID=T.Point_TipeID)", [$this->no_cetak]); $ainfo = $this->db->fetchRow("SELECT T.*,DATE_FORMAT(T.Tgl_TX,'%d-%m-%Y') Tgl_TX2,DATE_FORMAT(T.DateStamp,'%H:%i:%s') Jam_TX,UCASE(O.Nama) Nama_User,M.Kode_Member,M.Nama_Member,M.IM,B.Nama_Barang,UPPER(P.Nama_Tipe) Nama_Tipe FROM (SELECT * FROM inv_point_tx WHERE No_TX=?) T LEFT JOIN app_operator O ON (T.UserID=O.UserID) LEFT JOIN para_member M ON (M.MemberID=T.MemberID) LEFT JOIN inv_point_barang B ON (T.InvPID=B.InvPID) LEFT JOIN inv_point_tipe P ON (P.Point_TipeID=T.Point_TipeID)", [$this->no_cetak]);
$pre = new PrintPOS($this->app); $pre = new PrintPOS($this->app);
if ($this->is_thermal) {
$pre->set_fontsize(2); $pre->set_fontsize(2);
$pre->set_header_logo("logo-nota.png"); $pre->set_header_logo("logo-nota.png");
} else {
$pre->add_header($this->web_app['REG_NAME'], $this->web_app['REG_CITY']);
}
if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper(); if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper();
if (!empty($this->app_inv['TITLE_BEGIN'])) { if (!empty($this->app_inv['TITLE_BEGIN'])) {
$_ahead = explode("[br]", stripslashes($this->app_inv['TITLE_BEGIN'])); $_ahead = explode("[br]", stripslashes($this->app_inv['TITLE_BEGIN']));
foreach($_ahead as $val) $pre->addc($val); foreach ($_ahead as $val) $pre->addc($val);
} }
$pre->add([$ainfo['No_TX'],20,"L"], [$ainfo['Tgl_TX2'],20,"R"]); $pre->add([$ainfo['No_TX'],20,"L"], [$ainfo['Tgl_TX2'],20,"R"]);
@@ -405,8 +422,12 @@ class NotaController {
$abulan = bulan_array(); $abulan = bulan_array();
$pre = new PrintPOS($this->app); $pre = new PrintPOS($this->app);
if ($this->is_thermal) {
$pre->set_fontsize(2); $pre->set_fontsize(2);
$pre->set_header_logo("logo-nota.png"); $pre->set_header_logo("logo-nota.png");
} else {
$pre->add_header($this->web_app['REG_NAME'], $this->web_app['REG_CITY']);
}
if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper(); if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper();
$_info = $this->db->fetchRow("SELECT DATE_FORMAT(Tgl_Gaji,'%d-%m-%Y') Tgl_Gaji,Tgl_Gaji Tgl_Gaji2,Minggu,Bulan,Tahun,Kode_Jurnal,Catatan Catatan1,UserID FROM gel_gaji WHERE No_Gaji=?", [$this->no_cetak]); $_info = $this->db->fetchRow("SELECT DATE_FORMAT(Tgl_Gaji,'%d-%m-%Y') Tgl_Gaji,Tgl_Gaji Tgl_Gaji2,Minggu,Bulan,Tahun,Kode_Jurnal,Catatan Catatan1,UserID FROM gel_gaji WHERE No_Gaji=?", [$this->no_cetak]);
@@ -418,7 +439,7 @@ class NotaController {
if (count($aitem) === 0) return; if (count($aitem) === 0) return;
foreach ($aitem as $item) { foreach ($aitem as $item) {
$ainfo = array_merge($ainfo, $item); $ainfo = array_merge($ainfo, $item->getData());
$acatat = []; $acatat = [];
if (!empty($ainfo['Catatan1'])) { if (!empty($ainfo['Catatan1'])) {
$acatat = str_split(ucfirst(trim($ainfo['Catatan1'])), 40); $acatat = str_split(ucfirst(trim($ainfo['Catatan1'])), 40);
@@ -464,13 +485,17 @@ class NotaController {
if ((int) $ainfo['KateID'] === 5) $is_token = 1; if ((int) $ainfo['KateID'] === 5) $is_token = 1;
$pre = new PrintPOS($this->app); $pre = new PrintPOS($this->app);
if ($this->is_thermal) {
$pre->set_fontsize(2); $pre->set_fontsize(2);
$pre->set_header_logo("logo-nota.png"); $pre->set_header_logo("logo-nota.png");
} else {
$pre->add_header($this->web_app['REG_NAME'], $this->web_app['REG_CITY']);
}
if ($this->app_inv['PRINT_OPENCD'] === 1 && $this->op_cash === 1) $pre->set_opendrawer(); if ($this->app_inv['PRINT_OPENCD'] === 1 && $this->op_cash === 1) $pre->set_opendrawer();
if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper(); if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper();
if (!empty($this->app_inv['TITLE_BEGIN'])) { if (!empty($this->app_inv['TITLE_BEGIN'])) {
$_ahead = explode("[br]", stripslashes($this->app_inv['TITLE_BEGIN'])); $_ahead = explode("[br]", stripslashes($this->app_inv['TITLE_BEGIN']));
foreach($_ahead as $val) $pre->addc($val); foreach ($_ahead as $val) $pre->addc($val);
} }
$pre->add([$ainfo['No_TX'],20], [$ainfo['Tgl_TX2'],20,"R"]); $pre->add([$ainfo['No_TX'],20], [$ainfo['Tgl_TX2'],20,"R"]);
+10 -6
View File
@@ -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 : October 13th, 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']);
} }
@@ -93,8 +93,12 @@ class AkhirController {
$apre = $this->prepare(); $apre = $this->prepare();
$pre = new PrintPOS($this->app); $pre = new PrintPOS($this->app);
$pre->set_fontsize(2);//thermal if (Invesa::Printer_Thermal(Param::Get("Printer", ""))) {
$pre->set_header_logo("logo-nota.png");//thermal $pre->set_fontsize(2);
$pre->set_header_logo("logo-nota.png");
} else {
$pre->add_header($this->reg_name);
}
if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper(); if ($this->app_inv['PRINT_AUTOCUT'] === 1) $pre->set_cutpaper();
$pre->add_empty(); $pre->add_empty();
@@ -187,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>
+30 -4
View File
@@ -6,7 +6,7 @@
Description : Informasi Aplikasi Description : Informasi Aplikasi
Created By : Siau Pheng ([email protected]). Created By : Siau Pheng ([email protected]).
Created Date : November 23th, 2011. Created Date : November 23th, 2011.
Last Modified : August 13th, 2026. Last Modified : November 2nd, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM. (c) 3FONIA Software; WWW.3FONIA.COM.
@@ -16,6 +16,7 @@ declare(strict_types=1);
namespace App\Controller\System; namespace App\Controller\System;
use Composer\Autoload\ClassLoader;
use flight\Engine; use flight\Engine;
use flight\Session; use flight\Session;
use Webapp\App\Register; use Webapp\App\Register;
@@ -47,7 +48,7 @@ class AboutController {
<div class="col col-form-label"><span class="form-control">'.$ainfo['cur_version'].'</span></div> <div class="col col-form-label"><span class="form-control">'.$ainfo['cur_version'].'</span></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-4 col-lg-4 col-form-label">Commit Sekarang</div> <div class="col-sm-4 col-lg-4 col-form-label">Commit Aplikasi</div>
<div class="col col-form-label"><span class="form-control"><strong>'.$ainfo['cur_sha'].'</strong> '.$ainfo['cur_date'].'</span></div> <div class="col col-form-label"><span class="form-control"><strong>'.$ainfo['cur_sha'].'</strong> '.$ainfo['cur_date'].'</span></div>
</div> </div>
<div class="row"><div class="col"><hr class="my-1"></div></div> <div class="row"><div class="col"><hr class="my-1"></div></div>
@@ -60,7 +61,7 @@ class AboutController {
<div class="col col-form-label"><span class="form-control">'.$ainfo['new_message'].'</span></div> <div class="col col-form-label"><span class="form-control">'.$ainfo['new_message'].'</span></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-4 col-lg-4 col-form-label">Status Server</div> <div class="col-sm-4 col-lg-4 col-form-label">Status Git Server</div>
<div class="col"> <div class="col">
<span class="form-control text-'.($ainfo['svr_status']===1?'success border-primary':'warning border-danger').'" id="spanStatus">'.$ainfo['svr_message'].'</span> <span class="form-control text-'.($ainfo['svr_status']===1?'success border-primary':'warning border-danger').'" id="spanStatus">'.$ainfo['svr_message'].'</span>
</div> </div>
@@ -91,6 +92,28 @@ class AboutController {
$this->app->json($ajson); $this->app->json($ajson);
} }
public function composer() {
$packages = [];
if (class_exists(ClassLoader::class, false)) {
$baseDir = (function () {
$baseDir = null;
@include dirname((string) (new \ReflectionClass(ClassLoader::class))->getFileName()) . '/autoload_psr4.php'; // @ may not exist
return $baseDir;
})();
$composer = @json_decode((string) file_get_contents($baseDir . '/composer.lock')); // @ may not exist or be valid
$packages = (array) @$composer->packages; // @ keys may not exist
array_walk($packages, function ($package) {
$package->hash = $package->source->reference ?? $package->dist->reference ?? null;
}, $packages);
usort($packages, fn($a, $b): int => $a->name <=> $b->name);
}
$text = ''; $last = array_key_last((array) $packages);
foreach ($packages as $key => $item) {
$text .= $item->name. ' '.(str_starts_with($item->version,'v')?'':'v').$item->version. ($key === $last ? '' : '<i class="bi-gear px-1"></i>');
}
$this->app->json([ 'html' => $text ]);
}
public function index() { public function index() {
$ajson = []; $ajson = [];
$apps = $this->session->get('WEB_APP'); $apps = $this->session->get('WEB_APP');
@@ -119,7 +142,10 @@ class AboutController {
<div class="text-center text-secondary">'.$apps['APP_NAMES'].' Ver. '.$apps['APP_VER'].'<br>Updated : '.$apps['APP_UPDATED'].'<br><br><span style="font-size:.9em;"><i class="bi-c-circle pe-1"></i>'.$apps['CREATOR_YEARS'].', '.$apps['CREATOR_NAME'].'<br>'.$apps['CREATOR_WEBSITE'].'.</span></div> <div class="text-center text-secondary">'.$apps['APP_NAMES'].' Ver. '.$apps['APP_VER'].'<br>Updated : '.$apps['APP_UPDATED'].'<br><br><span style="font-size:.9em;"><i class="bi-c-circle pe-1"></i>'.$apps['CREATOR_YEARS'].', '.$apps['CREATOR_NAME'].'<br>'.$apps['CREATOR_WEBSITE'].'.</span></div>
</div> </div>
<div class="tab-pane fade" id="other" role="tabpanel" aria-labelledby="other-tab"> <div class="tab-pane fade" id="other" role="tabpanel" aria-labelledby="other-tab">
<div class="row"><div class="col" id="divBuildInfo"></div></div> <div class="row mb-1"><div class="col fw-bold">Komponen Javascript</div></div>
<div class="row mb-1"><div class="col" id="divBuildInfo"></div></div>
<div class="row mb-1"><div class="col fw-bold">Repositori Composer</div></div>
<div class="row mb-1"><div class="col overflow-auto" style="height:100px;" id="divComposerInfo"></div></div>
</div> </div>
<div class="tab-pane fade" id="tool" role="tabpanel" aria-labelledby="tool-tab"> <div class="tab-pane fade" id="tool" role="tabpanel" aria-labelledby="tool-tab">
<div class="row mb-2"> <div class="row mb-2">
+2 -2
View File
@@ -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();
+9 -9
View File
@@ -14,34 +14,34 @@ var DISPConfigJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butBrow').click(() => this.cab_brow()); $('#butBrow').click(() => this.cab_brow());
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('form-display'); this.data_query('form-display');
}, },
cab_brow: function(){ cab_brow() {
var _isi = new String('<div id="divBrowCab">&nbsp;</div>'); var _isi = new String('<div id="divBrowCab">&nbsp;</div>');
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', _isi, 'lg', '', () => this.data_query('brow-cabang')); this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', _isi, 'lg', '', () => this.data_query('brow-cabang'));
}, },
cab_select: function(acell){ cab_select(acell) {
FoniaJS.closeWindow(this.winBCab); FoniaJS.closeWindow(this.winBCab);
$('#REG_ID').val(acell[0]); $('#REG_ID').val(acell[0]);
this.data_query('form-display', 'view'); this.data_query('form-display', 'view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('form-display', 'edit'); this.data_query('form-display', 'edit');
this.load_port(); this.load_port();
}, },
proses_save: function(){ proses_save() {
this.data_query('form-display', 'save'); this.data_query('form-display', 'save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=='form-display'){ if (tipe=='form-display'){
new Request({ new Request({
url: this.PHP + '/form_display', url: this.PHP + '/form_display',
@@ -54,13 +54,13 @@ var DISPConfigJS = {
} }
}).send(); }).send();
} else if (tipe=='brow-cabang'){ } else if (tipe=='brow-cabang'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_cabang', url: this.PHP + '/brow_cabang',
}).send(); }).send();
} }
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode').val(), ['edit']) >= 0) { if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$('#butBrow').prop('disabled', true); $('#butBrow').prop('disabled', true);
$('#butUbah').prop('disabled', true); $('#butUbah').prop('disabled', true);
@@ -72,7 +72,7 @@ var DISPConfigJS = {
} }
}, },
load_port: function(){ load_port() {
var parent = this; var parent = this;
qz.serial.findPorts().then(function(data){ qz.serial.findPorts().then(function(data){
var _selport = $('#POLE_PORT').val(); var _selport = $('#POLE_PORT').val();
+11 -11
View File
@@ -14,7 +14,7 @@ var DISPIklanJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Iklan').keydown((e) => { $('#Cari_Iklan').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var DISPIklanJS = {
FoniaJS.setFocus('#Cari_Iklan'); FoniaJS.setFocus('#Cari_Iklan');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_iklan', url: this.PHP + '/form_iklan',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -63,17 +63,17 @@ var DISPIklanJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Iklan'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Iklan'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -81,8 +81,8 @@ var DISPIklanJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PromoID','CabID','Tanggal','Info','Aktif','Cari_Iklan'], sendParam: ['mode_detail','PromoID','CabID','Tanggal','Info','Aktif','Cari_Iklan'],
onSuccess: () => { onSuccess: () => {
@@ -92,16 +92,16 @@ var DISPIklanJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Iklan'] sendParam: ['Cari_Iklan']
}).send(); }).send();
} }
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: this.PHP + '/get_picture', url: this.PHP + '/get_picture',
sendParam: ['PromoID'], sendParam: ['PromoID'],
+11 -11
View File
@@ -14,7 +14,7 @@ var DISPPromoJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Promo').keydown((e) => { $('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var DISPPromoJS = {
FoniaJS.setFocus('#Cari_Promo'); FoniaJS.setFocus('#Cari_Promo');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_promo', url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -63,17 +63,17 @@ var DISPPromoJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -81,8 +81,8 @@ var DISPPromoJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PromoID','Tanggal','Info','Warna','Font','Aktif','Cari_Promo'], sendParam: ['mode_detail','PromoID','Tanggal','Info','Warna','Font','Aktif','Cari_Promo'],
onSuccess: () => { onSuccess: () => {
@@ -92,16 +92,16 @@ var DISPPromoJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Promo'] sendParam: ['Cari_Promo']
}).send(); }).send();
} }
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: this.PHP + '/get_picture', url: this.PHP + '/get_picture',
sendParam: ['PromoID'], sendParam: ['PromoID'],
+30 -30
View File
@@ -14,7 +14,7 @@ var GELGajiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var GELGajiJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -42,17 +42,17 @@ var GELGajiJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Gaji').val(acell[0]); $('#No_Gaji').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Gaji').val()){ if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -60,7 +60,7 @@ var GELGajiJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Gaji').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Gaji').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Gaji').val()){ if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -84,18 +84,18 @@ var GELGajiJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Gaji').val(''); $('#No_Gaji').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(){ tx_print() {
if (!$('#No_Gaji').val()){ if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -106,14 +106,14 @@ var GELGajiJS = {
}); });
}, },
tx_print_exec: function(){ tx_print_exec() {
var cetak = new PrinterPos('report/nota/gaji'); new PrinterPos('report/nota/gaji')
cetak.add_param("Nomor_Cetak", $('#No_Gaji').val()); .addParam("Nomor_Cetak", $('#No_Gaji').val())
cetak.exec(); .exec();
FoniaJS.closeWindow(this.winBCetak); FoniaJS.closeWindow(this.winBCetak);
}, },
karya_brow: function(){ karya_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Karya" 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="divBrowKarya">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Karya" 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="divBrowKarya">&nbsp;</div>');
this.winBKarya = FoniaJS.showWindow('BKarya', 'Daftar Karyawan', _isi, 'lg', '', () => { this.winBKarya = FoniaJS.showWindow('BKarya', 'Daftar Karyawan', _isi, 'lg', '', () => {
$('#winBKarya') $('#winBKarya')
@@ -131,12 +131,12 @@ var GELGajiJS = {
}); });
}, },
karya_select: function(acell){ karya_select(acell) {
FoniaJS.closeWindow(this.winBKarya); FoniaJS.closeWindow(this.winBKarya);
this.detail_gaji('insert', 0, acell[0]); this.detail_gaji('insert', 0, acell[0]);
}, },
detail_gaji: function(mode, ID, KaryaID){ detail_gaji(mode, ID, KaryaID) {
new Request({ new Request({
url: this.PHP + '/form_gaji', url: this.PHP + '/form_gaji',
sendParam: ['mode','mode_detail='+mode,'No_Gaji','ID='+ID,'KaryaID='+KaryaID], sendParam: ['mode','mode_detail='+mode,'No_Gaji','ID='+ID,'KaryaID='+KaryaID],
@@ -177,24 +177,24 @@ var GELGajiJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_gaji('insert', 0, 0); this.detail_gaji('insert', 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_gaji('update', acell[0], acell[1]); this.detail_gaji('update', acell[0], acell[1]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Gaji','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','No_Gaji','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#KaryaID').val())==0) { if (parseInt($('#KaryaID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Karyawan !'); FoniaJS.showError('Silakan masukkan Nama Karyawan !');
return; return;
@@ -203,7 +203,7 @@ var GELGajiJS = {
FoniaJS.showError('Jumlah Potongan melebihi Jumlah Pinjaman !'); FoniaJS.showError('Jumlah Potongan melebihi Jumlah Pinjaman !');
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Gaji','KaryaID','Qty_Harian','Gaji_Harian','Qty_Lembur','Lembur_Harian','Qty_BonusM','Qty_BonusB','Bonus_Minggu','Bonus_Bulan','Total_Potong','CatatKar','ID'], sendParam: ['mode','mode_detail','No_Gaji','KaryaID','Qty_Harian','Gaji_Harian','Qty_Lembur','Lembur_Harian','Qty_BonusM','Qty_BonusB','Bonus_Minggu','Bonus_Bulan','Total_Potong','CatatKar','ID'],
onSuccess: () => { onSuccess: () => {
@@ -212,7 +212,7 @@ var GELGajiJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Gaji'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Gaji'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode=save','No_Gaji','Tgl_Gaji','CabID','Tahun','Bulan','Minggu','Catatan='+encodeURIComponent($('#Catatan').val())]; if ((mode ?? '')=='save') sparam = ['mode=save','No_Gaji','Tgl_Gaji','CabID','Tahun','Bulan','Minggu','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -248,31 +248,31 @@ var GELGajiJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Gaji'] sendParam: ['mode','No_Gaji']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-karya"){ } else if (tipe=="brow-karya"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_karya', url: this.PHP + '/brow_karya',
sendParam: ['No_Gaji','Cari_Karya'], sendParam: ['No_Gaji','Cari_Karya'],
onSuccess: () => FoniaJS.setFocus('#Cari_Karya') onSuccess: () => FoniaJS.setFocus('#Cari_Karya')
}).send(); }).send();
} else if (tipe=="brow-cetak"){ } else if (tipe=="brow-cetak"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_cetak', url: this.PHP + '/brow_cetak',
sendParam: ['No_Gaji'] sendParam: ['No_Gaji']
}).send(); }).send();
} }
}, },
Karya_Comp: function(item){ Karya_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#KaryaID').val(item.value); $('#KaryaID').val(item.value);
$('#Gaji_Harian').val(FoniaJS.FloatToStr(adata[0])); $('#Gaji_Harian').val(FoniaJS.FloatToStr(adata[0]));
@@ -280,7 +280,7 @@ var GELGajiJS = {
FoniaJS.setFocus('#Qty_Harian'); FoniaJS.setFocus('#Qty_Harian');
}, },
oc_Minggu: function(){ oc_Minggu() {
new Request({ new Request({
url: this.PHP + '/option_minggu', url: this.PHP + '/option_minggu',
sendParam: ['Tahun','Bulan'], sendParam: ['Tahun','Bulan'],
@@ -295,7 +295,7 @@ var GELGajiJS = {
}).send(); }).send();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
var dgaji = FoniaJS.StrToFloat($('#Qty_Harian').val()) * FoniaJS.StrToFloat($('#Gaji_Harian').val()); var dgaji = FoniaJS.StrToFloat($('#Qty_Harian').val()) * FoniaJS.StrToFloat($('#Gaji_Harian').val());
var dlemb = FoniaJS.StrToFloat($('#Qty_Lembur').val()) * FoniaJS.StrToFloat($('#Lembur_Harian').val()); var dlemb = FoniaJS.StrToFloat($('#Qty_Lembur').val()) * FoniaJS.StrToFloat($('#Lembur_Harian').val());
var dbon1 = FoniaJS.StrToFloat($('#Qty_BonusM').val()) * FoniaJS.StrToFloat($('#Bonus_Minggu').val()); var dbon1 = FoniaJS.StrToFloat($('#Qty_BonusM').val()) * FoniaJS.StrToFloat($('#Bonus_Minggu').val());
+16 -16
View File
@@ -14,21 +14,21 @@ var GELHutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butMode').click(() => this.tx_mode()); $('#butMode').click(() => this.tx_mode());
$('#butBatal').click(() => this.tx_batal()); $('#butBatal').click(() => this.tx_batal());
if (FoniaJS.User.Level>0) $('#butMode').hide(); if (FoniaJS.User.Level>0) $('#butMode').hide();
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_mode: function(){ tx_mode() {
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1; var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
$('#Mode_Tampil').val(mode); $('#Mode_Tampil').val(mode);
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal')); $('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
tx_batal: function(){ tx_batal() {
$('#divTXNota').removeClass('d-none'); $('#divTXNota').removeClass('d-none');
$('#divDetailNota').addClass('d-none'); $('#divDetailNota').addClass('d-none');
$('#divDetailBayar').addClass('d-none'); $('#divDetailBayar').addClass('d-none');
@@ -39,7 +39,7 @@ var GELHutangJS = {
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
sup_brow: function(){ sup_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Sup" 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="divBrowSup">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Sup" 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="divBrowSup">&nbsp;</div>');
this.winBSup = FoniaJS.showWindow('BSup', 'Daftar Supplier', _isi, 'xl', '', () => { this.winBSup = FoniaJS.showWindow('BSup', 'Daftar Supplier', _isi, 'xl', '', () => {
$('#winBSup') $('#winBSup')
@@ -57,7 +57,7 @@ var GELHutangJS = {
}); });
}, },
sup_select: function(acell){ sup_select(acell) {
FoniaJS.closeWindow(this.winBSup); FoniaJS.closeWindow(this.winBSup);
$('#SupID').val(acell[0]); $('#SupID').val(acell[0]);
$('#Nama_Sup').val(acell[2]); $('#Nama_Sup').val(acell[2]);
@@ -65,7 +65,7 @@ var GELHutangJS = {
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
nota_select: function(acell){ nota_select(acell) {
new Request({ new Request({
url: this.PHP + '/form_nota', url: this.PHP + '/form_nota',
sendParam: ['No_Beli='+acell[1],'Tipe_Nota='+acell[0]], sendParam: ['No_Beli='+acell[1],'Tipe_Nota='+acell[0]],
@@ -83,7 +83,7 @@ var GELHutangJS = {
}).send(); }).send();
}, },
bayar_show: function(){ bayar_show() {
new Request({ new Request({
url: this.PHP + '/form_bayar', url: this.PHP + '/form_bayar',
sendParam: ['No_Beli','Total_Sisa'], sendParam: ['No_Beli','Total_Sisa'],
@@ -96,28 +96,28 @@ var GELHutangJS = {
}).send(); }).send();
}, },
bayar_hapus: function(acell){ bayar_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=delete','No_Beli','ID='+acell[0]] sendParam: ['mode_detail=delete','No_Beli','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
bayar_simpan: function(){ bayar_simpan() {
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){ if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!"); FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=insert','SupID','No_Beli','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Sup'], sendParam: ['mode_detail=insert','SupID','No_Beli','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Sup'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar) onSuccess: () => FoniaJS.closeWindow(this.winBayar)
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
@@ -135,17 +135,17 @@ var GELHutangJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-nota"){ } else if (tipe=="tabel-nota"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_nota', url: this.PHP + '/table_nota',
sendParam: ['SupID','Mode_Tampil'] sendParam: ['SupID','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="tabel-bayar"){ } else if (tipe=="tabel-bayar"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['No_Beli','Lunas','Mode_Tampil'] sendParam: ['No_Beli','Lunas','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="brow-sup"){ } else if (tipe=="brow-sup"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_sup', url: this.PHP + '/brow_sup',
sendParam: ['Cari_Sup'], sendParam: ['Cari_Sup'],
onSuccess: () => FoniaJS.setFocus('#Cari_Sup') onSuccess: () => FoniaJS.setFocus('#Cari_Sup')
@@ -153,7 +153,7 @@ var GELHutangJS = {
} }
}, },
Sup_Comp: function(item){ Sup_Comp(item) {
$('#SupID').val(item.value); $('#SupID').val(item.value);
$('#Alamat_Sup').val(item.data); $('#Alamat_Sup').val(item.data);
GELHutangJS.data_query('tabel-nota'); GELHutangJS.data_query('tabel-nota');
+12 -12
View File
@@ -14,13 +14,13 @@ var GELKaryaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butPinjam').click(() => this.tx_pinjam()); $('#butPinjam').click(() => this.tx_pinjam());
$('#butBayar').click(() => this.tx_bayar()); $('#butBayar').click(() => this.tx_bayar());
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_pinjam: function(){ tx_pinjam() {
new Request({ new Request({
url: this.PHP + '/form_pinjam', url: this.PHP + '/form_pinjam',
sendParam: ['KaryaID'], sendParam: ['KaryaID'],
@@ -33,7 +33,7 @@ var GELKaryaJS = {
}).send(); }).send();
}, },
tx_bayar: function(){ tx_bayar() {
new Request({ new Request({
url: this.PHP + '/form_bayar', url: this.PHP + '/form_bayar',
sendParam: ['KaryaID'], sendParam: ['KaryaID'],
@@ -46,40 +46,40 @@ var GELKaryaJS = {
}).send(); }).send();
}, },
pinjam_simpan: function(){ pinjam_simpan() {
if (FoniaJS.StrToFloat($('#Total_Pinjam').val()) == 0){ if (FoniaJS.StrToFloat($('#Total_Pinjam').val()) == 0){
FoniaJS.showError("Silahkan masukkan jumlah pinjaman !"); FoniaJS.showError("Silahkan masukkan jumlah pinjaman !");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Pinjam','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=1'], sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Pinjam','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=1'],
onSuccess: () => FoniaJS.closeWindow(this.winPinjam) onSuccess: () => FoniaJS.closeWindow(this.winPinjam)
}).send(); }).send();
}, },
bayar_simpan: function(){ bayar_simpan() {
if (FoniaJS.StrToFloat($('#Total_Bayar').val()) == 0){ if (FoniaJS.StrToFloat($('#Total_Bayar').val()) == 0){
FoniaJS.showError("Silahkan masukkan jumlah pembayaran !"); FoniaJS.showError("Silahkan masukkan jumlah pembayaran !");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Bayar','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=0'], sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Bayar','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=0'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar) onSuccess: () => FoniaJS.closeWindow(this.winBayar)
}).send(); }).send();
}, },
karya_hapus: function(acell){ karya_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['mode_detail=delete','KaryaID','No_Trans='+acell[0]] sendParam: ['mode_detail=delete','KaryaID','No_Trans='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
@@ -91,14 +91,14 @@ var GELKaryaJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-karya"){ } else if (tipe=="tabel-karya"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['KaryaID'] sendParam: ['KaryaID']
}).send(); }).send();
} }
}, },
ocKarya: function() { ocKarya() {
this.data_query('master'); this.data_query('master');
} }
+23 -23
View File
@@ -14,7 +14,7 @@ var GELKeluarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -23,7 +23,7 @@ var GELKeluarJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var GELKeluarJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -59,7 +59,7 @@ var GELKeluarJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -83,7 +83,7 @@ var GELKeluarJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Total_Item').val()==0){ if ($('#Total_Item').val()==0){
FoniaJS.showError("Belum ada Item Jurnal!"); FoniaJS.showError("Belum ada Item Jurnal!");
return false; return false;
@@ -92,14 +92,14 @@ var GELKeluarJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Kode_Jurnal').val(''); $('#Kode_Jurnal').val('');
}, 'danger'); }, 'danger');
}, },
cek_awal: function(){ cek_awal() {
/*if (GEL_Kunci($('Tanggal').get('value'))) { /*if (GEL_Kunci($('Tanggal').get('value'))) {
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000); FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
return false; return false;
@@ -112,7 +112,7 @@ var GELKeluarJS = {
return true; return true;
}, },
rek_brow: function(){ rek_brow() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>');
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => { this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
@@ -131,12 +131,12 @@ var GELKeluarJS = {
}); });
}, },
rek_select: function(acell){ rek_select(acell) {
FoniaJS.closeWindow(this.winBRek); FoniaJS.closeWindow(this.winBRek);
this.detail_rek('insert', 0, acell[0]); this.detail_rek('insert', 0, acell[0]);
}, },
detail_rek: function(mode, ID, Kode_Rek){ detail_rek(mode, ID, Kode_Rek) {
new Request({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek], sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
@@ -158,31 +158,31 @@ var GELKeluarJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
this.detail_rek('insert', 0, 0); this.detail_rek('insert', 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_rek('update', acell[0], acell[1]); this.detail_rek('update', acell[0], acell[1]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Rekening Jurnal !'); FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'], sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
onSuccess: () => { onSuccess: () => {
@@ -191,7 +191,7 @@ var GELKeluarJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())]; if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -234,18 +234,18 @@ var GELKeluarJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal'] sendParam: ['mode','Kode_Jurnal']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-rek"){ } else if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -253,7 +253,7 @@ var GELKeluarJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
FoniaJS.setFocus('#Jumlah'); FoniaJS.setFocus('#Jumlah');
} }
+16 -16
View File
@@ -14,21 +14,21 @@ var GELPiutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butMode').click(() => this.tx_mode()); $('#butMode').click(() => this.tx_mode());
$('#butBatal').click(() => this.tx_batal()); $('#butBatal').click(() => this.tx_batal());
if (FoniaJS.User.Level>0) $('#butMode').hide(); if (FoniaJS.User.Level>0) $('#butMode').hide();
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_mode: function(){ tx_mode() {
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1; var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
$('#Mode_Tampil').val(mode); $('#Mode_Tampil').val(mode);
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal')); $('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
tx_batal: function(){ tx_batal() {
$('#divTXNota').removeClass('d-none'); $('#divTXNota').removeClass('d-none');
$('#divDetailNota').addClass('d-none'); $('#divDetailNota').addClass('d-none');
$('#divDetailBayar').addClass('d-none'); $('#divDetailBayar').addClass('d-none');
@@ -39,7 +39,7 @@ var GELPiutangJS = {
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
buyer_brow: function(){ buyer_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Buyer" 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="divBrowBuyer">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Buyer" 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="divBrowBuyer">&nbsp;</div>');
this.winBBuyer = FoniaJS.showWindow('BBuyer', 'Daftar Member', _isi, 'xl', '', () => { this.winBBuyer = FoniaJS.showWindow('BBuyer', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBBuyer') $('#winBBuyer')
@@ -57,7 +57,7 @@ var GELPiutangJS = {
}); });
}, },
buyer_select: function(acell){ buyer_select(acell) {
FoniaJS.closeWindow(this.winBBuyer); FoniaJS.closeWindow(this.winBBuyer);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[2]); $('#Nama_Member').val(acell[2]);
@@ -65,7 +65,7 @@ var GELPiutangJS = {
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
nota_select: function(acell){ nota_select(acell) {
new Request({ new Request({
url: this.PHP + '/form_nota', url: this.PHP + '/form_nota',
sendParam: ['No_Jual='+acell[1],'Tipe_Nota='+acell[0]], sendParam: ['No_Jual='+acell[1],'Tipe_Nota='+acell[0]],
@@ -83,7 +83,7 @@ var GELPiutangJS = {
}).send(); }).send();
}, },
bayar_show: function(){ bayar_show() {
new Request({ new Request({
url: this.PHP + '/form_bayar', url: this.PHP + '/form_bayar',
sendParam: ['No_Jual','Total_Sisa'], sendParam: ['No_Jual','Total_Sisa'],
@@ -96,28 +96,28 @@ var GELPiutangJS = {
}).send(); }).send();
}, },
bayar_hapus: function(acell){ bayar_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]] sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
bayar_simpan: function(){ bayar_simpan() {
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){ if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!"); FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=insert','MemberID','No_Jual','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Member'], sendParam: ['mode_detail=insert','MemberID','No_Jual','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Member'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar) onSuccess: () => FoniaJS.closeWindow(this.winBayar)
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
@@ -135,17 +135,17 @@ var GELPiutangJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-nota"){ } else if (tipe=="tabel-nota"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_nota', url: this.PHP + '/table_nota',
sendParam: ['MemberID','Mode_Tampil'] sendParam: ['MemberID','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="tabel-bayar"){ } else if (tipe=="tabel-bayar"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['No_Jual','Lunas','Mode_Tampil'] sendParam: ['No_Jual','Lunas','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="brow-buyer"){ } else if (tipe=="brow-buyer"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_buyer', url: this.PHP + '/brow_buyer',
sendParam: ['Cari_Buyer'], sendParam: ['Cari_Buyer'],
onSuccess: () => FoniaJS.setFocus('#Cari_Buyer') onSuccess: () => FoniaJS.setFocus('#Cari_Buyer')
@@ -153,7 +153,7 @@ var GELPiutangJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Alamat_Member').val(item.data); $('#Alamat_Member').val(item.data);
GELPiutangJS.data_query('tabel-nota'); GELPiutangJS.data_query('tabel-nota');
+23 -23
View File
@@ -14,7 +14,7 @@ var GELTerimaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -23,7 +23,7 @@ var GELTerimaJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var GELTerimaJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -59,7 +59,7 @@ var GELTerimaJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -83,7 +83,7 @@ var GELTerimaJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Total_Item').val()==0){ if ($('#Total_Item').val()==0){
FoniaJS.showError("Belum ada Item Jurnal!"); FoniaJS.showError("Belum ada Item Jurnal!");
return false; return false;
@@ -92,14 +92,14 @@ var GELTerimaJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Kode_Jurnal').val(''); $('#Kode_Jurnal').val('');
}, 'danger'); }, 'danger');
}, },
cek_awal: function(){ cek_awal() {
/*if (GEL_Kunci($('Tanggal').get('value'))) { /*if (GEL_Kunci($('Tanggal').get('value'))) {
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000); FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
return false; return false;
@@ -112,7 +112,7 @@ var GELTerimaJS = {
return true; return true;
}, },
rek_brow: function(){ rek_brow() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>');
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => { this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
@@ -131,12 +131,12 @@ var GELTerimaJS = {
}); });
}, },
rek_select: function(acell){ rek_select(acell) {
FoniaJS.closeWindow(this.winBRek); FoniaJS.closeWindow(this.winBRek);
this.detail_rek('insert', 0, acell[0]); this.detail_rek('insert', 0, acell[0]);
}, },
detail_rek: function(mode, ID, Kode_Rek){ detail_rek(mode, ID, Kode_Rek) {
new Request({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek], sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
@@ -158,31 +158,31 @@ var GELTerimaJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
this.detail_rek('insert', 0, 0); this.detail_rek('insert', 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_rek('update', acell[0], acell[1]); this.detail_rek('update', acell[0], acell[1]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Rekening Jurnal !'); FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'], sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
onSuccess: () => { onSuccess: () => {
@@ -191,7 +191,7 @@ var GELTerimaJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())]; if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -234,18 +234,18 @@ var GELTerimaJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal'] sendParam: ['mode','Kode_Jurnal']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-rek"){ } else if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -253,7 +253,7 @@ var GELTerimaJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
FoniaJS.setFocus('#Jumlah'); FoniaJS.setFocus('#Jumlah');
} }
+23 -23
View File
@@ -14,7 +14,7 @@ var GELUmumJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah());$('#butHapus').click(() => this.tx_hapus()); $('#butUbah').click(() => this.tx_ubah());$('#butHapus').click(() => this.tx_hapus());
$('#butSimpan').click(() => this.tx_simpan()); $('#butSimpan').click(() => this.tx_simpan());
@@ -22,7 +22,7 @@ var GELUmumJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -40,17 +40,17 @@ var GELUmumJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -58,7 +58,7 @@ var GELUmumJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -82,7 +82,7 @@ var GELUmumJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Total_Item').val()==0){ if ($('#Total_Item').val()==0){
FoniaJS.showError("Belum ada Item Jurnal!"); FoniaJS.showError("Belum ada Item Jurnal!");
return false; return false;
@@ -95,14 +95,14 @@ var GELUmumJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Kode_Jurnal').val(''); $('#Kode_Jurnal').val('');
}, 'danger'); }, 'danger');
}, },
cek_awal: function(){ cek_awal() {
/*if (GEL_Kunci($('Tanggal').get('value'))) { /*if (GEL_Kunci($('Tanggal').get('value'))) {
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000); FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
return false; return false;
@@ -115,7 +115,7 @@ var GELUmumJS = {
return true; return true;
}, },
rek_brow: function(){ rek_brow() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>');
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => { this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
@@ -134,12 +134,12 @@ var GELUmumJS = {
}); });
}, },
rek_select: function(acell){ rek_select(acell) {
FoniaJS.closeWindow(this.winBRek); FoniaJS.closeWindow(this.winBRek);
this.detail_rek('insert', 0, acell[0], 'D'); this.detail_rek('insert', 0, acell[0], 'D');
}, },
detail_rek: function(mode, ID, Kode_Rek, DK){ detail_rek(mode, ID, Kode_Rek, DK) {
new Request({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek,'DK='+DK], sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek,'DK='+DK],
@@ -161,31 +161,31 @@ var GELUmumJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
this.detail_rek('insert', 0, 0, 'D'); this.detail_rek('insert', 0, 0, 'D');
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_rek('update', acell[0], acell[1], acell[3]); this.detail_rek('update', acell[0], acell[1], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Rekening Jurnal !'); FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','DK','Jumlah','ID'], sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','DK','Jumlah','ID'],
onSuccess: () => { onSuccess: () => {
@@ -194,7 +194,7 @@ var GELUmumJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Catatan='+encodeURIComponent($('#Catatan').val())]; if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -237,18 +237,18 @@ var GELUmumJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal'] sendParam: ['mode','Kode_Jurnal']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-rek"){ } else if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -256,7 +256,7 @@ var GELUmumJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
FoniaJS.setFocus('#Jumlah'); FoniaJS.setFocus('#Jumlah');
} }
+4 -4
View File
@@ -50,7 +50,7 @@ socket.on('super-data', (adata) => {
var IndexJS = { var IndexJS = {
index: function(){ index() {
new Request({ new Request({
url: 'index/index', url: 'index/index',
sendParam: [], sendParam: [],
@@ -66,7 +66,7 @@ var IndexJS = {
}).send(); }).send();
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: 'system/profile/get_picture', url: 'system/profile/get_picture',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -75,13 +75,13 @@ var IndexJS = {
}).send(); }).send();
}, },
load_chart: function(){ load_chart() {
this.data_query('chart-sale'); this.data_query('chart-sale');
this.data_query('chart-omzet'); this.data_query('chart-omzet');
this.data_query('tabel-stok'); this.data_query('tabel-stok');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="chart-sale"){ if (tipe=="chart-sale"){
new Request({ new Request({
url: 'index/chart_sale', url: 'index/chart_sale',
+35 -35
View File
@@ -14,7 +14,7 @@ var BeliJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -26,7 +26,7 @@ var BeliJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -43,17 +43,17 @@ var BeliJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -65,7 +65,7 @@ var BeliJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -89,7 +89,7 @@ var BeliJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(mode){ tx_simpan(mode) {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -109,35 +109,35 @@ var BeliJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Beli').val(''); $('#No_Beli').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Beli').val()) { if ($('#No_Beli').val()) {
var cetak = new Printer('report/nota/beli'); let cetak = new Printer('report/nota/beli')
cetak.add_param("Nomor_Cetak", $('#No_Beli').val()); .addParam("Nomor_Cetak", $('#No_Beli').val());
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
pending_brow: function(){ pending_brow() {
var _isi = new String('<div id="divBrowPending">&nbsp;</div>'); var _isi = new String('<div id="divBrowPending">&nbsp;</div>');
this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Pembelian', _isi, 'xl', '', () => this.data_query('brow-pending')); this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Pembelian', _isi, 'xl', '', () => this.data_query('brow-pending'));
}, },
pending_select: function(acell){ pending_select(acell) {
FoniaJS.closeWindow(this.winBPending); FoniaJS.closeWindow(this.winBPending);
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
this.data_query('master', 'pending-edit'); this.data_query('master', 'pending-edit');
}, },
pending_delete: function(acell){ pending_delete(acell) {
FoniaJS.closeWindow(this.winBPending); FoniaJS.closeWindow(this.winBPending);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
@@ -145,7 +145,7 @@ var BeliJS = {
}, 'danger'); }, 'danger');
}, },
produk_brow: function(){ produk_brow() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
return; return;
@@ -173,12 +173,12 @@ var BeliJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
}, },
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){ detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -236,7 +236,7 @@ var BeliJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
return; return;
@@ -244,13 +244,13 @@ var BeliJS = {
this.detail_produk('insert', 0, 0, 0, 0); this.detail_produk('insert', 0, 0, 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]], sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]],
onSuccess: () => { onSuccess: () => {
@@ -261,13 +261,13 @@ var BeliJS = {
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#InvID').val())==0) { if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Disk_Rupiah','Disk_Persen1','Disk_Persen2','Disk_Persen3','Disk_Persen4','Disk_Persen5'], sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Disk_Rupiah','Disk_Persen1','Disk_Persen2','Disk_Persen3','Disk_Persen4','Disk_Persen5'],
onSuccess: () => { onSuccess: () => {
@@ -278,7 +278,7 @@ var BeliJS = {
}).send(); }).send();
}, },
total_show: function(){ total_show() {
if (['add','edit'].indexOf($('#mode').val()) == -1) return false; if (['add','edit'].indexOf($('#mode').val()) == -1) return false;
new Request({ new Request({
url: this.PHP + '/form_total', url: this.PHP + '/form_total',
@@ -302,14 +302,14 @@ var BeliJS = {
}).send(); }).send();
}, },
total_simpan: function(){ total_simpan() {
$('#Real_Diskon').val(FoniaJS.StrToFloat($('#popTotal_Diskon').val())); $('#Real_Diskon').val(FoniaJS.StrToFloat($('#popTotal_Diskon').val()));
$('#Real_Beli').val(FoniaJS.StrToFloat($('#popTotal_Beli').val())); $('#Real_Beli').val(FoniaJS.StrToFloat($('#popTotal_Beli').val()));
$('#tombolTotal').html('<i class="bi-wallet2 me-1"></i>Hutang : '+FoniaJS.FloatToStr($('#Real_Beli').val(),2)); $('#tombolTotal').html('<i class="bi-wallet2 me-1"></i>Hutang : '+FoniaJS.FloatToStr($('#Real_Beli').val(),2));
FoniaJS.closeWindow(this.winTotal); FoniaJS.closeWindow(this.winTotal);
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -358,7 +358,7 @@ var BeliJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Beli'], sendParam: ['mode','No_Beli'],
onSuccess: () => { onSuccess: () => {
@@ -367,18 +367,18 @@ var BeliJS = {
} }
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-pending"){ } else if (tipe=="brow-pending"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_pending', url: this.PHP + '/brow_pending',
sendParam: ['Cari_Pending'] sendParam: ['Cari_Pending']
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Filter_Browse','SupID'], sendParam: ['Cari_Produk','Filter_Browse','SupID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -386,7 +386,7 @@ var BeliJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#SatuanID').val(adata[0]); $('#SatuanID').val(adata[0]);
@@ -398,7 +398,7 @@ var BeliJS = {
BeliJS.update_Items(); BeliJS.update_Items();
}, },
update_Items: function(){ update_Items() {
new Request({ new Request({
url: this.PHP + '/item_detail', url: this.PHP + '/item_detail',
sendParam: ['InvID','SatuanID','SupID'], sendParam: ['InvID','SatuanID','SupID'],
@@ -419,14 +419,14 @@ var BeliJS = {
}).send(); }).send();
}, },
update_Varian: function(){ update_Varian() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_varian', url: this.PHP + '/option_varian',
sendParam: ['InvID','SatuanID','VarianID'] sendParam: ['InvID','SatuanID','VarianID']
}).send(); }).send();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
var dqty = FoniaJS.StrToFloat($('#Qty').val()); var dqty = FoniaJS.StrToFloat($('#Qty').val());
var dharga = FoniaJS.StrToFloat($('#Harga_Beli').val()); var dharga = FoniaJS.StrToFloat($('#Harga_Beli').val());
var ddiskrp = FoniaJS.StrToFloat($('#Disk_Rupiah').val()); var ddiskrp = FoniaJS.StrToFloat($('#Disk_Rupiah').val());
+28 -28
View File
@@ -14,7 +14,7 @@ var BeliReturJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var BeliReturJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var BeliReturJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -59,7 +59,7 @@ var BeliReturJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -83,7 +83,7 @@ var BeliReturJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -95,24 +95,24 @@ var BeliReturJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Beli').val(''); $('#No_Beli').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Beli').val()) { if ($('#No_Beli').val()) {
var cetak = new Printer('report/nota/beli_retur'); let cetak = new Printer('report/nota/beli_retur')
cetak.add_param("Nomor_Cetak", $('#No_Beli').val()); .addParam("Nomor_Cetak", $('#No_Beli').val());
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
produk_brow: function(){ produk_brow() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -133,12 +133,12 @@ var BeliReturJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
}, },
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){ detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -168,7 +168,7 @@ var BeliReturJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
return; return;
@@ -176,26 +176,26 @@ var BeliReturJS = {
this.detail_produk('insert', 0, 0, 0, 0); this.detail_produk('insert', 0, 0, 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#InvID').val())==0) { if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'], sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'],
onSuccess: () => { onSuccess: () => {
@@ -204,7 +204,7 @@ var BeliReturJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Beli','Tgl_Beli','No_Faktur','CabID','SupID']; if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Beli','Tgl_Beli','No_Faktur','CabID','SupID'];
@@ -242,18 +242,18 @@ var BeliReturJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Beli'] sendParam: ['mode','No_Beli']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['CabID','Cari_Produk'], sendParam: ['CabID','Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -261,7 +261,7 @@ var BeliReturJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#SatuanID').val(adata[0]); $('#SatuanID').val(adata[0]);
@@ -273,14 +273,14 @@ var BeliReturJS = {
FoniaJS.setFocus('#Qty'); FoniaJS.setFocus('#Qty');
}, },
update_Varian: function(){ update_Varian() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_varian', url: this.PHP + '/option_varian',
sendParam: ['InvID','SatuanID','VarianID'] sendParam: ['InvID','SatuanID','VarianID']
}).send(); }).send();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
} }
@@ -15,7 +15,7 @@ var CekHargaJS = {
KODE: '', KODE: '',
html5QrcodeScanner: null, html5QrcodeScanner: null,
index: function(){ index() {
$('#butBrow').click(() => this.produk_brow()); $('#butBrow').click(() => this.produk_brow());
if (FoniaJS.WEB_MOBILE){ if (FoniaJS.WEB_MOBILE){
html5QrcodeScanner = new Html5Qrcode('qr-reader'); html5QrcodeScanner = new Html5Qrcode('qr-reader');
@@ -26,7 +26,7 @@ var CekHargaJS = {
} }
}, },
ScanSukses: function(decodedText, decodedResult){ ScanSukses(decodedText, decodedResult) {
new Request({ new Request({
url: CekHargaJS.PHP + '/scan_produk', url: CekHargaJS.PHP + '/scan_produk',
sendParam: ['Cari_Produk='+decodedText], sendParam: ['Cari_Produk='+decodedText],
@@ -41,7 +41,7 @@ var CekHargaJS = {
}).send(); }).send();
}, },
produk_brow: function(){ 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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -58,7 +58,7 @@ var CekHargaJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#Kode_Barang').val(acell[1]+' / '+acell[2]); $('#Kode_Barang').val(acell[1]+' / '+acell[2]);
@@ -68,9 +68,9 @@ var CekHargaJS = {
this.update_Sup(); this.update_Sup();
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -78,7 +78,7 @@ var CekHargaJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#Nama_Barang').val(item.text); $('#Nama_Barang').val(item.text);
@@ -89,9 +89,9 @@ var CekHargaJS = {
CekHargaJS.update_Sup(); CekHargaJS.update_Sup();
}, },
update_Sup: function(){ update_Sup() {
if (parseInt($('#InvID').val()) == 0) return false; if (parseInt($('#InvID').val()) == 0) return false;
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/update_sup', url: this.PHP + '/update_sup',
sendParam: ['InvID'] sendParam: ['InvID']
}).send(); }).send();
+41 -41
View File
@@ -14,7 +14,7 @@ var JualJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -27,7 +27,7 @@ var JualJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -44,17 +44,17 @@ var JualJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Jual').val()){ if (!$('#No_Jual').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -66,7 +66,7 @@ var JualJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Jual').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Jual').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Jual').val()){ if (!$('#No_Jual').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -90,7 +90,7 @@ var JualJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(mode){ tx_simpan(mode) {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
return; return;
@@ -102,44 +102,44 @@ var JualJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Jual').val(''); $('#No_Jual').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Jual').val()) { if ($('#No_Jual').val()) {
var cetak = new Printer('report/nota/jual'); let cetak = new Printer('report/nota/jual')
cetak.add_param("Nomor_Cetak", $('#No_Jual').val()); .addParam("Nomor_Cetak", $('#No_Jual').val());
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
tx_print_pos: function(){ tx_print_pos() {
if ($('#No_Jual').val()) { if ($('#No_Jual').val()) {
var cetak = new PrinterPos('report/nota/pos'); new PrinterPos('report/nota/pos')
cetak.add_param("Nomor_Cetak", $('#No_Jual').val()); .addParam("Nomor_Cetak", $('#No_Jual').val())
cetak.exec(); .exec();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
pending_brow: function(){ pending_brow() {
this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Penjualan', '<div id="divBrowPending">&nbsp;</div>', 'xl', '', () => this.data_query('brow-pending')); this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Penjualan', '<div id="divBrowPending">&nbsp;</div>', 'xl', '', () => this.data_query('brow-pending'));
}, },
pending_select: function(acell){ pending_select(acell) {
FoniaJS.closeWindow(this.winBPending); FoniaJS.closeWindow(this.winBPending);
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
this.data_query('master', 'pending-edit'); this.data_query('master', 'pending-edit');
}, },
pending_delete: function(acell){ pending_delete(acell) {
FoniaJS.closeWindow(this.winBPending); FoniaJS.closeWindow(this.winBPending);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
@@ -147,7 +147,7 @@ var JualJS = {
}, 'danger'); }, 'danger');
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -164,7 +164,7 @@ var JualJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Grup_MemberID').val(acell[1]); $('#Grup_MemberID').val(acell[1]);
@@ -172,7 +172,7 @@ var JualJS = {
this.update_Piutang(); this.update_Piutang();
}, },
produk_brow: function(){ produk_brow() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
return; return;
@@ -193,12 +193,12 @@ var JualJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
}, },
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){ detail_produk(mode, ID, InvID, SatuanID, VarianID) {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -231,13 +231,13 @@ var JualJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Jual','ID='+acell[0]], sendParam: ['mode','mode_detail=delete','No_Jual','ID='+acell[0]],
onSuccess: () => $('#Nama_Produk').focus() onSuccess: () => $('#Nama_Produk').focus()
@@ -245,12 +245,12 @@ var JualJS = {
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) { if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) {
FoniaJS.showInfo('Nilai Diskon diluar batas !'); FoniaJS.showInfo('Nilai Diskon diluar batas !');
return false; return false;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'], sendParam: ['mode','mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
onSuccess: () => { onSuccess: () => {
@@ -260,7 +260,7 @@ var JualJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Jual'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Jual'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -271,7 +271,7 @@ var JualJS = {
onSuccess: (ajson) => { onSuccess: (ajson) => {
$('#divTXMaster').html(ajson.html); $('#divTXMaster').html(ajson.html);
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','CabID','Grup_MemberID'], {'selectFunc':this.Produk_Comp}); FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','CabID','Grup_MemberID'], {'selectFunc':this.Produk_Comp, 'breakFocus': true});
$('#Nama_Produk').click(() => $('#Nama_Produk').select()); $('#Nama_Produk').click(() => $('#Nama_Produk').select());
$('#POS_Qty').on({ $('#POS_Qty').on({
keyup: (e) => { keyup: (e) => {
@@ -324,28 +324,28 @@ var JualJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Jual'] sendParam: ['mode','No_Jual']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-pending"){ } else if (tipe=="brow-pending"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_pending', url: this.PHP + '/brow_pending',
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Grup_MemberID'], sendParam: ['Cari_Produk','Grup_MemberID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -353,13 +353,13 @@ var JualJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Grup_MemberID').val(item.data); $('#Grup_MemberID').val(item.data);
JualJS.update_Piutang(); JualJS.update_Piutang();
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val()); var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
var adata = item.data.split(':'); var adata = item.data.split(':');
// M : Grup_Member // M : Grup_Member
@@ -371,7 +371,7 @@ var JualJS = {
// P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok // P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok
//todo: jika stok kosong tidak simpan !! //todo: jika stok kosong tidak simpan !!
//if (parseInt(adata[5])>0 || _qty<0){ //if (parseInt(adata[5])>0 || _qty<0){
new Request.JSONF({ new Request_JSF({
url: JualJS.PHP + '/table_detail', url: JualJS.PHP + '/table_detail',
sendParam: ['mode','mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]], sendParam: ['mode','mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]],
onSuccess: () => $('#POS_Qty').val('1.00') onSuccess: () => $('#POS_Qty').val('1.00')
@@ -385,15 +385,15 @@ var JualJS = {
$('#Nama_Produk').val('').focus(); $('#Nama_Produk').val('').focus();
}, },
update_Piutang: function(){ update_Piutang() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/update_piutang', url: this.PHP + '/update_piutang',
sendParam: ['MemberID'], sendParam: ['MemberID'],
onSuccess: () => FoniaJS.setFocus('#Nama_Produk') onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
}).send(); }).send();
}, },
Hitung_Detail: function(tipe){ Hitung_Detail(tipe) {
if (tipe==1) $('#Disk_Persen').val(FoniaJS.FloatToStr((FoniaJS.StrToFloat($('#Disk_Rupiah').val())*100) / FoniaJS.StrToFloat($('#Harga_Jual').val()), 2)); if (tipe==1) $('#Disk_Persen').val(FoniaJS.FloatToStr((FoniaJS.StrToFloat($('#Disk_Rupiah').val())*100) / FoniaJS.StrToFloat($('#Harga_Jual').val()), 2));
if (tipe==2) $('#Disk_Rupiah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Jual').val()) * FoniaJS.StrToFloat($('#Disk_Persen').val()) * 0.01, 2)); if (tipe==2) $('#Disk_Rupiah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Jual').val()) * FoniaJS.StrToFloat($('#Disk_Persen').val()) * 0.01, 2));
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * (FoniaJS.StrToFloat($('#Harga_Jual').val()) - FoniaJS.StrToFloat($('#Disk_Rupiah').val())), 2)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * (FoniaJS.StrToFloat($('#Harga_Jual').val()) - FoniaJS.StrToFloat($('#Disk_Rupiah').val())), 2));
+30 -30
View File
@@ -14,7 +14,7 @@ var MutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -25,7 +25,7 @@ var MutasiJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -42,17 +42,17 @@ var MutasiJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Mutasi').val(acell[0]); $('#No_Mutasi').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Mutasi').val()){ if (!$('#No_Mutasi').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -60,7 +60,7 @@ var MutasiJS = {
FoniaJS.showAuth(function(){this.data_query('master', 'edit')}.bind(this), this, 'EDIT '+$('#No_Mutasi').val()); FoniaJS.showAuth(function(){this.data_query('master', 'edit')}.bind(this), this, 'EDIT '+$('#No_Mutasi').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Mutasi').val()){ if (!$('#No_Mutasi').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -84,7 +84,7 @@ var MutasiJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Dari_CabID').val()==0){ if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !"); FoniaJS.showError("Silakan pilih Dari Cabang !");
return; return;
@@ -100,34 +100,34 @@ var MutasiJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Mutasi').val(''); $('#No_Mutasi').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Mutasi').val()) { if ($('#No_Mutasi').val()) {
var cetak = new Printer('report/nota/mutasi'); let cetak = new Printer('report/nota/mutasi')
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val()); .addParam("Nomor_Cetak", $('#No_Mutasi').val());
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
tx_print_pos: function(){ tx_print_pos() {
if ($('#No_Mutasi').val()) { if ($('#No_Mutasi').val()) {
var cetak = new PrinterPos('report/nota/mutasi_pos'); new PrinterPos('report/nota/mutasi_pos')
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val()); .addParam("Nomor_Cetak", $('#No_Mutasi').val())
cetak.exec(); .exec();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
produk_brow: function(){ produk_brow() {
if ($('#Dari_CabID').val()==0){ if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !"); FoniaJS.showError("Silakan pilih Dari Cabang !");
return; return;
@@ -148,12 +148,12 @@ var MutasiJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
}, },
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){ detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Mutasi','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Mutasi','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -174,13 +174,13 @@ var MutasiJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Mutasi','ID='+acell[0]], sendParam: ['mode','mode_detail=delete','No_Mutasi','ID='+acell[0]],
onSuccess: () => $('#Nama_Produk').focus() onSuccess: () => $('#Nama_Produk').focus()
@@ -188,8 +188,8 @@ var MutasiJS = {
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Mutasi','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Dari_CabID','Ke_CabID'], sendParam: ['mode','mode_detail','No_Mutasi','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Dari_CabID','Ke_CabID'],
onSuccess: () => { onSuccess: () => {
@@ -199,7 +199,7 @@ var MutasiJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Mutasi'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Mutasi'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Mutasi','Tgl_Mutasi','Dari_CabID','Ke_CabID','Catatan']; if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Mutasi','Tgl_Mutasi','Dari_CabID','Ke_CabID','Catatan'];
@@ -249,18 +249,18 @@ var MutasiJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Mutasi'] sendParam: ['mode','No_Mutasi']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Dari_CabID'], sendParam: ['Cari_Produk','Dari_CabID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -268,7 +268,7 @@ var MutasiJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
if ($('#Dari_CabID').val()==0){ if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !"); FoniaJS.showError("Silakan pilih Dari Cabang !");
return; return;
@@ -276,7 +276,7 @@ var MutasiJS = {
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val()); var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
var adata = item.data.split(':'); var adata = item.data.split(':');
// Satuan : Varian : Harga_Pokok // Satuan : Varian : Harga_Pokok
new Request.JSONF({ new Request_JSF({
url: MutasiJS.PHP + '/table_detail', url: MutasiJS.PHP + '/table_detail',
sendParam: ['mode','mode_detail=insert','No_Mutasi','InvID='+item.value,'SatuanID='+adata[0],'VarianID='+adata[1],'Qty='+_qty,'Harga_Beli='+adata[2]], sendParam: ['mode','mode_detail=insert','No_Mutasi','InvID='+item.value,'SatuanID='+adata[0],'VarianID='+adata[1],'Qty='+_qty,'Harga_Beli='+adata[2]],
onSuccess: () => $('#POS_Qty').val('1.00') onSuccess: () => $('#POS_Qty').val('1.00')
@@ -284,7 +284,7 @@ var MutasiJS = {
$('#Nama_Produk').val('').focus(); $('#Nama_Produk').val('').focus();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
} }
+25 -25
View File
@@ -14,7 +14,7 @@ var OpnameJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var OpnameJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var OpnameJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Opname').val(acell[0]); $('#No_Opname').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Opname').val()){ if (!$('#No_Opname').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -59,7 +59,7 @@ var OpnameJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Opname').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Opname').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Opname').val()){ if (!$('#No_Opname').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -83,7 +83,7 @@ var OpnameJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -91,24 +91,24 @@ var OpnameJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Opname').val(''); $('#No_Opname').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Opname').val()) { if ($('#No_Opname').val()) {
var cetak = new Printer('report/nota/opname'); let cetak = new Printer('report/nota/opname')
cetak.add_param("Nomor_Cetak", $('#No_Opname').val()); .addParam("Nomor_Cetak", $('#No_Opname').val());
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
produk_brow: function(){ produk_brow() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -129,12 +129,12 @@ var OpnameJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
}, },
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){ detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Opname','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianIID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Opname','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianIID='+VarianID],
@@ -157,7 +157,7 @@ var OpnameJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -165,26 +165,26 @@ var OpnameJS = {
this.detail_produk('insert', 0, 0, 0, 0); this.detail_produk('insert', 0, 0, 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Opname','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','No_Opname','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#InvID').val())==0) { if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Opname','CabID','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'], sendParam: ['mode','mode_detail','No_Opname','CabID','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'],
onSuccess: () => { onSuccess: () => {
@@ -193,7 +193,7 @@ var OpnameJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Opname'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Opname'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Opname','Tgl_Opname','CabID','Catatan']; if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Opname','Tgl_Opname','CabID','Catatan'];
@@ -231,18 +231,18 @@ var OpnameJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Opname'] sendParam: ['mode','No_Opname']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['CabID','Cari_Produk'], sendParam: ['CabID','Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -250,7 +250,7 @@ var OpnameJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
// Satuan : Varian : Harga_Pokok : Satuan : Stok // Satuan : Varian : Harga_Pokok : Satuan : Stok
$('#InvID').val(item.value); $('#InvID').val(item.value);
+9 -10
View File
@@ -15,11 +15,10 @@ var OpnameBarangJS = {
KODE: '', KODE: '',
html5QrcodeScanner: null, html5QrcodeScanner: null,
index: function(){ index() {
$('#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 {
@@ -28,7 +27,7 @@ var OpnameBarangJS = {
} }
}, },
proses_save: function(){ proses_save() {
if ($('#InvID').val()==0) { if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Produk!'); FoniaJS.showError('Silakan masukkan Nama Produk!');
return; return;
@@ -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){
@@ -50,7 +49,7 @@ var OpnameBarangJS = {
}).send(); }).send();
}, },
ScanSukses: function(decodedText, decodedResult){ ScanSukses(decodedText, decodedResult) {
new Request({ new Request({
url: OpnameBarangJS.PHP + '/scan_produk', url: OpnameBarangJS.PHP + '/scan_produk',
sendParam: ['Cari_Produk='+decodedText], sendParam: ['Cari_Produk='+decodedText],
@@ -70,7 +69,7 @@ var OpnameBarangJS = {
this.html5QrcodeScanner.pause(); this.html5QrcodeScanner.pause();
}, },
produk_brow: function(){ 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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -87,7 +86,7 @@ var OpnameBarangJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#SatuanID').val(acell[1]); $('#SatuanID').val(acell[1]);
@@ -101,9 +100,9 @@ var OpnameBarangJS = {
FoniaJS.setFocus('#Stok_Fisik'); FoniaJS.setFocus('#Stok_Fisik');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -111,7 +110,7 @@ var OpnameBarangJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
// 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
var adata = item.data.split(':'); var adata = item.data.split(':');
+46 -47
View File
@@ -17,8 +17,8 @@ var POSJS = {
POLE_CONF: {}, POLE_CONF: {},
Simpan: false, Simpan: false,
index: function(){ index() {
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','Grup_MemberID'], {'selectFunc': this.Produk_Comp, 'keyFunc': this.Produk_Key}); FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','Grup_MemberID'], {'selectFunc': this.Produk_Comp, 'keyFunc': this.Produk_Key, 'breakFocus': true});
$('#Nama_Produk').click(() => $('#Nama_Produk').select()); $('#Nama_Produk').click(() => $('#Nama_Produk').select());
$('#POS_Qty').on({ $('#POS_Qty').on({
keyup: (e) => { keyup: (e) => {
@@ -34,20 +34,19 @@ var POSJS = {
this.data_query('config-pole'); this.data_query('config-pole');
}, },
proses_oc: function(){ proses_oc() {
var cetak = new PrinterPos('report/nota/open_cash'); new PrinterPos('report/nota/open_cash').exec();
cetak.exec();
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
}, },
proses_print: function(oc){ proses_print(oc) {
var cetak = new PrinterPos('report/nota/pos'); new PrinterPos('report/nota/pos')
cetak.add_param("Nomor_Cetak", $('#No_Cetak').val()); .addParam("Nomor_Cetak", $('#No_Cetak').val())
cetak.add_param("Open_Cash", oc); .addParam("Open_Cash", oc)
cetak.exec(); .exec();
}, },
proses_cancel: function(){ proses_cancel() {
if ($('#Total_Item').val()==0) { if ($('#Total_Item').val()==0) {
FoniaJS.showInfo('Tidak ada item barang !'); FoniaJS.showInfo('Tidak ada item barang !');
return; return;
@@ -55,7 +54,7 @@ var POSJS = {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin membatalkan ?<br>Semua item nota ini akan dihapus !', () => this.data_query('master','cancel'), 'danger'); FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin membatalkan ?<br>Semua item nota ini akan dihapus !', () => this.data_query('master','cancel'), 'danger');
}, },
nota_brow: function(){ nota_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Nota" 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="divBrowNota">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Nota" 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="divBrowNota">&nbsp;</div>');
this.winBNota = FoniaJS.showWindow('BNota', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBNota = FoniaJS.showWindow('BNota', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBNota') $('#winBNota')
@@ -72,7 +71,7 @@ var POSJS = {
}); });
}, },
nota_print: function(acell){ nota_print(acell) {
FoniaJS.closeWindow(this.winBNota); FoniaJS.closeWindow(this.winBNota);
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
$('#No_Cetak').val(acell[0]); $('#No_Cetak').val(acell[0]);
@@ -80,7 +79,7 @@ var POSJS = {
}, 'info'); }, 'info');
}, },
nota_select: function(acell){ nota_select(acell) {
FoniaJS.closeWindow(this.winBNota); FoniaJS.closeWindow(this.winBNota);
FoniaJS.showAuth(() => { FoniaJS.showAuth(() => {
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
@@ -88,7 +87,7 @@ var POSJS = {
}, this, 'EDIT POS : '+acell[0]); }, this, 'EDIT POS : '+acell[0]);
}, },
nota_delete: function(acell){ nota_delete(acell) {
FoniaJS.closeWindow(this.winBNota); FoniaJS.closeWindow(this.winBNota);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => { FoniaJS.showAuth(() => {
@@ -98,17 +97,17 @@ var POSJS = {
}, 'danger'); }, 'danger');
}, },
pending_brow: function(){ pending_brow() {
this.winBPend = FoniaJS.showWindow('BPend', 'Daftar Pending POS', '<div id="divBrowPending">&nbsp;</div>', 'xl', '', () => this.data_query('brow-pending')); this.winBPend = FoniaJS.showWindow('BPend', 'Daftar Pending POS', '<div id="divBrowPending">&nbsp;</div>', 'xl', '', () => this.data_query('brow-pending'));
}, },
pending_select: function(acell){ pending_select(acell) {
FoniaJS.closeWindow(this.winBPend); FoniaJS.closeWindow(this.winBPend);
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
this.data_query('master', 'pending-edit'); this.data_query('master', 'pending-edit');
}, },
pending_delete: function(acell){ pending_delete(acell) {
FoniaJS.closeWindow(this.winBPend); FoniaJS.closeWindow(this.winBPend);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
@@ -116,7 +115,7 @@ var POSJS = {
}, 'danger'); }, 'danger');
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -133,7 +132,7 @@ var POSJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Grup_MemberID').val(acell[1]); $('#Grup_MemberID').val(acell[1]);
@@ -142,7 +141,7 @@ var POSJS = {
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
}, },
produk_brow: function(){ produk_brow() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -164,12 +163,12 @@ var POSJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
}, },
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){ detail_produk(mode, ID, InvID, SatuanID, VarianID) {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -202,12 +201,12 @@ var POSJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]], sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]],
onSuccess: () => { onSuccess: () => {
@@ -220,12 +219,12 @@ var POSJS = {
}).send(); }).send();
}, },
detail_simpan: function(){ detail_simpan() {
if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) { if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) {
FoniaJS.showInfo('Nilai Diskon diluar batas !'); FoniaJS.showInfo('Nilai Diskon diluar batas !');
return false; return false;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'], sendParam: ['mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
onSuccess: () => { onSuccess: () => {
@@ -239,7 +238,7 @@ var POSJS = {
}).send(); }).send();
}, },
kasir_show: function(){ kasir_show() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -263,26 +262,26 @@ var POSJS = {
$('#butKBatal').click(() => $('#Nama_Produk').focus()); $('#butKBatal').click(() => $('#Nama_Produk').focus());
$('#popTotal_Tunai').keyup((e) => { $('#popTotal_Tunai').keyup((e) => {
if (13 == e.which && parseFloat(e.target.value) == 0){ if (13 == e.which && parseFloat(e.target.value) == 0){
e.target.value = FoniaJS.FloatToStr($('#Total_Nota').val()); e.target.value = $('#Total_Nota').val()-FoniaJS.StrToFloat($('#popTotal_Kartu').val());
} }
if (27 == e.which) { if (27 == e.which) {
FoniaJS.closeWindow(this.winKasir); FoniaJS.closeWindow(this.winKasir);
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
} }
this.kasir_hitung(); this.kasir_hitung();
if (parseFloat(e.target.value) == 0) return false; //if (parseFloat(e.target.value) == 0) return false;
if (13 == e.which) $('#butKBayar').focus(); if (13 == e.which) $('#butKBayar').focus();
}); });
$('#popTotal_Kartu').keyup((e) => { $('#popTotal_Kartu').keyup((e) => {
if (13 == e.which && $('#popKartuID').val() > 0 && parseFloat(e.target.value) == 0){ if (13 == e.which && $('#popKartuID').val() > 0 && parseFloat(e.target.value) == 0){
e.target.value = FoniaJS.FloatToStr($('#Total_Nota').val()-FoniaJS.StrToFloat($('#popTotal_Tunai').val())); e.target.value = $('#Total_Nota').val()-FoniaJS.StrToFloat($('#popTotal_Tunai').val());
} }
if (27 == e.which) { if (27 == e.which) {
FoniaJS.closeWindow(this.winKasir); FoniaJS.closeWindow(this.winKasir);
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
} }
this.kasir_hitung(); this.kasir_hitung();
if (parseFloat(e.target.value) == 0) return false; //if (parseFloat(e.target.value) == 0) return false;
if (13 == e.which) $('#butKBayar').focus(); if (13 == e.which) $('#butKBayar').focus();
}); });
$('#popKartuID').change(() => { $('#popKartuID').change(() => {
@@ -310,14 +309,14 @@ var POSJS = {
}).send(); }).send();
}, },
kasir_hitung: function(){ kasir_hitung() {
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val()); const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
$('#popTotal_Bayar').val(totBayar); $('#popTotal_Bayar').val(totBayar);
$('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success'); $('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success');
}, },
kasir_simpan: function(){ kasir_simpan() {
const totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val()); const totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val());
const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const jenKartu = $('#popKartuID').val(); const jenKartu = $('#popKartuID').val();
@@ -350,12 +349,12 @@ var POSJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
kasir_pending: function(){ kasir_pending() {
FoniaJS.closeWindow(this.winKasir); FoniaJS.closeWindow(this.winKasir);
this.data_query('master', 'pending-save'); this.data_query('master', 'pending-save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=='master'){ if (tipe=='master'){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Jual','No_Cetak']; var sparam = ['mode='+mode,'No_Jual','No_Cetak'];
@@ -392,28 +391,28 @@ var POSJS = {
} }
}).send(); }).send();
} else if (tipe=='detail'){ } else if (tipe=='detail'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['No_Jual'] sendParam: ['No_Jual']
}).send(); }).send();
} else if (tipe=='brow-nota'){ } else if (tipe=='brow-nota'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_nota', url: this.PHP + '/brow_nota',
sendParam: ['Cari_Nota'], sendParam: ['Cari_Nota'],
onSuccess: () => FoniaJS.setFocus('#Cari_Nota') onSuccess: () => FoniaJS.setFocus('#Cari_Nota')
}).send(); }).send();
} else if (tipe=='brow-pending'){ } else if (tipe=='brow-pending'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_pending', url: this.PHP + '/brow_pending',
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
}).send(); }).send();
} else if (tipe=='brow-produk'){ } else if (tipe=='brow-produk'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Grup_MemberID'], sendParam: ['Cari_Produk','Grup_MemberID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -434,7 +433,7 @@ var POSJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Grup_MemberID').val(adata[0]); $('#Grup_MemberID').val(adata[0]);
@@ -442,7 +441,7 @@ var POSJS = {
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val()); var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
var adata = item.data.split(':'); var adata = item.data.split(':');
// M : Grup_Member : Info_Member // M : Grup_Member : Info_Member
@@ -455,7 +454,7 @@ var POSJS = {
// P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok // P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok
//todo: jika stok kosong tidak simpan !! //todo: jika stok kosong tidak simpan !!
//if (parseInt(adata[5])>0 || _qty<0){ //if (parseInt(adata[5])>0 || _qty<0){
new Request.JSONF({ new Request_JSF({
url: POSJS.PHP + '/table_detail', url: POSJS.PHP + '/table_detail',
sendParam: ['mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]], sendParam: ['mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]],
onSuccess: () => { onSuccess: () => {
@@ -475,7 +474,7 @@ var POSJS = {
$('#Nama_Produk').val('').focus(); $('#Nama_Produk').val('').focus();
}, },
Produk_Key: function(key, val){ Produk_Key(key, val) {
if (key == 13) { if (key == 13) {
POSJS.kasir_show(); POSJS.kasir_show();
} else if (key == 117) {//f6 } else if (key == 117) {//f6
@@ -487,7 +486,7 @@ var POSJS = {
} }
}, },
Hitung_Detail: function(tipe){ Hitung_Detail(tipe) {
if (tipe==1) $('#Disk_Persen').val(FoniaJS.FloatToStr((FoniaJS.StrToFloat($('#Disk_Rupiah').val())*100) / FoniaJS.StrToFloat($('#Harga_Jual').val()), 2)); if (tipe==1) $('#Disk_Persen').val(FoniaJS.FloatToStr((FoniaJS.StrToFloat($('#Disk_Rupiah').val())*100) / FoniaJS.StrToFloat($('#Harga_Jual').val()), 2));
if (tipe==2) $('#Disk_Rupiah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Jual').val()) * FoniaJS.StrToFloat($('#Disk_Persen').val()) * 0.01, 2)); if (tipe==2) $('#Disk_Rupiah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Jual').val()) * FoniaJS.StrToFloat($('#Disk_Persen').val()) * 0.01, 2));
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * (FoniaJS.StrToFloat($('#Harga_Jual').val()) - FoniaJS.StrToFloat($('#Disk_Rupiah').val())), 2)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * (FoniaJS.StrToFloat($('#Harga_Jual').val()) - FoniaJS.StrToFloat($('#Disk_Rupiah').val())), 2));
+2 -2
View File
@@ -43,7 +43,7 @@ $(document).ready(function(){
var LoginJS = { var LoginJS = {
Tampil_Login: function(){ Tampil_Login() {
var Username = FoniaJS.getCookie('Username'); var Username = FoniaJS.getCookie('Username');
if (Username != '') { if (Username != '') {
$('#Username').val(Username); $('#Username').val(Username);
@@ -53,7 +53,7 @@ var LoginJS = {
} }
}, },
Proses_Login: function(){ Proses_Login() {
if (!$('#Username').val()){ if (!$('#Username').val()){
$('#Username').focus(); $('#Username').focus();
FoniaJS.showError('Silahkan masukkan Username !'); FoniaJS.showError('Silahkan masukkan Username !');
+4 -4
View File
@@ -14,17 +14,17 @@ var MemberBaruJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butTambah').click(() => this.proses_add()); $('#butTambah').click(() => this.proses_add());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('view'); this.data_query('view');
}, },
proses_add: function(){ proses_add() {
this.data_query('add'); this.data_query('add');
}, },
proses_save: function(){ proses_save() {
new Request({ new Request({
url: this.PHP + '/proses_simpan', url: this.PHP + '/proses_simpan',
sendParam: ['MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar'], sendParam: ['MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar'],
@@ -39,7 +39,7 @@ var MemberBaruJS = {
}).send() }).send()
}, },
data_query: function(mode){ data_query(mode) {
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
sendParam: ['mode='+mode], sendParam: ['mode='+mode],
+8 -8
View File
@@ -15,7 +15,7 @@ var MemberPointJS = {
KODE: '', KODE: '',
html5QrcodeScanner: null, html5QrcodeScanner: null,
index: function(){ index() {
$('#butBrow').click(() => this.member_brow()); $('#butBrow').click(() => this.member_brow());
if (FoniaJS.WEB_MOBILE){ if (FoniaJS.WEB_MOBILE){
html5QrcodeScanner = new Html5Qrcode('qr-reader'); html5QrcodeScanner = new Html5Qrcode('qr-reader');
@@ -27,7 +27,7 @@ var MemberPointJS = {
this.data_query('table-point'); this.data_query('table-point');
}, },
ScanSukses: function(decodedText, decodedResult){ ScanSukses(decodedText, decodedResult) {
new Request({ new Request({
url: MemberPointJS.PHP + '/scan_member', url: MemberPointJS.PHP + '/scan_member',
sendParam: ['Cari_Member='+decodedText], sendParam: ['Cari_Member='+decodedText],
@@ -41,7 +41,7 @@ var MemberPointJS = {
}).send(); }).send();
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -58,7 +58,7 @@ var MemberPointJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Kode_Member').val(acell[1]); $('#Kode_Member').val(acell[1]);
@@ -67,14 +67,14 @@ var MemberPointJS = {
this.data_query('table-point'); this.data_query('table-point');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="table-point"){ if (tipe=="table-point"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_point', url: this.PHP + '/table_point',
sendParam: ['MemberID'] sendParam: ['MemberID']
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -82,7 +82,7 @@ var MemberPointJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Kode_Member').val(adata[0]); $('#Kode_Member').val(adata[0]);
+24 -24
View File
@@ -14,7 +14,7 @@ var MemberTukarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var MemberTukarJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_brow: function(){ tx_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" 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="divBrowTX">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var MemberTukarJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_TX').val(acell[0]); $('#No_TX').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_TX').val()){ if (!$('#No_TX').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -59,7 +59,7 @@ var MemberTukarJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_TX').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_TX').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_TX').val()){ if (!$('#No_TX').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -83,7 +83,7 @@ var MemberTukarJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Point_TipeID').val()==0){ if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !"); FoniaJS.showError("Silakan pilih Tipe Point !");
return; return;
@@ -109,24 +109,24 @@ var MemberTukarJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_TX').val(''); $('#No_TX').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(){ tx_print() {
if ($('#No_TX').val()) { if ($('#No_TX').val()) {
var cetak = new PrinterPos('report/nota/tukarpoint_pos'); new PrinterPos('report/nota/tukarpoint_pos')
cetak.add_param("Nomor_Cetak", $('#No_TX').val()); .addParam("Nomor_Cetak", $('#No_TX').val())
cetak.exec(); .exec();
return; return;
} }
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
member_brow: function(){ member_brow() {
if ($('#Point_TipeID').val()==0){ if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !"); FoniaJS.showError("Silakan pilih Tipe Point !");
return; return;
@@ -147,14 +147,14 @@ var MemberTukarJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[3]); $('#Nama_Member').val(acell[3]);
$('#Sisa_Point').val(acell[6]); $('#Sisa_Point').val(acell[6]);
}, },
barang_brow: function(){ barang_brow() {
if ($('#Point_TipeID').val()==0){ if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !"); FoniaJS.showError("Silakan pilih Tipe Point !");
return; return;
@@ -175,7 +175,7 @@ var MemberTukarJS = {
}); });
}, },
barang_select: function(acell){ barang_select(acell) {
FoniaJS.closeWindow(this.winBBarang); FoniaJS.closeWindow(this.winBBarang);
$('#InvPID').val(acell[0]); $('#InvPID').val(acell[0]);
$('#Nama_Barang').val(acell[2]); $('#Nama_Barang').val(acell[2]);
@@ -185,7 +185,7 @@ var MemberTukarJS = {
this.Hitung_Point(); this.Hitung_Point();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_TX'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_TX'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -238,18 +238,18 @@ var MemberTukarJS = {
} }
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member','Point_TipeID'] sendParam: ['Cari_Member','Point_TipeID']
}).send(); }).send();
} else if (tipe=="brow-barang"){ } else if (tipe=="brow-barang"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_barang', url: this.PHP + '/brow_barang',
sendParam: ['Cari_Barang','Point_TipeID'], sendParam: ['Cari_Barang','Point_TipeID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Barang') onSuccess: () => FoniaJS.setFocus('#Cari_Barang')
@@ -257,13 +257,13 @@ var MemberTukarJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Sisa_Point').val(item.data); $('#Sisa_Point').val(item.data);
$('#Nama_Barang').focus(); $('#Nama_Barang').focus();
}, },
Barang_Comp: function(item){ Barang_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvPID').val(item.value); $('#InvPID').val(item.value);
$('#Nilai_Barang').val(adata[1]); $('#Nilai_Barang').val(adata[1]);
@@ -273,11 +273,11 @@ var MemberTukarJS = {
this.Hitung_Point(); this.Hitung_Point();
}, },
oc_Tipe: function(){ oc_Tipe() {
// //
}, },
Hitung_Point: function(){ Hitung_Point() {
var qty = FoniaJS.StrToFloat($('#Qty').val()); var qty = FoniaJS.StrToFloat($('#Qty').val());
var point = FoniaJS.StrToFloat($('#Point').val()); var point = FoniaJS.StrToFloat($('#Point').val());
$('#Nilai_Point').val(FoniaJS.FloatToStr(qty * point,0)); $('#Nilai_Point').val(FoniaJS.FloatToStr(qty * point,0));
+6 -6
View File
@@ -56,7 +56,7 @@ var MonJS = {
ID_CABANG: 0, ID_CABANG: 0,
TOTAL_SHOP: 0, TOTAL_SHOP: 0,
index: function(){ index() {
new Request({ new Request({
url: this.PHP + '/index', url: this.PHP + '/index',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -70,31 +70,31 @@ var MonJS = {
}).send(); }).send();
}, },
hide_pos: function(){ hide_pos() {
this.ISSHOW_POS = false; this.ISSHOW_POS = false;
$('#divBanner').removeClass('d-none'); $('#divBanner').removeClass('d-none');
$('#divShop').addClass('d-none'); $('#divShop').addClass('d-none');
}, },
show_pos: function(){ show_pos() {
this.ISSHOW_POS = true; this.ISSHOW_POS = true;
$('#divBanner').addClass('d-none'); $('#divBanner').addClass('d-none');
$('#divShop').removeClass('d-none'); $('#divShop').removeClass('d-none');
this.data_query('shop'); this.data_query('shop');
}, },
hide_thank: function(){ hide_thank() {
$('#divBlur').addClass('d-none'); $('#divBlur').addClass('d-none');
$('#divThank').addClass('d-none'); $('#divThank').addClass('d-none');
}, },
show_thank: function(){ show_thank() {
$('#divBlur').removeClass('d-none'); $('#divBlur').removeClass('d-none');
$('#divThank').removeClass('d-none'); $('#divThank').removeClass('d-none');
this.data_query('thank'); this.data_query('thank');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe == 'config'){ if (tipe == 'config'){
$.post(this.PHP + '/config', {}, (ajson) => { $.post(this.PHP + '/config', {}, (ajson) => {
if (ajson.PROMO_DURASI) MonJS.DEF_PROMO_DUR = ajson.PROMO_DURASI; if (ajson.PROMO_DURASI) MonJS.DEF_PROMO_DUR = ajson.PROMO_DURASI;
+17 -17
View File
@@ -14,7 +14,7 @@ var PPOBTXJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('tabel-detail'); this.data_query('tabel-detail');
$('#Cari_TX').keydown((e) => { $('#Cari_TX').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,44 +28,44 @@ var PPOBTXJS = {
FoniaJS.setFocus('#Cari_TX'); FoniaJS.setFocus('#Cari_TX');
}, },
proses_print: function(oc, no_cetak){ proses_print(oc, no_cetak) {
var cetak = new PrinterPos('report/nota/ppob'); new PrinterPos('report/nota/ppob')
cetak.add_param("Nomor_Cetak", no_cetak); .addParam("Nomor_Cetak", no_cetak)
cetak.add_param("Open_Cash", oc); .addParam("Open_Cash", oc)
cetak.exec(); .exec();
}, },
proses_delete: function(no_tx){ proses_delete(no_tx) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX'] sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send(); }).send();
}, },
proses_reproc: function(no_tx){ proses_reproc(no_tx) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX'] sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send(); }).send();
}, },
nota_print: function(acell){ nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]); this.proses_print(0, acell[0]);
}, 'info'); }, 'info');
}, },
nota_delete: function(acell){ nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]); FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]);
}, 'danger'); }, 'danger');
}, },
nota_reproc: function(acell){ nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning'); FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning');
}, },
nota_detail: function(acell){ nota_detail(acell) {
new Request({ new Request({
url: this.PHP + '/form_tx', url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]], sendParam: ['No_TX='+acell[0]],
@@ -75,7 +75,7 @@ var PPOBTXJS = {
}).send(); }).send();
}, },
saldo_ppob: function(){ saldo_ppob() {
new Request({ new Request({
url: this.PHP + '/form_saldo', url: this.PHP + '/form_saldo',
onSuccess: (adata) => { onSuccess: (adata) => {
@@ -85,9 +85,9 @@ var PPOBTXJS = {
}).send(); }).send();
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="tabel-detail"){ if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['Tgl_From','Tgl_To','Cari_TX'] sendParam: ['Tgl_From','Tgl_To','Cari_TX']
}).send(); }).send();
+28 -28
View File
@@ -19,7 +19,7 @@ var PrabayarJS = {
KATE_PREFIX: [1,2,3,4], KATE_PREFIX: [1,2,3,4],
KATE_TOKEN: [5], KATE_TOKEN: [5],
index: function(){ index() {
$('#Cari_PPOB').keydown((e) => { $('#Cari_PPOB').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('tabel-tx'); if (key==13 && e.target.value!='') this.data_query('tabel-tx');
@@ -34,39 +34,39 @@ var PrabayarJS = {
this.data_query('pole-config'); this.data_query('pole-config');
}, },
proses_print: function(oc, no_cetak){ proses_print(oc, no_cetak) {
var cetak = new PrinterPos('apps/php/repo/nota.php'); new PrinterPos('apps/php/repo/nota.php')
cetak.add_param("data", "ppob-pos"); .addParam("data", "ppob-pos")
cetak.add_param("Nomor_Cetak", no_cetak); .addParam("Nomor_Cetak", no_cetak)
cetak.add_param("Open_Cash", oc); .addParam("Open_Cash", oc)
cetak.exec(); .exec();
}, },
proses_delete: function(){ proses_delete() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX'] sendParam: ['mode_detail=delete','No_TX']
}).send(); }).send();
}, },
proses_reproc: function(ft){ proses_reproc(ft) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX','FT='+ft] sendParam: ['mode_detail=reproc','No_TX','FT='+ft]
}).send(); }).send();
}, },
proses_cancel: function(){ proses_cancel() {
FoniaJS.showConfirm('Konfirmasi', 'Apakah Anda yakin ingin membatalkan ?', () => this.data_query('master','cancel'), 'danger'); FoniaJS.showConfirm('Konfirmasi', 'Apakah Anda yakin ingin membatalkan ?', () => this.data_query('master','cancel'), 'danger');
}, },
nota_print: function(acell){ nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]); this.proses_print(0, acell[0]);
}, 'info'); }, 'info');
}, },
nota_delete: function(acell){ nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => { FoniaJS.showAuth(() => {
$('#No_TX').val(acell[0]); $('#No_TX').val(acell[0]);
@@ -75,14 +75,14 @@ var PrabayarJS = {
}, 'danger'); }, 'danger');
}, },
nota_reproc: function(acell){ nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => {
$('#No_TX').val(acell[0]); $('#No_TX').val(acell[0]);
this.proses_reproc(); this.proses_reproc();
}, 'warning'); }, 'warning');
}, },
nota_detail: function(acell){ nota_detail(acell) {
new Request({ new Request({
url: this.PHP + '/form_tx', url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]], sendParam: ['No_TX='+acell[0]],
@@ -92,7 +92,7 @@ var PrabayarJS = {
}).send(); }).send();
}, },
kasir_show: function(){ kasir_show() {
if ($('#Tujuan').val()=='') { if ($('#Tujuan').val()=='') {
FoniaJS.showInfo('Silahkan masukkan Nomor Tujuan !'); FoniaJS.showInfo('Silahkan masukkan Nomor Tujuan !');
FoniaJS.setFocus('#Tujuan'); FoniaJS.setFocus('#Tujuan');
@@ -163,14 +163,14 @@ var PrabayarJS = {
}).send(); }).send();
}, },
kasir_hitung: function(){ kasir_hitung() {
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val()); const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
$('#popTotal_Bayar').val(totBayar); $('#popTotal_Bayar').val(totBayar);
$('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success'); $('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success');
}, },
kasir_simpan: function(){ kasir_simpan() {
const totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val()); const totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val());
const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const jenKartu = $('#popKartuID').val(); const jenKartu = $('#popKartuID').val();
@@ -203,7 +203,7 @@ var PrabayarJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=='master'){ if (tipe=='master'){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_TX']; var sparam = ['mode='+mode,'No_TX'];
@@ -246,7 +246,7 @@ var PrabayarJS = {
} }
}).send(); }).send();
} else if (tipe=='tabel-tx'){ } else if (tipe=='tabel-tx'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['Cari_PPOB'] sendParam: ['Cari_PPOB']
}).send(); }).send();
@@ -266,7 +266,7 @@ var PrabayarJS = {
} }
}, },
oc_KateID: function(){ oc_KateID() {
if ($.inArray(parseInt($('#KateID').val()), this.KATE_TOKEN) !== -1) { if ($.inArray(parseInt($('#KateID').val()), this.KATE_TOKEN) !== -1) {
$('.rowToken').removeClass('d-none'); $('.rowToken').removeClass('d-none');
$('.rowPulsa').addClass('d-none'); $('.rowPulsa').addClass('d-none');
@@ -274,30 +274,30 @@ var PrabayarJS = {
$('.rowToken').addClass('d-none'); $('.rowToken').addClass('d-none');
$('.rowPulsa').removeClass('d-none'); $('.rowPulsa').removeClass('d-none');
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_operator', url: this.PHP + '/option_operator',
sendParam: ['KateID'], sendParam: ['KateID'],
}).send(); }).send();
}, },
oc_Tujuan: function(){ oc_Tujuan() {
if ($('#Tujuan').val()=='') return false; if ($('#Tujuan').val()=='') return false;
if ($.inArray(parseInt($('#KateID').val()), this.KATE_PREFIX) === -1) return false; if ($.inArray(parseInt($('#KateID').val()), this.KATE_PREFIX) === -1) return false;
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_operator', url: this.PHP + '/option_operator',
sendParam: ['KateID','Tujuan'], sendParam: ['KateID','Tujuan'],
}).send(); }).send();
}, },
oc_OpeID: function(){ oc_OpeID() {
if ($('#OpeID').val()==0) return false; if ($('#OpeID').val()==0) return false;
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_produk', url: this.PHP + '/option_produk',
sendParam: ['KateID','OpeID'], sendParam: ['KateID','OpeID'],
}).send(); }).send();
}, },
oc_ProdukID: function(){ oc_ProdukID() {
const obj = $('#ProdukID'); const obj = $('#ProdukID');
var harga = $(obj).find(":selected").attr('olabel'); var harga = $(obj).find(":selected").attr('olabel');
$('#Harga_Jual').val(harga); $('#Harga_Jual').val(harga);
+7 -7
View File
@@ -14,7 +14,7 @@ var TopupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('tabel-detail'); this.data_query('tabel-detail');
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#Cari_Topup').keydown((e) => { $('#Cari_Topup').keydown((e) => {
@@ -29,11 +29,11 @@ var TopupJS = {
FoniaJS.setFocus('#Cari_Topup'); FoniaJS.setFocus('#Cari_Topup');
}, },
tx_info: function(acell){ tx_info(acell) {
this.winInfo = FoniaJS.showWindow('', 'Informasi Topup Saldo', '<div class="form-control fs-4">'+acell[6]+'</div>', 'md'); this.winInfo = FoniaJS.showWindow('', 'Informasi Topup Saldo', '<div class="form-control fs-4">'+acell[6]+'</div>', 'md');
}, },
tx_tambah: function(){ tx_tambah() {
new Request({ new Request({
url: this.PHP + '/form_topup', url: this.PHP + '/form_topup',
onSuccess: (a) => { onSuccess: (a) => {
@@ -46,22 +46,22 @@ var TopupJS = {
}).send(); }).send();
}, },
tx_simpan: function(){ tx_simpan() {
if (parseInt($('#Jumlah').val())==0) { if (parseInt($('#Jumlah').val())==0) {
FoniaJS.showError('Silakan isi Jumlah lebih dari NOL !'); FoniaJS.showError('Silakan isi Jumlah lebih dari NOL !');
$('#Jumlah').focus(); $('#Jumlah').focus();
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=insert','Tgl_Depo','Jumlah','Bank'], sendParam: ['mode_detail=insert','Tgl_Depo','Jumlah','Bank'],
onSuccess: () => FoniaJS.closeWindow(this.winDetail) onSuccess: () => FoniaJS.closeWindow(this.winDetail)
}).send(); }).send();
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="tabel-detail"){ if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Topup'] sendParam: ['Cari_Topup']
}).send(); }).send();
+16 -16
View File
@@ -14,7 +14,7 @@ var PromoBarangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Promo').keydown((e) => { $('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PromoBarangJS = {
FoniaJS.setFocus('#Cari_Promo'); FoniaJS.setFocus('#Cari_Promo');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_promo', url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -49,17 +49,17 @@ var PromoBarangJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -67,8 +67,8 @@ var PromoBarangJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['mode_detail','PromoID','InvID','SatuanID','CabID','Grup_MemberID','Pilih_Qty','Qty_Min','Qty_Kali','Tipe_Promo','Promo_Disc','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'], sendParam: ['mode_detail','PromoID','InvID','SatuanID','CabID','Grup_MemberID','Pilih_Qty','Qty_Min','Qty_Kali','Tipe_Promo','Promo_Disc','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'],
onSuccess: () => { onSuccess: () => {
@@ -78,7 +78,7 @@ var PromoBarangJS = {
}).send(); }).send();
}, },
produk_brow: function(tipe){ produk_brow(tipe) {
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><input type="hidden" id="Tipe_Brow" value="'+tipe+'" /></div></div></div><div id="divBrowProduk">&nbsp;</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><input type="hidden" id="Tipe_Brow" value="'+tipe+'" /></div></div></div><div id="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -96,7 +96,7 @@ var PromoBarangJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
var itipe = parseInt($('#Tipe_Brow').val()); var itipe = parseInt($('#Tipe_Brow').val());
if (itipe == 1){ if (itipe == 1){
@@ -110,14 +110,14 @@ var PromoBarangJS = {
} }
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['Cari_Promo'] sendParam: ['Cari_Promo']
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -125,7 +125,7 @@ var PromoBarangJS = {
} }
}, },
update_Items: function(InvID, SatuanID, Tipe){ update_Items(InvID, SatuanID, Tipe) {
const elSatuan = (Tipe==1) ? $('#SatuanID') : $('#Promo_SatuanID'); const elSatuan = (Tipe==1) ? $('#SatuanID') : $('#Promo_SatuanID');
elSatuan.empty(); elSatuan.empty();
if (InvID==0) return false; if (InvID==0) return false;
@@ -141,7 +141,7 @@ var PromoBarangJS = {
}).send(); }).send();
}, },
oc_PilihQ: function(){ oc_PilihQ() {
var i = parseInt($('#Pilih_Qty').val()); var i = parseInt($('#Pilih_Qty').val());
if (i == 1){ if (i == 1){
$('#Qty_Min').prop('disabled', false); $('#Qty_Min').prop('disabled', false);
@@ -152,7 +152,7 @@ var PromoBarangJS = {
} }
}, },
oc_PilihP: function(){ oc_PilihP() {
var i = parseInt($('#Tipe_Promo').val()); var i = parseInt($('#Tipe_Promo').val());
if (i == 1){ if (i == 1){
$('.promo1').removeClass('d-none'); $('.promo1').removeClass('d-none');
+26 -26
View File
@@ -14,7 +14,7 @@ var PromoBeliDiscJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.promo_tambah()); $('#butTambah').click(() => this.promo_tambah());
$('#butUbah').click(() => this.promo_ubah()); $('#butUbah').click(() => this.promo_ubah());
$('#butHapus').click(() => this.promo_hapus()); $('#butHapus').click(() => this.promo_hapus());
@@ -23,7 +23,7 @@ var PromoBeliDiscJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
promo_brow: function(){ promo_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Promo" 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="divBrowPromo">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Promo" 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="divBrowPromo">&nbsp;</div>');
this.winBPromo = FoniaJS.showWindow('BPromo', 'Daftar Promo', _isi, 'xl', '', () => { this.winBPromo = FoniaJS.showWindow('BPromo', 'Daftar Promo', _isi, 'xl', '', () => {
$('#winBPromo') $('#winBPromo')
@@ -40,17 +40,17 @@ var PromoBeliDiscJS = {
}); });
}, },
promo_select: function(acell){ promo_select(acell) {
FoniaJS.closeWindow(this.winBPromo); FoniaJS.closeWindow(this.winBPromo);
$('#Grup_PromoID').val(acell[0]); $('#Grup_PromoID').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
promo_tambah: function(){ promo_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
promo_ubah: function(){ promo_ubah() {
if ($('#Grup_PromoID').val() == 0){ if ($('#Grup_PromoID').val() == 0){
FoniaJS.showError("Silakan pilih Nama Promo !"); FoniaJS.showError("Silakan pilih Nama Promo !");
return; return;
@@ -58,7 +58,7 @@ var PromoBeliDiscJS = {
this.data_query('master', 'edit'); this.data_query('master', 'edit');
}, },
promo_hapus: function(){ promo_hapus() {
if ($('#Grup_PromoID').val() == 0){ if ($('#Grup_PromoID').val() == 0){
FoniaJS.showError("Silakan pilih Nama Promo !"); FoniaJS.showError("Silakan pilih Nama Promo !");
return; return;
@@ -80,18 +80,18 @@ var PromoBeliDiscJS = {
}, 'danger'); }, 'danger');
}, },
promo_simpan: function(mode){ promo_simpan(mode) {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
promo_batal: function(){ promo_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Grup_PromoID').val(0); $('#Grup_PromoID').val(0);
}, 'danger'); }, 'danger');
}, },
produk_brow: function(){ 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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -108,12 +108,12 @@ var PromoBeliDiscJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], '0'); this.detail_produk('insert', 0, acell[0], acell[1], '0');
}, },
detail_produk: function(mode, PromoID, InvID, SatuanID, Kode_Varian){ detail_produk(mode, PromoID, InvID, SatuanID, Kode_Varian) {
new Request({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'Grup_PromoID','PromoID='+PromoID,'InvID='+InvID,'SatuanID='+SatuanID,'Kode_Varian='+Kode_Varian], sendParam: ['mode','mode_detail='+mode,'Grup_PromoID','PromoID='+PromoID,'InvID='+InvID,'SatuanID='+SatuanID,'Kode_Varian='+Kode_Varian],
@@ -132,43 +132,43 @@ var PromoBeliDiscJS = {
}).send(); }).send();
}, },
detail_tambah: function() { detail_tambah() {
this.detail_produk('insert', 0, 0, 0, '0'); this.detail_produk('insert', 0, 0, 0, '0');
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Grup_PromoID','PromoID='+acell[0]], sendParam: ['mode','mode_detail=delete','Grup_PromoID','PromoID='+acell[0]],
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if ($('#InvID').val() == 0) { if ($('#InvID').val() == 0) {
FoniaJS.showError('Silakan masukkan Nama Barang Promo !'); FoniaJS.showError('Silakan masukkan Nama Barang Promo !');
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Grup_PromoID','PromoID','InvID','SatuanID','Kode_Varian'], sendParam: ['mode','mode_detail','Grup_PromoID','PromoID','InvID','SatuanID','Kode_Varian'],
onSuccess: () => FoniaJS.closeWindow(this.winDetail) onSuccess: () => FoniaJS.closeWindow(this.winDetail)
}).send(); }).send();
}, },
varian_show: function(){ varian_show() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/form_varian', url: this.PHP + '/form_varian',
sendParam: ['InvID','SatuanID','Kode_Varian'] sendParam: ['InvID','SatuanID','Kode_Varian']
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'Grup_PromoID'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'Grup_PromoID'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -202,18 +202,18 @@ var PromoBeliDiscJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Grup_PromoID'] sendParam: ['mode','Grup_PromoID']
}).send(); }).send();
} else if (tipe=="brow-promo"){ } else if (tipe=="brow-promo"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_promo', url: this.PHP + '/brow_promo',
sendParam: ['Cari_Promo'], sendParam: ['Cari_Promo'],
onSuccess: () => FoniaJS.setFocus('#Cari_Promo') onSuccess: () => FoniaJS.setFocus('#Cari_Promo')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Grup_PromoID'], sendParam: ['Cari_Produk','Grup_PromoID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -221,14 +221,14 @@ var PromoBeliDiscJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#Nama_Produk').val(item.text); $('#Nama_Produk').val(item.text);
PromoBeliDiscJS.update_items(item.value, item.data); PromoBeliDiscJS.update_items(item.value, item.data);
}, },
update_items: function(InvID, SatuanID){ update_items(InvID, SatuanID) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_satuan', url: this.PHP + '/option_satuan',
sendParam: ['InvID='+InvID,'SatuanID='+SatuanID], sendParam: ['InvID='+InvID,'SatuanID='+SatuanID],
onSuccess: () => this.varian_show() onSuccess: () => this.varian_show()
+19 -19
View File
@@ -14,7 +14,7 @@ var PromoTotalJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Promo').keydown((e) => { $('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PromoTotalJS = {
FoniaJS.setFocus('#Cari_Promo'); FoniaJS.setFocus('#Cari_Promo');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_promo', url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -47,17 +47,17 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -65,8 +65,8 @@ var PromoTotalJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['mode_detail','PromoID','Nama_Promo','Jual_Min','Jual_Grup','CabID','Grup_MemberID','Tipe_Promo','Promo_Jual','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'], sendParam: ['mode_detail','PromoID','Nama_Promo','Jual_Min','Jual_Grup','CabID','Grup_MemberID','Tipe_Promo','Promo_Jual','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'],
onSuccess: () => { onSuccess: () => {
@@ -76,7 +76,7 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
grup_show: function(){ grup_show() {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['Jual_Grup'], sendParam: ['Jual_Grup'],
@@ -91,15 +91,15 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
grup_semua: function(){ grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true); $('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
}, },
grup_clear: function(){ grup_clear() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false); $('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
}, },
grup_save: function(){ grup_save() {
var alist = []; var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => { $('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -108,7 +108,7 @@ var PromoTotalJS = {
FoniaJS.closeWindow(this.winGrup); FoniaJS.closeWindow(this.winGrup);
}, },
produk_brow: function(){ 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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -126,21 +126,21 @@ var PromoTotalJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#Promo_InvID').val(acell[0]); $('#Promo_InvID').val(acell[0]);
$('#Promo_Produk').val(acell[1]); $('#Promo_Produk').val(acell[1]);
this.update_Items(acell[0], 0); this.update_Items(acell[0], 0);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['Cari_Promo'] sendParam: ['Cari_Promo']
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -148,7 +148,7 @@ var PromoTotalJS = {
} }
}, },
update_Items: function(InvID, SatuanID){ update_Items(InvID, SatuanID) {
$('#Promo_SatuanID').empty(); $('#Promo_SatuanID').empty();
if (InvID==0) return false; if (InvID==0) return false;
new Request({ new Request({
@@ -163,7 +163,7 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
oc_PilihP: function(){ oc_PilihP() {
var i = parseInt($('#Tipe_Promo').val()); var i = parseInt($('#Tipe_Promo').val());
if (i == 4){ if (i == 4){
$('.promo1').removeClass('d-none'); $('.promo1').removeClass('d-none');
+16 -16
View File
@@ -14,31 +14,31 @@ var RepoBeliAnalisaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Grup_InvID"); .addParam("Grup_InvID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("SupID"); dload.addParam("SupID");
dload.add_param("Grup_InvID"); dload.addParam("Grup_InvID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+16 -16
View File
@@ -14,31 +14,31 @@ var RepoBeliJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Grup_InvID"); .addParam("Grup_InvID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("SupID"); dload.addParam("SupID");
dload.add_param("Grup_InvID"); dload.addParam("Grup_InvID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,37 +14,37 @@ var RepoBeliMutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
$('#SupID').focus(); $('#SupID').focus();
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
$('#SupID').focus(); $('#SupID').focus();
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("SupID"); dload.addParam("SupID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+14 -14
View File
@@ -14,29 +14,29 @@ var RepoBeliReturJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("SupID"); dload.addParam("SupID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoDanaKeluarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoDanaMasukJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+22 -22
View File
@@ -14,45 +14,45 @@ var RepoDanaPosJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butPOS').click(() => this.proses_pos()); $('#butPOS').click(() => this.proses_pos());
$('#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());
}, },
proses_pos: function(){ proses_pos() {
if ($('#KasirID').val()==0){ if ($('#KasirID').val()==0){
FoniaJS.showError("Untuk Cetak POS, pilih satu Nama Kasir !"); FoniaJS.showError("Untuk Cetak POS, pilih satu Nama Kasir !");
$('#KasirID').focus(); $('#KasirID').focus();
return; return;
} }
var cetak = new PrinterPos(this.PHP + '/pos'); new PrinterPos(this.PHP + '/pos')
cetak.add_param("Tipe", "R"); .addParam("Tipe", "R")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("KasirID"); .addParam("KasirID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To")
cetak.exec(); .exec();
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("KasirID"); .addParam("KasirID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("KasirID"); dload.addParam("KasirID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoGelBNeracaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("Bulan"); .addParam("Bulan")
cetak.add_param("Tahun"); .addParam("Tahun")
cetak.add_param("Level"); .addParam("Level");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("Bulan"); dload.addParam("Bulan");
dload.add_param("Tahun"); dload.addParam("Tahun");
dload.add_param("Level"); dload.addParam("Level");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoGelBRLCabJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Bulan1"); .addParam("Bulan1")
cetak.add_param("Bulan2"); .addParam("Bulan2")
cetak.add_param("Tahun"); .addParam("Tahun");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Bulan1"); dload.addParam("Bulan1");
dload.add_param("Bulan2"); dload.addParam("Bulan2");
dload.add_param("Tahun"); dload.addParam("Tahun");
dload.download(); dload.download();
} }
+10 -10
View File
@@ -14,25 +14,25 @@ var RepoGelBSaldoJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("Bulan"); .addParam("Bulan")
cetak.add_param("Tahun"); .addParam("Tahun");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("Bulan"); dload.addParam("Bulan");
dload.add_param("Tahun"); dload.addParam("Tahun");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoGelBSHUJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Bulan1"); .addParam("Bulan1")
cetak.add_param("Bulan2"); .addParam("Bulan2")
cetak.add_param("Tahun"); .addParam("Tahun")
cetak.add_param("Level"); .addParam("Level");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Bulan1"); dload.addParam("Bulan1");
dload.add_param("Bulan2"); dload.addParam("Bulan2");
dload.add_param("Tahun"); dload.addParam("Tahun");
dload.add_param("Level"); dload.addParam("Level");
dload.download(); dload.download();
} }
+10 -10
View File
@@ -14,25 +14,25 @@ var RepoGelHBantuJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Kode_Rek"); .addParam("Kode_Rek")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Kode_Rek"); dload.addParam("Kode_Rek");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+17 -17
View File
@@ -14,7 +14,7 @@ var RepoGelHBesarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
@@ -23,33 +23,33 @@ var RepoGelHBesarJS = {
FoniaJS.setFocus('#Nama_Rek'); FoniaJS.setFocus('#Nama_Rek');
}, },
proses_print: function(prt){ proses_print(prt) {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Rekening !'); FoniaJS.showError('Silakan masukkan Nama Rekening !');
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Kode_Rek"); .addParam("Kode_Rek")
cetak.add_param("Jenis"); .addParam("Jenis")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Rekening !'); FoniaJS.showError('Silakan masukkan Nama Rekening !');
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Kode_Rek"); dload.addParam("Kode_Rek");
dload.add_param("Jenis"); dload.addParam("Jenis");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
rek_brow: function(){ rek_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" 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="divBrowRek">&nbsp;</div>');
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => { this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
$('#winBRek') $('#winBRek')
@@ -66,16 +66,16 @@ var RepoGelHBesarJS = {
}); });
}, },
rek_select: function(acell){ rek_select(acell) {
FoniaJS.closeWindow(this.winBRek); FoniaJS.closeWindow(this.winBRek);
$('#Kode_Rek').val(acell[0]); $('#Kode_Rek').val(acell[0]);
$('#Nama_Rek').val(acell[1]); $('#Nama_Rek').val(acell[1]);
$('#Tgl_From').focus(); $('#Tgl_From').focus();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="brow-rek"){ if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -83,7 +83,7 @@ var RepoGelHBesarJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
$('#Tgl_From').focus(); $('#Tgl_From').focus();
} }
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoGelHDetailJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butBrowJurnal').click(() => this.jurnal_brow()); $('#butBrowJurnal').click(() => this.jurnal_brow());
@@ -26,13 +26,13 @@ var RepoGelHDetailJS = {
FoniaJS.setFocus('#Kode_Jurnal'); FoniaJS.setFocus('#Kode_Jurnal');
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Kode_Jurnal"); .addParam("Kode_Jurnal");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
jurnal_brow: function(){ jurnal_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Jurnal" 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="divBrowJurnal">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Jurnal" 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="divBrowJurnal">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -49,14 +49,14 @@ var RepoGelHDetailJS = {
}); });
}, },
jurnal_select: function(acell){ jurnal_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="brow-jurnal"){ if (tipe=="brow-jurnal"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_jurnal', url: this.PHP + '/brow_jurnal',
sendParam: ['Cari_Jurnal'], sendParam: ['Cari_Jurnal'],
onSuccess: () => FoniaJS.setFocus('#Cari_Jurnal') onSuccess: () => FoniaJS.setFocus('#Cari_Jurnal')
+10 -10
View File
@@ -14,25 +14,25 @@ var RepoGelHJurnalJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("TipeID"); .addParam("TipeID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("TipeID"); dload.addParam("TipeID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+8 -8
View File
@@ -14,23 +14,23 @@ var RepoGelHSaldoJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+17 -17
View File
@@ -14,7 +14,7 @@ var RepoInvBarcodeJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print()); $('#butCetak').click(() => this.proses_print());
$('#butLoadPrinter').click(() => this.load_printer()); $('#butLoadPrinter').click(() => this.load_printer());
$('#butBrowProduk').click(() => this.produk_brow()); $('#butBrowProduk').click(() => this.produk_brow());
@@ -22,7 +22,7 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Nama_Produk'); FoniaJS.setFocus('#Nama_Produk');
}, },
proses_print: function(){ proses_print() {
if ($('#InvID').val() == 0){ if ($('#InvID').val() == 0){
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
FoniaJS.setFocus('Nama_Produk'); FoniaJS.setFocus('Nama_Produk');
@@ -32,17 +32,17 @@ var RepoInvBarcodeJS = {
FoniaJS.showError('Silakan pilih Nama Printer Barcode !'); FoniaJS.showError('Silakan pilih Nama Printer Barcode !');
return; return;
} }
var cetak = new PrinterPos(this.PHP + '/barcode'); new PrinterPos(this.PHP + '/barcode')
cetak.setPrinter($('#Printer').val()); .setPrinter($('#Printer').val())
cetak.add_param("InvID"); .addParam("InvID")
cetak.add_param("SatuanID"); .addParam("SatuanID")
cetak.add_param("VarianID"); .addParam("VarianID")
cetak.add_param("Qty"); .addParam("Qty")
cetak.add_param("Printer"); .addParam("Printer")
cetak.exec(); .exec();
}, },
produk_brow: function(){ 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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -59,7 +59,7 @@ var RepoInvBarcodeJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#SatuanID').val(acell[1]); $('#SatuanID').val(acell[1]);
@@ -69,9 +69,9 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Qty'); FoniaJS.setFocus('#Qty');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -79,7 +79,7 @@ var RepoInvBarcodeJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#SatuanID').val(adata[0]); $('#SatuanID').val(adata[0]);
@@ -89,9 +89,9 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Qty'); FoniaJS.setFocus('#Qty');
}, },
load_printer: function(){ load_printer() {
qz.printers.find().then((data) => { qz.printers.find().then((data) => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/load_printer', url: this.PHP + '/load_printer',
sendParam: ['Printer='+JSON.stringify(data),'DefPrint='+$('#configPrinter').html()] sendParam: ['Printer='+JSON.stringify(data),'DefPrint='+$('#configPrinter').html()]
}).send(); }).send();
+14 -14
View File
@@ -14,29 +14,29 @@ var RepoInvHutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("SupID"); dload.addParam("SupID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+20 -20
View File
@@ -14,26 +14,26 @@ var RepoInvLabelJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butHapus').click(() => this.proses_empty()); $('#butHapus').click(() => this.proses_empty());
$('#butPrint').click(() => this.proses_print(true)); $('#butPrint').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : '')); this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : ''));
}, },
proses_empty: function(){ proses_empty() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=empty'] sendParam: ['mode_detail=empty']
}).send(); }).send();
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print');
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
produk_brow: function(){ 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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winBProduk') $('#winBProduk')
@@ -51,15 +51,15 @@ var RepoInvLabelJS = {
}); });
}, },
produk_simpan: function(){ produk_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=simpan-produk'], sendParam: ['mode_detail=simpan-produk'],
onSuccess: () => FoniaJS.closeWindow(this.winBProduk) onSuccess: () => FoniaJS.closeWindow(this.winBProduk)
}).send(); }).send();
}, },
grup_brow: function(){ grup_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Grup" 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="divBrowGrup">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Grup" 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="divBrowGrup">&nbsp;</div>');
this.winBGrup = FoniaJS.showWindow('BGrup', 'Daftar Grup Barang', _isi, 'xl', '', () => { this.winBGrup = FoniaJS.showWindow('BGrup', 'Daftar Grup Barang', _isi, 'xl', '', () => {
$('#winBGrup') $('#winBGrup')
@@ -76,15 +76,15 @@ var RepoInvLabelJS = {
}); });
}, },
grup_select: function(acell){ grup_select(acell) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]], sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]],
onSuccess: () => FoniaJS.closeWindow(this.winBGrup) onSuccess: () => FoniaJS.closeWindow(this.winBGrup)
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
new Request({ new Request({
url: this.PHP + '/form_detail', url: this.PHP + '/form_detail',
sendParam: ['mode_detail=update','ID='+acell[0]], sendParam: ['mode_detail=update','ID='+acell[0]],
@@ -101,37 +101,37 @@ var RepoInvLabelJS = {
}).send(); }).send();
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','ID='+acell[0]] sendParam: ['mode_detail=delete','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())], sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
onSuccess: () => FoniaJS.closeWindow(this.winDetail) onSuccess: () => FoniaJS.closeWindow(this.winDetail)
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="tabel-detail"){ if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')] sendParam: ['mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
}).send(); }).send();
} else if (tipe=="brow-grup"){ } else if (tipe=="brow-grup"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_grup', url: this.PHP + '/brow_grup',
sendParam: ['Cari_Grup'], sendParam: ['Cari_Grup'],
onSuccess: () => FoniaJS.setFocus('#Cari_Grup') onSuccess: () => FoniaJS.setFocus('#Cari_Grup')
+19 -19
View File
@@ -14,7 +14,7 @@ var RepoInvPiutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
@@ -22,27 +22,27 @@ var RepoInvPiutangJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("MemberID"); .addParam("MemberID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("MemberID"); dload.addParam("MemberID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -59,15 +59,15 @@ var RepoInvPiutangJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -75,7 +75,7 @@ var RepoInvPiutangJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+27 -27
View File
@@ -14,7 +14,7 @@ var RepoJualAnalisaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
@@ -22,35 +22,35 @@ var RepoJualAnalisaJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Grup_InvID"); .addParam("Grup_InvID")
cetak.add_param("Grup_MemberID"); .addParam("Grup_MemberID")
cetak.add_param("MemberID"); .addParam("MemberID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Urut"); .addParam("Urut")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Grup_InvID"); dload.addParam("Grup_InvID");
dload.add_param("Grup_MemberID"); dload.addParam("Grup_MemberID");
dload.add_param("MemberID"); dload.addParam("MemberID");
dload.add_param("SupID"); dload.addParam("SupID");
dload.add_param("Urut"); dload.addParam("Urut");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -67,15 +67,15 @@ var RepoJualAnalisaJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -83,7 +83,7 @@ var RepoJualAnalisaJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+16 -16
View File
@@ -14,30 +14,30 @@ var RepoJualJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("MemberID"); .addParam("MemberID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); new Download(this.PHP + '/excel')
dload.add_param("Tipe"); .addParam("Tipe")
dload.add_param("CabID"); .addParam("CabID")
dload.add_param("MemberID"); .addParam("MemberID")
dload.add_param("Tgl_From"); .addParam("Tgl_From")
dload.add_param("Tgl_To"); .addParam("Tgl_To")
dload.download(); .download();
} }
}; };
+21 -21
View File
@@ -14,7 +14,7 @@ var RepoJualMarginJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
@@ -22,29 +22,29 @@ var RepoJualMarginJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("MemberID"); .addParam("MemberID")
cetak.add_param("Urut"); .addParam("Urut")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("MemberID"); dload.addParam("MemberID");
dload.add_param("Urut"); dload.addParam("Urut");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -61,15 +61,15 @@ var RepoJualMarginJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -77,7 +77,7 @@ var RepoJualMarginJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoJualMarginPosJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+17 -17
View File
@@ -14,7 +14,7 @@ var RepoJualMutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
@@ -23,35 +23,35 @@ var RepoJualMutasiJS = {
FoniaJS.setFocus('#Nama_Member'); FoniaJS.setFocus('#Nama_Member');
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
$('#Nama_Member').focus(); $('#Nama_Member').focus();
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("MemberID"); .addParam("MemberID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
$('#Nama_Member').focus(); $('#Nama_Member').focus();
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("MemberID"); dload.addParam("MemberID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -68,15 +68,15 @@ var RepoJualMutasiJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -84,7 +84,7 @@ var RepoJualMutasiJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+23 -23
View File
@@ -14,7 +14,7 @@ var RepoJualRekapJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
@@ -25,7 +25,7 @@ var RepoJualRekapJS = {
FoniaJS.setFocus('#Nama_Produk'); FoniaJS.setFocus('#Nama_Produk');
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#InvID').val()==0){ if ($('#InvID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Barang !"); FoniaJS.showError("Silakan masukkan Nama Barang !");
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
@@ -36,16 +36,16 @@ var RepoJualRekapJS = {
$('#Nama_Member').focus(); $('#Nama_Member').focus();
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("InvID"); .addParam("InvID")
cetak.add_param("MemberID"); .addParam("MemberID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#InvID').val()==0){ if ($('#InvID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Barang !"); FoniaJS.showError("Silakan masukkan Nama Barang !");
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
@@ -57,15 +57,15 @@ var RepoJualRekapJS = {
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("InvID"); dload.addParam("InvID");
dload.add_param("MemberID"); dload.addParam("MemberID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -82,13 +82,13 @@ var RepoJualRekapJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
produk_brow: function(){ 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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -105,21 +105,21 @@ var RepoJualRekapJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#Nama_Produk').val(acell[5]); $('#Nama_Produk').val(acell[5]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -127,11 +127,11 @@ var RepoJualRekapJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
$('#InvID').val(item.value); $('#InvID').val(item.value);
} }
+19 -19
View File
@@ -14,7 +14,7 @@ var RepoMemberHistoriJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
@@ -22,7 +22,7 @@ var RepoMemberHistoriJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
@@ -32,16 +32,16 @@ var RepoMemberHistoriJS = {
FoniaJS.setFocus('#Nama_Member'); FoniaJS.setFocus('#Nama_Member');
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Point_TipeID"); .addParam("Point_TipeID")
cetak.add_param("MemberID"); .addParam("MemberID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
@@ -52,15 +52,15 @@ var RepoMemberHistoriJS = {
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Point_TipeID"); dload.addParam("Point_TipeID");
dload.add_param("MemberID"); dload.addParam("MemberID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
member_brow: function(){ member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -77,15 +77,15 @@ var RepoMemberHistoriJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -93,7 +93,7 @@ var RepoMemberHistoriJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+16 -16
View File
@@ -14,39 +14,39 @@ var RepoMemberPointJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Point_TipeID"); .addParam("Point_TipeID")
cetak.add_param("Grup_MemberID"); .addParam("Grup_MemberID")
cetak.add_param("Urut"); .addParam("Urut")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Point_TipeID"); dload.addParam("Point_TipeID");
dload.add_param("Grup_MemberID"); dload.addParam("Grup_MemberID");
dload.add_param("Urut"); dload.addParam("Urut");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+14 -14
View File
@@ -14,37 +14,37 @@ var RepoMemberTukarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Point_TipeID"); .addParam("Point_TipeID")
cetak.add_param("Grup_MemberID"); .addParam("Grup_MemberID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Point_TipeID"); dload.addParam("Point_TipeID");
dload.add_param("Grup_MemberID"); dload.addParam("Grup_MemberID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoPPOBJualJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoPPOBMarginJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Tipe"); .addParam("Tipe")
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.addParam("Tipe");
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+10 -10
View File
@@ -14,25 +14,25 @@ var RepoRekapMarginJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+10 -10
View File
@@ -14,25 +14,25 @@ var RepoRekapModalJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+32 -32
View File
@@ -14,53 +14,53 @@ var RepoStokAkhirJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butPOS').click(() => this.proses_pos()); $('#butPOS').click(() => this.proses_pos());
$('#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());
}, },
proses_pos: function(){ proses_pos() {
var cetak = new PrinterPos(this.PHP + '/pos'); new PrinterPos(this.PHP + '/pos')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Grup_InvID"); .addParam("Grup_InvID")
cetak.add_param("PPN"); .addParam("PPN")
cetak.add_param("Tanggal"); .addParam("Tanggal")
cetak.add_param("Urut"); .addParam("Urut")
cetak.add_param("Min_Stok"); .addParam("Min_Stok")
cetak.add_param("Min_Qty"); .addParam("Min_Qty")
cetak.exec(); .exec();
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("SupID"); .addParam("SupID")
cetak.add_param("Grup_InvID"); .addParam("Grup_InvID")
cetak.add_param("PPN"); .addParam("PPN")
cetak.add_param("Tanggal"); .addParam("Tanggal")
cetak.add_param("Urut"); .addParam("Urut")
cetak.add_param("Min_Stok"); .addParam("Min_Stok")
cetak.add_param("Min_Qty"); .addParam("Min_Qty");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("SupID"); dload.addParam("SupID");
dload.add_param("Grup_InvID"); dload.addParam("Grup_InvID");
dload.add_param("PPN"); dload.addParam("PPN");
dload.add_param("Tanggal"); dload.addParam("Tanggal");
dload.add_param("Urut"); dload.addParam("Urut");
dload.add_param("Min_Stok"); dload.addParam("Min_Stok");
dload.add_param("Min_Qty"); dload.addParam("Min_Qty");
dload.download(); dload.download();
}, },
oc_MinStok: function(){ oc_MinStok() {
if ($('#Min_Stok').val()=='Y') { if ($('#Min_Stok').val()=='Y') {
$('#Min_Qty').prop({disabled:false, readonly:false}); $('#Min_Qty').prop({disabled:false, readonly:false});
FoniaJS.setFocus('#Min_Qty') FoniaJS.setFocus('#Min_Qty')
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoStokCabangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("Cab1ID"); .addParam("Cab1ID")
cetak.add_param("Cab2ID"); .addParam("Cab2ID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Cab1ID"); dload.addParam("Cab1ID");
dload.add_param("Cab2ID"); dload.addParam("Cab2ID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+37 -19
View File
@@ -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,45 +13,63 @@
var RepoStokMutasiJS = { var RepoStokMutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
html5QrcodeScanner: null,
index: function(){ 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: function(prt){ proses_print(prt) {
if ($('#InvID').val()==0) { if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
return; return;
} }
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("InvID"); .addParam("InvID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#InvID').val()==0) { if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
return; return;
} }
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("InvID"); dload.addParam("InvID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
}, },
produk_brow: function(){ 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() {
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">&nbsp;</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">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -68,15 +86,15 @@ var RepoStokMutasiJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#Nama_Produk').val(acell[5]); $('#Nama_Produk').val(acell[5]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -84,7 +102,7 @@ var RepoStokMutasiJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#Tgl_From').focus(); $('#Tgl_From').focus();
} }
+12 -12
View File
@@ -14,27 +14,27 @@ var RepoStokOpnameJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ 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());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); let cetak = new Printer(this.PHP + '/print')
cetak.add_param("CabID"); .addParam("CabID")
cetak.add_param("Grup_InvID"); .addParam("Grup_InvID")
cetak.add_param("Tgl_From"); .addParam("Tgl_From")
cetak.add_param("Tgl_To"); .addParam("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.addParam("CabID");
dload.add_param("Grup_InvID"); dload.addParam("Grup_InvID");
dload.add_param("Tgl_From"); dload.addParam("Tgl_From");
dload.add_param("Tgl_To"); dload.addParam("Tgl_To");
dload.download(); dload.download();
} }
+24 -9
View File
@@ -4,7 +4,7 @@
Description : Informasi Aplikasi Description : Informasi Aplikasi
Created By : Siau Pheng (siaupheng@3fonia.com). Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : November 23th, 2011. Created Date : November 23th, 2011.
Last Modified : August 13th, 2026. Last Modified : November 2nd, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM. (c) 3FONIA Software; WWW.3FONIA.COM.
@@ -14,14 +14,28 @@ var AboutJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#win'+this.KODE).find('#divBuildInfo').html('<p>Aplikasi dibuat dengan komponen :<br>- jQuery Version '+$().jquery+' <br>- Bootstrap Version '+$.fn.tooltip.Constructor.VERSION+' <br>- FoniaJS Version '+FoniaJS.version+' <br>- FoniaPHP Version '+FoniaJS.version+'</p>'); let _html = [];
if (typeof jQuery !== undefined) _html.push('jQuery v'+$().jquery);
if (typeof bootstrap !== undefined) _html.push('Bootstrap v'+$.fn.tooltip.Constructor.VERSION);
if (typeof DataTable !== undefined) _html.push('DataTable v'+DataTable.version);
if (typeof Chart !== undefined) _html.push('Chart.js v'+Chart.version);
if (typeof qz !== undefined) _html.push('QZ Connector v'+qz.version);
if (typeof FoniaJS !== undefined) _html.push('FoniaJS v'+FoniaJS.version);
$('#win'+this.KODE).find('#divBuildInfo').html(`<p>${_html.join('<i class="bi-nut px-1"></i>')}</p>`);
$('#butDBCek').click(() => this.db_check()); $('#butDBCek').click(() => this.db_check());
$('#butDBOpti').click(() => this.db_opti()); $('#butDBOpti').click(() => this.db_opti());
$('#butUpdateCek').click(() => this.update_check()); $('#butUpdateCek').click(() => this.update_check());
new Request({
url: this.PHP + '/composer',
onSuccess: (ajson) => {
$('#win'+this.KODE).find('#divComposerInfo').html(ajson.html);
}
}).send();
}, },
db_check: function(){ db_check() {
new Request({ new Request({
url: this.PHP + '/db_check', url: this.PHP + '/db_check',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -30,7 +44,7 @@ var AboutJS = {
}).send(); }).send();
}, },
db_opti: function(){ db_opti() {
new Request({ new Request({
url: this.PHP + '/db_check', url: this.PHP + '/db_check',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -39,7 +53,7 @@ var AboutJS = {
}).send(); }).send();
}, },
update_check: function(){ update_check() {
new Request({ new Request({
url: this.PHP + '/update_check', url: this.PHP + '/update_check',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -52,7 +66,7 @@ var AboutJS = {
}).send(); }).send();
}, },
db_run: function(db_count = 0){ db_run(db_count = 0) {
if (db_count === 0) return false; if (db_count === 0) return false;
var items = Array(db_count).fill(0).map((_, index) => index); var items = Array(db_count).fill(0).map((_, index) => index);
var $ul = $('#db-list').empty(); var $ul = $('#db-list').empty();
@@ -70,7 +84,7 @@ var AboutJS = {
}, $.Deferred().resolve().promise()); }, $.Deferred().resolve().promise());
}, },
opti_run: function(db_count = 0){ opti_run(db_count = 0) {
if (db_count === 0) return false; if (db_count === 0) return false;
var items = Array(db_count).fill(0).map((_, index) => index); var items = Array(db_count).fill(0).map((_, index) => index);
var $ul = $('#db-list').empty(); var $ul = $('#db-list').empty();
@@ -88,7 +102,7 @@ var AboutJS = {
}, $.Deferred().resolve().promise()); }, $.Deferred().resolve().promise());
}, },
update_run: function(){ update_run() {
new Request({ new Request({
url: this.PHP + '/update_proses', url: this.PHP + '/update_proses',
onSuccess: (adata) => { onSuccess: (adata) => {
@@ -101,4 +115,5 @@ var AboutJS = {
} }
}).send(); }).send();
} }
}; };
+2 -2
View File
@@ -14,12 +14,12 @@ var SYSChpasswdJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butSave').click(() => this.proses_save()); $('#butSave').click(() => this.proses_save());
FoniaJS.setFocus('#LPass'); FoniaJS.setFocus('#LPass');
}, },
proses_save: function(){ proses_save() {
if ($("#LPass").val()=="") { if ($("#LPass").val()=="") {
FoniaJS.showInfo("Silakan masukkan password lama Anda!"); FoniaJS.showInfo("Silakan masukkan password lama Anda!");
FoniaJS.setFocus("#LPass"); FoniaJS.setFocus("#LPass");
+5 -5
View File
@@ -14,17 +14,17 @@ var ConfigJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('view'); this.data_query('view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('edit'); this.data_query('edit');
}, },
proses_save: function(){ proses_save() {
new Request({ new Request({
url: this.PHP + '/config', url: this.PHP + '/config',
sendParam: ['mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_EMAIL','REG_OWNER','REG_NPWP'], sendParam: ['mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_EMAIL','REG_OWNER','REG_NPWP'],
@@ -35,7 +35,7 @@ var ConfigJS = {
}).send() }).send()
}, },
data_query: function(mode){ data_query(mode) {
new Request({ new Request({
url: this.PHP + '/config', url: this.PHP + '/config',
sendParam: ['mode='+mode], sendParam: ['mode='+mode],
@@ -46,7 +46,7 @@ var ConfigJS = {
}).send() }).send()
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode').val(), ['edit']) !== -1) { if ($.inArray($('#mode').val(), ['edit']) !== -1) {
$("#butUbah").prop('disabled', true); $("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false); $("#butSimpan").prop('disabled', false);
+14 -14
View File
@@ -14,7 +14,7 @@ var MenuGrupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query(); this.data_query();
$('#Cari_Grup').keydown((e) => { $('#Cari_Grup').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var MenuGrupJS = {
FoniaJS.setFocus('#Cari_Grup'); FoniaJS.setFocus('#Cari_Grup');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/detail_grup', url: this.PHP + '/detail_grup',
sendParam: ['mode='+mode,'Grup_MenuID='+ID], sendParam: ['mode='+mode,'Grup_MenuID='+ID],
@@ -40,17 +40,17 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('add', 0); this.detail_show('add', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('edit', acell[0]); this.detail_show('edit', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){ FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode=del','Grup_MenuID='+acell[0],'Cari_Grup'], sendParam: ['mode=del','Grup_MenuID='+acell[0],'Cari_Grup'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -58,8 +58,8 @@ var MenuGrupJS = {
}.bind(this), 'danger'); }.bind(this), 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Grup_MenuID','Nama_Grup','Ket','Aktif','Cari_Grup'], sendParam: ['mode','Grup_MenuID','Nama_Grup','Ket','Aktif','Cari_Grup'],
onSuccess: () => { onSuccess: () => {
@@ -69,7 +69,7 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
menu_show: function(acell){ menu_show(acell) {
new Request({ new Request({
url: this.PHP + '/detail_menu', url: this.PHP + '/detail_menu',
sendParam: ['Grup_MenuID='+acell[0]], sendParam: ['Grup_MenuID='+acell[0]],
@@ -92,15 +92,15 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
menu_ceksemua: function(){ menu_ceksemua() {
$('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', true); $('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', true);
}, },
menu_hapussemua: function(){ menu_hapussemua() {
$('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', false); $('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', false);
}, },
menu_simpan: function(){ menu_simpan() {
var alist = []; var alist = [];
$('#tabMenuList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => { $('#tabMenuList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -119,8 +119,8 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
data_query: function(){ data_query() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Grup'], sendParam: ['Cari_Grup'],
}).send() }).send()
+16 -16
View File
@@ -14,7 +14,7 @@ var OperatorJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_User').keydown((e) => { $('#Cari_User').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -29,7 +29,7 @@ var OperatorJS = {
FoniaJS.setFocus('#Cari_User'); FoniaJS.setFocus('#Cari_User');
}, },
filter_show: function(){ filter_show() {
new Request({ new Request({
url: this.PHP + '/detail_filter', url: this.PHP + '/detail_filter',
sendParam: ['Filter_Level'], sendParam: ['Filter_Level'],
@@ -43,13 +43,13 @@ var OperatorJS = {
}).send(); }).send();
}, },
filter_simpan: function(){ filter_simpan() {
$('#Filter_Level').val($('#Fi_Level').val()); $('#Filter_Level').val($('#Fi_Level').val());
FoniaJS.closeWindow(this.winFilter); FoniaJS.closeWindow(this.winFilter);
this.data_query('detail'); this.data_query('detail');
}, },
detail_show: function(mode, UserID){ detail_show(mode, UserID) {
new Request({ new Request({
url: this.PHP + '/detail_user', url: this.PHP + '/detail_user',
sendParam: ['mode='+mode,'UserID='+UserID], sendParam: ['mode='+mode,'UserID='+UserID],
@@ -62,15 +62,15 @@ var OperatorJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('add', 0); this.detail_show('add', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('edit', acell[0]); this.detail_show('edit', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus ["+acell[1]+"] "+acell[2]+"?", () => { FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus ["+acell[1]+"] "+acell[2]+"?", () => {
new Request({ new Request({
url: this.PHP + '/save_user', url: this.PHP + '/save_user',
@@ -87,7 +87,7 @@ var OperatorJS = {
}, 'danger'); }, 'danger');
}, },
detail_check: function(){ detail_check() {
if ($('#Username').val().toUpperCase()==$('#UserLama').val().toUpperCase()) { if ($('#Username').val().toUpperCase()==$('#UserLama').val().toUpperCase()) {
this.detail_save(); this.detail_save();
return; return;
@@ -105,7 +105,7 @@ var OperatorJS = {
}).send(); }).send();
}, },
detail_save: function(){ detail_save() {
new Request({ new Request({
url: this.PHP + '/save_user', url: this.PHP + '/save_user',
sendParam: ['mode','UserID','Username','Nama','Posisi','Level','Password','Grup_MenuID','Aktif'], sendParam: ['mode','UserID','Username','Nama','Posisi','Level','Password','Grup_MenuID','Aktif'],
@@ -121,7 +121,7 @@ var OperatorJS = {
}).send(); }).send();
}, },
menu_show: function(acell){ menu_show(acell) {
new Request({ new Request({
url: this.PHP + '/detail_menu', url: this.PHP + '/detail_menu',
sendParam: ['UserID='+acell[0]], sendParam: ['UserID='+acell[0]],
@@ -145,15 +145,15 @@ var OperatorJS = {
}).send(); }).send();
}, },
menu_ceksemua: function(){ menu_ceksemua() {
$('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', true); $('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', true);
}, },
menu_hapussemua: function(){ menu_hapussemua() {
$('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', false); $('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', false);
}, },
menu_simpan: function(){ menu_simpan() {
var alist = []; var alist = [];
$('#tabMenuList tbody input.form-check-input[type=checkbox]:not(:disabled):checked').map((i, b) => { $('#tabMenuList tbody input.form-check-input[type=checkbox]:not(:disabled):checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -172,16 +172,16 @@ var OperatorJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Filter_Level','Cari_User'] sendParam: ['Filter_Level','Cari_User']
}).send() }).send()
} }
}, },
oc_Level: function(){ oc_Level() {
} }
}; };
+8 -8
View File
@@ -14,32 +14,32 @@ var PrinterJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butBrow').click(() => this.cab_brow()); $('#butBrow').click(() => this.cab_brow());
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('form-printer'); this.data_query('form-printer');
}, },
cab_brow: function(){ cab_brow() {
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', '<div id="divBrowCab">&nbsp;</div>', 'lg', '', () => this.data_query('brow-cabang')); this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', '<div id="divBrowCab">&nbsp;</div>', 'lg', '', () => this.data_query('brow-cabang'));
}, },
cab_select: function(acell){ cab_select(acell) {
FoniaJS.closeWindow(this.winBCab); FoniaJS.closeWindow(this.winBCab);
$('#REG_ID').val(acell[0]); $('#REG_ID').val(acell[0]);
this.data_query('form-printer', 'view'); this.data_query('form-printer', 'view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('form-printer', 'edit'); this.data_query('form-printer', 'edit');
}, },
proses_save: function(){ proses_save() {
this.data_query('form-printer', 'save'); this.data_query('form-printer', 'save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe === 'form-printer'){ if (tipe === 'form-printer'){
new Request({ new Request({
url: this.PHP + '/form_printer', url: this.PHP + '/form_printer',
@@ -52,13 +52,13 @@ var PrinterJS = {
} }
}).send(); }).send();
} else if (tipe=='brow-cabang'){ } else if (tipe=='brow-cabang'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_cabang', url: this.PHP + '/brow_cabang',
}).send(); }).send();
} }
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode').val(), ['edit']) >= 0) { if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$('#butBrow').prop('disabled', true); $('#butBrow').prop('disabled', true);
$('#butUbah').prop('disabled', true); $('#butUbah').prop('disabled', true);
+3 -3
View File
@@ -14,7 +14,7 @@ var SYSProfileJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butSave').click(() => this.save_profile()); $('#butSave').click(() => this.save_profile());
$('#win'+this.KODE).find('#FileGambar').off('change').change(() => { $('#win'+this.KODE).find('#FileGambar').off('change').change(() => {
var fd = new FormData(), files = $('#FileGambar')[0].files[0]; var fd = new FormData(), files = $('#FileGambar')[0].files[0];
@@ -38,7 +38,7 @@ var SYSProfileJS = {
this.get_picture(); this.get_picture();
}, },
save_profile: function(){ save_profile() {
new Request({ new Request({
url: this.PHP + '/save_profile', url: this.PHP + '/save_profile',
sendParam: ['Nama','Posisi','Email','HP'], sendParam: ['Nama','Posisi','Email','HP'],
@@ -53,7 +53,7 @@ var SYSProfileJS = {
}).send(); }).send();
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: this.PHP + '/get_picture', url: this.PHP + '/get_picture',
onSuccess: (ajson) => { onSuccess: (ajson) => {
+4 -4
View File
@@ -14,12 +14,12 @@ var SuperJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query(); this.data_query();
if ($('#divSuper').length > 0 && socket.active) socket.emit('super-check'); if ($('#divSuper').length > 0 && socket.active) socket.emit('super-check');
}, },
detail_select: function(acell){ detail_select(acell) {
new Request({ new Request({
url: this.PHP + '/approve', url: this.PHP + '/approve',
sendParam: ['AuthID='+acell[0]], sendParam: ['AuthID='+acell[0]],
@@ -27,8 +27,8 @@ var SuperJS = {
}).send(); }).send();
}, },
data_query: function(){ data_query() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
}).send(); }).send();
} }
+5 -5
View File
@@ -14,17 +14,17 @@ var GajiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('view'); this.data_query('view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('update'); this.data_query('update');
}, },
proses_save: function(){ proses_save() {
new Request({ new Request({
url: this.PHP + '/form_gaji', url: this.PHP + '/form_gaji',
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'], sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
@@ -36,7 +36,7 @@ var GajiJS = {
}).send() }).send()
}, },
data_query: function(mode){ data_query(mode) {
new Request({ new Request({
url: this.PHP + '/form_gaji', url: this.PHP + '/form_gaji',
sendParam: ['mode_detail='+mode,'REG_ID'], sendParam: ['mode_detail='+mode,'REG_ID'],
@@ -47,7 +47,7 @@ var GajiJS = {
}).send() }).send()
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) { if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
$("#butUbah").prop('disabled', true); $("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false); $("#butSimpan").prop('disabled', false);
+10 -10
View File
@@ -14,7 +14,7 @@ var RekGrupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Rek').keydown((e) => { $('#Cari_Rek').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var RekGrupJS = {
FoniaJS.setFocus('#Cari_Rek'); FoniaJS.setFocus('#Cari_Rek');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_RekID='+ID], sendParam: ['mode_detail='+mode,'Grup_RekID='+ID],
@@ -40,17 +40,17 @@ var RekGrupJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Grup_RekID='+acell[0],'Cari_Rek'], sendParam: ['mode_detail=delete','Grup_RekID='+acell[0],'Cari_Rek'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var RekGrupJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'], sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var RekGrupJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Rek'] sendParam: ['Cari_Rek']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var KaryawanJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Karya').keydown((e) => { $('#Cari_Karya').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var KaryawanJS = {
FoniaJS.setFocus('#Cari_Karya'); FoniaJS.setFocus('#Cari_Karya');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_karya', url: this.PHP + '/form_karya',
sendParam: ['mode_detail='+mode,'KaryaID='+ID], sendParam: ['mode_detail='+mode,'KaryaID='+ID],
@@ -38,17 +38,17 @@ var KaryawanJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','KaryaID='+acell[0],'Cari_Karya'], sendParam: ['mode_detail=delete','KaryaID='+acell[0],'Cari_Karya'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -56,8 +56,8 @@ var KaryawanJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'], sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
onSuccess: () => { onSuccess: () => {
@@ -67,9 +67,9 @@ var KaryawanJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Karya'] sendParam: ['Cari_Karya']
}).send(); }).send();
+16 -16
View File
@@ -14,7 +14,7 @@ var RekJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#butPrint').click(() => this.print_show()); $('#butPrint').click(() => this.print_show());
$('#Cari_Rek').keydown((e) => { $('#Cari_Rek').keydown((e) => {
@@ -29,7 +29,7 @@ var RekJS = {
FoniaJS.setFocus('#Cari_Rek'); FoniaJS.setFocus('#Cari_Rek');
}, },
print_show: function(){ print_show() {
new Request({ new Request({
url: this.PHP + '/detail_print', url: this.PHP + '/detail_print',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -42,16 +42,16 @@ var RekJS = {
}).send(); }).send();
}, },
print_rek: function(prt){ print_rek(prt) {
var cetak = new Printer(this.PHP + '/print_rek'); let cetak = new Printer(this.PHP + '/print_rek')
cetak.add_param("Grup_RekID"); .addParam("Grup_RekID")
cetak.add_param("Level"); .addParam("Level")
cetak.add_param("Tgl_Cetak"); .addParam("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint); FoniaJS.closeWindow(this.winDPrint);
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID], sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
@@ -61,17 +61,17 @@ var RekJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Kode_Rek='+acell[0],'Cari_Rek'], sendParam: ['mode_detail=delete','Kode_Rek='+acell[0],'Cari_Rek'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -79,8 +79,8 @@ var RekJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'], sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
onSuccess: () => { onSuccess: () => {
@@ -90,9 +90,9 @@ var RekJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Rek'] sendParam: ['Cari_Rek']
}).send(); }).send();
+16 -16
View File
@@ -14,7 +14,7 @@ var MemberJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#butPrint').click(() => this.print_show()); $('#butPrint').click(() => this.print_show());
$('#Cari_Member').keydown((e) => { $('#Cari_Member').keydown((e) => {
@@ -29,7 +29,7 @@ var MemberJS = {
FoniaJS.setFocus('#Cari_Member'); FoniaJS.setFocus('#Cari_Member');
}, },
print_show: function(){ print_show() {
new Request({ new Request({
url: this.PHP + '/detail_print', url: this.PHP + '/detail_print',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -42,16 +42,16 @@ var MemberJS = {
}).send(); }).send();
}, },
print_member: function(prt){ print_member(prt) {
var cetak = new Printer(this.PHP + '/print_member'); let cetak = new Printer(this.PHP + '/print_member')
cetak.add_param("Grup_MemberID"); .addParam("Grup_MemberID")
cetak.add_param("Aktif"); .addParam("Aktif")
cetak.add_param("Tgl_Cetak"); .addParam("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint); FoniaJS.closeWindow(this.winDPrint);
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_member', url: this.PHP + '/form_member',
sendParam: ['mode_detail='+mode,'MemberID='+ID], sendParam: ['mode_detail='+mode,'MemberID='+ID],
@@ -61,17 +61,17 @@ var MemberJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','MemberID='+acell[0],'Cari_Member'], sendParam: ['mode_detail=delete','MemberID='+acell[0],'Cari_Member'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -79,8 +79,8 @@ var MemberJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar','IM','Aktif','Cari_Member'], sendParam: ['mode_detail','MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar','IM','Aktif','Cari_Member'],
onSuccess: () => { onSuccess: () => {
@@ -90,9 +90,9 @@ var MemberJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Member'] sendParam: ['Cari_Member']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var MemberGrupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Member').keydown((e) => { $('#Cari_Member').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var MemberGrupJS = {
FoniaJS.setFocus('#Cari_Member'); FoniaJS.setFocus('#Cari_Member');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID], sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
@@ -40,17 +40,17 @@ var MemberGrupJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Grup_MemberID='+acell[0],'Cari_Member'], sendParam: ['mode_detail=delete','Grup_MemberID='+acell[0],'Cari_Member'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var MemberGrupJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'], sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var MemberGrupJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Member'] sendParam: ['Cari_Member']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var PointBarangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Barang').keydown((e) => { $('#Cari_Barang').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointBarangJS = {
FoniaJS.setFocus('#Cari_Barang'); FoniaJS.setFocus('#Cari_Barang');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_barang', url: this.PHP + '/form_barang',
sendParam: ['mode_detail='+mode,'InvPID='+ID], sendParam: ['mode_detail='+mode,'InvPID='+ID],
@@ -40,17 +40,17 @@ var PointBarangJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','InvPID='+acell[0],'Cari_Barang'], sendParam: ['mode_detail=delete','InvPID='+acell[0],'Cari_Barang'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var PointBarangJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'], sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var PointBarangJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Barang'] sendParam: ['Cari_Barang']
}).send(); }).send();
+20 -20
View File
@@ -14,7 +14,7 @@ var PointSkemaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Skema').keydown((e) => { $('#Cari_Skema').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointSkemaJS = {
FoniaJS.setFocus('#Cari_Skema'); FoniaJS.setFocus('#Cari_Skema');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_skema', url: this.PHP + '/form_skema',
sendParam: ['mode_detail='+mode,'PointID='+ID], sendParam: ['mode_detail='+mode,'PointID='+ID],
@@ -43,17 +43,17 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'], sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -61,8 +61,8 @@ var PointSkemaJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'], sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'],
onSuccess: () => { onSuccess: () => {
@@ -72,7 +72,7 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
grup_form: function(){ grup_form() {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['Grup_Barang'], sendParam: ['Grup_Barang'],
@@ -87,15 +87,15 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
grup_semua: function(){ grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true); $('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
}, },
grup_clear: function(){ grup_clear() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false); $('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
}, },
grup_save: function(){ grup_save() {
var alist = []; var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => { $('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -104,7 +104,7 @@ var PointSkemaJS = {
FoniaJS.closeWindow(this.winGrup); FoniaJS.closeWindow(this.winGrup);
}, },
barang_form: function(){ barang_form() {
new Request({ new Request({
url: this.PHP + '/form_barang', url: this.PHP + '/form_barang',
sendParam: ['Kode_Barang'], sendParam: ['Kode_Barang'],
@@ -117,9 +117,9 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
barang_hapus: function(acell){ barang_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_barang', url: this.PHP + '/table_barang',
sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'], sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -127,14 +127,14 @@ var PointSkemaJS = {
}, 'danger'); }, 'danger');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Skema'] sendParam: ['Cari_Skema']
}).send(); }).send();
} else if (tipe=="tabel-barang"){ } else if (tipe=="tabel-barang"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_barang', url: this.PHP + '/table_barang',
sendParam: ['Kode_Barang'], sendParam: ['Kode_Barang'],
onSuccess: () => FoniaJS.setFocus('#Nama_Produk') onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
@@ -142,8 +142,8 @@ var PointSkemaJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
new Request.JSONF({ new Request_JSF({
url: PointSkemaJS.PHP + '/table_barang', url: PointSkemaJS.PHP + '/table_barang',
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value] sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var PointTipeJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Tipe').keydown((e) => { $('#Cari_Tipe').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointTipeJS = {
FoniaJS.setFocus('#Cari_Tipe'); FoniaJS.setFocus('#Cari_Tipe');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_tipe', url: this.PHP + '/form_tipe',
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID], sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
@@ -40,17 +40,17 @@ var PointTipeJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Point_TipeID='+acell[0],'Cari_Tipe'], sendParam: ['mode_detail=delete','Point_TipeID='+acell[0],'Cari_Tipe'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var PointTipeJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'], sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var PointTipeJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Tipe'] sendParam: ['Cari_Tipe']
}).send(); }).send();
+5 -5
View File
@@ -14,7 +14,7 @@ var PPOBKateJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Kate').keydown((e) => { $('#Cari_Kate').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PPOBKateJS = {
FoniaJS.setFocus('#Cari_Kate'); FoniaJS.setFocus('#Cari_Kate');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_kategori', url: this.PHP + '/form_kategori',
sendParam: ['mode_detail='+mode,'KateID='+ID], sendParam: ['mode_detail='+mode,'KateID='+ID],
@@ -38,13 +38,13 @@ var PPOBKateJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Kate'] sendParam: ['Cari_Kate']
}).send(); }).send();
+5 -5
View File
@@ -14,7 +14,7 @@ var PPOBOpeJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Ope').keydown((e) => { $('#Cari_Ope').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PPOBOpeJS = {
FoniaJS.setFocus('#Cari_Ope'); FoniaJS.setFocus('#Cari_Ope');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_operator', url: this.PHP + '/form_operator',
sendParam: ['mode_detail='+mode,'OpeID='+ID], sendParam: ['mode_detail='+mode,'OpeID='+ID],
@@ -38,13 +38,13 @@ var PPOBOpeJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Ope'] sendParam: ['Cari_Ope']
}).send(); }).send();
+16 -16
View File
@@ -14,7 +14,7 @@ var PPOBProdukJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('tabel-produk'); this.data_query('tabel-produk');
$('#butPrint').click(() => this.print_show()); $('#butPrint').click(() => this.print_show());
$('#butUpdate').click(() => this.update_show()); $('#butUpdate').click(() => this.update_show());
@@ -30,7 +30,7 @@ var PPOBProdukJS = {
FoniaJS.setFocus('#Cari_Produk'); FoniaJS.setFocus('#Cari_Produk');
}, },
print_show: function(){ print_show() {
new Request({ new Request({
url: this.PHP + '/detail_print', url: this.PHP + '/detail_print',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -43,16 +43,16 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
print_produk: function(prt){ print_produk(prt) {
var cetak = new Printer(this.PHP + '/print_produk'); let cetak = new Printer(this.PHP + '/print_produk')
cetak.add_param("KateID"); .addParam("KateID")
cetak.add_param("OpeID"); .addParam("OpeID")
cetak.add_param("Tgl_Cetak"); .addParam("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint); FoniaJS.closeWindow(this.winDPrint);
}, },
update_show: function(){ update_show() {
new Request({ new Request({
url: this.PHP + '/detail_update', url: this.PHP + '/detail_update',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -63,8 +63,8 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
update_proses: function(){ update_proses() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/proses_update', url: this.PHP + '/proses_update',
sendParam: ['K_Kate','K_Ope'], sendParam: ['K_Kate','K_Ope'],
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -74,7 +74,7 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
produk_show: function(mode, ID){ produk_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode_detail='+mode,'ProdukID='+ID], sendParam: ['mode_detail='+mode,'ProdukID='+ID],
@@ -86,12 +86,12 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
produk_ubah: function(acell){ produk_ubah(acell) {
this.produk_show('update', acell[0]); this.produk_show('update', acell[0]);
}, },
produk_simpan: function(){ produk_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_produk', url: this.PHP + '/table_produk',
sendParam: ['mode_detail','ProdukID','OpeID','KateID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'Kode','Harga_Pokok','Harga_Jual','Status','Cari_Produk'], sendParam: ['mode_detail','ProdukID','OpeID','KateID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'Kode','Harga_Pokok','Harga_Jual','Status','Cari_Produk'],
onSuccess: (adata) => { onSuccess: (adata) => {
@@ -103,9 +103,9 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="tabel-produk"){ if (tipe=="tabel-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_produk', url: this.PHP + '/table_produk',
sendParam: ['Cari_Produk'] sendParam: ['Cari_Produk']
}).send(); }).send();

Some files were not shown because too many files have changed in this diff Show More