示例#1
0
 /**
  * 
  * @param DispoData $DispoData
  * @return int
  */
 public function actualizarCeroStock($DispoData)
 {
     $proveedor_id = $DispoData->getProveedorId();
     $sql = " UPDATE dispo " . " SET cantidad_bunch_disponible = 0" . " WHERE inventario_id \t= '" . $DispoData->getInventarioId() . "'";
     if (!empty($proveedor_id)) {
         $sql = $sql . "   and proveedor_id  \t= '" . $DispoData->getProveedorId() . "'";
     }
     //end if
     $sql = $sql . "   and producto\t\t= '" . $DispoData->getProducto() . "'" . "   and variedad_id\t\t= '" . $DispoData->getVariedadId() . "'" . "   and tallos_x_bunch  = " . $DispoData->getTallosxbunch() . "   and clasifica\t\t= '" . $DispoData->getClasifica() . "'";
     $count = $this->getEntityManager()->getConnection()->executeUpdate($sql);
     return $count;
 }