<?php

/**
 * Subclass for performing query and update operations on the 'DEPARTAMENTOS' table.
 *
 *
 *
 * @package lib.model
 */
class DepartamentosPeer extends BaseDepartamentosPeer
{
	public static function getCodDepto($destino) {
		$nom = explode('-', $destino);
		
		$c = new Criteria();
		$c->add(DepartamentosPeer::DESDEPTO, $nom[1]);
		
		$depto = DepartamentosPeer::doSelectOne($c);
		
		if($depto)
			return $depto->getCoddepto();
		else
			return '05';
	}
}
