50
AND order_id = v_order_id;
UPDATE order_milestones SET status_id = 80 WHERE status_id <> 50
AND order_id = v_order_id;
UPDATE order_work_queue SET status = 80 WHERE status <> 50
AND order_id = v_order_id;
UPDATE customer_order SET order_status = 5 WHERE order_status in ( 1, 2, 3 )
AND order_id = v_order_id;
UPDATE order_lookup SET order_status = 5 WHERE order_status in ( 1, 2, 3 )
AND order_id = v_order_id;
DELETE FROM order_dependency WHERE order_id = v_order_id
or dependent_upon_order_id = v_order_id;
delete from invd_order_dep c
where c.order_id in ( v_order_id );
delete from INVD_CHANGE c
where c.order_id in ( v_order_id );
delete from PEN_XFER_HISTORY px
where px.order_id in ( v_order_id );
delete from PEN_SWAP_HISTORY ps
where ps.order_id in ( v_order_id );
COMMIT;
END;
");
OCIExecute($stmt);
if ( $stmt ) echo "Auftrag $order_id abgebrochen.";
}
elseif ( $_REQUEST['action'] == 'check' && isset ( $_SESSION['arbor_user'] ) && isset ( $_SESSION['arbor_passwd'] ) && isset ( $_REQUEST['account_no'] ) )
{
$conn=OCILogon($_SESSION['arbor_user'], $_SESSION['arbor_passwd'], $db);
$sql=
"
SELECT *
FROM CUSTOMER_ORDER@aom WHERE MASTER_ACCOUNT_NO = $_REQUEST[account_no] AND ORDER_STATUS NOT IN ( 4 , 5 )
";
$stmt=OCIParse($conn, $sql);
OCIExecute($stmt);
$nrows = OCIFetchStatement($stmt,$results);
if ( $nrows > 0 ) {
print "
$key | \n";
---|
$data[$i] | \n";
?>
} else {
echo "No data found
\n";
}
print "$nrows Record(s) Selected
\n";
OCIFreeStatement($stmt);
OCILogoff($conn);
?>