copy dari repo om Irfan
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
use Restserver\Libraries\REST_Controller;
|
||||
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
require APPPATH . 'libraries/REST_Controller.php';
|
||||
require APPPATH . 'libraries/Format.php';
|
||||
|
||||
class ManageHutangBank extends CI_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('ModelHutangBank', 'HutangBank');
|
||||
$this->load->library(['datatables', 'form_validation']);
|
||||
$this->form_validation->set_error_delimiters('', '');
|
||||
}
|
||||
public function output_json($data, $encode = true)
|
||||
{
|
||||
if ($encode) $data = json_encode($data);
|
||||
$this->output->set_content_type('application/json')->set_output($data);
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
$datHutangBank = $this->HutangBank->getDataHutangBank();
|
||||
|
||||
$data = [
|
||||
'sidebar' => "menu accounting",
|
||||
'navChild' => "",
|
||||
'hutangbank'=> $datHutangBank
|
||||
];
|
||||
|
||||
$this->load->view('proses/HutangBank', $data);
|
||||
}
|
||||
|
||||
public function konfirmasi()
|
||||
{
|
||||
$method = $this->input->post('method');
|
||||
$id_hba = $this->input->post('id_hba');
|
||||
|
||||
$update = [
|
||||
'STATUS_HBA' => "LUNAS"
|
||||
];
|
||||
|
||||
$action = $this->HutangBank->update('hutang_bank', $update, 'ID_HBA', $id_hba);
|
||||
|
||||
if ($action) {
|
||||
$this->session->set_flashdata('flash', 'dikunci');
|
||||
redirect('ManageHutangBank');
|
||||
} else {
|
||||
$this->session->set_flashdata('flashgagal', 'dikunci');
|
||||
redirect('ManageHutangBank');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function viewDeskripsi($id)
|
||||
{
|
||||
$deskripsi = $this->HutangBank->getDataDeskripsiHBA($id);
|
||||
$title = $this->HutangBank->getTitleHBA($id);
|
||||
|
||||
$data = [
|
||||
'sidebar' => "menu accounting",
|
||||
'navChild' => "",
|
||||
'deskripsi' => $deskripsi,
|
||||
'id_hba' => $id,
|
||||
'title1' => $title[0]['KODE_HBA'],
|
||||
'title2' => $title[0]['DEBIT'],
|
||||
'title3' => $title[0]['KREDIT']
|
||||
];
|
||||
|
||||
$this->load->view('proses/DeskripsiHBA', $data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user