@@ -363,7 +363,7 @@ public static function cekStokPersediaan($id, $tanggal = null)
363
363
)
364
364
->where ('master_persediaan_id ' , $ id )
365
365
->when ($ tanggal , function ($ query , $ tanggal ) {
366
- return $ query ->where ('tanggal_transaksi ' , '<= ' , $ tanggal );
366
+ return $ query ->whereDate ('tanggal_transaksi ' , '<= ' , $ tanggal );
367
367
})
368
368
->groupBy ('master_persediaan_id ' )
369
369
->first ();
@@ -716,7 +716,7 @@ public static function nomor($tanggal, $jenis_naskah_id, $unit_kerja_id = null,
716
716
$ no_urut = $ max_no_urut + 1 ;
717
717
$ segmen = 0 ;
718
718
} else {
719
- $ no_urut = $ naskah ->where ('tanggal ' , '<= ' , $ tanggal )->max ('no_urut ' ) ?? 1 ;
719
+ $ no_urut = $ naskah ->whereDate ('tanggal ' , '<= ' , $ tanggal )->max ('no_urut ' ) ?? 1 ;
720
720
$ segmen = NaskahKeluar::whereYear ('tanggal ' , $ tahun )
721
721
->where ('kode_naskah_id ' , self ::getPropertyFromCollection ($ kode_naskah , 'id ' ))
722
722
->where ('no_urut ' , $ no_urut )
@@ -758,7 +758,7 @@ public static function getUsersByPengelola($role, $tanggal)
758
758
$ usersIdByUnitKerja = DataPegawai::cache ()
759
759
->get ('all ' )
760
760
->where ('unit_kerja_id ' , self ::getPropertyFromCollection (self ::getDataPegawaiByUserId (Auth::user ()->id , $ tanggal ), 'unit_kerja_id ' ))
761
- ->where ('tanggal ' , '<= ' , $ tanggal )
761
+ ->whereDate ('tanggal ' , '<= ' , $ tanggal )
762
762
->pluck ('user_id ' )
763
763
->toArray ();
764
764
$ koordinatorsId = array_intersect ($ usersIdByPengelola , $ usersIdByUnitKerja );
@@ -807,7 +807,7 @@ public static function setDefaultPesertaRapat($tujuan, $tanggal)
807
807
*/
808
808
public static function getDataPegawaiByUserId ($ user_id , $ tanggal )
809
809
{
810
- return DataPegawai::cache ()->get ('all ' )->where ('user_id ' , $ user_id )->where ('tanggal ' , '<= ' , $ tanggal )->sortByDesc ('tanggal ' )->first ();
810
+ return DataPegawai::cache ()->get ('all ' )->where ('user_id ' , $ user_id )->whereDate ('tanggal ' , '<= ' , $ tanggal )->sortByDesc ('tanggal ' )->first ();
811
811
}
812
812
813
813
/**
@@ -1644,7 +1644,7 @@ public static function getTemplatePathById($id)
1644
1644
*/
1645
1645
public static function getLatestTataNaskahId ($ tanggal )
1646
1646
{
1647
- return self ::getPropertyFromCollection (TataNaskah::cache ()->get ('all ' )->where ('tanggal ' , '<= ' , $ tanggal )->sortByDesc ('tanggal ' )->first (), 'id ' );
1647
+ return self ::getPropertyFromCollection (TataNaskah::cache ()->get ('all ' )->whereDate ('tanggal ' , '<= ' , $ tanggal )->sortByDesc ('tanggal ' )->first (), 'id ' );
1648
1648
}
1649
1649
1650
1650
/**
@@ -1666,7 +1666,7 @@ public static function getLatestHargaSatuanId($tanggal)
1666
1666
*/
1667
1667
public static function getLatestHargaSatuan ($ tanggal )
1668
1668
{
1669
- return HargaSatuan::cache ()->get ('all ' )->where ('tanggal ' , '<= ' , $ tanggal )->sortByDesc ('tanggal ' )->first ();
1669
+ return HargaSatuan::cache ()->get ('all ' )->whereDate ('tanggal ' , '<= ' , $ tanggal )->sortByDesc ('tanggal ' )->first ();
1670
1670
}
1671
1671
1672
1672
/**
0 commit comments