File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 33namespace App \Nova \Metrics ;
44
55use App \Helpers \Helper ;
6+ use App \Models \Dipa ;
67use Laravel \Nova \Nova ;
78use Laravelwebdev \Table \Table ;
89use Laravelwebdev \Table \Table \Cell ;
@@ -12,6 +13,11 @@ class MonitoringUpPerJenis extends Table
1213{
1314 public function __construct ()
1415 {
16+ $ tglNihil = optional (
17+ Dipa::cache ()->get ('all ' )
18+ ->where ('tahun ' , session ('year ' ))
19+ ->first ()
20+ )->tanggal_nihil ;
1521 $ gup = null ;
1622 $ minGup = null ;
1723 $ tup = null ;
@@ -50,12 +56,20 @@ public function __construct()
5056 $ this ->data ([
5157 Row::make (
5258 Cell::make ('GUP ' ),
53- Cell::make ($ gup ? Helper::terbilangTanggal ($ gup ['akhir ' ]) : '- ' ),
59+ Cell::make (
60+ ($ gup && $ tglNihil && $ gup ['akhir ' ] > $ tglNihil )
61+ ? Helper::terbilangTanggal ($ tglNihil )
62+ : ($ gup ? Helper::terbilangTanggal ($ gup ['akhir ' ]) : '- ' )
63+ ),
5464 Cell::make ($ minGup ? Helper::formatUang ($ minGup ) : '- ' )->class ('text-right ' )
5565 ),
5666 Row::make (
5767 Cell::make ('TUP ' ),
58- Cell::make (($ tup && $ tup ['akhir ' ] !== '- ' ) ? Helper::terbilangTanggal ($ tup ['akhir ' ]) : ($ tup ['akhir ' ] ?? '- ' )),
68+ Cell::make (
69+ ($ tup && $ tglNihil && $ tup ['akhir ' ] > $ tglNihil )
70+ ? Helper::terbilangTanggal ($ tglNihil )
71+ : ($ tup && $ tup ['akhir ' ] !== '- ' ? Helper::terbilangTanggal ($ tup ['akhir ' ]) : ($ tup ['akhir ' ] ?? '- ' ))
72+ ),
5973 Cell::make ($ latestTup ? Helper::formatUang (optional ($ latestTup )->nilai ) : '- ' )->class ('text-right ' )
6074 ),
6175 ]
You can’t perform that action at this time.
0 commit comments