tambahan hapus ansuran

This commit is contained in:
Hafifie PKB
2024-01-10 10:11:25 +08:00
parent 4c47bb0f84
commit 4726ea7c5c
7 changed files with 266 additions and 1 deletions
+12 -1
View File
@@ -96,7 +96,7 @@ class PanjarServices
if (!$vault) throw new \Exception('Custom Exception: Vault Does Not Exist!');
if (!$deno_panjar) throw new \Exception('Custom Exception: Denominasi Panjar Does Not Exist!');
DB::transaction(function () use ($cawangan,$deno_panjar,$panjar,$denominasi,$current,$vault) {
DB::transaction(function () use ($cawangan,$deno_panjar,$panjar,$denominasi,$current,$vault,$request) {
$return_data = $this->calculation_denominasi($deno_panjar,$denominasi,'masuk');
if($return_data == 'no data') throw new \Exception('Custom Exception: Denominasi Panjar Not Return Data');
@@ -297,9 +297,20 @@ class PanjarServices
$audit->updated_at = $current;
$audit->save();
$array_response = [
'result' => 'success',
'data' => 1
];
return response()->json($array_response);
});
}catch(\Exception $e){
dd($e->getMessage());
$array_response = [
'result' => 'error',
'data' => $e->getMessage()
];
return response()->json($array_response);
Log::error('Exception: ' , $e->getMessage());
}
}