<?php


$id_billing = $_POST['id_billing'];
$id_siswa = $_POST['id_siswa'];
$status = $_POST['status'];
$tahun_tabel = $_POST['tahun_tabel'];

$payment_list = "payment_list" . $tahun_tabel;
$tb_transaksi = "db_transaksi" . $tahun_tabel;

$cekpost = new cekissetPost;
$keterangan = $cekpost->cek('keterangan');

if (isset($_POST['submitReset']) && isset($_POST['id_billing'])) {
    $db = database::getInstance();

    //wa
    require('../../asset/mod/autoLoad.php');


    $time = new time();
    $waktu = $time->getTime();
    $browser = $_SERVER['HTTP_USER_AGENT'];

    $class = new crudData();
    $dataarray = [
        'status' => 'DRAF',
        'keterangan' => 'Reset'
    ];
    $update = $class->updateData($payment_list, $dataarray, ['payment_id', ' = ', $id_billing]);


    $direct = new toast();
    echo  $direct->redirectID('toast', 'reset', $id_siswa, 'transfer/index');
};
