Update various controllers and scripts; modify last modified dates, enhance JSON responses, and adjust PPN handling for improved functionality

This commit is contained in:
2026-11-04 11:14:12 +07:00
parent 4344b53de8
commit eab5acde17
11 changed files with 84 additions and 41 deletions
+2 -2
View File
@@ -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 : 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() {