public void addLine(String itemCode, double quantity) throws BPException {
if(order==null){
//Order is not valid
throw new BPException("SALES_000002");
}
CustomerOrderLine orderLine=new CustomerOrderLine();
//check item
Item item=findItem(itemCode);
if(item==null){
orderLineBPOperationResult = 3;
}
orderLine.setItem(findItem(itemCode));
//TODO LINE numbering rules
//Check warehouse
Warehouse warehouse=order.getCustomer().getWarehouse();
if(warehouse==null){
//TODO customer does not have preferred Warehouse