Compare commits
20
Commits
872a42489f
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
471589cc57 | ||
|
|
eab5acde17 | ||
|
|
4344b53de8 | ||
|
|
f04d146828 | ||
|
|
b6da9303a5 | ||
|
|
695028581f | ||
|
|
03e281d671 | ||
|
|
0db288c404 | ||
|
|
d5b44789fe | ||
|
|
a5fd32ba79 | ||
|
|
dcd13bb9df | ||
|
|
5d246e039e | ||
|
|
70595b835d | ||
|
|
aaaf0a9215 | ||
|
|
be2091eddd | ||
|
|
465f88bcbc | ||
|
|
7a585ab7c2 | ||
|
|
52897c25c5 | ||
|
|
dd6f0dea12 | ||
|
|
f901042cf5 |
@@ -16,6 +16,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use DateInterval;
|
||||
use DateTime;
|
||||
use flight\Engine;
|
||||
use flight\Session;
|
||||
use flight\database\SimplePdo;
|
||||
@@ -128,26 +130,27 @@ class IndexController {
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$ajson['CabID'] = $this->id_cab ?? 0;
|
||||
$ajson['html'] = '
|
||||
<div class="card">
|
||||
<div class="card-body my-bashboard">
|
||||
<div class="row h-100">
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="h-50">
|
||||
<canvas id="ChartA"></canvas>
|
||||
$this->app->json([
|
||||
'CabID' => $this->id_cab ?? 0,
|
||||
'html' => '
|
||||
<div class="card">
|
||||
<div class="card-body my-bashboard">
|
||||
<div class="row h-100">
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="h-50">
|
||||
<canvas id="ChartA"></canvas>
|
||||
</div>
|
||||
<div class="h-50">
|
||||
<canvas id="ChartB"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-50">
|
||||
<canvas id="ChartB"></canvas>
|
||||
<div class="col-12 col-md-6 h-100 overflow-scroll">
|
||||
<div id="tabelStok"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 h-100 overflow-scroll">
|
||||
<div id="tabelStok"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
$this->app->json($ajson);
|
||||
</div>'
|
||||
]);
|
||||
}
|
||||
|
||||
public function get401() {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Transaksi Pembelian
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 22th, 2010.
|
||||
Last Modified : September 20th, 2026.
|
||||
Last Modified : November 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -553,7 +553,7 @@ class BeliController {
|
||||
}
|
||||
|
||||
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 ($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();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Informasi Barang & Harga Jual
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 22nd, 2014.
|
||||
Last Modified : September 27th, 2026.
|
||||
Last Modified : November 3rd, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -83,18 +83,18 @@ class CekhargaController {
|
||||
|
||||
public function scan_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
|
||||
// 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 (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']]);
|
||||
if ($_row) $scandata = array_merge($scandata, $_row->getData());
|
||||
}
|
||||
$this->app->json([ $scandata ]);
|
||||
$this->app->json( $scandata );
|
||||
}
|
||||
|
||||
public function update_sup() {
|
||||
|
||||
@@ -373,7 +373,7 @@ class JualController {
|
||||
$ttglnota = $form->datebox("_", "Tgl_Jual", $atabel['Tgl_Jual'], $enable, true);
|
||||
$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," "]);
|
||||
$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");
|
||||
$ajson['html'] = '
|
||||
<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'.(in_array($this->mode, ['add','edit']) ? '' : ' d-none').'">
|
||||
<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 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>
|
||||
<input type="hidden" id="MemberID" value="'.$atabel['MemberID'].'" >
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Transaksi Penyesuaian Stok Per Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 22nd, 2014.
|
||||
Last Modified : October 11th, 2026.
|
||||
Last Modified : November 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -98,13 +98,13 @@ class OpnamebarangController {
|
||||
|
||||
public function scan_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
|
||||
// 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]);
|
||||
if ($_row) $scandata = array_merge($scandata, $_row->getData());
|
||||
$this->app->json([ $scandata ]);
|
||||
$this->app->json( $scandata );
|
||||
}
|
||||
|
||||
public function proses_simpan() {
|
||||
|
||||
@@ -587,10 +587,10 @@ class PosController {
|
||||
<div class="col-sm-12 col-md-9 col-lg-10 mt-3 mt-md-0">
|
||||
<div class="row mb-1">
|
||||
<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 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 id="divPOS1"> </div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Laporan Penerimaan Dana POS / Kasir
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : September 8th, 2012.
|
||||
Last Modified : October 9th, 2026.
|
||||
Last Modified : November 2nd, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -16,6 +16,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Report\Dana;
|
||||
|
||||
use App\Utils\Invesa;
|
||||
use flight\Engine;
|
||||
use flight\database\SimplePdo;
|
||||
use flight\Session;
|
||||
@@ -91,8 +92,12 @@ class PosController {
|
||||
$tot_dana = $tot_jual + $tot_pulsa - $tot_potong - $tot_diskon;
|
||||
|
||||
$pre = new PrintPOS($this->app);
|
||||
$pre->set_fontsize(2);//thermal
|
||||
$pre->set_header_logo("logo-nota.png");//thermal
|
||||
if (Invesa::Printer_Thermal(Param::Get("Printer", ""))) {
|
||||
$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_AUTOCUT'] === 1) $pre->set_cutpaper();
|
||||
$pre->add_empty();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Laporan Margin Penjualan / Member
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 12nd, 2012.
|
||||
Last Modified : October 7th, 2026.
|
||||
Last Modified : November 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -226,7 +226,7 @@ class MarginController {
|
||||
$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"]);
|
||||
$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);
|
||||
$tto = $form->datebox("_", "Tgl_To", tgl_ymd(), true, false);
|
||||
$ajson['html'] = '
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Cetak Struk / Nota POS
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : April 12th, 2011.
|
||||
Last Modified : October 3rd, 2026.
|
||||
Last Modified : November 2nd, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -16,6 +16,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Report;
|
||||
|
||||
use App\Utils\Invesa;
|
||||
use App\Utils\PPOBClient;
|
||||
use flight\Engine;
|
||||
use flight\database\SimplePdo;
|
||||
@@ -29,6 +30,7 @@ class NotaController {
|
||||
private array $app_inv;
|
||||
private string $no_cetak;
|
||||
private int $op_cash;
|
||||
private bool $is_thermal;
|
||||
protected Engine $app;
|
||||
protected SimplePdo $db;
|
||||
|
||||
@@ -39,6 +41,7 @@ class NotaController {
|
||||
$this->app_inv = (array) $session->get('APP_INV');
|
||||
$this->no_cetak = Param::Get("Nomor_Cetak", "");
|
||||
$this->op_cash = Param::Int("Open_Cash", 0);
|
||||
$this->is_thermal = Invesa::Printer_Thermal(Param::Get("Printer", ""));
|
||||
}
|
||||
|
||||
public function pos(): void {
|
||||
@@ -60,13 +63,18 @@ class NotaController {
|
||||
if (count($aitem) === 0) return;
|
||||
|
||||
$pre = new PrintPOS($this->app);
|
||||
$pre->set_fontsize(2);//thermal
|
||||
$pre->set_header_logo("logo-nota.png");//thermal
|
||||
if ($this->is_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_AUTOCUT'] === 1) $pre->set_cutpaper();
|
||||
if (!empty($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) {
|
||||
@@ -81,6 +89,7 @@ class NotaController {
|
||||
|
||||
$items = 0; $qty = 0;
|
||||
foreach ($aitem as $item) {
|
||||
if ($item['Qty'] === 0) continue;
|
||||
if ($item['Promo'] > 1) {
|
||||
$apromo[] = rupiah($item['Qty'])." ".$item['Nama_Satuan']." ".$item['Nama_Produk_Varian'];
|
||||
continue;
|
||||
@@ -338,8 +347,12 @@ class NotaController {
|
||||
if (count($aitem) === 0) return;
|
||||
|
||||
$pre = new PrintPOS($this->app);
|
||||
$pre->set_fontsize(2);
|
||||
$pre->set_header_logo("logo-nota.png");
|
||||
if ($this->is_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_AUTOCUT'] === 1) $pre->set_cutpaper();
|
||||
$pre->add([$ainfo['No_Mutasi'],20,"L"], [tgl_sql2str($ainfo['Tgl_Mutasi']),20,"R"]);
|
||||
$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]);
|
||||
|
||||
$pre = new PrintPOS($this->app);
|
||||
$pre->set_fontsize(2);
|
||||
$pre->set_header_logo("logo-nota.png");
|
||||
if ($this->is_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_AUTOCUT'] === 1) $pre->set_cutpaper();
|
||||
if (!empty($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"]);
|
||||
@@ -405,8 +422,12 @@ class NotaController {
|
||||
$abulan = bulan_array();
|
||||
|
||||
$pre = new PrintPOS($this->app);
|
||||
$pre->set_fontsize(2);
|
||||
$pre->set_header_logo("logo-nota.png");
|
||||
if ($this->is_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_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]);
|
||||
@@ -418,7 +439,7 @@ class NotaController {
|
||||
if (count($aitem) === 0) return;
|
||||
|
||||
foreach ($aitem as $item) {
|
||||
$ainfo = array_merge($ainfo, $item);
|
||||
$ainfo = array_merge($ainfo, $item->getData());
|
||||
$acatat = [];
|
||||
if (!empty($ainfo['Catatan1'])) {
|
||||
$acatat = str_split(ucfirst(trim($ainfo['Catatan1'])), 40);
|
||||
@@ -464,13 +485,17 @@ class NotaController {
|
||||
if ((int) $ainfo['KateID'] === 5) $is_token = 1;
|
||||
|
||||
$pre = new PrintPOS($this->app);
|
||||
$pre->set_fontsize(2);
|
||||
$pre->set_header_logo("logo-nota.png");
|
||||
if ($this->is_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_AUTOCUT'] === 1) $pre->set_cutpaper();
|
||||
if (!empty($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"]);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Laporan Stok Akhir Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : January 24th, 2011.
|
||||
Last Modified : October 13th, 2026.
|
||||
Last Modified : November 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -46,7 +46,7 @@ class AkhirController {
|
||||
$apre = [
|
||||
'id_sup' => Param::Int("SupID", 0),
|
||||
'id_grup_inv' => Param::Int("Grup_InvID", 0),
|
||||
'ppn' => Param::Int("PPN", 9),
|
||||
'ppn' => Param::Int("PPN", 0),
|
||||
'tgl' => Param::Get("Tanggal"),
|
||||
'urut' => Param::Get("Urut", "B"),
|
||||
'min' => Param::Get("Min_Stok", "N"),
|
||||
@@ -75,7 +75,7 @@ class AkhirController {
|
||||
$tsql2 .= " AND P.Grup_InvID=?";
|
||||
array_push($asql2, $apre['id_grup_inv']);
|
||||
}
|
||||
if ($apre['ppn'] !== 9) {
|
||||
if ($apre['ppn'] > 0) {
|
||||
$tsql2 .= " AND P.PPN=?";
|
||||
array_push($asql2, $apre['ppn']);
|
||||
}
|
||||
@@ -93,8 +93,12 @@ class AkhirController {
|
||||
$apre = $this->prepare();
|
||||
|
||||
$pre = new PrintPOS($this->app);
|
||||
$pre->set_fontsize(2);//thermal
|
||||
$pre->set_header_logo("logo-nota.png");//thermal
|
||||
if (Invesa::Printer_Thermal(Param::Get("Printer", ""))) {
|
||||
$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();
|
||||
$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"]);
|
||||
$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"]);
|
||||
$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);
|
||||
$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");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Laporan Mutasi Stok Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : July 16th, 2011.
|
||||
Last Modified : October 12th, 2026.
|
||||
Last Modified : November 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -83,6 +83,18 @@ class MutasiController {
|
||||
$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() {
|
||||
$apre = [
|
||||
'id_inv' => Param::Int("InvID", 0),
|
||||
@@ -198,7 +210,11 @@ class MutasiController {
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-4 col-lg-3 col-form-label" for="CabID">Nama Cabang</label>
|
||||
<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">
|
||||
<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>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Informasi Aplikasi
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : November 23th, 2011.
|
||||
Last Modified : August 13th, 2026.
|
||||
Last Modified : November 2nd, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -16,6 +16,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\System;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use flight\Engine;
|
||||
use flight\Session;
|
||||
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>
|
||||
<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>
|
||||
<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>
|
||||
<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">
|
||||
<span class="form-control text-'.($ainfo['svr_status']===1?'success border-primary':'warning border-danger').'" id="spanStatus">'.$ainfo['svr_message'].'</span>
|
||||
</div>
|
||||
@@ -91,6 +92,28 @@ class AboutController {
|
||||
$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() {
|
||||
$ajson = [];
|
||||
$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>
|
||||
<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 class="tab-pane fade" id="tool" role="tabpanel" aria-labelledby="tool-tab">
|
||||
<div class="row mb-2">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Description : Master Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : September 10th, 2026.
|
||||
Last Modified : November 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -253,7 +253,7 @@ class ProdukController {
|
||||
}
|
||||
|
||||
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) {
|
||||
$atabel = $this->db->fetchRow("SELECT * FROM inv_produk WHERE InvID=?", [$this->id_inv]);
|
||||
$this->Produk_Backup();
|
||||
|
||||
@@ -14,34 +14,34 @@ var DISPConfigJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butBrow').click(() => this.cab_brow());
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('form-display');
|
||||
},
|
||||
|
||||
cab_brow: function(){
|
||||
cab_brow() {
|
||||
var _isi = new String('<div id="divBrowCab"> </div>');
|
||||
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);
|
||||
$('#REG_ID').val(acell[0]);
|
||||
this.data_query('form-display', 'view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
proses_edit() {
|
||||
this.data_query('form-display', 'edit');
|
||||
this.load_port();
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
this.data_query('form-display', 'save');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=='form-display'){
|
||||
new Request({
|
||||
url: this.PHP + '/form_display',
|
||||
@@ -54,13 +54,13 @@ var DISPConfigJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=='brow-cabang'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_cabang',
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
update_event() {
|
||||
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
|
||||
$('#butBrow').prop('disabled', true);
|
||||
$('#butUbah').prop('disabled', true);
|
||||
@@ -72,7 +72,7 @@ var DISPConfigJS = {
|
||||
}
|
||||
},
|
||||
|
||||
load_port: function(){
|
||||
load_port() {
|
||||
var parent = this;
|
||||
qz.serial.findPorts().then(function(data){
|
||||
var _selport = $('#POLE_PORT').val();
|
||||
|
||||
@@ -14,7 +14,7 @@ var DISPIklanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Iklan').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var DISPIklanJS = {
|
||||
FoniaJS.setFocus('#Cari_Iklan');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_iklan',
|
||||
sendParam: ['mode_detail='+mode,'PromoID='+ID],
|
||||
@@ -63,17 +63,17 @@ var DISPIklanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Iklan'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -81,8 +81,8 @@ var DISPIklanJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','PromoID','CabID','Tanggal','Info','Aktif','Cari_Iklan'],
|
||||
onSuccess: () => {
|
||||
@@ -92,16 +92,16 @@ var DISPIklanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Iklan']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
get_picture: function(){
|
||||
get_picture() {
|
||||
new Request({
|
||||
url: this.PHP + '/get_picture',
|
||||
sendParam: ['PromoID'],
|
||||
|
||||
@@ -14,7 +14,7 @@ var DISPPromoJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Promo').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var DISPPromoJS = {
|
||||
FoniaJS.setFocus('#Cari_Promo');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_promo',
|
||||
sendParam: ['mode_detail='+mode,'PromoID='+ID],
|
||||
@@ -63,17 +63,17 @@ var DISPPromoJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -81,8 +81,8 @@ var DISPPromoJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','PromoID','Tanggal','Info','Warna','Font','Aktif','Cari_Promo'],
|
||||
onSuccess: () => {
|
||||
@@ -92,16 +92,16 @@ var DISPPromoJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Promo']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
get_picture: function(){
|
||||
get_picture() {
|
||||
new Request({
|
||||
url: this.PHP + '/get_picture',
|
||||
sendParam: ['PromoID'],
|
||||
|
||||
+30
-30
@@ -14,7 +14,7 @@ var GELGajiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -24,7 +24,7 @@ var GELGajiJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -42,17 +42,17 @@ var GELGajiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_Gaji').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_Gaji').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -60,7 +60,7 @@ var GELGajiJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Gaji').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_Gaji').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -84,18 +84,18 @@ var GELGajiJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_Gaji').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(){
|
||||
tx_print() {
|
||||
if (!$('#No_Gaji').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -106,14 +106,14 @@ var GELGajiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_print_exec: function(){
|
||||
var cetak = new PrinterPos('report/nota/gaji');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Gaji').val());
|
||||
cetak.exec();
|
||||
tx_print_exec() {
|
||||
new PrinterPos('report/nota/gaji')
|
||||
.addParam("Nomor_Cetak", $('#No_Gaji').val())
|
||||
.exec();
|
||||
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"> </div>');
|
||||
this.winBKarya = FoniaJS.showWindow('BKarya', 'Daftar Karyawan', _isi, 'lg', '', () => {
|
||||
$('#winBKarya')
|
||||
@@ -131,12 +131,12 @@ var GELGajiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
karya_select: function(acell){
|
||||
karya_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBKarya);
|
||||
this.detail_gaji('insert', 0, acell[0]);
|
||||
},
|
||||
|
||||
detail_gaji: function(mode, ID, KaryaID){
|
||||
detail_gaji(mode, ID, KaryaID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_gaji',
|
||||
sendParam: ['mode','mode_detail='+mode,'No_Gaji','ID='+ID,'KaryaID='+KaryaID],
|
||||
@@ -177,24 +177,24 @@ var GELGajiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_gaji('insert', 0, 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_gaji('update', acell[0], acell[1]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','No_Gaji','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#KaryaID').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Karyawan !');
|
||||
return;
|
||||
@@ -203,7 +203,7 @@ var GELGajiJS = {
|
||||
FoniaJS.showError('Jumlah Potongan melebihi Jumlah Pinjaman !');
|
||||
}
|
||||
var _mdetail = $('#mode_detail').val();
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => {
|
||||
@@ -212,7 +212,7 @@ var GELGajiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
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())];
|
||||
@@ -248,31 +248,31 @@ var GELGajiJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','No_Gaji']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-karya"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_karya',
|
||||
sendParam: ['No_Gaji','Cari_Karya'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Karya')
|
||||
}).send();
|
||||
} else if (tipe=="brow-cetak"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_cetak',
|
||||
sendParam: ['No_Gaji']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
Karya_Comp: function(item){
|
||||
Karya_Comp(item) {
|
||||
var adata = item.data.split(':');
|
||||
$('#KaryaID').val(item.value);
|
||||
$('#Gaji_Harian').val(FoniaJS.FloatToStr(adata[0]));
|
||||
@@ -280,7 +280,7 @@ var GELGajiJS = {
|
||||
FoniaJS.setFocus('#Qty_Harian');
|
||||
},
|
||||
|
||||
oc_Minggu: function(){
|
||||
oc_Minggu() {
|
||||
new Request({
|
||||
url: this.PHP + '/option_minggu',
|
||||
sendParam: ['Tahun','Bulan'],
|
||||
@@ -295,7 +295,7 @@ var GELGajiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
Hitung_Detail: function(){
|
||||
Hitung_Detail() {
|
||||
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 dbon1 = FoniaJS.StrToFloat($('#Qty_BonusM').val()) * FoniaJS.StrToFloat($('#Bonus_Minggu').val());
|
||||
|
||||
+16
-16
@@ -14,21 +14,21 @@ var GELHutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butMode').click(() => this.tx_mode());
|
||||
$('#butBatal').click(() => this.tx_batal());
|
||||
if (FoniaJS.User.Level>0) $('#butMode').hide();
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_mode: function(){
|
||||
tx_mode() {
|
||||
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
|
||||
$('#Mode_Tampil').val(mode);
|
||||
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
$('#divTXNota').removeClass('d-none');
|
||||
$('#divDetailNota').addClass('d-none');
|
||||
$('#divDetailBayar').addClass('d-none');
|
||||
@@ -39,7 +39,7 @@ var GELHutangJS = {
|
||||
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"> </div>');
|
||||
this.winBSup = FoniaJS.showWindow('BSup', 'Daftar Supplier', _isi, 'xl', '', () => {
|
||||
$('#winBSup')
|
||||
@@ -57,7 +57,7 @@ var GELHutangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
sup_select: function(acell){
|
||||
sup_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBSup);
|
||||
$('#SupID').val(acell[0]);
|
||||
$('#Nama_Sup').val(acell[2]);
|
||||
@@ -65,7 +65,7 @@ var GELHutangJS = {
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
nota_select: function(acell){
|
||||
nota_select(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_nota',
|
||||
sendParam: ['No_Beli='+acell[1],'Tipe_Nota='+acell[0]],
|
||||
@@ -83,7 +83,7 @@ var GELHutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_show: function(){
|
||||
bayar_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_bayar',
|
||||
sendParam: ['No_Beli','Total_Sisa'],
|
||||
@@ -96,28 +96,28 @@ var GELHutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_hapus: function(acell){
|
||||
bayar_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
sendParam: ['mode_detail=delete','No_Beli','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
bayar_simpan: function(){
|
||||
bayar_simpan() {
|
||||
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
|
||||
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
sendParam: ['mode_detail=insert','SupID','No_Beli','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Sup'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBayar)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
@@ -135,17 +135,17 @@ var GELHutangJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-nota"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_nota',
|
||||
sendParam: ['SupID','Mode_Tampil']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-bayar"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
sendParam: ['No_Beli','Lunas','Mode_Tampil']
|
||||
}).send();
|
||||
} else if (tipe=="brow-sup"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_sup',
|
||||
sendParam: ['Cari_Sup'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Sup')
|
||||
@@ -153,7 +153,7 @@ var GELHutangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Sup_Comp: function(item){
|
||||
Sup_Comp(item) {
|
||||
$('#SupID').val(item.value);
|
||||
$('#Alamat_Sup').val(item.data);
|
||||
GELHutangJS.data_query('tabel-nota');
|
||||
|
||||
+12
-12
@@ -14,13 +14,13 @@ var GELKaryaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butPinjam').click(() => this.tx_pinjam());
|
||||
$('#butBayar').click(() => this.tx_bayar());
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_pinjam: function(){
|
||||
tx_pinjam() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_pinjam',
|
||||
sendParam: ['KaryaID'],
|
||||
@@ -33,7 +33,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
tx_bayar: function(){
|
||||
tx_bayar() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_bayar',
|
||||
sendParam: ['KaryaID'],
|
||||
@@ -46,40 +46,40 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
pinjam_simpan: function(){
|
||||
pinjam_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Total_Pinjam').val()) == 0){
|
||||
FoniaJS.showError("Silahkan masukkan jumlah pinjaman !");
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winPinjam)
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_simpan: function(){
|
||||
bayar_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Total_Bayar').val()) == 0){
|
||||
FoniaJS.showError("Silahkan masukkan jumlah pembayaran !");
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBayar)
|
||||
}).send();
|
||||
},
|
||||
|
||||
karya_hapus: function(acell){
|
||||
karya_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_karya',
|
||||
sendParam: ['mode_detail=delete','KaryaID','No_Trans='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
@@ -91,14 +91,14 @@ var GELKaryaJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-karya"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_karya',
|
||||
sendParam: ['KaryaID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
ocKarya: function() {
|
||||
ocKarya() {
|
||||
this.data_query('master');
|
||||
}
|
||||
|
||||
|
||||
+23
-23
@@ -14,7 +14,7 @@ var GELKeluarJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -23,7 +23,7 @@ var GELKeluarJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -41,17 +41,17 @@ var GELKeluarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#Kode_Jurnal').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ var GELKeluarJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ var GELKeluarJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Total_Item').val()==0){
|
||||
FoniaJS.showError("Belum ada Item Jurnal!");
|
||||
return false;
|
||||
@@ -92,14 +92,14 @@ var GELKeluarJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#Kode_Jurnal').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
cek_awal: function(){
|
||||
cek_awal() {
|
||||
/*if (GEL_Kunci($('Tanggal').get('value'))) {
|
||||
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
|
||||
return false;
|
||||
@@ -112,7 +112,7 @@ var GELKeluarJS = {
|
||||
return true;
|
||||
},
|
||||
|
||||
rek_brow: function(){
|
||||
rek_brow() {
|
||||
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"> </div>');
|
||||
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);
|
||||
this.detail_rek('insert', 0, acell[0]);
|
||||
},
|
||||
|
||||
detail_rek: function(mode, ID, Kode_Rek){
|
||||
detail_rek(mode, ID, Kode_Rek) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
|
||||
@@ -158,31 +158,31 @@ var GELKeluarJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if (!this.cek_awal()) return false;
|
||||
this.detail_rek('insert', 0, 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
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> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
|
||||
return;
|
||||
}
|
||||
var _mdetail = $('#mode_detail').val();
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
|
||||
onSuccess: () => {
|
||||
@@ -191,7 +191,7 @@ var GELKeluarJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
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())];
|
||||
@@ -234,18 +234,18 @@ var GELKeluarJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','Kode_Jurnal']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-rek"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_rek',
|
||||
sendParam: ['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);
|
||||
FoniaJS.setFocus('#Jumlah');
|
||||
}
|
||||
|
||||
+16
-16
@@ -14,21 +14,21 @@ var GELPiutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butMode').click(() => this.tx_mode());
|
||||
$('#butBatal').click(() => this.tx_batal());
|
||||
if (FoniaJS.User.Level>0) $('#butMode').hide();
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_mode: function(){
|
||||
tx_mode() {
|
||||
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
|
||||
$('#Mode_Tampil').val(mode);
|
||||
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
$('#divTXNota').removeClass('d-none');
|
||||
$('#divDetailNota').addClass('d-none');
|
||||
$('#divDetailBayar').addClass('d-none');
|
||||
@@ -39,7 +39,7 @@ var GELPiutangJS = {
|
||||
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"> </div>');
|
||||
this.winBBuyer = FoniaJS.showWindow('BBuyer', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBBuyer')
|
||||
@@ -57,7 +57,7 @@ var GELPiutangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
buyer_select: function(acell){
|
||||
buyer_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBBuyer);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[2]);
|
||||
@@ -65,7 +65,7 @@ var GELPiutangJS = {
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
nota_select: function(acell){
|
||||
nota_select(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_nota',
|
||||
sendParam: ['No_Jual='+acell[1],'Tipe_Nota='+acell[0]],
|
||||
@@ -83,7 +83,7 @@ var GELPiutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_show: function(){
|
||||
bayar_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_bayar',
|
||||
sendParam: ['No_Jual','Total_Sisa'],
|
||||
@@ -96,28 +96,28 @@ var GELPiutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_hapus: function(acell){
|
||||
bayar_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
bayar_simpan: function(){
|
||||
bayar_simpan() {
|
||||
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
|
||||
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
sendParam: ['mode_detail=insert','MemberID','No_Jual','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Member'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBayar)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
@@ -135,17 +135,17 @@ var GELPiutangJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-nota"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_nota',
|
||||
sendParam: ['MemberID','Mode_Tampil']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-bayar"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
sendParam: ['No_Jual','Lunas','Mode_Tampil']
|
||||
}).send();
|
||||
} else if (tipe=="brow-buyer"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_buyer',
|
||||
sendParam: ['Cari_Buyer'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Buyer')
|
||||
@@ -153,7 +153,7 @@ var GELPiutangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
$('#Alamat_Member').val(item.data);
|
||||
GELPiutangJS.data_query('tabel-nota');
|
||||
|
||||
+23
-23
@@ -14,7 +14,7 @@ var GELTerimaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -23,7 +23,7 @@ var GELTerimaJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -41,17 +41,17 @@ var GELTerimaJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#Kode_Jurnal').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ var GELTerimaJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ var GELTerimaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Total_Item').val()==0){
|
||||
FoniaJS.showError("Belum ada Item Jurnal!");
|
||||
return false;
|
||||
@@ -92,14 +92,14 @@ var GELTerimaJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#Kode_Jurnal').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
cek_awal: function(){
|
||||
cek_awal() {
|
||||
/*if (GEL_Kunci($('Tanggal').get('value'))) {
|
||||
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
|
||||
return false;
|
||||
@@ -112,7 +112,7 @@ var GELTerimaJS = {
|
||||
return true;
|
||||
},
|
||||
|
||||
rek_brow: function(){
|
||||
rek_brow() {
|
||||
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"> </div>');
|
||||
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);
|
||||
this.detail_rek('insert', 0, acell[0]);
|
||||
},
|
||||
|
||||
detail_rek: function(mode, ID, Kode_Rek){
|
||||
detail_rek(mode, ID, Kode_Rek) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
|
||||
@@ -158,31 +158,31 @@ var GELTerimaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if (!this.cek_awal()) return false;
|
||||
this.detail_rek('insert', 0, 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
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> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
|
||||
return;
|
||||
}
|
||||
var _mdetail = $('#mode_detail').val();
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
|
||||
onSuccess: () => {
|
||||
@@ -191,7 +191,7 @@ var GELTerimaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
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())];
|
||||
@@ -234,18 +234,18 @@ var GELTerimaJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','Kode_Jurnal']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-rek"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_rek',
|
||||
sendParam: ['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);
|
||||
FoniaJS.setFocus('#Jumlah');
|
||||
}
|
||||
|
||||
+23
-23
@@ -14,7 +14,7 @@ var GELUmumJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());$('#butHapus').click(() => this.tx_hapus());
|
||||
$('#butSimpan').click(() => this.tx_simpan());
|
||||
@@ -22,7 +22,7 @@ var GELUmumJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -40,17 +40,17 @@ var GELUmumJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#Kode_Jurnal').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ var GELUmumJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -82,7 +82,7 @@ var GELUmumJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Total_Item').val()==0){
|
||||
FoniaJS.showError("Belum ada Item Jurnal!");
|
||||
return false;
|
||||
@@ -95,14 +95,14 @@ var GELUmumJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#Kode_Jurnal').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
cek_awal: function(){
|
||||
cek_awal() {
|
||||
/*if (GEL_Kunci($('Tanggal').get('value'))) {
|
||||
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
|
||||
return false;
|
||||
@@ -115,7 +115,7 @@ var GELUmumJS = {
|
||||
return true;
|
||||
},
|
||||
|
||||
rek_brow: function(){
|
||||
rek_brow() {
|
||||
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"> </div>');
|
||||
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);
|
||||
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({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek,'DK='+DK],
|
||||
@@ -161,31 +161,31 @@ var GELUmumJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if (!this.cek_awal()) return false;
|
||||
this.detail_rek('insert', 0, 0, 'D');
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
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> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
|
||||
return;
|
||||
}
|
||||
var _mdetail = $('#mode_detail').val();
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','DK','Jumlah','ID'],
|
||||
onSuccess: () => {
|
||||
@@ -194,7 +194,7 @@ var GELUmumJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
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())];
|
||||
@@ -237,18 +237,18 @@ var GELUmumJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','Kode_Jurnal']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-rek"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_rek',
|
||||
sendParam: ['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);
|
||||
FoniaJS.setFocus('#Jumlah');
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ socket.on('super-data', (adata) => {
|
||||
|
||||
var IndexJS = {
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
new Request({
|
||||
url: 'index/index',
|
||||
sendParam: [],
|
||||
@@ -66,7 +66,7 @@ var IndexJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
get_picture: function(){
|
||||
get_picture() {
|
||||
new Request({
|
||||
url: 'system/profile/get_picture',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -75,13 +75,13 @@ var IndexJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
load_chart: function(){
|
||||
load_chart() {
|
||||
this.data_query('chart-sale');
|
||||
this.data_query('chart-omzet');
|
||||
this.data_query('tabel-stok');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="chart-sale"){
|
||||
new Request({
|
||||
url: 'index/chart_sale',
|
||||
|
||||
+35
-35
@@ -14,7 +14,7 @@ var BeliJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -26,7 +26,7 @@ var BeliJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -43,17 +43,17 @@ var BeliJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_Beli').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_Beli').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -65,7 +65,7 @@ var BeliJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_Beli').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -89,7 +89,7 @@ var BeliJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(mode){
|
||||
tx_simpan(mode) {
|
||||
if ($('#CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Cabang !");
|
||||
return;
|
||||
@@ -109,35 +109,35 @@ var BeliJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_Beli').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(prt){
|
||||
tx_print(prt) {
|
||||
if ($('#No_Beli').val()) {
|
||||
var cetak = new Printer('report/nota/beli');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Beli').val());
|
||||
let cetak = new Printer('report/nota/beli')
|
||||
.addParam("Nomor_Cetak", $('#No_Beli').val());
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
pending_brow: function(){
|
||||
pending_brow() {
|
||||
var _isi = new String('<div id="divBrowPending"> </div>');
|
||||
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);
|
||||
$('#No_Beli').val(acell[0]);
|
||||
this.data_query('master', 'pending-edit');
|
||||
},
|
||||
|
||||
pending_delete: function(acell){
|
||||
pending_delete(acell) {
|
||||
FoniaJS.closeWindow(this.winBPending);
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
|
||||
$('#No_Beli').val(acell[0]);
|
||||
@@ -145,7 +145,7 @@ var BeliJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
if ($('#SupID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Supplier !");
|
||||
return;
|
||||
@@ -173,12 +173,12 @@ var BeliJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
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({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
|
||||
@@ -236,7 +236,7 @@ var BeliJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if ($('#SupID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Supplier !");
|
||||
return;
|
||||
@@ -244,13 +244,13 @@ var BeliJS = {
|
||||
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]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]],
|
||||
onSuccess: () => {
|
||||
@@ -261,13 +261,13 @@ var BeliJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#InvID').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
return;
|
||||
}
|
||||
var _mdetail = $('#mode_detail').val();
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => {
|
||||
@@ -278,7 +278,7 @@ var BeliJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
total_show: function(){
|
||||
total_show() {
|
||||
if (['add','edit'].indexOf($('#mode').val()) == -1) return false;
|
||||
new Request({
|
||||
url: this.PHP + '/form_total',
|
||||
@@ -302,14 +302,14 @@ var BeliJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
total_simpan: function(){
|
||||
total_simpan() {
|
||||
$('#Real_Diskon').val(FoniaJS.StrToFloat($('#popTotal_Diskon').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));
|
||||
FoniaJS.closeWindow(this.winTotal);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
mode = (mode) ? mode : '';
|
||||
var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
@@ -358,7 +358,7 @@ var BeliJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','No_Beli'],
|
||||
onSuccess: () => {
|
||||
@@ -367,18 +367,18 @@ var BeliJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-pending"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_pending',
|
||||
sendParam: ['Cari_Pending']
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk','Filter_Browse','SupID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -386,7 +386,7 @@ var BeliJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
var adata = item.data.split(':');
|
||||
$('#InvID').val(item.value);
|
||||
$('#SatuanID').val(adata[0]);
|
||||
@@ -398,7 +398,7 @@ var BeliJS = {
|
||||
BeliJS.update_Items();
|
||||
},
|
||||
|
||||
update_Items: function(){
|
||||
update_Items() {
|
||||
new Request({
|
||||
url: this.PHP + '/item_detail',
|
||||
sendParam: ['InvID','SatuanID','SupID'],
|
||||
@@ -419,14 +419,14 @@ var BeliJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
update_Varian: function(){
|
||||
new Request.JSONF({
|
||||
update_Varian() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/option_varian',
|
||||
sendParam: ['InvID','SatuanID','VarianID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
Hitung_Detail: function(){
|
||||
Hitung_Detail() {
|
||||
var dqty = FoniaJS.StrToFloat($('#Qty').val());
|
||||
var dharga = FoniaJS.StrToFloat($('#Harga_Beli').val());
|
||||
var ddiskrp = FoniaJS.StrToFloat($('#Disk_Rupiah').val());
|
||||
|
||||
@@ -14,7 +14,7 @@ var BeliReturJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -24,7 +24,7 @@ var BeliReturJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -41,17 +41,17 @@ var BeliReturJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_Beli').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_Beli').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ var BeliReturJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_Beli').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ var BeliReturJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Cabang !");
|
||||
return;
|
||||
@@ -95,24 +95,24 @@ var BeliReturJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_Beli').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(prt){
|
||||
tx_print(prt) {
|
||||
if ($('#No_Beli').val()) {
|
||||
var cetak = new Printer('report/nota/beli_retur');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Beli').val());
|
||||
let cetak = new Printer('report/nota/beli_retur')
|
||||
.addParam("Nomor_Cetak", $('#No_Beli').val());
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
if ($('#CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Cabang !");
|
||||
return;
|
||||
@@ -133,12 +133,12 @@ var BeliReturJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
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({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
|
||||
@@ -168,7 +168,7 @@ var BeliReturJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if ($('#SupID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Supplier !");
|
||||
return;
|
||||
@@ -176,26 +176,26 @@ var BeliReturJS = {
|
||||
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]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#InvID').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
return;
|
||||
}
|
||||
var _mdetail = $('#mode_detail').val();
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'],
|
||||
onSuccess: () => {
|
||||
@@ -204,7 +204,7 @@ var BeliReturJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
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'];
|
||||
@@ -242,18 +242,18 @@ var BeliReturJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','No_Beli']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['CabID','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(':');
|
||||
$('#InvID').val(item.value);
|
||||
$('#SatuanID').val(adata[0]);
|
||||
@@ -273,14 +273,14 @@ var BeliReturJS = {
|
||||
FoniaJS.setFocus('#Qty');
|
||||
},
|
||||
|
||||
update_Varian: function(){
|
||||
new Request.JSONF({
|
||||
update_Varian() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/option_varian',
|
||||
sendParam: ['InvID','SatuanID','VarianID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
Hitung_Detail: function(){
|
||||
Hitung_Detail() {
|
||||
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ var CekHargaJS = {
|
||||
KODE: '',
|
||||
html5QrcodeScanner: null,
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butBrow').click(() => this.produk_brow());
|
||||
if (FoniaJS.WEB_MOBILE){
|
||||
html5QrcodeScanner = new Html5Qrcode('qr-reader');
|
||||
@@ -26,7 +26,7 @@ var CekHargaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
ScanSukses: function(decodedText, decodedResult){
|
||||
ScanSukses(decodedText, decodedResult) {
|
||||
new Request({
|
||||
url: CekHargaJS.PHP + '/scan_produk',
|
||||
sendParam: ['Cari_Produk='+decodedText],
|
||||
@@ -41,7 +41,7 @@ var CekHargaJS = {
|
||||
}).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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -58,7 +58,7 @@ var CekHargaJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#Kode_Barang').val(acell[1]+' / '+acell[2]);
|
||||
@@ -68,9 +68,9 @@ var CekHargaJS = {
|
||||
this.update_Sup();
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['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(':');
|
||||
$('#InvID').val(item.value);
|
||||
$('#Nama_Barang').val(item.text);
|
||||
@@ -89,9 +89,9 @@ var CekHargaJS = {
|
||||
CekHargaJS.update_Sup();
|
||||
},
|
||||
|
||||
update_Sup: function(){
|
||||
update_Sup() {
|
||||
if (parseInt($('#InvID').val()) == 0) return false;
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/update_sup',
|
||||
sendParam: ['InvID']
|
||||
}).send();
|
||||
+41
-41
@@ -14,7 +14,7 @@ var JualJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -27,7 +27,7 @@ var JualJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -44,17 +44,17 @@ var JualJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_Jual').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_Jual').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -66,7 +66,7 @@ var JualJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Jual').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_Jual').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -90,7 +90,7 @@ var JualJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(mode){
|
||||
tx_simpan(mode) {
|
||||
if ($('#MemberID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
return;
|
||||
@@ -102,44 +102,44 @@ var JualJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_Jual').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(prt){
|
||||
tx_print(prt) {
|
||||
if ($('#No_Jual').val()) {
|
||||
var cetak = new Printer('report/nota/jual');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Jual').val());
|
||||
let cetak = new Printer('report/nota/jual')
|
||||
.addParam("Nomor_Cetak", $('#No_Jual').val());
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
tx_print_pos: function(){
|
||||
tx_print_pos() {
|
||||
if ($('#No_Jual').val()) {
|
||||
var cetak = new PrinterPos('report/nota/pos');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Jual').val());
|
||||
cetak.exec();
|
||||
new PrinterPos('report/nota/pos')
|
||||
.addParam("Nomor_Cetak", $('#No_Jual').val())
|
||||
.exec();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
pending_brow: function(){
|
||||
pending_brow() {
|
||||
this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Penjualan', '<div id="divBrowPending"> </div>', 'xl', '', () => this.data_query('brow-pending'));
|
||||
},
|
||||
|
||||
pending_select: function(acell){
|
||||
pending_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBPending);
|
||||
$('#No_Jual').val(acell[0]);
|
||||
this.data_query('master', 'pending-edit');
|
||||
},
|
||||
|
||||
pending_delete: function(acell){
|
||||
pending_delete(acell) {
|
||||
FoniaJS.closeWindow(this.winBPending);
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
|
||||
$('#No_Jual').val(acell[0]);
|
||||
@@ -147,7 +147,7 @@ var JualJS = {
|
||||
}, '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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -164,7 +164,7 @@ var JualJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Grup_MemberID').val(acell[1]);
|
||||
@@ -172,7 +172,7 @@ var JualJS = {
|
||||
this.update_Piutang();
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
if ($('#MemberID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
return;
|
||||
@@ -193,12 +193,12 @@ var JualJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
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){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
FoniaJS.setFocus('Nama_Member');
|
||||
@@ -231,13 +231,13 @@ var JualJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
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> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','No_Jual','ID='+acell[0]],
|
||||
onSuccess: () => $('#Nama_Produk').focus()
|
||||
@@ -245,12 +245,12 @@ var JualJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) {
|
||||
FoniaJS.showInfo('Nilai Diskon diluar batas !');
|
||||
return false;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
|
||||
onSuccess: () => {
|
||||
@@ -260,7 +260,7 @@ var JualJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
mode = (mode) ? mode : '';
|
||||
var sparam = ['mode='+mode,'No_Jual'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
@@ -271,7 +271,7 @@ var JualJS = {
|
||||
onSuccess: (ajson) => {
|
||||
$('#divTXMaster').html(ajson.html);
|
||||
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());
|
||||
$('#POS_Qty').on({
|
||||
keyup: (e) => {
|
||||
@@ -324,28 +324,28 @@ var JualJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','No_Jual']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-pending"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_pending',
|
||||
}).send();
|
||||
} else if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk','Grup_MemberID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -353,13 +353,13 @@ var JualJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
$('#Grup_MemberID').val(item.data);
|
||||
JualJS.update_Piutang();
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
|
||||
var adata = item.data.split(':');
|
||||
// M : Grup_Member
|
||||
@@ -371,7 +371,7 @@ var JualJS = {
|
||||
// P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok
|
||||
//todo: jika stok kosong tidak simpan !!
|
||||
//if (parseInt(adata[5])>0 || _qty<0){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
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]],
|
||||
onSuccess: () => $('#POS_Qty').val('1.00')
|
||||
@@ -385,15 +385,15 @@ var JualJS = {
|
||||
$('#Nama_Produk').val('').focus();
|
||||
},
|
||||
|
||||
update_Piutang: function(){
|
||||
new Request.JSONF({
|
||||
update_Piutang() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/update_piutang',
|
||||
sendParam: ['MemberID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
|
||||
}).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==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));
|
||||
|
||||
+30
-30
@@ -14,7 +14,7 @@ var MutasiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -25,7 +25,7 @@ var MutasiJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -42,17 +42,17 @@ var MutasiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_Mutasi').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_Mutasi').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -60,7 +60,7 @@ var MutasiJS = {
|
||||
FoniaJS.showAuth(function(){this.data_query('master', 'edit')}.bind(this), this, 'EDIT '+$('#No_Mutasi').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_Mutasi').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -84,7 +84,7 @@ var MutasiJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Dari_CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Dari Cabang !");
|
||||
return;
|
||||
@@ -100,34 +100,34 @@ var MutasiJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_Mutasi').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(prt){
|
||||
tx_print(prt) {
|
||||
if ($('#No_Mutasi').val()) {
|
||||
var cetak = new Printer('report/nota/mutasi');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val());
|
||||
let cetak = new Printer('report/nota/mutasi')
|
||||
.addParam("Nomor_Cetak", $('#No_Mutasi').val());
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
tx_print_pos: function(){
|
||||
tx_print_pos() {
|
||||
if ($('#No_Mutasi').val()) {
|
||||
var cetak = new PrinterPos('report/nota/mutasi_pos');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val());
|
||||
cetak.exec();
|
||||
new PrinterPos('report/nota/mutasi_pos')
|
||||
.addParam("Nomor_Cetak", $('#No_Mutasi').val())
|
||||
.exec();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
if ($('#Dari_CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Dari Cabang !");
|
||||
return;
|
||||
@@ -148,12 +148,12 @@ var MutasiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
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({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode','mode_detail='+mode,'No_Mutasi','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
|
||||
@@ -174,13 +174,13 @@ var MutasiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
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> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','No_Mutasi','ID='+acell[0]],
|
||||
onSuccess: () => $('#Nama_Produk').focus()
|
||||
@@ -188,8 +188,8 @@ var MutasiJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
new Request.JSONF({
|
||||
detail_simpan() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','No_Mutasi','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Dari_CabID','Ke_CabID'],
|
||||
onSuccess: () => {
|
||||
@@ -199,7 +199,7 @@ var MutasiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
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'];
|
||||
@@ -249,18 +249,18 @@ var MutasiJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','No_Mutasi']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk','Dari_CabID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -268,7 +268,7 @@ var MutasiJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
if ($('#Dari_CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Dari Cabang !");
|
||||
return;
|
||||
@@ -276,7 +276,7 @@ var MutasiJS = {
|
||||
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
|
||||
var adata = item.data.split(':');
|
||||
// Satuan : Varian : Harga_Pokok
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
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]],
|
||||
onSuccess: () => $('#POS_Qty').val('1.00')
|
||||
@@ -284,7 +284,7 @@ var MutasiJS = {
|
||||
$('#Nama_Produk').val('').focus();
|
||||
},
|
||||
|
||||
Hitung_Detail: function(){
|
||||
Hitung_Detail() {
|
||||
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
|
||||
}
|
||||
|
||||
|
||||
+25
-25
@@ -14,7 +14,7 @@ var OpnameJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -24,7 +24,7 @@ var OpnameJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -41,17 +41,17 @@ var OpnameJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_Opname').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_Opname').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ var OpnameJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Opname').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_Opname').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ var OpnameJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Cabang !");
|
||||
return;
|
||||
@@ -91,24 +91,24 @@ var OpnameJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_Opname').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(prt){
|
||||
tx_print(prt) {
|
||||
if ($('#No_Opname').val()) {
|
||||
var cetak = new Printer('report/nota/opname');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Opname').val());
|
||||
let cetak = new Printer('report/nota/opname')
|
||||
.addParam("Nomor_Cetak", $('#No_Opname').val());
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
if ($('#CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Cabang !");
|
||||
return;
|
||||
@@ -129,12 +129,12 @@ var OpnameJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
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({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode','mode_detail='+mode,'No_Opname','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianIID='+VarianID],
|
||||
@@ -157,7 +157,7 @@ var OpnameJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if ($('#CabID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Cabang !");
|
||||
return;
|
||||
@@ -165,26 +165,26 @@ var OpnameJS = {
|
||||
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]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','No_Opname','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#InvID').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
return;
|
||||
}
|
||||
var _mdetail = $('#mode_detail').val();
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','No_Opname','CabID','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'],
|
||||
onSuccess: () => {
|
||||
@@ -193,7 +193,7 @@ var OpnameJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
var sparam = ['mode='+mode,'No_Opname'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Opname','Tgl_Opname','CabID','Catatan'];
|
||||
@@ -231,18 +231,18 @@ var OpnameJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','No_Opname']
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['CabID','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(':');
|
||||
// Satuan : Varian : Harga_Pokok : Satuan : Stok
|
||||
$('#InvID').val(item.value);
|
||||
|
||||
@@ -15,11 +15,10 @@ var OpnameBarangJS = {
|
||||
KODE: '',
|
||||
html5QrcodeScanner: null,
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
$('#butBrow').click(() => this.produk_brow());
|
||||
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.start({ facingMode: 'environment' }, { fps: 10, qrbox: 250 }, OpnameBarangJS.ScanSukses);
|
||||
} else {
|
||||
@@ -28,7 +27,7 @@ var OpnameBarangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Produk!');
|
||||
return;
|
||||
@@ -39,7 +38,7 @@ var OpnameBarangJS = {
|
||||
onSuccess: (ajson) => {
|
||||
if (ajson.status === true){
|
||||
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('');
|
||||
$('#Stok_Sistem, #Stok_Fisik').val('0.00');
|
||||
if (FoniaJS.WEB_MOBILE){
|
||||
@@ -50,7 +49,7 @@ var OpnameBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
ScanSukses: function(decodedText, decodedResult){
|
||||
ScanSukses(decodedText, decodedResult) {
|
||||
new Request({
|
||||
url: OpnameBarangJS.PHP + '/scan_produk',
|
||||
sendParam: ['Cari_Produk='+decodedText],
|
||||
@@ -70,7 +69,7 @@ var OpnameBarangJS = {
|
||||
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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -87,7 +86,7 @@ var OpnameBarangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#SatuanID').val(acell[1]);
|
||||
@@ -101,9 +100,9 @@ var OpnameBarangJS = {
|
||||
FoniaJS.setFocus('#Stok_Fisik');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -111,7 +110,7 @@ var OpnameBarangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
// Cari by SKU + Barcode
|
||||
// Satuan : Varian : SKU + Barcode : Harga_Pokok : Satuan : PPN : Stok
|
||||
var adata = item.data.split(':');
|
||||
|
||||
+46
-47
@@ -17,8 +17,8 @@ var POSJS = {
|
||||
POLE_CONF: {},
|
||||
Simpan: false,
|
||||
|
||||
index: function(){
|
||||
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','Grup_MemberID'], {'selectFunc': this.Produk_Comp, 'keyFunc': this.Produk_Key});
|
||||
index() {
|
||||
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());
|
||||
$('#POS_Qty').on({
|
||||
keyup: (e) => {
|
||||
@@ -34,20 +34,19 @@ var POSJS = {
|
||||
this.data_query('config-pole');
|
||||
},
|
||||
|
||||
proses_oc: function(){
|
||||
var cetak = new PrinterPos('report/nota/open_cash');
|
||||
cetak.exec();
|
||||
proses_oc() {
|
||||
new PrinterPos('report/nota/open_cash').exec();
|
||||
$('#Nama_Produk').focus();
|
||||
},
|
||||
|
||||
proses_print: function(oc){
|
||||
var cetak = new PrinterPos('report/nota/pos');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Cetak').val());
|
||||
cetak.add_param("Open_Cash", oc);
|
||||
cetak.exec();
|
||||
proses_print(oc) {
|
||||
new PrinterPos('report/nota/pos')
|
||||
.addParam("Nomor_Cetak", $('#No_Cetak').val())
|
||||
.addParam("Open_Cash", oc)
|
||||
.exec();
|
||||
},
|
||||
|
||||
proses_cancel: function(){
|
||||
proses_cancel() {
|
||||
if ($('#Total_Item').val()==0) {
|
||||
FoniaJS.showInfo('Tidak ada item barang !');
|
||||
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');
|
||||
},
|
||||
|
||||
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"> </div>');
|
||||
this.winBNota = FoniaJS.showWindow('BNota', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBNota')
|
||||
@@ -72,7 +71,7 @@ var POSJS = {
|
||||
});
|
||||
},
|
||||
|
||||
nota_print: function(acell){
|
||||
nota_print(acell) {
|
||||
FoniaJS.closeWindow(this.winBNota);
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
|
||||
$('#No_Cetak').val(acell[0]);
|
||||
@@ -80,7 +79,7 @@ var POSJS = {
|
||||
}, 'info');
|
||||
},
|
||||
|
||||
nota_select: function(acell){
|
||||
nota_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBNota);
|
||||
FoniaJS.showAuth(() => {
|
||||
$('#No_Jual').val(acell[0]);
|
||||
@@ -88,7 +87,7 @@ var POSJS = {
|
||||
}, this, 'EDIT POS : '+acell[0]);
|
||||
},
|
||||
|
||||
nota_delete: function(acell){
|
||||
nota_delete(acell) {
|
||||
FoniaJS.closeWindow(this.winBNota);
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
|
||||
FoniaJS.showAuth(() => {
|
||||
@@ -98,17 +97,17 @@ var POSJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
pending_brow: function(){
|
||||
pending_brow() {
|
||||
this.winBPend = FoniaJS.showWindow('BPend', 'Daftar Pending POS', '<div id="divBrowPending"> </div>', 'xl', '', () => this.data_query('brow-pending'));
|
||||
},
|
||||
|
||||
pending_select: function(acell){
|
||||
pending_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBPend);
|
||||
$('#No_Jual').val(acell[0]);
|
||||
this.data_query('master', 'pending-edit');
|
||||
},
|
||||
|
||||
pending_delete: function(acell){
|
||||
pending_delete(acell) {
|
||||
FoniaJS.closeWindow(this.winBPend);
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
|
||||
$('#No_Jual').val(acell[0]);
|
||||
@@ -116,7 +115,7 @@ var POSJS = {
|
||||
}, '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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -133,7 +132,7 @@ var POSJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Grup_MemberID').val(acell[1]);
|
||||
@@ -142,7 +141,7 @@ var POSJS = {
|
||||
$('#Nama_Produk').focus();
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
produk_brow() {
|
||||
if ($('#MemberID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
FoniaJS.setFocus('Nama_Member');
|
||||
@@ -164,12 +163,12 @@ var POSJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
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){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
FoniaJS.setFocus('Nama_Member');
|
||||
@@ -202,12 +201,12 @@ var POSJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
new Request.JSONF({
|
||||
detail_hapus(acell) {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]],
|
||||
onSuccess: () => {
|
||||
@@ -220,12 +219,12 @@ var POSJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) {
|
||||
FoniaJS.showInfo('Nilai Diskon diluar batas !');
|
||||
return false;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
|
||||
onSuccess: () => {
|
||||
@@ -239,7 +238,7 @@ var POSJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
kasir_show: function(){
|
||||
kasir_show() {
|
||||
if ($('#MemberID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
FoniaJS.setFocus('Nama_Member');
|
||||
@@ -263,26 +262,26 @@ var POSJS = {
|
||||
$('#butKBatal').click(() => $('#Nama_Produk').focus());
|
||||
$('#popTotal_Tunai').keyup((e) => {
|
||||
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) {
|
||||
FoniaJS.closeWindow(this.winKasir);
|
||||
$('#Nama_Produk').focus();
|
||||
}
|
||||
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();
|
||||
});
|
||||
$('#popTotal_Kartu').keyup((e) => {
|
||||
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) {
|
||||
FoniaJS.closeWindow(this.winKasir);
|
||||
$('#Nama_Produk').focus();
|
||||
}
|
||||
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();
|
||||
});
|
||||
$('#popKartuID').change(() => {
|
||||
@@ -310,14 +309,14 @@ var POSJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
kasir_hitung: function(){
|
||||
kasir_hitung() {
|
||||
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
|
||||
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
|
||||
$('#popTotal_Bayar').val(totBayar);
|
||||
$('#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 totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
|
||||
const jenKartu = $('#popKartuID').val();
|
||||
@@ -350,12 +349,12 @@ var POSJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
kasir_pending: function(){
|
||||
kasir_pending() {
|
||||
FoniaJS.closeWindow(this.winKasir);
|
||||
this.data_query('master', 'pending-save');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=='master'){
|
||||
mode = (mode) ? mode : '';
|
||||
var sparam = ['mode='+mode,'No_Jual','No_Cetak'];
|
||||
@@ -392,28 +391,28 @@ var POSJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=='detail'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['No_Jual']
|
||||
}).send();
|
||||
} else if (tipe=='brow-nota'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_nota',
|
||||
sendParam: ['Cari_Nota'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Nota')
|
||||
}).send();
|
||||
} else if (tipe=='brow-pending'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_pending',
|
||||
}).send();
|
||||
} else if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
}).send();
|
||||
} else if (tipe=='brow-produk'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk','Grup_MemberID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -434,7 +433,7 @@ var POSJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
var adata = item.data.split(':');
|
||||
$('#MemberID').val(item.value);
|
||||
$('#Grup_MemberID').val(adata[0]);
|
||||
@@ -442,7 +441,7 @@ var POSJS = {
|
||||
$('#Nama_Produk').focus();
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
|
||||
var adata = item.data.split(':');
|
||||
// M : Grup_Member : Info_Member
|
||||
@@ -455,7 +454,7 @@ var POSJS = {
|
||||
// P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok
|
||||
//todo: jika stok kosong tidak simpan !!
|
||||
//if (parseInt(adata[5])>0 || _qty<0){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
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]],
|
||||
onSuccess: () => {
|
||||
@@ -475,7 +474,7 @@ var POSJS = {
|
||||
$('#Nama_Produk').val('').focus();
|
||||
},
|
||||
|
||||
Produk_Key: function(key, val){
|
||||
Produk_Key(key, val) {
|
||||
if (key == 13) {
|
||||
POSJS.kasir_show();
|
||||
} 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==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));
|
||||
|
||||
@@ -43,7 +43,7 @@ $(document).ready(function(){
|
||||
|
||||
var LoginJS = {
|
||||
|
||||
Tampil_Login: function(){
|
||||
Tampil_Login() {
|
||||
var Username = FoniaJS.getCookie('Username');
|
||||
if (Username != '') {
|
||||
$('#Username').val(Username);
|
||||
@@ -53,7 +53,7 @@ var LoginJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Proses_Login: function(){
|
||||
Proses_Login() {
|
||||
if (!$('#Username').val()){
|
||||
$('#Username').focus();
|
||||
FoniaJS.showError('Silahkan masukkan Username !');
|
||||
|
||||
@@ -14,17 +14,17 @@ var MemberBaruJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butTambah').click(() => this.proses_add());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('view');
|
||||
},
|
||||
|
||||
proses_add: function(){
|
||||
proses_add() {
|
||||
this.data_query('add');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
new Request({
|
||||
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'],
|
||||
@@ -39,7 +39,7 @@ var MemberBaruJS = {
|
||||
}).send()
|
||||
},
|
||||
|
||||
data_query: function(mode){
|
||||
data_query(mode) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
sendParam: ['mode='+mode],
|
||||
|
||||
@@ -15,7 +15,7 @@ var MemberPointJS = {
|
||||
KODE: '',
|
||||
html5QrcodeScanner: null,
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butBrow').click(() => this.member_brow());
|
||||
if (FoniaJS.WEB_MOBILE){
|
||||
html5QrcodeScanner = new Html5Qrcode('qr-reader');
|
||||
@@ -27,7 +27,7 @@ var MemberPointJS = {
|
||||
this.data_query('table-point');
|
||||
},
|
||||
|
||||
ScanSukses: function(decodedText, decodedResult){
|
||||
ScanSukses(decodedText, decodedResult) {
|
||||
new Request({
|
||||
url: MemberPointJS.PHP + '/scan_member',
|
||||
sendParam: ['Cari_Member='+decodedText],
|
||||
@@ -41,7 +41,7 @@ var MemberPointJS = {
|
||||
}).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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -58,7 +58,7 @@ var MemberPointJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Kode_Member').val(acell[1]);
|
||||
@@ -67,14 +67,14 @@ var MemberPointJS = {
|
||||
this.data_query('table-point');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="table-point"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_point',
|
||||
sendParam: ['MemberID']
|
||||
}).send();
|
||||
} else if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['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(':');
|
||||
$('#MemberID').val(item.value);
|
||||
$('#Kode_Member').val(adata[0]);
|
||||
|
||||
+24
-24
@@ -14,7 +14,7 @@ var MemberTukarJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -24,7 +24,7 @@ var MemberTukarJS = {
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -41,17 +41,17 @@ var MemberTukarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_TX').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_TX').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ var MemberTukarJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_TX').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_TX').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ var MemberTukarJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Point_TipeID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
@@ -109,24 +109,24 @@ var MemberTukarJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_TX').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(){
|
||||
tx_print() {
|
||||
if ($('#No_TX').val()) {
|
||||
var cetak = new PrinterPos('report/nota/tukarpoint_pos');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_TX').val());
|
||||
cetak.exec();
|
||||
new PrinterPos('report/nota/tukarpoint_pos')
|
||||
.addParam("Nomor_Cetak", $('#No_TX').val())
|
||||
.exec();
|
||||
return;
|
||||
}
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
},
|
||||
|
||||
member_brow: function(){
|
||||
member_brow() {
|
||||
if ($('#Point_TipeID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
@@ -147,14 +147,14 @@ var MemberTukarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[3]);
|
||||
$('#Sisa_Point').val(acell[6]);
|
||||
},
|
||||
|
||||
barang_brow: function(){
|
||||
barang_brow() {
|
||||
if ($('#Point_TipeID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
@@ -175,7 +175,7 @@ var MemberTukarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
barang_select: function(acell){
|
||||
barang_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBBarang);
|
||||
$('#InvPID').val(acell[0]);
|
||||
$('#Nama_Barang').val(acell[2]);
|
||||
@@ -185,7 +185,7 @@ var MemberTukarJS = {
|
||||
this.Hitung_Point();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
mode = (mode) ? mode : '';
|
||||
var sparam = ['mode='+mode,'No_TX'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
@@ -238,18 +238,18 @@ var MemberTukarJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="brow-tx"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_tx',
|
||||
sendParam: ['Cari_TX'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_TX')
|
||||
}).send();
|
||||
} else if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member','Point_TipeID']
|
||||
}).send();
|
||||
} else if (tipe=="brow-barang"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_barang',
|
||||
sendParam: ['Cari_Barang','Point_TipeID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Barang')
|
||||
@@ -257,13 +257,13 @@ var MemberTukarJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
$('#Sisa_Point').val(item.data);
|
||||
$('#Nama_Barang').focus();
|
||||
},
|
||||
|
||||
Barang_Comp: function(item){
|
||||
Barang_Comp(item) {
|
||||
var adata = item.data.split(':');
|
||||
$('#InvPID').val(item.value);
|
||||
$('#Nilai_Barang').val(adata[1]);
|
||||
@@ -273,11 +273,11 @@ var MemberTukarJS = {
|
||||
this.Hitung_Point();
|
||||
},
|
||||
|
||||
oc_Tipe: function(){
|
||||
oc_Tipe() {
|
||||
//
|
||||
},
|
||||
|
||||
Hitung_Point: function(){
|
||||
Hitung_Point() {
|
||||
var qty = FoniaJS.StrToFloat($('#Qty').val());
|
||||
var point = FoniaJS.StrToFloat($('#Point').val());
|
||||
$('#Nilai_Point').val(FoniaJS.FloatToStr(qty * point,0));
|
||||
|
||||
@@ -56,7 +56,7 @@ var MonJS = {
|
||||
ID_CABANG: 0,
|
||||
TOTAL_SHOP: 0,
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
new Request({
|
||||
url: this.PHP + '/index',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -70,31 +70,31 @@ var MonJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
hide_pos: function(){
|
||||
hide_pos() {
|
||||
this.ISSHOW_POS = false;
|
||||
$('#divBanner').removeClass('d-none');
|
||||
$('#divShop').addClass('d-none');
|
||||
},
|
||||
|
||||
show_pos: function(){
|
||||
show_pos() {
|
||||
this.ISSHOW_POS = true;
|
||||
$('#divBanner').addClass('d-none');
|
||||
$('#divShop').removeClass('d-none');
|
||||
this.data_query('shop');
|
||||
},
|
||||
|
||||
hide_thank: function(){
|
||||
hide_thank() {
|
||||
$('#divBlur').addClass('d-none');
|
||||
$('#divThank').addClass('d-none');
|
||||
},
|
||||
|
||||
show_thank: function(){
|
||||
show_thank() {
|
||||
$('#divBlur').removeClass('d-none');
|
||||
$('#divThank').removeClass('d-none');
|
||||
this.data_query('thank');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe == 'config'){
|
||||
$.post(this.PHP + '/config', {}, (ajson) => {
|
||||
if (ajson.PROMO_DURASI) MonJS.DEF_PROMO_DUR = ajson.PROMO_DURASI;
|
||||
|
||||
+17
-17
@@ -14,7 +14,7 @@ var PPOBTXJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('tabel-detail');
|
||||
$('#Cari_TX').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,44 +28,44 @@ var PPOBTXJS = {
|
||||
FoniaJS.setFocus('#Cari_TX');
|
||||
},
|
||||
|
||||
proses_print: function(oc, no_cetak){
|
||||
var cetak = new PrinterPos('report/nota/ppob');
|
||||
cetak.add_param("Nomor_Cetak", no_cetak);
|
||||
cetak.add_param("Open_Cash", oc);
|
||||
cetak.exec();
|
||||
proses_print(oc, no_cetak) {
|
||||
new PrinterPos('report/nota/ppob')
|
||||
.addParam("Nomor_Cetak", no_cetak)
|
||||
.addParam("Open_Cash", oc)
|
||||
.exec();
|
||||
},
|
||||
|
||||
proses_delete: function(no_tx){
|
||||
new Request.JSONF({
|
||||
proses_delete(no_tx) {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_reproc: function(no_tx){
|
||||
new Request.JSONF({
|
||||
proses_reproc(no_tx) {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
|
||||
}).send();
|
||||
},
|
||||
|
||||
nota_print: function(acell){
|
||||
nota_print(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
|
||||
this.proses_print(0, acell[0]);
|
||||
}, 'info');
|
||||
},
|
||||
|
||||
nota_delete: function(acell){
|
||||
nota_delete(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
|
||||
FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]);
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
nota_reproc: function(acell){
|
||||
nota_reproc(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning');
|
||||
},
|
||||
|
||||
nota_detail: function(acell){
|
||||
nota_detail(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_tx',
|
||||
sendParam: ['No_TX='+acell[0]],
|
||||
@@ -75,7 +75,7 @@ var PPOBTXJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
saldo_ppob: function(){
|
||||
saldo_ppob() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_saldo',
|
||||
onSuccess: (adata) => {
|
||||
@@ -85,9 +85,9 @@ var PPOBTXJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['Tgl_From','Tgl_To','Cari_TX']
|
||||
}).send();
|
||||
|
||||
@@ -19,7 +19,7 @@ var PrabayarJS = {
|
||||
KATE_PREFIX: [1,2,3,4],
|
||||
KATE_TOKEN: [5],
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#Cari_PPOB').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('tabel-tx');
|
||||
@@ -34,39 +34,39 @@ var PrabayarJS = {
|
||||
this.data_query('pole-config');
|
||||
},
|
||||
|
||||
proses_print: function(oc, no_cetak){
|
||||
var cetak = new PrinterPos('apps/php/repo/nota.php');
|
||||
cetak.add_param("data", "ppob-pos");
|
||||
cetak.add_param("Nomor_Cetak", no_cetak);
|
||||
cetak.add_param("Open_Cash", oc);
|
||||
cetak.exec();
|
||||
proses_print(oc, no_cetak) {
|
||||
new PrinterPos('apps/php/repo/nota.php')
|
||||
.addParam("data", "ppob-pos")
|
||||
.addParam("Nomor_Cetak", no_cetak)
|
||||
.addParam("Open_Cash", oc)
|
||||
.exec();
|
||||
},
|
||||
|
||||
proses_delete: function(){
|
||||
new Request.JSONF({
|
||||
proses_delete() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['mode_detail=delete','No_TX']
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_reproc: function(ft){
|
||||
new Request.JSONF({
|
||||
proses_reproc(ft) {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['mode_detail=reproc','No_TX','FT='+ft]
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_cancel: function(){
|
||||
proses_cancel() {
|
||||
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]+'" ?', () => {
|
||||
this.proses_print(0, acell[0]);
|
||||
}, 'info');
|
||||
},
|
||||
|
||||
nota_delete: function(acell){
|
||||
nota_delete(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
|
||||
FoniaJS.showAuth(() => {
|
||||
$('#No_TX').val(acell[0]);
|
||||
@@ -75,14 +75,14 @@ var PrabayarJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
nota_reproc: function(acell){
|
||||
nota_reproc(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => {
|
||||
$('#No_TX').val(acell[0]);
|
||||
this.proses_reproc();
|
||||
}, 'warning');
|
||||
},
|
||||
|
||||
nota_detail: function(acell){
|
||||
nota_detail(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_tx',
|
||||
sendParam: ['No_TX='+acell[0]],
|
||||
@@ -92,7 +92,7 @@ var PrabayarJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
kasir_show: function(){
|
||||
kasir_show() {
|
||||
if ($('#Tujuan').val()=='') {
|
||||
FoniaJS.showInfo('Silahkan masukkan Nomor Tujuan !');
|
||||
FoniaJS.setFocus('#Tujuan');
|
||||
@@ -163,14 +163,14 @@ var PrabayarJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
kasir_hitung: function(){
|
||||
kasir_hitung() {
|
||||
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
|
||||
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
|
||||
$('#popTotal_Bayar').val(totBayar);
|
||||
$('#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 totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
|
||||
const jenKartu = $('#popKartuID').val();
|
||||
@@ -203,7 +203,7 @@ var PrabayarJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=='master'){
|
||||
mode = (mode) ? mode : '';
|
||||
var sparam = ['mode='+mode,'No_TX'];
|
||||
@@ -246,7 +246,7 @@ var PrabayarJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=='tabel-tx'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_tx',
|
||||
sendParam: ['Cari_PPOB']
|
||||
}).send();
|
||||
@@ -266,7 +266,7 @@ var PrabayarJS = {
|
||||
}
|
||||
},
|
||||
|
||||
oc_KateID: function(){
|
||||
oc_KateID() {
|
||||
if ($.inArray(parseInt($('#KateID').val()), this.KATE_TOKEN) !== -1) {
|
||||
$('.rowToken').removeClass('d-none');
|
||||
$('.rowPulsa').addClass('d-none');
|
||||
@@ -274,30 +274,30 @@ var PrabayarJS = {
|
||||
$('.rowToken').addClass('d-none');
|
||||
$('.rowPulsa').removeClass('d-none');
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/option_operator',
|
||||
sendParam: ['KateID'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Tujuan: function(){
|
||||
oc_Tujuan() {
|
||||
if ($('#Tujuan').val()=='') return false;
|
||||
if ($.inArray(parseInt($('#KateID').val()), this.KATE_PREFIX) === -1) return false;
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/option_operator',
|
||||
sendParam: ['KateID','Tujuan'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_OpeID: function(){
|
||||
oc_OpeID() {
|
||||
if ($('#OpeID').val()==0) return false;
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/option_produk',
|
||||
sendParam: ['KateID','OpeID'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_ProdukID: function(){
|
||||
oc_ProdukID() {
|
||||
const obj = $('#ProdukID');
|
||||
var harga = $(obj).find(":selected").attr('olabel');
|
||||
$('#Harga_Jual').val(harga);
|
||||
|
||||
@@ -14,7 +14,7 @@ var TopupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('tabel-detail');
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#Cari_Topup').keydown((e) => {
|
||||
@@ -29,11 +29,11 @@ var TopupJS = {
|
||||
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');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_topup',
|
||||
onSuccess: (a) => {
|
||||
@@ -46,22 +46,22 @@ var TopupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if (parseInt($('#Jumlah').val())==0) {
|
||||
FoniaJS.showError('Silakan isi Jumlah lebih dari NOL !');
|
||||
$('#Jumlah').focus();
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=insert','Tgl_Depo','Jumlah','Bank'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winDetail)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Topup']
|
||||
}).send();
|
||||
|
||||
+16
-16
@@ -14,7 +14,7 @@ var PromoBarangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Promo').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PromoBarangJS = {
|
||||
FoniaJS.setFocus('#Cari_Promo');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_promo',
|
||||
sendParam: ['mode_detail='+mode,'PromoID='+ID],
|
||||
@@ -49,17 +49,17 @@ var PromoBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_promo',
|
||||
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -67,8 +67,8 @@ var PromoBarangJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => {
|
||||
@@ -78,7 +78,7 @@ var PromoBarangJS = {
|
||||
}).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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -96,7 +96,7 @@ var PromoBarangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
var itipe = parseInt($('#Tipe_Brow').val());
|
||||
if (itipe == 1){
|
||||
@@ -110,14 +110,14 @@ var PromoBarangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_promo',
|
||||
sendParam: ['Cari_Promo']
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['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');
|
||||
elSatuan.empty();
|
||||
if (InvID==0) return false;
|
||||
@@ -141,7 +141,7 @@ var PromoBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_PilihQ: function(){
|
||||
oc_PilihQ() {
|
||||
var i = parseInt($('#Pilih_Qty').val());
|
||||
if (i == 1){
|
||||
$('#Qty_Min').prop('disabled', false);
|
||||
@@ -152,7 +152,7 @@ var PromoBarangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
oc_PilihP: function(){
|
||||
oc_PilihP() {
|
||||
var i = parseInt($('#Tipe_Promo').val());
|
||||
if (i == 1){
|
||||
$('.promo1').removeClass('d-none');
|
||||
|
||||
@@ -14,7 +14,7 @@ var PromoBeliDiscJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.promo_tambah());
|
||||
$('#butUbah').click(() => this.promo_ubah());
|
||||
$('#butHapus').click(() => this.promo_hapus());
|
||||
@@ -23,7 +23,7 @@ var PromoBeliDiscJS = {
|
||||
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"> </div>');
|
||||
this.winBPromo = FoniaJS.showWindow('BPromo', 'Daftar Promo', _isi, 'xl', '', () => {
|
||||
$('#winBPromo')
|
||||
@@ -40,17 +40,17 @@ var PromoBeliDiscJS = {
|
||||
});
|
||||
},
|
||||
|
||||
promo_select: function(acell){
|
||||
promo_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBPromo);
|
||||
$('#Grup_PromoID').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
promo_tambah: function(){
|
||||
promo_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
promo_ubah: function(){
|
||||
promo_ubah() {
|
||||
if ($('#Grup_PromoID').val() == 0){
|
||||
FoniaJS.showError("Silakan pilih Nama Promo !");
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ var PromoBeliDiscJS = {
|
||||
this.data_query('master', 'edit');
|
||||
},
|
||||
|
||||
promo_hapus: function(){
|
||||
promo_hapus() {
|
||||
if ($('#Grup_PromoID').val() == 0){
|
||||
FoniaJS.showError("Silakan pilih Nama Promo !");
|
||||
return;
|
||||
@@ -80,18 +80,18 @@ var PromoBeliDiscJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
promo_simpan: function(mode){
|
||||
promo_simpan(mode) {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
promo_batal: function(){
|
||||
promo_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#Grup_PromoID').val(0);
|
||||
}, '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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -108,12 +108,12 @@ var PromoBeliDiscJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
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({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode','mode_detail='+mode,'Grup_PromoID','PromoID='+PromoID,'InvID='+InvID,'SatuanID='+SatuanID,'Kode_Varian='+Kode_Varian],
|
||||
@@ -132,43 +132,43 @@ var PromoBeliDiscJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function() {
|
||||
detail_tambah() {
|
||||
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]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail=delete','Grup_PromoID','PromoID='+acell[0]],
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if ($('#InvID').val() == 0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang Promo !');
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','mode_detail','Grup_PromoID','PromoID','InvID','SatuanID','Kode_Varian'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winDetail)
|
||||
}).send();
|
||||
},
|
||||
|
||||
varian_show: function(){
|
||||
new Request.JSONF({
|
||||
varian_show() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/form_varian',
|
||||
sendParam: ['InvID','SatuanID','Kode_Varian']
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
mode = (mode) ? mode : '';
|
||||
var sparam = ['mode='+mode,'Grup_PromoID'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
@@ -202,18 +202,18 @@ var PromoBeliDiscJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','Grup_PromoID']
|
||||
}).send();
|
||||
} else if (tipe=="brow-promo"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_promo',
|
||||
sendParam: ['Cari_Promo'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Promo')
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk','Grup_PromoID'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -221,14 +221,14 @@ var PromoBeliDiscJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
$('#InvID').val(item.value);
|
||||
$('#Nama_Produk').val(item.text);
|
||||
PromoBeliDiscJS.update_items(item.value, item.data);
|
||||
},
|
||||
|
||||
update_items: function(InvID, SatuanID){
|
||||
new Request.JSONF({
|
||||
update_items(InvID, SatuanID) {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/option_satuan',
|
||||
sendParam: ['InvID='+InvID,'SatuanID='+SatuanID],
|
||||
onSuccess: () => this.varian_show()
|
||||
|
||||
+19
-19
@@ -14,7 +14,7 @@ var PromoTotalJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Promo').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PromoTotalJS = {
|
||||
FoniaJS.setFocus('#Cari_Promo');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_promo',
|
||||
sendParam: ['mode_detail='+mode,'PromoID='+ID],
|
||||
@@ -47,17 +47,17 @@ var PromoTotalJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_promo',
|
||||
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -65,8 +65,8 @@ var PromoTotalJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => {
|
||||
@@ -76,7 +76,7 @@ var PromoTotalJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_show: function(){
|
||||
grup_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['Jual_Grup'],
|
||||
@@ -91,15 +91,15 @@ var PromoTotalJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_semua: function(){
|
||||
grup_semua() {
|
||||
$('#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);
|
||||
},
|
||||
|
||||
grup_save: function(){
|
||||
grup_save() {
|
||||
var alist = [];
|
||||
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
@@ -108,7 +108,7 @@ var PromoTotalJS = {
|
||||
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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -126,21 +126,21 @@ var PromoTotalJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#Promo_InvID').val(acell[0]);
|
||||
$('#Promo_Produk').val(acell[1]);
|
||||
this.update_Items(acell[0], 0);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_promo',
|
||||
sendParam: ['Cari_Promo']
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['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();
|
||||
if (InvID==0) return false;
|
||||
new Request({
|
||||
@@ -163,7 +163,7 @@ var PromoTotalJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_PilihP: function(){
|
||||
oc_PilihP() {
|
||||
var i = parseInt($('#Tipe_Promo').val());
|
||||
if (i == 4){
|
||||
$('.promo1').removeClass('d-none');
|
||||
|
||||
@@ -14,31 +14,31 @@ var RepoBeliAnalisaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("SupID")
|
||||
.addParam("Grup_InvID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("SupID");
|
||||
dload.addParam("Grup_InvID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,31 +14,31 @@ var RepoBeliJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("SupID")
|
||||
.addParam("Grup_InvID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("SupID");
|
||||
dload.addParam("Grup_InvID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,37 +14,37 @@ var RepoBeliMutasiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#SupID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Supplier !");
|
||||
$('#SupID').focus();
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("SupID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#SupID').val()==0){
|
||||
FoniaJS.showError("Silakan pilih Nama Supplier !");
|
||||
$('#SupID').focus();
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("SupID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,29 +14,29 @@ var RepoBeliReturJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("SupID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("SupID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoDanaKeluarJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoDanaMasukJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,45 +14,45 @@ var RepoDanaPosJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butPOS').click(() => this.proses_pos());
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_pos: function(){
|
||||
proses_pos() {
|
||||
if ($('#KasirID').val()==0){
|
||||
FoniaJS.showError("Untuk Cetak POS, pilih satu Nama Kasir !");
|
||||
$('#KasirID').focus();
|
||||
return;
|
||||
}
|
||||
var cetak = new PrinterPos(this.PHP + '/pos');
|
||||
cetak.add_param("Tipe", "R");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("KasirID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
cetak.exec();
|
||||
new PrinterPos(this.PHP + '/pos')
|
||||
.addParam("Tipe", "R")
|
||||
.addParam("CabID")
|
||||
.addParam("KasirID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To")
|
||||
.exec();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("KasirID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("KasirID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("KasirID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("KasirID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoGelBNeracaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("Bulan");
|
||||
cetak.add_param("Tahun");
|
||||
cetak.add_param("Level");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("Bulan")
|
||||
.addParam("Tahun")
|
||||
.addParam("Level");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("Bulan");
|
||||
dload.add_param("Tahun");
|
||||
dload.add_param("Level");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("Bulan");
|
||||
dload.addParam("Tahun");
|
||||
dload.addParam("Level");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoGelBRLCabJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Bulan1");
|
||||
cetak.add_param("Bulan2");
|
||||
cetak.add_param("Tahun");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("Bulan1")
|
||||
.addParam("Bulan2")
|
||||
.addParam("Tahun");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Bulan1");
|
||||
dload.add_param("Bulan2");
|
||||
dload.add_param("Tahun");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Bulan1");
|
||||
dload.addParam("Bulan2");
|
||||
dload.addParam("Tahun");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,25 +14,25 @@ var RepoGelBSaldoJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("Bulan");
|
||||
cetak.add_param("Tahun");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("Bulan")
|
||||
.addParam("Tahun");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("Bulan");
|
||||
dload.add_param("Tahun");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("Bulan");
|
||||
dload.addParam("Tahun");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoGelBSHUJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Bulan1");
|
||||
cetak.add_param("Bulan2");
|
||||
cetak.add_param("Tahun");
|
||||
cetak.add_param("Level");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Bulan1")
|
||||
.addParam("Bulan2")
|
||||
.addParam("Tahun")
|
||||
.addParam("Level");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Bulan1");
|
||||
dload.add_param("Bulan2");
|
||||
dload.add_param("Tahun");
|
||||
dload.add_param("Level");
|
||||
dload.addParam("Bulan1");
|
||||
dload.addParam("Bulan2");
|
||||
dload.addParam("Tahun");
|
||||
dload.addParam("Level");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,25 +14,25 @@ var RepoGelHBantuJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Kode_Rek");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Kode_Rek")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Kode_Rek");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Kode_Rek");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoGelHBesarJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -23,33 +23,33 @@ var RepoGelHBesarJS = {
|
||||
FoniaJS.setFocus('#Nama_Rek');
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Rekening !');
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Kode_Rek");
|
||||
cetak.add_param("Jenis");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Kode_Rek")
|
||||
.addParam("Jenis")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Rekening !');
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Kode_Rek");
|
||||
dload.add_param("Jenis");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Kode_Rek");
|
||||
dload.addParam("Jenis");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
|
||||
$('#winBRek')
|
||||
@@ -66,16 +66,16 @@ var RepoGelHBesarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
rek_select: function(acell){
|
||||
rek_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBRek);
|
||||
$('#Kode_Rek').val(acell[0]);
|
||||
$('#Nama_Rek').val(acell[1]);
|
||||
$('#Tgl_From').focus();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="brow-rek"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_rek',
|
||||
sendParam: ['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);
|
||||
$('#Tgl_From').focus();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoGelHDetailJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butBrowJurnal').click(() => this.jurnal_brow());
|
||||
@@ -26,13 +26,13 @@ var RepoGelHDetailJS = {
|
||||
FoniaJS.setFocus('#Kode_Jurnal');
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Kode_Jurnal");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Kode_Jurnal");
|
||||
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"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -49,14 +49,14 @@ var RepoGelHDetailJS = {
|
||||
});
|
||||
},
|
||||
|
||||
jurnal_select: function(acell){
|
||||
jurnal_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#Kode_Jurnal').val(acell[0]);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="brow-jurnal"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_jurnal',
|
||||
sendParam: ['Cari_Jurnal'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Jurnal')
|
||||
|
||||
@@ -14,25 +14,25 @@ var RepoGelHJurnalJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("TipeID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("TipeID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("TipeID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("TipeID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,23 +14,23 @@ var RepoGelHSaldoJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoInvBarcodeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print());
|
||||
$('#butLoadPrinter').click(() => this.load_printer());
|
||||
$('#butBrowProduk').click(() => this.produk_brow());
|
||||
@@ -22,7 +22,7 @@ var RepoInvBarcodeJS = {
|
||||
FoniaJS.setFocus('#Nama_Produk');
|
||||
},
|
||||
|
||||
proses_print: function(){
|
||||
proses_print() {
|
||||
if ($('#InvID').val() == 0){
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
FoniaJS.setFocus('Nama_Produk');
|
||||
@@ -32,17 +32,17 @@ var RepoInvBarcodeJS = {
|
||||
FoniaJS.showError('Silakan pilih Nama Printer Barcode !');
|
||||
return;
|
||||
}
|
||||
var cetak = new PrinterPos(this.PHP + '/barcode');
|
||||
cetak.setPrinter($('#Printer').val());
|
||||
cetak.add_param("InvID");
|
||||
cetak.add_param("SatuanID");
|
||||
cetak.add_param("VarianID");
|
||||
cetak.add_param("Qty");
|
||||
cetak.add_param("Printer");
|
||||
cetak.exec();
|
||||
new PrinterPos(this.PHP + '/barcode')
|
||||
.setPrinter($('#Printer').val())
|
||||
.addParam("InvID")
|
||||
.addParam("SatuanID")
|
||||
.addParam("VarianID")
|
||||
.addParam("Qty")
|
||||
.addParam("Printer")
|
||||
.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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -59,7 +59,7 @@ var RepoInvBarcodeJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#SatuanID').val(acell[1]);
|
||||
@@ -69,9 +69,9 @@ var RepoInvBarcodeJS = {
|
||||
FoniaJS.setFocus('#Qty');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['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(':');
|
||||
$('#InvID').val(item.value);
|
||||
$('#SatuanID').val(adata[0]);
|
||||
@@ -89,9 +89,9 @@ var RepoInvBarcodeJS = {
|
||||
FoniaJS.setFocus('#Qty');
|
||||
},
|
||||
|
||||
load_printer: function(){
|
||||
load_printer() {
|
||||
qz.printers.find().then((data) => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/load_printer',
|
||||
sendParam: ['Printer='+JSON.stringify(data),'DefPrint='+$('#configPrinter').html()]
|
||||
}).send();
|
||||
|
||||
@@ -14,29 +14,29 @@ var RepoInvHutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("SupID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("SupID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,26 +14,26 @@ var RepoInvLabelJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butHapus').click(() => this.proses_empty());
|
||||
$('#butPrint').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
proses_empty: function(){
|
||||
new Request.JSONF({
|
||||
proses_empty() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=empty']
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print');
|
||||
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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winBProduk')
|
||||
@@ -51,15 +51,15 @@ var RepoInvLabelJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
new Request.JSONF({
|
||||
produk_simpan() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-produk'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBProduk)
|
||||
}).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"> </div>');
|
||||
this.winBGrup = FoniaJS.showWindow('BGrup', 'Daftar Grup Barang', _isi, 'xl', '', () => {
|
||||
$('#winBGrup')
|
||||
@@ -76,15 +76,15 @@ var RepoInvLabelJS = {
|
||||
});
|
||||
},
|
||||
|
||||
grup_select: function(acell){
|
||||
new Request.JSONF({
|
||||
grup_select(acell) {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBGrup)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_detail',
|
||||
sendParam: ['mode_detail=update','ID='+acell[0]],
|
||||
@@ -101,37 +101,37 @@ var RepoInvLabelJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
new Request.JSONF({
|
||||
detail_simpan() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winDetail)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
}).send();
|
||||
} else if (tipe=="brow-grup"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_grup',
|
||||
sendParam: ['Cari_Grup'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Grup')
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoInvPiutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -22,27 +22,27 @@ var RepoInvPiutangJS = {
|
||||
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("MemberID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("MemberID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -59,15 +59,15 @@ var RepoInvPiutangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[1]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
@@ -75,7 +75,7 @@ var RepoInvPiutangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoJualAnalisaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -22,35 +22,35 @@ var RepoJualAnalisaJS = {
|
||||
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("Grup_MemberID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Urut");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("Grup_InvID")
|
||||
.addParam("Grup_MemberID")
|
||||
.addParam("MemberID")
|
||||
.addParam("SupID")
|
||||
.addParam("Urut")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("Grup_MemberID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Urut");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Grup_InvID");
|
||||
dload.addParam("Grup_MemberID");
|
||||
dload.addParam("MemberID");
|
||||
dload.addParam("SupID");
|
||||
dload.addParam("Urut");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -67,15 +67,15 @@ var RepoJualAnalisaJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[1]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
@@ -83,7 +83,7 @@ var RepoJualAnalisaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,30 +14,30 @@ var RepoJualJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("MemberID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
proses_dload() {
|
||||
new Download(this.PHP + '/excel')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("MemberID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To")
|
||||
.download();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoJualMarginJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -22,29 +22,29 @@ var RepoJualMarginJS = {
|
||||
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("Urut");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("MemberID")
|
||||
.addParam("Urut")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("Urut");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("MemberID");
|
||||
dload.addParam("Urut");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -61,15 +61,15 @@ var RepoJualMarginJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[1]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
@@ -77,7 +77,7 @@ var RepoJualMarginJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoJualMarginPosJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoJualMutasiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -23,35 +23,35 @@ var RepoJualMutasiJS = {
|
||||
FoniaJS.setFocus('#Nama_Member');
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#MemberID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
$('#Nama_Member').focus();
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("MemberID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#MemberID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Member !");
|
||||
$('#Nama_Member').focus();
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("MemberID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -68,15 +68,15 @@ var RepoJualMutasiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[1]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
@@ -84,7 +84,7 @@ var RepoJualMutasiJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoJualRekapJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -25,7 +25,7 @@ var RepoJualRekapJS = {
|
||||
FoniaJS.setFocus('#Nama_Produk');
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#InvID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Barang !");
|
||||
$('#Nama_Produk').focus();
|
||||
@@ -36,16 +36,16 @@ var RepoJualRekapJS = {
|
||||
$('#Nama_Member').focus();
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("InvID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("InvID")
|
||||
.addParam("MemberID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#InvID').val()==0){
|
||||
FoniaJS.showError("Silakan masukkan Nama Barang !");
|
||||
$('#Nama_Produk').focus();
|
||||
@@ -57,15 +57,15 @@ var RepoJualRekapJS = {
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("InvID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("InvID");
|
||||
dload.addParam("MemberID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -82,13 +82,13 @@ var RepoJualRekapJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -105,21 +105,21 @@ var RepoJualRekapJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#Nama_Produk').val(acell[5]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -127,11 +127,11 @@ var RepoJualRekapJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
$('#InvID').val(item.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ var RepoMemberHistoriJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
@@ -22,7 +22,7 @@ var RepoMemberHistoriJS = {
|
||||
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#Point_TipeID').val() == 0){
|
||||
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
@@ -32,16 +32,16 @@ var RepoMemberHistoriJS = {
|
||||
FoniaJS.setFocus('#Nama_Member');
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Point_TipeID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("Point_TipeID")
|
||||
.addParam("MemberID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#Point_TipeID').val() == 0){
|
||||
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
@@ -52,15 +52,15 @@ var RepoMemberHistoriJS = {
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Point_TipeID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Point_TipeID");
|
||||
dload.addParam("MemberID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
@@ -77,15 +77,15 @@ var RepoMemberHistoriJS = {
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
member_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[1]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
@@ -93,7 +93,7 @@ var RepoMemberHistoriJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,39 +14,39 @@ var RepoMemberPointJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#Point_TipeID').val() == 0){
|
||||
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Point_TipeID");
|
||||
cetak.add_param("Grup_MemberID");
|
||||
cetak.add_param("Urut");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("Point_TipeID")
|
||||
.addParam("Grup_MemberID")
|
||||
.addParam("Urut")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#Point_TipeID').val() == 0){
|
||||
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Point_TipeID");
|
||||
dload.add_param("Grup_MemberID");
|
||||
dload.add_param("Urut");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Point_TipeID");
|
||||
dload.addParam("Grup_MemberID");
|
||||
dload.addParam("Urut");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,37 +14,37 @@ var RepoMemberTukarJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#Point_TipeID').val() == 0){
|
||||
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Point_TipeID");
|
||||
cetak.add_param("Grup_MemberID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("Point_TipeID")
|
||||
.addParam("Grup_MemberID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#Point_TipeID').val() == 0){
|
||||
FoniaJS.showInfo("Silakan pilih Tipe Point !");
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Point_TipeID");
|
||||
dload.add_param("Grup_MemberID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Point_TipeID");
|
||||
dload.addParam("Grup_MemberID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoPPOBJualJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoPPOBMarginJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Tipe")
|
||||
.addParam("CabID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Tipe");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,25 +14,25 @@ var RepoRekapMarginJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,25 +14,25 @@ var RepoRekapModalJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,53 +14,53 @@ var RepoStokAkhirJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butPOS').click(() => this.proses_pos());
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_pos: function(){
|
||||
var cetak = new PrinterPos(this.PHP + '/pos');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("PPN");
|
||||
cetak.add_param("Tanggal");
|
||||
cetak.add_param("Urut");
|
||||
cetak.add_param("Min_Stok");
|
||||
cetak.add_param("Min_Qty");
|
||||
cetak.exec();
|
||||
proses_pos() {
|
||||
new PrinterPos(this.PHP + '/pos')
|
||||
.addParam("CabID")
|
||||
.addParam("SupID")
|
||||
.addParam("Grup_InvID")
|
||||
.addParam("PPN")
|
||||
.addParam("Tanggal")
|
||||
.addParam("Urut")
|
||||
.addParam("Min_Stok")
|
||||
.addParam("Min_Qty")
|
||||
.exec();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("PPN");
|
||||
cetak.add_param("Tanggal");
|
||||
cetak.add_param("Urut");
|
||||
cetak.add_param("Min_Stok");
|
||||
cetak.add_param("Min_Qty");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("SupID")
|
||||
.addParam("Grup_InvID")
|
||||
.addParam("PPN")
|
||||
.addParam("Tanggal")
|
||||
.addParam("Urut")
|
||||
.addParam("Min_Stok")
|
||||
.addParam("Min_Qty");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("PPN");
|
||||
dload.add_param("Tanggal");
|
||||
dload.add_param("Urut");
|
||||
dload.add_param("Min_Stok");
|
||||
dload.add_param("Min_Qty");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("SupID");
|
||||
dload.addParam("Grup_InvID");
|
||||
dload.addParam("PPN");
|
||||
dload.addParam("Tanggal");
|
||||
dload.addParam("Urut");
|
||||
dload.addParam("Min_Stok");
|
||||
dload.addParam("Min_Qty");
|
||||
dload.download();
|
||||
},
|
||||
|
||||
oc_MinStok: function(){
|
||||
oc_MinStok() {
|
||||
if ($('#Min_Stok').val()=='Y') {
|
||||
$('#Min_Qty').prop({disabled:false, readonly:false});
|
||||
FoniaJS.setFocus('#Min_Qty')
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoStokCabangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Cab1ID");
|
||||
cetak.add_param("Cab2ID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("Cab1ID")
|
||||
.addParam("Cab2ID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Cab1ID");
|
||||
dload.add_param("Cab2ID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("Cab1ID");
|
||||
dload.addParam("Cab2ID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Description : Laporan Mutasi Stok Barang
|
||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||
Created Date : July 16th, 2011.
|
||||
Last Modified : October 12th, 2026.
|
||||
Last Modified : November 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -13,45 +13,63 @@
|
||||
var RepoStokMutasiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
html5QrcodeScanner: null,
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
$('#butBrowProduk').click(() => this.produk_brow());
|
||||
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', [], {'selectFunc':this.Produk_Comp});
|
||||
FoniaJS.setFocus('#Nama_Produk');
|
||||
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');
|
||||
}
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
proses_print(prt) {
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
$('#Nama_Produk').focus();
|
||||
return;
|
||||
}
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("InvID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("InvID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
$('#Nama_Produk').focus();
|
||||
return;
|
||||
}
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("InvID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("InvID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
@@ -68,15 +86,15 @@ var RepoStokMutasiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
produk_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#Nama_Produk').val(acell[5]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
data_query(tipe) {
|
||||
if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
@@ -84,7 +102,7 @@ var RepoStokMutasiJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
Produk_Comp(item) {
|
||||
$('#InvID').val(item.value);
|
||||
$('#Tgl_From').focus();
|
||||
}
|
||||
|
||||
@@ -14,27 +14,27 @@ var RepoStokOpnameJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
proses_print(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print')
|
||||
.addParam("CabID")
|
||||
.addParam("Grup_InvID")
|
||||
.addParam("Tgl_From")
|
||||
.addParam("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
proses_dload() {
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.addParam("CabID");
|
||||
dload.addParam("Grup_InvID");
|
||||
dload.addParam("Tgl_From");
|
||||
dload.addParam("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Description : Informasi Aplikasi
|
||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||
Created Date : November 23th, 2011.
|
||||
Last Modified : August 13th, 2026.
|
||||
Last Modified : November 2nd, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -14,14 +14,28 @@ var AboutJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
$('#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>');
|
||||
index() {
|
||||
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());
|
||||
$('#butDBOpti').click(() => this.db_opti());
|
||||
$('#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({
|
||||
url: this.PHP + '/db_check',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -30,7 +44,7 @@ var AboutJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
db_opti: function(){
|
||||
db_opti() {
|
||||
new Request({
|
||||
url: this.PHP + '/db_check',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -39,7 +53,7 @@ var AboutJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
update_check: function(){
|
||||
update_check() {
|
||||
new Request({
|
||||
url: this.PHP + '/update_check',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -52,7 +66,7 @@ var AboutJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
db_run: function(db_count = 0){
|
||||
db_run(db_count = 0) {
|
||||
if (db_count === 0) return false;
|
||||
var items = Array(db_count).fill(0).map((_, index) => index);
|
||||
var $ul = $('#db-list').empty();
|
||||
@@ -70,7 +84,7 @@ var AboutJS = {
|
||||
}, $.Deferred().resolve().promise());
|
||||
},
|
||||
|
||||
opti_run: function(db_count = 0){
|
||||
opti_run(db_count = 0) {
|
||||
if (db_count === 0) return false;
|
||||
var items = Array(db_count).fill(0).map((_, index) => index);
|
||||
var $ul = $('#db-list').empty();
|
||||
@@ -88,7 +102,7 @@ var AboutJS = {
|
||||
}, $.Deferred().resolve().promise());
|
||||
},
|
||||
|
||||
update_run: function(){
|
||||
update_run() {
|
||||
new Request({
|
||||
url: this.PHP + '/update_proses',
|
||||
onSuccess: (adata) => {
|
||||
@@ -101,4 +115,5 @@ var AboutJS = {
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -14,12 +14,12 @@ var SYSChpasswdJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butSave').click(() => this.proses_save());
|
||||
FoniaJS.setFocus('#LPass');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
if ($("#LPass").val()=="") {
|
||||
FoniaJS.showInfo("Silakan masukkan password lama Anda!");
|
||||
FoniaJS.setFocus("#LPass");
|
||||
|
||||
@@ -14,17 +14,17 @@ var ConfigJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
proses_edit() {
|
||||
this.data_query('edit');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
new Request({
|
||||
url: this.PHP + '/config',
|
||||
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()
|
||||
},
|
||||
|
||||
data_query: function(mode){
|
||||
data_query(mode) {
|
||||
new Request({
|
||||
url: this.PHP + '/config',
|
||||
sendParam: ['mode='+mode],
|
||||
@@ -46,7 +46,7 @@ var ConfigJS = {
|
||||
}).send()
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
update_event() {
|
||||
if ($.inArray($('#mode').val(), ['edit']) !== -1) {
|
||||
$("#butUbah").prop('disabled', true);
|
||||
$("#butSimpan").prop('disabled', false);
|
||||
|
||||
@@ -14,7 +14,7 @@ var MenuGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query();
|
||||
$('#Cari_Grup').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var MenuGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_grup',
|
||||
sendParam: ['mode='+mode,'Grup_MenuID='+ID],
|
||||
@@ -40,17 +40,17 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode=del','Grup_MenuID='+acell[0],'Cari_Grup'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -58,8 +58,8 @@ var MenuGrupJS = {
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode','Grup_MenuID','Nama_Grup','Ket','Aktif','Cari_Grup'],
|
||||
onSuccess: () => {
|
||||
@@ -69,7 +69,7 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
menu_show: function(acell){
|
||||
menu_show(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_menu',
|
||||
sendParam: ['Grup_MenuID='+acell[0]],
|
||||
@@ -92,15 +92,15 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
menu_ceksemua: function(){
|
||||
menu_ceksemua() {
|
||||
$('#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);
|
||||
},
|
||||
|
||||
menu_simpan: function(){
|
||||
menu_simpan() {
|
||||
var alist = [];
|
||||
$('#tabMenuList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
@@ -119,8 +119,8 @@ var MenuGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(){
|
||||
new Request.JSONF({
|
||||
data_query() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Grup'],
|
||||
}).send()
|
||||
|
||||
@@ -14,7 +14,7 @@ var OperatorJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_User').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -29,7 +29,7 @@ var OperatorJS = {
|
||||
FoniaJS.setFocus('#Cari_User');
|
||||
},
|
||||
|
||||
filter_show: function(){
|
||||
filter_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_filter',
|
||||
sendParam: ['Filter_Level'],
|
||||
@@ -43,13 +43,13 @@ var OperatorJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
filter_simpan: function(){
|
||||
filter_simpan() {
|
||||
$('#Filter_Level').val($('#Fi_Level').val());
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('detail');
|
||||
},
|
||||
|
||||
detail_show: function(mode, UserID){
|
||||
detail_show(mode, UserID) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_user',
|
||||
sendParam: ['mode='+mode,'UserID='+UserID],
|
||||
@@ -62,15 +62,15 @@ var OperatorJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus ["+acell[1]+"] "+acell[2]+"?", () => {
|
||||
new Request({
|
||||
url: this.PHP + '/save_user',
|
||||
@@ -87,7 +87,7 @@ var OperatorJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_check: function(){
|
||||
detail_check() {
|
||||
if ($('#Username').val().toUpperCase()==$('#UserLama').val().toUpperCase()) {
|
||||
this.detail_save();
|
||||
return;
|
||||
@@ -105,7 +105,7 @@ var OperatorJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
detail_save() {
|
||||
new Request({
|
||||
url: this.PHP + '/save_user',
|
||||
sendParam: ['mode','UserID','Username','Nama','Posisi','Level','Password','Grup_MenuID','Aktif'],
|
||||
@@ -121,7 +121,7 @@ var OperatorJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
menu_show: function(acell){
|
||||
menu_show(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_menu',
|
||||
sendParam: ['UserID='+acell[0]],
|
||||
@@ -145,15 +145,15 @@ var OperatorJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
menu_ceksemua: function(){
|
||||
menu_ceksemua() {
|
||||
$('#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);
|
||||
},
|
||||
|
||||
menu_simpan: function(){
|
||||
menu_simpan() {
|
||||
var alist = [];
|
||||
$('#tabMenuList tbody input.form-check-input[type=checkbox]:not(:disabled):checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
@@ -172,16 +172,16 @@ var OperatorJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Filter_Level','Cari_User']
|
||||
}).send()
|
||||
}
|
||||
},
|
||||
|
||||
oc_Level: function(){
|
||||
oc_Level() {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -14,32 +14,32 @@ var PrinterJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butBrow').click(() => this.cab_brow());
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('form-printer');
|
||||
},
|
||||
|
||||
cab_brow: function(){
|
||||
cab_brow() {
|
||||
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', '<div id="divBrowCab"> </div>', 'lg', '', () => this.data_query('brow-cabang'));
|
||||
},
|
||||
|
||||
cab_select: function(acell){
|
||||
cab_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBCab);
|
||||
$('#REG_ID').val(acell[0]);
|
||||
this.data_query('form-printer', 'view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
proses_edit() {
|
||||
this.data_query('form-printer', 'edit');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
this.data_query('form-printer', 'save');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe === 'form-printer'){
|
||||
new Request({
|
||||
url: this.PHP + '/form_printer',
|
||||
@@ -52,13 +52,13 @@ var PrinterJS = {
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=='brow-cabang'){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_cabang',
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
update_event() {
|
||||
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
|
||||
$('#butBrow').prop('disabled', true);
|
||||
$('#butUbah').prop('disabled', true);
|
||||
|
||||
@@ -14,7 +14,7 @@ var SYSProfileJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butSave').click(() => this.save_profile());
|
||||
$('#win'+this.KODE).find('#FileGambar').off('change').change(() => {
|
||||
var fd = new FormData(), files = $('#FileGambar')[0].files[0];
|
||||
@@ -38,7 +38,7 @@ var SYSProfileJS = {
|
||||
this.get_picture();
|
||||
},
|
||||
|
||||
save_profile: function(){
|
||||
save_profile() {
|
||||
new Request({
|
||||
url: this.PHP + '/save_profile',
|
||||
sendParam: ['Nama','Posisi','Email','HP'],
|
||||
@@ -53,7 +53,7 @@ var SYSProfileJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
get_picture: function(){
|
||||
get_picture() {
|
||||
new Request({
|
||||
url: this.PHP + '/get_picture',
|
||||
onSuccess: (ajson) => {
|
||||
|
||||
@@ -14,12 +14,12 @@ var SuperJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query();
|
||||
if ($('#divSuper').length > 0 && socket.active) socket.emit('super-check');
|
||||
},
|
||||
|
||||
detail_select: function(acell){
|
||||
detail_select(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/approve',
|
||||
sendParam: ['AuthID='+acell[0]],
|
||||
@@ -27,8 +27,8 @@ var SuperJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(){
|
||||
new Request.JSONF({
|
||||
data_query() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
}).send();
|
||||
}
|
||||
|
||||
@@ -14,17 +14,17 @@ var GajiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
proses_edit() {
|
||||
this.data_query('update');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
proses_save() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_gaji',
|
||||
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
|
||||
@@ -36,7 +36,7 @@ var GajiJS = {
|
||||
}).send()
|
||||
},
|
||||
|
||||
data_query: function(mode){
|
||||
data_query(mode) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_gaji',
|
||||
sendParam: ['mode_detail='+mode,'REG_ID'],
|
||||
@@ -47,7 +47,7 @@ var GajiJS = {
|
||||
}).send()
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
update_event() {
|
||||
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
|
||||
$("#butUbah").prop('disabled', true);
|
||||
$("#butSimpan").prop('disabled', false);
|
||||
|
||||
@@ -14,7 +14,7 @@ var RekGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Rek').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var RekGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Rek');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['mode_detail='+mode,'Grup_RekID='+ID],
|
||||
@@ -40,17 +40,17 @@ var RekGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','Grup_RekID='+acell[0],'Cari_Rek'],
|
||||
onSuccess: () => {
|
||||
@@ -60,8 +60,8 @@ var RekGrupJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'],
|
||||
onSuccess: () => {
|
||||
@@ -71,9 +71,9 @@ var RekGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Rek']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var KaryawanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Karya').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var KaryawanJS = {
|
||||
FoniaJS.setFocus('#Cari_Karya');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_karya',
|
||||
sendParam: ['mode_detail='+mode,'KaryaID='+ID],
|
||||
@@ -38,17 +38,17 @@ var KaryawanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','KaryaID='+acell[0],'Cari_Karya'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -56,8 +56,8 @@ var KaryawanJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
|
||||
onSuccess: () => {
|
||||
@@ -67,9 +67,9 @@ var KaryawanJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Karya']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var RekJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#Cari_Rek').keydown((e) => {
|
||||
@@ -29,7 +29,7 @@ var RekJS = {
|
||||
FoniaJS.setFocus('#Cari_Rek');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -42,16 +42,16 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_rek: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print_rek');
|
||||
cetak.add_param("Grup_RekID");
|
||||
cetak.add_param("Level");
|
||||
cetak.add_param("Tgl_Cetak");
|
||||
print_rek(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print_rek')
|
||||
.addParam("Grup_RekID")
|
||||
.addParam("Level")
|
||||
.addParam("Tgl_Cetak");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
|
||||
@@ -61,17 +61,17 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','Kode_Rek='+acell[0],'Cari_Rek'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -79,8 +79,8 @@ var RekJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
|
||||
onSuccess: () => {
|
||||
@@ -90,9 +90,9 @@ var RekJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Rek']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var MemberJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#Cari_Member').keydown((e) => {
|
||||
@@ -29,7 +29,7 @@ var MemberJS = {
|
||||
FoniaJS.setFocus('#Cari_Member');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -42,16 +42,16 @@ var MemberJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_member: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print_member');
|
||||
cetak.add_param("Grup_MemberID");
|
||||
cetak.add_param("Aktif");
|
||||
cetak.add_param("Tgl_Cetak");
|
||||
print_member(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print_member')
|
||||
.addParam("Grup_MemberID")
|
||||
.addParam("Aktif")
|
||||
.addParam("Tgl_Cetak");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_member',
|
||||
sendParam: ['mode_detail='+mode,'MemberID='+ID],
|
||||
@@ -61,17 +61,17 @@ var MemberJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','MemberID='+acell[0],'Cari_Member'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -79,8 +79,8 @@ var MemberJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => {
|
||||
@@ -90,9 +90,9 @@ var MemberJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Member']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var MemberGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Member').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var MemberGrupJS = {
|
||||
FoniaJS.setFocus('#Cari_Member');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
|
||||
@@ -40,17 +40,17 @@ var MemberGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','Grup_MemberID='+acell[0],'Cari_Member'],
|
||||
onSuccess: () => {
|
||||
@@ -60,8 +60,8 @@ var MemberGrupJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
|
||||
onSuccess: () => {
|
||||
@@ -71,9 +71,9 @@ var MemberGrupJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Member']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var PointBarangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Barang').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PointBarangJS = {
|
||||
FoniaJS.setFocus('#Cari_Barang');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_barang',
|
||||
sendParam: ['mode_detail='+mode,'InvPID='+ID],
|
||||
@@ -40,17 +40,17 @@ var PointBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','InvPID='+acell[0],'Cari_Barang'],
|
||||
onSuccess: () => {
|
||||
@@ -60,8 +60,8 @@ var PointBarangJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
|
||||
onSuccess: () => {
|
||||
@@ -71,9 +71,9 @@ var PointBarangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Barang']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var PointSkemaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Skema').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PointSkemaJS = {
|
||||
FoniaJS.setFocus('#Cari_Skema');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_skema',
|
||||
sendParam: ['mode_detail='+mode,'PointID='+ID],
|
||||
@@ -43,17 +43,17 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -61,8 +61,8 @@ var PointSkemaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: () => {
|
||||
@@ -72,7 +72,7 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_form: function(){
|
||||
grup_form() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['Grup_Barang'],
|
||||
@@ -87,15 +87,15 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_semua: function(){
|
||||
grup_semua() {
|
||||
$('#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);
|
||||
},
|
||||
|
||||
grup_save: function(){
|
||||
grup_save() {
|
||||
var alist = [];
|
||||
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
@@ -104,7 +104,7 @@ var PointSkemaJS = {
|
||||
FoniaJS.closeWindow(this.winGrup);
|
||||
},
|
||||
|
||||
barang_form: function(){
|
||||
barang_form() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_barang',
|
||||
sendParam: ['Kode_Barang'],
|
||||
@@ -117,9 +117,9 @@ var PointSkemaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
barang_hapus: function(acell){
|
||||
barang_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
@@ -127,14 +127,14 @@ var PointSkemaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Skema']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-barang"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_barang',
|
||||
sendParam: ['Kode_Barang'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
|
||||
@@ -142,8 +142,8 @@ var PointSkemaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
new Request.JSONF({
|
||||
Produk_Comp(item) {
|
||||
new Request_JSF({
|
||||
url: PointSkemaJS.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var PointTipeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Tipe').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PointTipeJS = {
|
||||
FoniaJS.setFocus('#Cari_Tipe');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_tipe',
|
||||
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
|
||||
@@ -40,17 +40,17 @@ var PointTipeJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','Point_TipeID='+acell[0],'Cari_Tipe'],
|
||||
onSuccess: () => {
|
||||
@@ -60,8 +60,8 @@ var PointTipeJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
detail_save() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
|
||||
onSuccess: () => {
|
||||
@@ -71,9 +71,9 @@ var PointTipeJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Tipe']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var PPOBKateJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Kate').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PPOBKateJS = {
|
||||
FoniaJS.setFocus('#Cari_Kate');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_kategori',
|
||||
sendParam: ['mode_detail='+mode,'KateID='+ID],
|
||||
@@ -38,13 +38,13 @@ var PPOBKateJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Kate']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var PPOBOpeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('detail');
|
||||
$('#Cari_Ope').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
@@ -28,7 +28,7 @@ var PPOBOpeJS = {
|
||||
FoniaJS.setFocus('#Cari_Ope');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
detail_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_operator',
|
||||
sendParam: ['mode_detail='+mode,'OpeID='+ID],
|
||||
@@ -38,13 +38,13 @@ var PPOBOpeJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Ope']
|
||||
}).send();
|
||||
|
||||
@@ -14,7 +14,7 @@ var PPOBProdukJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
index() {
|
||||
this.data_query('tabel-produk');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#butUpdate').click(() => this.update_show());
|
||||
@@ -30,7 +30,7 @@ var PPOBProdukJS = {
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
print_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -43,16 +43,16 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_produk: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print_produk');
|
||||
cetak.add_param("KateID");
|
||||
cetak.add_param("OpeID");
|
||||
cetak.add_param("Tgl_Cetak");
|
||||
print_produk(prt) {
|
||||
let cetak = new Printer(this.PHP + '/print_produk')
|
||||
.addParam("KateID")
|
||||
.addParam("OpeID")
|
||||
.addParam("Tgl_Cetak");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
update_show: function(){
|
||||
update_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/detail_update',
|
||||
onSuccess: (ajson) => {
|
||||
@@ -63,8 +63,8 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
update_proses: function(){
|
||||
new Request.JSONF({
|
||||
update_proses() {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/proses_update',
|
||||
sendParam: ['K_Kate','K_Ope'],
|
||||
onSuccess: (ajson) => {
|
||||
@@ -74,7 +74,7 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_show: function(mode, ID){
|
||||
produk_show(mode, ID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode_detail='+mode,'ProdukID='+ID],
|
||||
@@ -86,12 +86,12 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_ubah: function(acell){
|
||||
produk_ubah(acell) {
|
||||
this.produk_show('update', acell[0]);
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
new Request.JSONF({
|
||||
produk_simpan() {
|
||||
new Request_JSF({
|
||||
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'],
|
||||
onSuccess: (adata) => {
|
||||
@@ -103,9 +103,9 @@ var PPOBProdukJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
data_query(tipe, mode) {
|
||||
if (tipe=="tabel-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_produk',
|
||||
sendParam: ['Cari_Produk']
|
||||
}).send();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user