opname barang: bug stok sisa 2

This commit is contained in:
2026-02-27 11:54:28 +07:00
parent 6c0451f79e
commit feba2009a8
5 changed files with 73 additions and 87 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ if ($data == "auto-produk") {
if (count($arec) > 0) {
$db->Query("SELECT * FROM inv_stok WHERE CabID='".$id_cab."' AND InvID='".$arec['InvID']."' LIMIT 1");
if ($db->Next()) $arec['Stok_Sistem'] = $db->RowFloat("Stok", 2);
if ($db->Next()) $arec['Stok_Sistem'] = $db->RowFloat("Stok", 0);
}
$ajson['InvID'] = $arec['InvID'];
$ajson['Kode_Barang'] = $arec['Kode_SKU']." / ".$arec['Kode_Barcode'];