project.lock(); //if(request.OrderNumber != "ALL"){ OrderQuery = database.cursor("select order_header.order_no, order_header.customer_no, order_header.customer_po, MONTH(order_header.order_date) AS ord_mon, DAY(order_header.order_date) AS ord_day, YEAR(order_header.order_date) AS ord_year, order_line.order_no, order_line.line_no, order_line.item_no, order_line.location, order_line.qty_ordered, order_line.qty_shipped, order_line.price, customer.customer_name, item_master.description from order_header, order_line, customer, item_master where order_header.order_no = '" + request.OrderNumber + "' and order_line.order_no = order_header.order_no and customer.customer_no = order_header.customer_no and item_master.part_no = order_line.item_no") //} //else{ // OrderQuery = database.cursor("select order_header.order_no, order_header.customer_no, order_header.customer_po, MONTH(order_header.order_date) AS ord_mon, DAY(order_header.order_date) AS ord_day, YEAR(order_header.order_date) AS ord_year, order_line.order_no, order_line.line_no, order_line.item_no, order_line.location, order_line.qty_ordered, order_line.qty_shipped, order_line.price, customer.customer_name, item_master.description from order_header, order_line, customer, item_master where order_header.order_no = order_line.order_no and customer.customer_no = order_header.customer_no and item_master.part_no = order_line.item_no") //} write(""); //write(""); write("" + ""); write(""); write("" + "" + "" + ""); write("
Query Selections
Query Selections" + "
Order Number:" + request.OrderNumber + "
"); write(""); write(""); write("" + ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""); var no_data = "Y"; var bo_qty = 0; var bo_amt = 0; while(OrderQuery.next()){ //this code calls the truncation function. //the following two write statements need to be commented out //when compiling for netscape 2.XX write('' ) //the following write statement needs to be commented out //when compiling for netscape 2.XX. Also replace rndPrc //cursor.price no_data = "N"; if (OrderQuery.qty_shipped > 0 && OrderQuery.qty_shipped != OrderQuery.qty_ordered){ bo_qty = OrderQuery.qty_ordered - OrderQuery.qty_shipped; bo_amt = bo_qty * OrderQuery.price; } else{ bo_qty = 0; bo_amt = 0; } write(""); write(""); write(""); write(""); write(""); write(""); write(""); write(""); write(""); write(""); write(""); write(""); write(""); } write("
Order Status By Order Number
Customer NoCustomer NameCust P.O.Order NoOrder DateLine NoItem NoDescriptionQty OrderedQty ShippedPriceQty B.O.$ B.O.
" + OrderQuery.customer_no + "
" + OrderQuery.customer_name + "
" + OrderQuery.customer_po + "
" + OrderQuery.order_no + "
" + OrderQuery.ord_mon + "/" + OrderQuery.ord_day + "/" + OrderQuery.ord_year + "
" + OrderQuery.line_no + "
" + OrderQuery.item_no + "
" + OrderQuery.description + "
" + OrderQuery.qty_ordered + "
" + OrderQuery.qty_shipped + "
" + bo_qty + "
" + bo_amt + "
"); if(no_data == "Y") write("No Data Matches Your Selections"); project.unlock();