fix: delete()
The delete method does not delete product_stock record. Typing error in delete product record debug log, sql iso sqlz
This commit is contained in:
parent
5b7b15ecfa
commit
dde9a6da39
@ -621,7 +621,7 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete all child tables
|
// Delete all child tables
|
||||||
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product');
|
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock');
|
||||||
foreach($elements as $table)
|
foreach($elements as $table)
|
||||||
{
|
{
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -644,7 +644,7 @@ class Product extends CommonObject
|
|||||||
{
|
{
|
||||||
$sqlz = "DELETE FROM ".MAIN_DB_PREFIX."product";
|
$sqlz = "DELETE FROM ".MAIN_DB_PREFIX."product";
|
||||||
$sqlz.= " WHERE rowid = ".$id;
|
$sqlz.= " WHERE rowid = ".$id;
|
||||||
dol_syslog(get_class($this).'::delete sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::delete sql='.$sqlz, LOG_DEBUG);
|
||||||
$resultz = $this->db->query($sqlz);
|
$resultz = $this->db->query($sqlz);
|
||||||
if ( ! $resultz )
|
if ( ! $resultz )
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user