Fix export data lelong
This commit is contained in:
@@ -997,9 +997,8 @@ class LelongController extends Controller
|
|||||||
|
|
||||||
foreach ($request->lelongbidmarhun as $data) {
|
foreach ($request->lelongbidmarhun as $data) {
|
||||||
$lelmarhun_to_be_inserted = new LelMarhun();
|
$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->norujukan = $data['norujukan'];
|
||||||
$lelmarhun_to_be_inserted->t_gadai = $data['t_gadai'];
|
|
||||||
$lelmarhun_to_be_inserted->nota = $data['nota'];
|
$lelmarhun_to_be_inserted->nota = $data['nota'];
|
||||||
$lelmarhun_to_be_inserted->batch_no = $newBatchNo;
|
$lelmarhun_to_be_inserted->batch_no = $newBatchNo;
|
||||||
|
|
||||||
@@ -1008,21 +1007,24 @@ class LelongController extends Controller
|
|||||||
|
|
||||||
LelMarhun::on($cawangan['mysql'])->insert($lelmarhun_arr);
|
LelMarhun::on($cawangan['mysql'])->insert($lelmarhun_arr);
|
||||||
|
|
||||||
$tunai = Tunai::on($cawangan['mysql'])->create([
|
if ($request->tunai != null) {
|
||||||
'tarikh' => $request->tarikh,
|
$tunai = Tunai::on($cawangan['mysql'])->create([
|
||||||
'kodlaluan' => "LELONG",
|
'tarikh' => $request->tarikh,
|
||||||
'masuk' => $request->tunai,
|
'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->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");
|
return response()->json("success");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user