Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
751ef3ff1b
@ -51,9 +51,9 @@ $langs->load('propal');
|
|||||||
|
|
||||||
$origin = GETPOST('origin','alpha')?GETPOST('origin','alpha'):'expedition'; // Example: commande, propal
|
$origin = GETPOST('origin','alpha')?GETPOST('origin','alpha'):'expedition'; // Example: commande, propal
|
||||||
$origin_id = GETPOST('id','int')?GETPOST('id','int'):'';
|
$origin_id = GETPOST('id','int')?GETPOST('id','int'):'';
|
||||||
|
$id = $origin_id;
|
||||||
if (empty($origin_id)) $origin_id = GETPOST('origin_id','int'); // Id of order or propal
|
if (empty($origin_id)) $origin_id = GETPOST('origin_id','int'); // Id of order or propal
|
||||||
if (empty($origin_id)) $origin_id = GETPOST('object_id','int'); // Id of order or propal
|
if (empty($origin_id)) $origin_id = GETPOST('object_id','int'); // Id of order or propal
|
||||||
$id = $origin_id;
|
|
||||||
$ref=GETPOST('ref','alpha');
|
$ref=GETPOST('ref','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -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 )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -61,6 +61,7 @@ class MouvementStock
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
$error = 0;
|
$error = 0;
|
||||||
dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse=$entrepot_id, qty=$qty, type=$type, price=$price label=$label");
|
dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse=$entrepot_id, qty=$qty, type=$type, price=$price label=$label");
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user