/**
  * @name $getPipelineShipment
  * @param int $wh_id
  * @param int $type
  * 
  * This service will return all Pipeline Consignments which are either 
  * completely not received or partially received sorted by arrival date.
  * 
  * @author Ajmal Hussain <*****@*****.**>
  */
 public function getPipelineConsignmentsAction()
 {
     $type = $this->_request->getParam('type');
     if ($this->_request->getParam('wh_id')) {
         $wh_id = $this->_request->getParam('wh_id');
         $pipeline_consignments = new Model_PipelineConsignments();
         if ($type == 1) {
             $result = $pipeline_consignments->getPipelineConsignmentsByWh($wh_id);
         } else {
             $result = $pipeline_consignments->getPlannedIssueByWh($wh_id);
         }
     } else {
         $result = array(array("error" => "Please provide wh_id param. e.g. (?wh_id=1)"));
     }
     echo Zend_Json::encode($result);
 }