<?php
include "../../asset/mod/autoLoad.php";

if (isset($_POST['submitProseAdd'])) {
    $id_tr = $_POST['id_tr'];
    $id_setor = $_POST['id_setor'];
    $tb_transaksi = $_POST['tb_transaksi'];
    foreach ($_POST['id_tr'] as $id) {
        $class = new setor();

        $crud = new crudData();
        $dataarray = [
            'id_setor' => $id_setor,
            'setor' => 1
        ];
        $update = $crud->updateData($tb_transaksi, $dataarray, ['no', ' = ', $id]);
        // }
    }
    $direct = new toast();
    echo  $direct->redirectID('toast', 'save', $id_setor, 'setor/setor_list');
} else {
    echo "";
};
