from server date 2025-01-14

This commit is contained in:
Hafifie PKB
2025-01-14 22:54:48 +08:00
parent 09af89a249
commit 1aee7390a6
10 changed files with 69 additions and 23 deletions
@@ -181,7 +181,7 @@ class PanjarServices
if($bakiakhir <= 0) throw new \Exception('Custom Exception: Amaun Baki Akhir Cannot Be Zero');
if($totalpanjar < 0) throw new \Exception('Custom Exception: Amaun Panjar Cannot Be Zero');
Vault::on($cawangan['mysql'])->where('kodcaw','=', $cawangan['kodcaw'])->latest('tarikh')->update(array(
Vault::on($cawangan['mysql'])->where('kodcaw','=', $cawangan['kodcaw'])->where('tarikh','=',$current->toDateString())->update(array(
'totpanjar' => $totalpanjar,
'bakiakhir'=>$bakiakhir,
'bakieod'=>$bakiakhir
@@ -330,7 +330,7 @@ class PanjarServices
if($bakiakhir <= 0) throw new \Exception('Custom Exception: Amaun Baki Akhir Cannot Be Zero');
if($totalpanjar < 0) throw new \Exception('Custom Exception: Amaun Panjar Cannot Be Zero');
Vault::on($cawangan['mysql'])->where('kodcaw','=', $cawangan['kodcaw'])->latest('tarikh')->update(array(
Vault::on($cawangan['mysql'])->where('kodcaw','=', $cawangan['kodcaw'])->where('tarikh','=',$current->toDateString())->update(array(
'totpanjar' => $totalpanjar,
'bakiakhir'=>$bakiakhir,
'bakieod'=>$bakiakhir
+3 -1
View File
@@ -302,7 +302,9 @@ class OnePercentService
$ujrah_current = $result_audit_current->sum('ujrah');
}
/* B */
$result_audit_previous = $this->StokAuditGenerateTerakru($month_sebelum,$cawangan,$year_generate);
$year_sebelum = $date_sebelum->format('Y');
$year_publish = ($month_sekarang == 1) ? $year_sebelum : $year_generate;
$result_audit_previous = $this->StokAuditGenerateTerakru($month_sebelum,$cawangan,$year_publish);
$onepercent_previous = $result_audit_previous->sum('utgonepercent');
$ujrah_previous = $result_audit_previous->sum('ujrah');
@@ -821,7 +821,8 @@ class RingkasanHarianService
'011233' => '2021-06-28',
];
return $tarikhTawarruq[Str::upper($this->kodCawangan)];
$defaultDate = '2021-01-01';
return $tarikhTawarruq[Str::upper($this->kodCawangan)] ?? $defaultDate;
}
private function getOutstandingImbangDuga()