// Gets on singular order from the database for the order entry page.
// Gets on singular order from the database for the order entry page.
// orderInfo: the ORDER_ID.
// orderInfo: the ORDER_ID.
// TODO seperate this into GetCorrugatedOrder and GetWebOrder.
var
var
orderType:string;
orderType:string;
orderID:string;
orderID:string;
...
@@ -1222,23 +1221,18 @@ var
...
@@ -1222,23 +1221,18 @@ var
begin
begin
orderID:=orderInfo;
orderID:=orderInfo;
try
try
SQL:='select ORDER_TYPE from orders where ORDER_ID = '+quotedStr(orderID);
SQL:='select * from corrugated_plate_orders cpo JOIN customers c ON c.CUSTOMER_ID = cpo.COMPANY_ID join orders o on cpo.ORDER_ID = o.ORDER_ID where cpo.ORDER_ID = '+quotedStr(orderID);