first commit
This commit is contained in:
@@ -0,0 +1,373 @@
|
||||
<?php
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Inv/MutasiController
|
||||
Description : Transaksi Mutasi Stok Antar Cabang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : February 28th, 2011.
|
||||
Last Modified : September 27th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Inv;
|
||||
|
||||
use App\Utils\Inv;
|
||||
use flight\Engine;
|
||||
use flight\database\SimplePdo;
|
||||
use flight\Session;
|
||||
use Webapp\DB\SQL;
|
||||
use Webapp\Web\Form;
|
||||
use Webapp\Web\Param;
|
||||
use Webapp\Web\Table;
|
||||
|
||||
class MutasiController {
|
||||
|
||||
private array $web_app;
|
||||
private int $id_cab_dari;
|
||||
private int $id_cab_ke;
|
||||
private string $mode;
|
||||
private string $mode_detail;
|
||||
private string $no_mutasi;
|
||||
private bool $is_baru;
|
||||
private int $id_inv;
|
||||
private int $id_satuan;
|
||||
private int $id_varian;
|
||||
private Inv $inv;
|
||||
protected Engine $app;
|
||||
protected SimplePdo $db;
|
||||
|
||||
public function __construct(Engine $app, SimplePdo $db, Session $session) {
|
||||
$this->app = $app;
|
||||
$this->db = $db;
|
||||
$this->web_app = (array) $session->get('WEB_APP');
|
||||
$this->id_cab_dari = Param::Int("Dari_CabID", $session->get('APP_INV')['CABANGID']);
|
||||
$this->id_cab_ke = Param::Int("Ke_CabID", 0);
|
||||
$this->mode = Param::Get("mode", "");
|
||||
$this->mode_detail = Param::Get("mode_detail", "");
|
||||
$this->no_mutasi = Param::Get("No_Mutasi", "");
|
||||
$this->is_baru = str_contains($this->no_mutasi, "MUTA") === true;
|
||||
$this->id_inv = Param::Int("InvID", 0);
|
||||
$this->id_satuan = Param::Int("SatuanID", 0);
|
||||
$this->id_varian = Param::Int("VarianID", 0);
|
||||
$this->inv = new Inv($app);
|
||||
}
|
||||
|
||||
public function table_detail() {
|
||||
if (in_array($this->mode_detail, ["insert","update","delete"])) {
|
||||
$iqty = Param::Float("Qty", 0);
|
||||
|
||||
$sql = new SQL($this->app);
|
||||
$sql->set_table("tmp_inv_detail");
|
||||
$sql->add_param("No_Ref", $this->no_mutasi);
|
||||
$sql->add_param("InvID");
|
||||
$sql->add_param("SatuanID");
|
||||
$sql->add_param("VarianID");
|
||||
$sql->add_param("Qty", $iqty);
|
||||
$sql->add_param("Harga_Beli");
|
||||
$sql->add_param("Harga_Jual", "Harga_Beli", true);
|
||||
$sql->add_param_unix();
|
||||
$sql->add_param_userid();
|
||||
$sql->add_where("ID");
|
||||
$sql->add_where("No_Ref", $this->no_mutasi);
|
||||
|
||||
if ( $this->mode_detail === "insert" ) {
|
||||
$sql->InsertDB();
|
||||
} else if ( $this->mode_detail === "update" ) {
|
||||
$sql->UpdateDB();
|
||||
} else if ( $this->mode_detail === "delete" ) {
|
||||
$sql->DeleteDB();
|
||||
}
|
||||
}
|
||||
|
||||
$tsql = ' AND Qty>0'; $asql = [$this->no_mutasi]; $qtabel = "inv_detail";
|
||||
if (in_array($this->mode, ["add","edit"])) {
|
||||
if ($this->mode === "add") { $tsql = " AND Unix=?"; array_push($asql, $this->app->user()->unix()); }
|
||||
$qtabel = "tmp_inv_detail";
|
||||
}
|
||||
|
||||
$obj = new Table($this->app);
|
||||
$obj->set_table("(SELECT * FROM ".$qtabel." WHERE No_Ref=?".$tsql.") D LEFT JOIN vi_inv_produk P ON (D.InvID=P.InvID AND D.SatuanID=P.SatuanID AND D.VarianID=P.VarianID)", "D.*,P.Kode_SKU,P.Nama_Lengkap,(D.Qty*D.Harga_Beli) Total", "", $asql);
|
||||
$obj->set_footer("COUNT(*) Harga_Beli,SUM(D.Qty*D.Harga_Beli) Total");
|
||||
$obj->add_field("ID", "No", "c");
|
||||
$obj->add_field("InvID", "InvID", "hid");
|
||||
$obj->add_field("SatuanID", "SatuanID", "hid");
|
||||
$obj->add_field("VarianID", "VarianID", "hid");
|
||||
$obj->add_field("Kode_SKU", "SKU", "c");
|
||||
$obj->add_field("Nama_Lengkap", "Nama Barang", "awr");
|
||||
$obj->add_field("Qty", "Qty", "r", "rupiah2");
|
||||
$obj->add_field("Harga_Beli", "Harga @", "r", "rupiah", "items");
|
||||
$obj->add_field("Total", "Jumlah", "r", "rupiah", "rupiah");
|
||||
$obj->set_field_order("ID", "D");
|
||||
if (in_array($this->mode, ["add","edit"])) {
|
||||
$obj->add_row_btn("clipboard", "Ubah", "MutasiJS.detail_ubah");
|
||||
$obj->add_row_btn("trash", "Hapus", "MutasiJS.detail_hapus", "Unix", $this->app->user()->unix());
|
||||
$obj->set_func_btn("MutasiJS.produk_brow", '<i class="bi-table me-1"></i> Browse');
|
||||
}
|
||||
$ajson[] = $obj->json_table("divDetailTabel");
|
||||
$this->app->json($ajson);
|
||||
}
|
||||
|
||||
public function brow_tx() {
|
||||
$tcari = Param::Get("Cari_TX");
|
||||
$tsql = ''; $asql = [];
|
||||
if (!empty($tcari)) {
|
||||
$tsql .= " WHERE CONCAT(No_Mutasi,DATE_FORMAT(Tgl_Mutasi,'%d-%m-%Y')) LIKE ?";
|
||||
array_push($asql, '%' . $tcari . '%');
|
||||
}
|
||||
|
||||
$obj = new Table($this->app);
|
||||
$obj->set_table("(SELECT * FROM inv_mutasi".$tsql.") M LEFT JOIN para_cabang C1 ON (C1.CabID=M.Dari_CabID) LEFT JOIN para_cabang C2 ON (C2.CabID=M.Ke_CabID)", "M.*,C1.Nama_Cab Cab1,C2.Nama_Cab Cab2", "", $asql);
|
||||
$obj->add_field("No_Mutasi", "No. Trans", "c");
|
||||
$obj->add_field("Tgl_Mutasi", "Tgl. Trans", "c", "sqltgl", "", "val-tgl");
|
||||
$obj->add_field("Cab1", "Dari Cab", "c");
|
||||
$obj->add_field("Cab2", "Ke Cab", "c");
|
||||
$obj->add_field("Total_Mutasi", "Total", "r", "rupiah2");
|
||||
$obj->set_field_order("No_Mutasi", "D");
|
||||
$obj->set_func_select("MutasiJS.tx_select");
|
||||
$this->app->json([ $obj->db_table("divBrowTX") ]);
|
||||
}
|
||||
|
||||
public function brow_produk() {
|
||||
$tcari = Param::Get("Cari_Produk");
|
||||
$tsql = ''; $asql = [];
|
||||
if (!empty($tcari)) {
|
||||
$tsql .= " AND Barcode_Nama LIKE ?";
|
||||
array_push($asql, '%' . $tcari . '%');
|
||||
}
|
||||
array_push($asql, $this->id_cab_dari);
|
||||
|
||||
$obj = new Table($this->app);
|
||||
$obj->set_table("(SELECT * FROM inv_produk_join WHERE Aktif=1".$tsql." GROUP BY InvID,SatuanID,VarianID) P LEFT JOIN inv_stok X ON (X.CabID=? AND X.InvID=P.InvID)", "P.InvID,P.SatuanID,P.VarianID,P.Kode_SKU,P.Kode_Barcode,P.Nama_Lengkap,IF(IFNULL(X.Stok,0)=0,0,ROUND(X.Stok/P.Qty,2)) Sisa_Stok", "", $asql);
|
||||
$obj->add_field("InvID", "ID", "hid");
|
||||
$obj->add_field("SatuanID", "ID", "hid");
|
||||
$obj->add_field("VarianID", "ID", "hid");
|
||||
$obj->add_field("Kode_SKU", "SKU", "c");
|
||||
$obj->add_field("Kode_Barcode", "Barcode", "c");
|
||||
$obj->add_field("Nama_Lengkap", "Nama Barang", "awr");
|
||||
$obj->add_field("Sisa_Stok", "Stok", "r", "rupiah2");
|
||||
$obj->set_field_order("Kode_SKU", "A");
|
||||
$obj->set_func_select("MutasiJS.produk_select");
|
||||
$this->app->json([ $obj->db_table("divBrowProduk") ]);
|
||||
}
|
||||
|
||||
public function auto_produk() {
|
||||
$tcari = Param::Get("Auto_Query", "");
|
||||
$ajson['autodata'] = [];
|
||||
$bcode = 0; $arec = [];
|
||||
|
||||
// Cari by SKU + Barcode
|
||||
// Satuan : Varian : Harga_Pokok
|
||||
$_row = $this->db->fetchRow("SELECT P.InvID,P.Nama_Lengkap,CONCAT(P.SatuanID,':',P.VarianID,':',CONVERT(P.Harga_Pokok USING UTF8)) Data2 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_dari]);
|
||||
if ($_row) {
|
||||
$bcode = 1;
|
||||
$arec = $_row->getData();
|
||||
}
|
||||
if ($bcode === 1) {
|
||||
$ajson['autodata'][] = ['value'=>$arec['InvID'], 'text'=>$arec['Nama_Lengkap'], 'data'=>$arec['Data2'], 'bc'=>1];
|
||||
} else {
|
||||
$stat = $this->db->runQuery("SELECT P.InvID,P.Nama_Lengkap,P.Kode_SKU,IF(IFNULL(X.Stok,0)=0,'KOSONG',ROUND(X.Stok/P.Qty,2)) Sisa_Stok,CONCAT(P.SatuanID,':',P.VarianID,':',CONVERT(P.Harga_Pokok USING UTF8)) Data2 FROM (SELECT * FROM inv_produk_join WHERE Barcode_Nama LIKE ? AND Aktif=1 GROUP BY InvID,SatuanID,VarianID) P LEFT JOIN inv_stok X ON (X.CabID=? AND X.InvID=P.InvID) ORDER BY P.Nama_Produk,P.Qty LIMIT 50", ['%'.$tcari.'%', $this->id_cab_dari]);
|
||||
while ($row = $stat->fetch(SimplePdo::FETCH_ASSOC)) {
|
||||
$ajson['autodata'][] = ['value'=>$row['InvID'], 'text'=>$row['Nama_Lengkap'], 'html'=>'<span class="text-primary">'.$row['Kode_SKU'].'</span> '.$row['Nama_Lengkap'].' <span class="text-danger">('.(string) $row['Sisa_Stok'].')</span>', 'data'=>$row['Data2'], 'bc'=>0];
|
||||
}
|
||||
}
|
||||
$this->app->json($ajson);
|
||||
}
|
||||
|
||||
public function form_master() {
|
||||
$ajson = [ 'error'=>"", 'html'=>"" ];
|
||||
$atabel = [];
|
||||
|
||||
if ($this->mode === "add") {
|
||||
$atabel = $this->Data_Mutasi("", true);
|
||||
} else if ($this->mode === "edit") {
|
||||
$this->inv->Detail_Copy($this->no_mutasi, true);
|
||||
$atabel = $this->Data_Mutasi($this->no_mutasi);
|
||||
} else if ($this->mode === "save") {
|
||||
$no_lama = $this->no_mutasi;
|
||||
$tgl_mutasi = Param::Get("Tgl_Mutasi");
|
||||
if ($this->is_baru) {
|
||||
$this->no_mutasi = $this->inv->Nomor_Baru("M", $tgl_mutasi, true);
|
||||
}
|
||||
|
||||
$this->inv->Detail_Save($this->no_mutasi, 2, $this->id_cab_ke, $tgl_mutasi, $this->is_baru, $no_lama, 0, true, $this->id_cab_dari);
|
||||
|
||||
$tot_mutasi = $this->db->fetchField("SELECT SUM(Qty*Harga_Beli) Beli FROM inv_detail WHERE No_Ref=? AND Qty>0", [$this->no_mutasi]) ?? 0;
|
||||
|
||||
$sql = new SQL($this->app);
|
||||
$sql->set_table("inv_mutasi");
|
||||
$sql->add_param_date("Tgl_Mutasi");
|
||||
$sql->add_param("Dari_CabID");
|
||||
$sql->add_param("Ke_CabID");
|
||||
$sql->add_param("Total_Mutasi", $tot_mutasi);
|
||||
$sql->add_param("Catatan");
|
||||
$sql->add_param_stamp();
|
||||
$sql->add_param_userid();
|
||||
$sql->add_where("No_Mutasi", $this->no_mutasi);
|
||||
$sql->UpdateDB();
|
||||
|
||||
$atabel = $this->Data_Mutasi($this->no_mutasi);
|
||||
$this->mode = "view";
|
||||
|
||||
} else if ($this->mode === "cancel") {
|
||||
$this->inv->Detail_Cancel($this->no_mutasi);
|
||||
$atabel = $this->Data_Mutasi();
|
||||
} else {
|
||||
$atabel = $this->Data_Mutasi($this->no_mutasi);
|
||||
}
|
||||
|
||||
$enable = in_array($this->mode, ["add","edit"]) ? true : false;
|
||||
$form = new Form($this->app);
|
||||
$tnota = $form->textbox("_", "No_Mutasi", $atabel['No_Mutasi'], !$enable, true, "text", "nomor transaksi");
|
||||
$ttglnota = $form->datebox("_", "Tgl_Mutasi", $atabel['Tgl_Mutasi'], $enable, true);
|
||||
$tcab_dari = $form->option_db("_", "Dari_CabID", $atabel['Dari_CabID'], $enable, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY Nama_Cab", [0," "]);
|
||||
$tcab_ke = $form->option_db("_", "Ke_CabID", $atabel['Ke_CabID'], $enable, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY Nama_Cab", [0," "]);
|
||||
$tcatat = $form->textbox("_", "Catatan", $atabel['Catatan'], $enable, false, "text");
|
||||
$ajson['html'] = '
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-6">
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-5 col-lg-3 col-form-label" for="No_Mutasi">Nomor Transaksi</label>
|
||||
<div class="col"><div class="input-group">'.$tnota.'<button id="butBrow" class="btn btn-info" type="button"><i class="bi-search"></i></button></div></div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-5 col-lg-3 col-form-label" for="Tgl_Mutasi">Tanggal Transaksi</label>
|
||||
<div class="col-sm-7 col-lg-5">'.$ttglnota.'</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-lg-6">
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-5 col-lg-3 col-form-label" for="Dari_CabID">Dari Cabang</label>
|
||||
<div class="col">'.$tcab_dari.'</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-5 col-lg-3 col-form-label" for="Ke_CabID">Ke Cabang</label>
|
||||
<div class="col">'.$tcab_ke.'</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-3 col-lg-2 col-form-label" for="Catatan" style="width:12.5%;">Catatan</label>
|
||||
<div class="col">'.$tcatat.'</div>
|
||||
</div>
|
||||
<div class="row mb-1"><div class="col"><hr class="my-1"></div></div>
|
||||
<div class="row mb-1'.(in_array($this->mode, ['add','edit']) ? '' : ' d-none').'">
|
||||
<div class="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" />
|
||||
</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" />
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="mode" value="'.$this->mode.'" >';
|
||||
$this->app->json($ajson);
|
||||
}
|
||||
|
||||
public function form_produk() {
|
||||
$id = (int) Param::Get("ID", 0);
|
||||
$atabel = [ 'ID'=>$id, 'InvID'=>$this->id_inv, 'SatuanID'=>$this->id_satuan, 'VarianID'=>$this->id_varian, 'Kode_SKU'=>"", 'Kode_Barcode'=>"", 'Nama_Lengkap'=>"", 'Satuan_Kemasan'=>"", 'Qty'=>0, 'Harga_Beli'=>0 ];
|
||||
if ($id > 0) {
|
||||
$_row = $this->db->fetchRow("SELECT ID,Qty,Harga_Beli FROM tmp_inv_detail WHERE No_Ref=? AND ID=?", [$this->no_mutasi, $id]);
|
||||
if ($_row) $atabel = array_merge($atabel, $_row->getData());
|
||||
}
|
||||
if ($this->id_inv > 0 && $this->id_satuan > 0) {
|
||||
$_row = $this->db->fetchRow("SELECT Kode_SKU,Kode_Barcode,Nama_Lengkap,Satuan_Kemasan,Harga_Pokok Harga_Beli FROM inv_produk_join WHERE InvID=? AND SatuanID=? AND VarianID=?", [$this->id_inv, $this->id_satuan, $this->id_varian]);
|
||||
if ($_row) $atabel = array_merge($atabel, $_row->getData());
|
||||
}
|
||||
|
||||
$form = new Form($this->app);
|
||||
$tsku = $form->textbox("_", "Kode_SKU", $atabel['Kode_SKU']. " / " .$atabel['Kode_Barcode'], false);
|
||||
$tnama = $form->textbox("_", "Nama_Lengkap", $atabel['Nama_Lengkap'], false);
|
||||
$tqty = $form->textbox("_", "Qty", $atabel['Qty'], true, true, "double");
|
||||
$tbeli = $form->textbox("_", "Harga_Beli", $atabel['Harga_Beli'], false, false, "double");
|
||||
$ttot = $form->textbox("_", "Jumlah", 0, false, false, "double");
|
||||
$tsat = $form->textbox("_", "Nama_Satuan", $atabel['Satuan_Kemasan'], false);
|
||||
$ajson['html'] = '
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-4 col-lg-3 col-form-label">Kode SKU / Barcode</label>
|
||||
<div class="col">'.$tsku.'</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-4 col-lg-3 col-form-label">Nama Barang</label>
|
||||
<div class="col">'.$tnama.'</div>
|
||||
</div>
|
||||
<div class="row mb-1"><hr class="my-1"></div>
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-4 col-lg-3 col-form-label" for="Qty">Qty</label>
|
||||
<div class="col-sm-4 col-lg-5"><div class="input-group">'.$tqty.$tsat.'</div></div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-4 col-lg-3 col-form-label">Harga (@)</label>
|
||||
<div class="col-sm-8 col-lg-5">'.$tbeli.'</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<label class="col-sm-4 col-lg-3 col-form-label">Sub Total</label>
|
||||
<div class="col-sm-8 col-lg-5">'.$ttot.'</div>
|
||||
</div>
|
||||
<input type="hidden" id="ID" value="'.$atabel['ID'].'" >
|
||||
<input type="hidden" id="InvID" value="'.$atabel['InvID'].'" >
|
||||
<input type="hidden" id="SatuanID" value="'.$atabel['SatuanID'].'" >
|
||||
<input type="hidden" id="VarianID" value="'.$atabel['VarianID'].'" >
|
||||
<input type="hidden" id="mode_detail" value="'.$this->mode_detail.'" >';
|
||||
$this->app->json($ajson);
|
||||
}
|
||||
|
||||
public function proses_delete() {
|
||||
$this->db->runQuery("DELETE FROM inv_mutasi WHERE No_Mutasi=?", [$this->no_mutasi]);
|
||||
$this->db->runQuery("DELETE FROM inv_detail WHERE No_Ref=?", [$this->no_mutasi]);
|
||||
$this->app->json([ 'status' => true ]);
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$this->app->json(['html' => '
|
||||
<div class="fade-in">
|
||||
<div class="card"><div class="card-body">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="tx-tab" data-bs-toggle="tab" data-bs-target="#tx" type="button" role="tab" aria-controls="tx" aria-selected="true"><i class="bi-database me-2"></i>Transaksi Mutasi Stok Cabang</button>
|
||||
</li>
|
||||
<li class="nav-item ms-auto">
|
||||
<button class="btn btn-primary mb-1 ms-2" id="butTambah" type="button"><i class="bi-plus-lg me-2"></i>Tambah</button>
|
||||
<button class="btn btn-info mb-1 ms-2" id="butUbah" type="button"><i class="bi-clipboard me-2"></i>Ubah</button>
|
||||
<button class="btn btn-warning mb-1 ms-2" id="butHapus" type="button"><i class="bi-trash me-2"></i>Hapus</button>
|
||||
<button class="btn btn-secondary mb-1 ms-2 dropdown-toggle" id="butPrint" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="bi-printer me-2"></i>Cetak</button>
|
||||
<div class="dropdown-menu" aria-labelledby="butPrint">
|
||||
<a class="dropdown-item" href="#" id="printNota">Cetak Nota</a>
|
||||
<a class="dropdown-item" href="#" id="printPOS">Cetak POS</a>
|
||||
</div>
|
||||
<button class="btn btn-danger mb-1 ms-2" id="butBatal" type="button"><i class="bi-x-lg me-2"></i>Batal</button>
|
||||
<button class="btn btn-success mb-1 ms-2" id="butSimpan" type="button"><i class="bi-save me-2"></i>Simpan</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content border border-top-0 p-3">
|
||||
<div class="tab-pane fade active show" id="tx" role="tabpanel" aria-labelledby="tx-tab">
|
||||
<div id="divTXMaster"> </div>
|
||||
<div id="divDetailTabel"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>'
|
||||
]);
|
||||
}
|
||||
|
||||
private function Data_Mutasi(string $nomor="", bool $baru=false): array {
|
||||
$aparam = [
|
||||
'No_Mutasi' => $nomor,
|
||||
'Tgl_Mutasi' => tgl_ymd(),
|
||||
'Dari_CabID' => $this->id_cab_dari,
|
||||
'Ke_CabID' => $this->id_cab_ke,
|
||||
'Catatan' => ""
|
||||
];
|
||||
if ($baru) $aparam['No_Mutasi'] = "MUTA".$this->web_app['SERVER_ID'].(string) $this->id_cab_dari.$this->app->user()->id(3)."#00";
|
||||
if (!empty($nomor)) {
|
||||
$row = $this->db->fetchRow("SELECT * FROM inv_mutasi WHERE No_Mutasi=?", [$nomor]);
|
||||
if ($row) $aparam = array_merge($aparam, $row->getData());
|
||||
}
|
||||
return $aparam;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user