Example #1
0
 } else {
     if ($_REQUEST['mode'] == "show") {
         $order_id = $_REQUEST['order_id'];
         $order1 = $purchaseorder->get_order($order_id);
         while ($result1 = $purchaseorder->fetch_object($order1)) {
             $orderno = $result1->order_no;
             $supplierno = $result1->supplier_id;
             $datecreated = $result1->order_date;
             $orderedby = $result1->ordered_by;
         }
         $supplier = $purchaseorder->get_supplier($supplierno);
         echo $purchaseorder->generate_order($orderno, $supplier, $orderedby, $datecreated);
     } else {
         if (isset($del_order) && isset($del_no)) {
             $sql1 = "delete from care_tz_purchase_order_detail where order_no='{$del_order}' AND no='{$del_no}'";
             $purchaseorder->query($sql1);
             $order1 = $purchaseorder->get_order($del_order);
             while ($result1 = $purchaseorder->fetch_object($order1)) {
                 $orderno = $result1->order_no;
                 $supplierno = $result1->supplier_id;
                 $datecreated = $result1->order_date;
                 $orderedby = $result1->ordered_by;
             }
             $supplier = $purchaseorder->get_supplier($supplierno);
             $form = " ";
             echo $purchaseorder->generate_order($orderno, $supplier, $orderedby, $datecreated);
         } else {
             if (isset($update_order) && isset($update_no)) {
                 //update starts here
                 $sql1 = "select * from care_tz_purchase_order_detail where order_no='{$update_order}' AND no='{$update_no}'";
                 $res = $purchaseorder->query($sql1);
Example #2
0
error_reporting(E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR);
require './roots.php';
require $root_path . 'include/care_api_classes/supplier_database_class.php';
require $root_path . 'include/care_api_classes/class_purchase_order.php';
require_once 'index.php';
global $supplier, $del_order;
$supplier = $_REQUEST['supplier'];
$del_order = $_REQUEST['del_order'];
$orders = new purchaseorder();
$orders->dbconnect();
$orders->dbselect();
if (isset($del_order)) {
    $sql1 = "delete from care_tz_purchase_order_detail where order_no='{$del_order}'";
    $sql2 = "delete from care_tz_purchase_order where order_no='{$del_order}'";
    $orders->query($sql1);
    $orders->query($sql2);
}
$rs = $orders->orders($supplier);
?>
<html>
<head>
<link rel="stylesheet" href="../../css/themes/default/default.css" type="text/css">
<style type="text/css">

TH {
    font-family: verdana;
    font-size: 10pt;
    background-color: #CCCCE5;
    font-weight: bold;
}