Ejemplo n.º 1
0
                if ($result = $konsumen->set_kuota_0($_POST['id'], $_POST['tglAwal'], $_POST['tglAkhir'])) {
                    $arr['status'] = TRUE;
                    $arr['msg'] = "Ubah kuota sukses..";
                } else {
                    $arr['status'] = FALSE;
                    $arr['msg'] = "Gagal mengubah kuota..";
                }
            } else {
                $arr['status'] = FALSE;
                $arr['msg'] = "Harap isi data dengan lengkap..";
            }
            echo json_encode($arr);
            break;
        case "hapus-kuota":
            $arr = array();
            if (isset($_POST['id']) && $_POST['id'] != "") {
                if ($result = $konsumen->hapus_kuota_penjualan($_POST['id'])) {
                    $arr['status'] = TRUE;
                    $arr['msg'] = "Data terhapus..";
                } else {
                    $arr['status'] = FALSE;
                    $arr['msg'] = "Gagal menghapus..";
                }
            } else {
                $arr['status'] = FALSE;
                $arr['msg'] = "Harap isi data dengan lengkap..";
            }
            echo json_encode($arr);
            break;
    }
}