You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.1 KiB

<?php
namespace App\Controllers;
use App\Models\Mref;
use App\Models\Mrapor;
class Rapor extends BaseController
{
function wpbayar()
{
$tahun = $this->request->getVar('tahun');
$pbulan = $this->request->getPost('bulan');
if (empty($ptahun)) {
$tahun = date('Y');
} else {
$tahun = $ptahun;
}
if (empty($pbulan)) {
$bulan = date('m');
} else {
$bulan = $pbulan;
}
$param = array('tahun' => $tahun, 'bln' => $bulan);
$model = new Mrapor();
$modelref = new Mref();
$d['tahunx'] = $tahun;
$d['bulanx'] = $bulan;
$d['refbulan'] = $modelref->getBln();
$d['raporbyr'] =$model->getRatKwl($param)->getResult();
if (session('isLogin')) {
echo view('inc/head');
echo view('inc/navbar');
echo view('inc/sidebar');
echo view('rapor/wpbayar',$d);
echo view('inc/footer');
} else {
return redirect()->to('auth');
}
}
}