Merge branch 'RingkasanBackup' of https://gitlab.com/online-sistem1/api_arrahn into RingkasanBackup
This commit is contained in:
@@ -380,12 +380,10 @@ class RingkasanHarianServices
|
||||
$period = CarbonPeriod::create($mula, $hingga);
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','KB2')->get()->toArray();
|
||||
|
||||
foreach($period as $current){
|
||||
foreach($cawangan as $index=>$caw){
|
||||
foreach($cawangan as $index=>$caw){
|
||||
foreach($period as $current){
|
||||
DB::connection($caw['mysql'])->beginTransaction();
|
||||
|
||||
try{
|
||||
|
||||
$getTransaksi = $this->getTransaksiHarian($current->toDateString(),$caw['kodcaw'],$caw['mysql']);
|
||||
$getPendser = $this->getPendahuluanSerahanHQ($current->toDateString(),$caw['kodcaw'],$caw['mysql']);
|
||||
$getPerbelanjaan = $this->getPerbelanjaan($current->toDateString(),$caw['kodcaw'],$caw['mysql']);
|
||||
@@ -468,10 +466,10 @@ class RingkasanHarianServices
|
||||
$main->tebus()->save($tebus);
|
||||
$main->lelong()->save($lelong);
|
||||
|
||||
$main->gad_id = $gadai->id;
|
||||
$main->teb_id = $tebus->id;
|
||||
$main->ans_id = $ansuran->id;
|
||||
$main->lel_id = $lelong->id;
|
||||
$main->gad_id = $gadai->gad_id;
|
||||
$main->teb_id = $tebus->teb_id;
|
||||
$main->ans_id = $ansuran->ans_id;
|
||||
$main->lel_id = $lelong->lel_id;
|
||||
}else{
|
||||
$ansuran->save();
|
||||
$tebus->save();
|
||||
|
||||
Reference in New Issue
Block a user