Fix export data lelong
This commit is contained in:
@@ -997,9 +997,8 @@ class LelongController extends Controller
|
||||
|
||||
foreach ($request->lelongbidmarhun as $data) {
|
||||
$lelmarhun_to_be_inserted = new LelMarhun();
|
||||
$lelmarhun_to_be_inserted->kodcaw = $request['kodcaw'];
|
||||
$lelmarhun_to_be_inserted->kodcaw = $request->kodcaw;
|
||||
$lelmarhun_to_be_inserted->norujukan = $data['norujukan'];
|
||||
$lelmarhun_to_be_inserted->t_gadai = $data['t_gadai'];
|
||||
$lelmarhun_to_be_inserted->nota = $data['nota'];
|
||||
$lelmarhun_to_be_inserted->batch_no = $newBatchNo;
|
||||
|
||||
@@ -1008,21 +1007,24 @@ class LelongController extends Controller
|
||||
|
||||
LelMarhun::on($cawangan['mysql'])->insert($lelmarhun_arr);
|
||||
|
||||
$tunai = Tunai::on($cawangan['mysql'])->create([
|
||||
'tarikh' => $request->tarikh,
|
||||
'kodlaluan' => "LELONG",
|
||||
'masuk' => $request->tunai,
|
||||
]);
|
||||
|
||||
$gldetail = GlDetail::on($cawangan['mysql'])->create([
|
||||
'tarikh' => $request->tarikh,
|
||||
'dtacct' => "1000/010",
|
||||
'ktacct' => "1000/020",
|
||||
'teller' => "LELONG ONLINE",
|
||||
'descpt' => "SERAHAN LELONG ONLINE",
|
||||
'amaun' => $request->gldetail
|
||||
]);
|
||||
if ($request->tunai != null) {
|
||||
$tunai = Tunai::on($cawangan['mysql'])->create([
|
||||
'tarikh' => $request->tarikh,
|
||||
'kodlaluan' => "LELONG",
|
||||
'masuk' => $request->tunai,
|
||||
]);
|
||||
}
|
||||
|
||||
if ($request->gldetail != null) {
|
||||
$gldetail = GlDetail::on($cawangan['mysql'])->create([
|
||||
'tarikh' => $request->tarikh,
|
||||
'dtacct' => "1000/010",
|
||||
'ktacct' => "1000/020",
|
||||
'teller' => "LELONG ONLINE",
|
||||
'descpt' => "SERAHAN LELONG ONLINE",
|
||||
'amaun' => $request->gldetail
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json("success");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user