// Stock decrementation when order is shipped

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9486 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-10-20 09:08:59 +00:00
parent 06564db555
commit 78ddaa120c
17 changed files with 212 additions and 125 deletions
+9
View File
@@ -241,4 +241,13 @@ class WarehouseCore extends ObjectModel
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query));
}
public static function getWarehouseList()
{
$query = new DbQuery();
$query->select('w.id_warehouse, name');
$query->from('warehouse w');
$query->innerJoin('warehouse_shop ws ON ws.id_warehouse = w.id_warehouse AND ws.id_shop = '.Context::getContext()->shop->getID(true));
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
}
}