예제 #1
0
 public static function GetQuoteItems($quoteId)
 {
     //check whether available and make necessary inventory deductions, then
     $lineItems = array();
     try {
         $sql = 'SELECT * FROM quotation_items WHERE quote_id = ' . $quoteId . ' AND status = 1';
         $res = DatabaseHandler::GetAll($sql);
         foreach ($res as $item) {
             $lineItem = new QuotationLine($item['quote_id'], $item['item_name'], $item['item_desc'], $item['quantity'], $item['unit_price'], $item['tax']);
             $lineItem->initId($item['id']);
             $lineItems[] = $lineItem;
         }
         return $lineItems;
     } catch (Exception $e) {
     }
 }