js.blade.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. <script src="http://code.highcharts.com/highcharts.js"></script>
  2. <script src="http://code.highcharts.com/maps/modules/map.js"></script>
  3. <script src="http://code.highcharts.com/maps/modules/exporting.js"></script>
  4. <script src="http://code.highcharts.com/mapdata/countries/us/us-all.js"></script>
  5. <?php
  6. $myTime = Carbon\Carbon::now();
  7. $fixYears = '20'.$myTime->format('y');
  8. $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses');
  9. ?>
  10. @if($getStatus == 'administrator')
  11. <script>
  12. Highcharts.chart('sppRT-admin', {
  13. chart: {
  14. type: 'bar'
  15. },
  16. title:false,
  17. xAxis: {
  18. categories: [
  19. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  20. '{{$value->nama}}',
  21. @endforeach
  22. ],
  23. title: {
  24. text: null
  25. }
  26. },
  27. yAxis: {
  28. min: 0,
  29. title: {
  30. text: 'UPT',
  31. align: 'high'
  32. },
  33. labels: {
  34. overflow: 'justify'
  35. }
  36. },
  37. tooltip: {
  38. valueSuffix: ' Jumlah'
  39. },
  40. plotOptions: {
  41. bar: {
  42. dataLabels: {
  43. enabled: true
  44. }
  45. }
  46. },
  47. legend: {
  48. layout: 'vertical',
  49. align: 'right',
  50. verticalAlign: 'top',
  51. x: -40,
  52. y: 80,
  53. floating: true,
  54. borderWidth: 1,
  55. backgroundColor:
  56. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  57. shadow: true
  58. },
  59. credits: {
  60. enabled: false
  61. },
  62. series: [
  63. {
  64. name: 'ST-1 Terbit Sudah di-TL UPT',
  65. data: [
  66. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  67. <?php
  68. if ($value->id_bulan == 1) {
  69. $minMonth = 12;
  70. $minYears = $fixYears - 1;
  71. }
  72. else{
  73. $minMonth = $value->id_bulan - 1;
  74. $minYears = $fixYears;
  75. }
  76. ?>
  77. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',1)->where('active',1)->count()}},
  78. @endforeach
  79. ]
  80. },
  81. {
  82. name: 'ST-1 Terbit Belum di-TL UPT',
  83. data: [
  84. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  85. <?php
  86. if ($value->id_bulan == 1) {
  87. $minMonth = 12;
  88. $minYears = $fixYears - 1;
  89. }
  90. else{
  91. $minMonth = $value->id_bulan - 1;
  92. $minYears = $fixYears;
  93. }
  94. ?>
  95. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',1)->where('active',null)->count()}},
  96. @endforeach
  97. ]
  98. },
  99. ]
  100. });
  101. </script>
  102. <script>
  103. Highcharts.chart('sppRT-admin1', {
  104. chart: {
  105. type: 'bar'
  106. },
  107. title:false,
  108. xAxis: {
  109. categories: [
  110. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  111. '{{$value->nama}}',
  112. @endforeach
  113. ],
  114. title: {
  115. text: null
  116. }
  117. },
  118. yAxis: {
  119. min: 0,
  120. title: {
  121. text: 'UPT',
  122. align: 'high'
  123. },
  124. labels: {
  125. overflow: 'justify'
  126. }
  127. },
  128. tooltip: {
  129. valueSuffix: ' Jumlah'
  130. },
  131. plotOptions: {
  132. bar: {
  133. dataLabels: {
  134. enabled: true
  135. }
  136. }
  137. },
  138. legend: {
  139. layout: 'vertical',
  140. align: 'right',
  141. verticalAlign: 'top',
  142. x: -40,
  143. y: 80,
  144. floating: true,
  145. borderWidth: 1,
  146. backgroundColor:
  147. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  148. shadow: true
  149. },
  150. credits: {
  151. enabled: false
  152. },
  153. series: [
  154. {
  155. name: 'ST-2 Terbit Sudah di-TL UPT',
  156. data: [
  157. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  158. <?php
  159. if ($value->id_bulan == 1) {
  160. $minMonth = 12;
  161. $minYears = $fixYears - 1;
  162. }
  163. else{
  164. $minMonth = $value->id_bulan - 1;
  165. $minYears = $fixYears;
  166. }
  167. ?>
  168. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',2)->where('active',1)->count()}},
  169. @endforeach
  170. ]
  171. },
  172. {
  173. name: 'ST-2 Terbit Belum di-TL UPT',
  174. data: [
  175. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  176. <?php
  177. if ($value->id_bulan == 1) {
  178. $minMonth = 12;
  179. $minYears = $fixYears - 1;
  180. }
  181. else{
  182. $minMonth = $value->id_bulan - 1;
  183. $minYears = $fixYears;
  184. }
  185. ?>
  186. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',2)->where('active',null)->count()}},
  187. @endforeach
  188. ]
  189. },
  190. ]
  191. });
  192. </script>
  193. <script>
  194. Highcharts.chart('sppRT-admin2', {
  195. chart: {
  196. type: 'bar'
  197. },
  198. title:false,
  199. xAxis: {
  200. categories: [
  201. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  202. '{{$value->nama}}',
  203. @endforeach
  204. ],
  205. title: {
  206. text: null
  207. }
  208. },
  209. yAxis: {
  210. min: 0,
  211. title: {
  212. text: 'UPT',
  213. align: 'high'
  214. },
  215. labels: {
  216. overflow: 'justify'
  217. }
  218. },
  219. tooltip: {
  220. valueSuffix: ' Jumlah'
  221. },
  222. plotOptions: {
  223. bar: {
  224. dataLabels: {
  225. enabled: true
  226. }
  227. }
  228. },
  229. legend: {
  230. layout: 'vertical',
  231. align: 'right',
  232. verticalAlign: 'top',
  233. x: -40,
  234. y: 80,
  235. floating: true,
  236. borderWidth: 1,
  237. backgroundColor:
  238. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  239. shadow: true
  240. },
  241. credits: {
  242. enabled: false
  243. },
  244. series: [
  245. {
  246. name: 'ST-3 Terbit Sudah di-TL UPT',
  247. data: [
  248. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  249. <?php
  250. if ($value->id_bulan == 1) {
  251. $minMonth = 12;
  252. $minYears = $fixYears - 1;
  253. }
  254. else{
  255. $minMonth = $value->id_bulan - 1;
  256. $minYears = $fixYears;
  257. }
  258. ?>
  259. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',3)->where('active',1)->count()}},
  260. @endforeach
  261. ]
  262. },
  263. {
  264. name: 'ST-3 Terbit Belum di-TL UPT',
  265. data: [
  266. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  267. <?php
  268. if ($value->id_bulan == 1) {
  269. $minMonth = 12;
  270. $minYears = $fixYears - 1;
  271. }
  272. else{
  273. $minMonth = $value->id_bulan - 1;
  274. $minYears = $fixYears;
  275. }
  276. ?>
  277. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',3)->where('active',null)->count()}},
  278. @endforeach
  279. ]
  280. },
  281. ]
  282. });
  283. </script>
  284. <script>
  285. Highcharts.chart('sppRT-admin3', {
  286. chart: {
  287. type: 'bar'
  288. },
  289. title:false,
  290. xAxis: {
  291. categories: [
  292. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  293. '{{$value->nama}}',
  294. @endforeach
  295. ],
  296. title: {
  297. text: null
  298. }
  299. },
  300. yAxis: {
  301. min: 0,
  302. title: {
  303. text: 'UPT',
  304. align: 'high'
  305. },
  306. labels: {
  307. overflow: 'justify'
  308. }
  309. },
  310. tooltip: {
  311. valueSuffix: ' Jumlah'
  312. },
  313. plotOptions: {
  314. bar: {
  315. dataLabels: {
  316. enabled: true
  317. }
  318. }
  319. },
  320. legend: {
  321. layout: 'vertical',
  322. align: 'right',
  323. verticalAlign: 'top',
  324. x: -40,
  325. y: 80,
  326. floating: true,
  327. borderWidth: 1,
  328. backgroundColor:
  329. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  330. shadow: true
  331. },
  332. credits: {
  333. enabled: false
  334. },
  335. series: [
  336. {
  337. name: 'STT Terbit Sudah di-TL UPT',
  338. data: [
  339. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  340. <?php
  341. if ($value->id_bulan == 1) {
  342. $minMonth = 12;
  343. $minYears = $fixYears - 1;
  344. }
  345. else{
  346. $minMonth = $value->id_bulan - 1;
  347. $minYears = $fixYears;
  348. }
  349. ?>
  350. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('katagori_spp',16)->where('active',1)->count()}},
  351. @endforeach
  352. ]
  353. },
  354. {
  355. name: 'STT Terbit Belum di-TL UPT',
  356. data: [
  357. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  358. <?php
  359. if ($value->id_bulan == 1) {
  360. $minMonth = 12;
  361. $minYears = $fixYears - 1;
  362. }
  363. else{
  364. $minMonth = $value->id_bulan - 1;
  365. $minYears = $fixYears;
  366. }
  367. ?>
  368. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('katagori_spp',16)->where('active',null)->count()}},
  369. @endforeach
  370. ]
  371. },
  372. ]
  373. });
  374. </script>
  375. @endif
  376. <script>
  377. Highcharts.chart('sppRT-operator', {
  378. chart: {
  379. type: 'bar'
  380. },
  381. title:false,
  382. xAxis: {
  383. categories: [
  384. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  385. '{{$value->nama}}',
  386. @endforeach
  387. ],
  388. title: {
  389. text: null
  390. }
  391. },
  392. yAxis: {
  393. min: 0,
  394. title: {
  395. text: 'UPT',
  396. align: 'high'
  397. },
  398. labels: {
  399. overflow: 'justify'
  400. }
  401. },
  402. tooltip: {
  403. valueSuffix: ' Jumlah'
  404. },
  405. plotOptions: {
  406. bar: {
  407. dataLabels: {
  408. enabled: true
  409. }
  410. }
  411. },
  412. legend: {
  413. layout: 'vertical',
  414. align: 'right',
  415. verticalAlign: 'top',
  416. x: -40,
  417. y: 80,
  418. floating: true,
  419. borderWidth: 1,
  420. backgroundColor:
  421. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  422. shadow: true
  423. },
  424. credits: {
  425. enabled: false
  426. },
  427. series: [
  428. {
  429. name: 'ST-1 Terbit Sudah di-TL UPT',
  430. data: [
  431. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  432. <?php
  433. if ($value->id_bulan == 1) {
  434. $minMonth = 12;
  435. $minYears = $fixYears - 1;
  436. }
  437. else{
  438. $minMonth = $value->id_bulan - 1;
  439. $minYears = $fixYears;
  440. }
  441. ?>
  442. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',1)->where('active',1)->where('upt',$getUptName)->count()}},
  443. @endforeach
  444. ]
  445. },
  446. {
  447. name: 'ST-1 Terbit Belum di-TL UPT',
  448. data: [
  449. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  450. <?php
  451. if ($value->id_bulan == 1) {
  452. $minMonth = 12;
  453. $minYears = $fixYears - 1;
  454. }
  455. else{
  456. $minMonth = $value->id_bulan - 1;
  457. $minYears = $fixYears;
  458. }
  459. ?>
  460. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',1)->where('active',null)->where('upt',$getUptName)->count()}},
  461. @endforeach
  462. ]
  463. },
  464. ]
  465. });
  466. </script>
  467. <script>
  468. Highcharts.chart('sppRT-operator1', {
  469. chart: {
  470. type: 'bar'
  471. },
  472. title:false,
  473. xAxis: {
  474. categories: [
  475. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  476. '{{$value->nama}}',
  477. @endforeach
  478. ],
  479. title: {
  480. text: null
  481. }
  482. },
  483. yAxis: {
  484. min: 0,
  485. title: {
  486. text: 'UPT',
  487. align: 'high'
  488. },
  489. labels: {
  490. overflow: 'justify'
  491. }
  492. },
  493. tooltip: {
  494. valueSuffix: ' Jumlah'
  495. },
  496. plotOptions: {
  497. bar: {
  498. dataLabels: {
  499. enabled: true
  500. }
  501. }
  502. },
  503. legend: {
  504. layout: 'vertical',
  505. align: 'right',
  506. verticalAlign: 'top',
  507. x: -40,
  508. y: 80,
  509. floating: true,
  510. borderWidth: 1,
  511. backgroundColor:
  512. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  513. shadow: true
  514. },
  515. credits: {
  516. enabled: false
  517. },
  518. series: [
  519. {
  520. name: 'ST-2 Terbit Sudah di-TL UPT',
  521. data: [
  522. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  523. <?php
  524. if ($value->id_bulan == 1) {
  525. $minMonth = 12;
  526. $minYears = $fixYears - 1;
  527. }
  528. else{
  529. $minMonth = $value->id_bulan - 1;
  530. $minYears = $fixYears;
  531. }
  532. ?>
  533. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',2)->where('active',1)->where('upt',$getUptName)->count()}},
  534. @endforeach
  535. ]
  536. },
  537. {
  538. name: 'ST-2 Terbit Belum di-TL UPT',
  539. data: [
  540. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  541. <?php
  542. if ($value->id_bulan == 1) {
  543. $minMonth = 12;
  544. $minYears = $fixYears - 1;
  545. }
  546. else{
  547. $minMonth = $value->id_bulan - 1;
  548. $minYears = $fixYears;
  549. }
  550. ?>
  551. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',2)->where('active',null)->where('upt',$getUptName)->count()}},
  552. @endforeach
  553. ]
  554. },
  555. ]
  556. });
  557. </script>
  558. <script>
  559. Highcharts.chart('sppRT-operator2', {
  560. chart: {
  561. type: 'bar'
  562. },
  563. title:false,
  564. xAxis: {
  565. categories: [
  566. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  567. '{{$value->nama}}',
  568. @endforeach
  569. ],
  570. title: {
  571. text: null
  572. }
  573. },
  574. yAxis: {
  575. min: 0,
  576. title: {
  577. text: 'UPT',
  578. align: 'high'
  579. },
  580. labels: {
  581. overflow: 'justify'
  582. }
  583. },
  584. tooltip: {
  585. valueSuffix: ' Jumlah'
  586. },
  587. plotOptions: {
  588. bar: {
  589. dataLabels: {
  590. enabled: true
  591. }
  592. }
  593. },
  594. legend: {
  595. layout: 'vertical',
  596. align: 'right',
  597. verticalAlign: 'top',
  598. x: -40,
  599. y: 80,
  600. floating: true,
  601. borderWidth: 1,
  602. backgroundColor:
  603. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  604. shadow: true
  605. },
  606. credits: {
  607. enabled: false
  608. },
  609. series: [
  610. {
  611. name: 'ST-3 Terbit Sudah di-TL UPT',
  612. data: [
  613. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  614. <?php
  615. if ($value->id_bulan == 1) {
  616. $minMonth = 12;
  617. $minYears = $fixYears - 1;
  618. }
  619. else{
  620. $minMonth = $value->id_bulan - 1;
  621. $minYears = $fixYears;
  622. }
  623. ?>
  624. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',3)->where('active',1)->where('upt',$getUptName)->count()}},
  625. @endforeach
  626. ]
  627. },
  628. {
  629. name: 'ST-3 Terbit Belum di-TL UPT',
  630. data: [
  631. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  632. <?php
  633. if ($value->id_bulan == 1) {
  634. $minMonth = 12;
  635. $minYears = $fixYears - 1;
  636. }
  637. else{
  638. $minMonth = $value->id_bulan - 1;
  639. $minYears = $fixYears;
  640. }
  641. ?>
  642. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',3)->where('active',null)->where('upt',$getUptName)->count()}},
  643. @endforeach
  644. ]
  645. },
  646. ]
  647. });
  648. </script>
  649. <script>
  650. Highcharts.chart('sppRT-operator3', {
  651. chart: {
  652. type: 'bar'
  653. },
  654. title:false,
  655. xAxis: {
  656. categories: [
  657. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  658. '{{$value->nama}}',
  659. @endforeach
  660. ],
  661. title: {
  662. text: null
  663. }
  664. },
  665. yAxis: {
  666. min: 0,
  667. title: {
  668. text: 'UPT',
  669. align: 'high'
  670. },
  671. labels: {
  672. overflow: 'justify'
  673. }
  674. },
  675. tooltip: {
  676. valueSuffix: ' Jumlah'
  677. },
  678. plotOptions: {
  679. bar: {
  680. dataLabels: {
  681. enabled: true
  682. }
  683. }
  684. },
  685. legend: {
  686. layout: 'vertical',
  687. align: 'right',
  688. verticalAlign: 'top',
  689. x: -40,
  690. y: 80,
  691. floating: true,
  692. borderWidth: 1,
  693. backgroundColor:
  694. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  695. shadow: true
  696. },
  697. credits: {
  698. enabled: false
  699. },
  700. series: [
  701. {
  702. name: 'STT Terbit Sudah di-TL UPT',
  703. data: [
  704. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  705. <?php
  706. if ($value->id_bulan == 1) {
  707. $minMonth = 12;
  708. $minYears = $fixYears - 1;
  709. }
  710. else{
  711. $minMonth = $value->id_bulan - 1;
  712. $minYears = $fixYears;
  713. }
  714. ?>
  715. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',16)->where('active',1)->where('upt',$getUptName)->count()}},
  716. @endforeach
  717. ]
  718. },
  719. {
  720. name: 'STT Terbit Belum di-TL UPT',
  721. data: [
  722. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  723. <?php
  724. if ($value->id_bulan == 1) {
  725. $minMonth = 12;
  726. $minYears = $fixYears - 1;
  727. }
  728. else{
  729. $minMonth = $value->id_bulan - 1;
  730. $minYears = $fixYears;
  731. }
  732. ?>
  733. {{\App\Model\SPP\StatusTagihan::whereMonth('bi_create_date',$minMonth)->whereYear('bi_create_date',$minYears)->where('status_izin','Perpanjangan')->where('bi_type',16)->where('active',null)->where('upt',$getUptName)->count()}},
  734. @endforeach
  735. ]
  736. },
  737. ]
  738. });
  739. </script>
  740. <script type="text/javascript">
  741. var map = am4core.create("chartdiv", am4maps.MapChart);
  742. </script>
  743. <script type="text/javascript" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
  744. <script type="text/javascript">
  745. var j = jQuery.noConflict();
  746. var table = j('#server-side').DataTable({
  747. "lengthChange": true,
  748. orderCellsTop: true,
  749. fixedHeader: true,
  750. "processing": true,
  751. "serverSide": true,
  752. "ajax": {
  753. "type": "GET",
  754. "url": "{{ url()->current() }}",
  755. "data": function (d) {
  756. console.log(d);
  757. return j.extend({}, d, {
  758. "type": "WEB",
  759. <?php
  760. foreach ($_GET as $key => $value) {
  761. ?>
  762. "{{ $key }}": "{{ $value }}",
  763. <?php
  764. }
  765. ?>
  766. });
  767. },
  768. },
  769. "columns": [
  770. {
  771. "data": "no_spp",
  772. },
  773. {
  774. "data": "no_klien",
  775. },
  776. {
  777. "data": "nama_perusahaan",
  778. },
  779. {
  780. "data": null,
  781. "render": function (data, type, row, meta) {
  782. if (data.bi_type == 1) {
  783. return '<a class="btn btn-success btn-sm text-white">ST 1</a>';
  784. }
  785. else if (data.bi_type == 9) {
  786. return '<a class="btn btn-success btn-sm text-white">ST 1 Paid</a>';
  787. }
  788. else if (data.bi_type == 2) {
  789. return '<a class="btn btn-info btn-sm text-white">ST 2</a>';
  790. }
  791. else if (data.bi_type == 10) {
  792. return '<a class="btn btn-info btn-sm text-white">ST 2 Paid</a>';
  793. }
  794. else if (data.bi_type == 3) {
  795. return '<a class="btn btn-warning btn-sm text-white">ST 3</a>';
  796. }
  797. else if (data.bi_type == 11) {
  798. return '<a class="btn btn-warning btn-sm text-white">ST 3 Paid</a>';
  799. }
  800. else if (data.bi_type == 16) {
  801. return '<a class="btn btn-danger btn-sm text-white">STT</a>';
  802. }
  803. else if (data.bi_type == 49) {
  804. return '<a class="btn btn-danger btn-sm text-white">STT Paid</a>';
  805. }
  806. else {
  807. return '-';
  808. }
  809. }
  810. },
  811. {
  812. "data": "upt",
  813. },
  814. {
  815. "data": "bhp",
  816. },
  817. {
  818. "data": "bi_created_at",
  819. },
  820. {
  821. "data": null,
  822. "render": function (data, type, row, meta) {
  823. return '<center><a class="btn btn-success btn-sm text-white">Telah Bayar</a></center>';
  824. }
  825. },
  826. {
  827. "data": "due_date",
  828. },
  829. {
  830. "data": "pay_date",
  831. },
  832. {
  833. "data": "service_name",
  834. },
  835. {
  836. "data": null,
  837. "render": function (data, type, row, meta) {
  838. if (data.active == 1) {
  839. return 'Sudah Disetujui';
  840. }
  841. else if(data.active == null) {
  842. return 'Terbayarkan';
  843. }
  844. else {
  845. return 'Belum disetujui';
  846. }
  847. }
  848. },
  849. {
  850. "data": "method",
  851. },
  852. {
  853. "data": "tanggal_upaya",
  854. },
  855. {
  856. "data": null,
  857. "render": function (data, type, row, meta) {
  858. if(data.bukti_dukung != null) {
  859. return '<a href="{{url("spp/st/lampiran")}}' + '/' + data.bukti_dukung + '" class="btn btn-info btn-sm"><i class="fa fa-download"></i></a>';
  860. }
  861. else {
  862. return '-';
  863. }
  864. }
  865. },
  866. {
  867. "data": "keterangan",
  868. }
  869. ],
  870. "ordering": true
  871. });
  872. </script>