add api file po asset, api receive item inventaris add insert into table stock_inventaris
This commit is contained in:
@@ -1190,10 +1190,10 @@ class PurchaseOrderAset extends MY_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
private function insertLog($poID, $type, $prm, $dataBefore, $dataAfter, $userID, $desc = '') {
|
||||
$sql = "INSERT INTO acc_one_log.purchase_order_log (
|
||||
PurchaseOrderLogPurchaseOrderID,
|
||||
PurchaseOrderLogType,
|
||||
private function insertLog($poID, $type, $prm, $dataBefore, $dataAfter, $userID, $desc = '') {
|
||||
$sql = "INSERT INTO acc_one_log.purchase_order_log (
|
||||
PurchaseOrderLogPurchaseOrderID,
|
||||
PurchaseOrderLogType,
|
||||
PurchaseOrderLogPrm,
|
||||
PurchaseOrderLogJSONBefore,
|
||||
PurchaseOrderLogJSONAfter,
|
||||
@@ -1208,7 +1208,26 @@ class PurchaseOrderAset extends MY_Controller {
|
||||
if (!$que) {
|
||||
$this->db->trans_rollback();
|
||||
$this->sys_error_db("[Error] failed insert into table log PO");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
## MUTATIONS ##
|
||||
public function insertPurchaseOrderAsset()
|
||||
{
|
||||
try {
|
||||
if (!$this->isLogin) {
|
||||
throw new Exception('Invalid token');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$msg = '[Error] ' . $e->getMessage();
|
||||
$code = $e->getCode();
|
||||
if ($code == 0) {
|
||||
$this->sys_error($msg);
|
||||
} else {
|
||||
$this->sys_error_db($msg);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user