copy dari repo om Irfan
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
<?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 ManagePiutangPihakKe3 extends CI_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('ModelPiutangPihakKe3', 'PiutangPihakKe3');
|
||||
$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);
|
||||
}
|
||||
|
||||
//Step One, Input Piutang PihakKe3
|
||||
public function index()
|
||||
{
|
||||
|
||||
$datPiutangPihakKe3 = $this->PiutangPihakKe3->getDataPiutangPihakKe3();
|
||||
|
||||
$data = [
|
||||
'sidebar' => "menu accounting",
|
||||
'navChild' => "",
|
||||
'piutangpihakke3' => $datPiutangPihakKe3
|
||||
];
|
||||
|
||||
$this->load->view('proses/PiutangPihakKe3', $data);
|
||||
}
|
||||
|
||||
public function konfirmasi()
|
||||
{
|
||||
$method = $this->input->post('method');
|
||||
$id_ppi = $this->input->post('id_ppi');
|
||||
|
||||
$update = [
|
||||
'STATUS_PPI' => "LUNAS"
|
||||
];
|
||||
|
||||
$action = $this->PiutangPihakKe3->update('piutang_pihakke3', $update, 'ID_PPI', $id_ppi);
|
||||
|
||||
if ($action) {
|
||||
$this->session->set_flashdata('flash', 'dikunci');
|
||||
redirect('ManagePiutangPihakKe3');
|
||||
} else {
|
||||
$this->session->set_flashdata('flashgagal', 'dikunci');
|
||||
redirect('ManagePiutangPihakKe3');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Step Two, View Deskripsi
|
||||
public function viewDeskripsi($id)
|
||||
{
|
||||
$deskripsi = $this->PiutangPihakKe3->getDataDeskripsiPPI($id);
|
||||
$title = $this->PiutangPihakKe3->getTitlePPI($id);
|
||||
|
||||
$data = [
|
||||
'sidebar' => "menu accounting",
|
||||
'navChild' => "",
|
||||
'deskripsi' => $deskripsi,
|
||||
'id_ppi' => $id,
|
||||
'title1' => $title[0]['KODE_PPI'],
|
||||
'title2' => $title[0]['DEBIT'],
|
||||
'title3' => $title[0]['KREDIT']
|
||||
];
|
||||
|
||||
$this->load->view('proses/DeskripsiPPI', $data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user