copy dari repo om Irfan

This commit is contained in:
2026-06-13 16:02:07 +10:00
commit db327c0305
5376 changed files with 2770667 additions and 0 deletions
@@ -0,0 +1,63 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class ManageStockAll extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->model('ModelProgress', 'MP');
$this->load->model('ModelService', 'MS');
$this->load->model('ModelOperator', 'MO');
$this->load->model('ModelTeknisi', 'MT');
$this->load->model('ModelStock', 'MSt');
$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()
{
$datStock = $this->MSt->getDataStockAll();
$datService = $this->MS->getDataService();
$datTeknisi = $this->MT->getDataTeknisi();
$data = [
'sidebar' => "data laporan service",
'navChild' => "data laporan stock all",
'stock' => $datStock,
'service' => $datService,
'teknisi' => $datTeknisi
];
$this->load->view('master/StockAll', $data);
}
public function edit()
{
$method = $this->input->post('method');
$id_progress = $this->input->post('id_progress');
$status_progress = $this->input->post('status_progressed');
$input = [
'STATUS_PROGRESS' => $status_progress,
'TANGGAL_KONFIRM' => date('Y-m-d H:i:s')
];
$action = $this->MP->update('progress', $input, 'ID_PROGRESS',$id_progress);
if ($action) {
$this->session->set_flashdata('flash', 'ditambah');
redirect('ManageStockAll');
} else {
$this->session->set_flashdata('flashgagal', 'ditambah');
redirect('ManageStockAll');
}
}
}