// Clean order_detail_tax table after deleting an order detail #PSCFV-8278

This commit is contained in:
Rémi Gaillard
2013-03-15 11:51:19 +01:00
parent 564aafd10d
commit d4d0661ff8
+10
View File
@@ -250,6 +250,16 @@ class OrderDetailCore extends ObjectModel
$this->context = $context->cloneContext(); $this->context = $context->cloneContext();
} }
public function delete()
{
if(!$res = parent::delete())
return false;
Db::getInstance()->delete('order_detail_tax', 'id_order_detail='.(int)$this->id);
return $res;
}
protected function setContext($id_shop) protected function setContext($id_shop)
{ {
if ($this->context->shop->id != $id_shop) if ($this->context->shop->id != $id_shop)