24 lines
648 B
PHP
24 lines
648 B
PHP
<?php
|
|
$path = realpath(dirname(__FILE__));
|
|
require_once $path . '/../core/main.php';
|
|
|
|
$id = $_REQUEST['id'];
|
|
$flag = $_REQUEST['flags'];
|
|
if ($flag == 'delete'){
|
|
$query = "UPDATE order_poct SET is_valid = 3 where id = {$id} ";
|
|
$execute_poct = execute($query);
|
|
}
|
|
|
|
if($flag == 'print_nota'){
|
|
$sql_nota = "select * from order_poct where no_nota='".$id."'";
|
|
$tmp=$db->query($sql_nota);
|
|
$data = $tmp->fetchAll()[0];
|
|
if ($tmp->numRows() > 0){
|
|
$cetak = $data['cetakan_nota'] + 1;
|
|
|
|
$query = "UPDATE order_poct SET cetakan_nota = {$cetak} where no_nota = '".$id."' ";
|
|
$execute_poct = execute($query);
|
|
}
|
|
}
|
|
|