Order Cancellator PHP




Test 2



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 "

\n";
print "\n";

$external_id = $results['ORDER_ID'][0] ;

while ( list( $key, $val ) = each( $results ) ) {
print "

\n";
}
print "\n";

for ( $i = 0; $i < $nrows; $i++ ) { reset($results); print "

\n";
while ( $column = each($results) ) {
$data = $column['value'];
print "\n";
}
print "\n";
}
print "
$key
$data[$i]
\n";

?>





\n";
}
print "$nrows Record(s) Selected
\n";

OCIFreeStatement($stmt);
OCILogoff($conn);
?>

Arbor Login:

Passwort:

Account No.:


Dieser Eintrag wurde veröffentlicht in Allgemein von admin. Setze ein Lesezeichen zum Permalink.