pdpa for koperasi
This commit is contained in:
@@ -1038,6 +1038,27 @@ class CustomerController extends Controller
|
||||
return response()->json($results);
|
||||
}
|
||||
|
||||
public function updateTagPdpa(Request $request)
|
||||
{
|
||||
$tarikh_cetak_pdpa = Carbon::now()->toDateString();
|
||||
|
||||
$no_ic = $request->input('no_ic');
|
||||
|
||||
$customer = Customer::where('kplama', $no_ic)
|
||||
->orWhere('kpbaru', $no_ic)
|
||||
->first();
|
||||
|
||||
if (!$customer) {
|
||||
return response()->json(['error' => 'Customer not found.'], 404);
|
||||
}
|
||||
|
||||
$customer->tag_pdpa = $request->input('tag_pdpa');
|
||||
$customer->tarikh_cetak_pdpa = $tarikh_cetak_pdpa;
|
||||
$customer->save();
|
||||
|
||||
return response()->json(['message' => 'Customer PDPA updated successfully.'], 200);
|
||||
}
|
||||
|
||||
// public function createNotaArcc($kodcaw, Request $request)
|
||||
// {
|
||||
// $current = Carbon::now();
|
||||
|
||||
Reference in New Issue
Block a user