// SupplyOrder form updated

This commit is contained in:
bMancone
2012-01-30 10:11:36 +00:00
parent e959ed363b
commit 39f8cfe26a
4 changed files with 35 additions and 7 deletions
+21
View File
@@ -487,6 +487,27 @@ class SupplyOrderCore extends ObjectModel
}
}
/**
* Gets the reference of a given order
*
* @param int $id_supply_order
* @return bool|string
*/
public static function getReferenceById($id_supply_order)
{
if (!$id_supply_order)
return false;
$query = new DbQuery();
$query->select('so.reference');
$query->from('supply_order', 'so');
$query->where('so.id_supply_order = '.(int)$id_supply_order);
$ref = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
return (pSQL($ref));
}
/*********************************\
*
* Webservices Specific Methods