Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts: htdocs/install/mysql/migration/repair.sql
This commit is contained in:
commit
50d65e3a9f
@ -1158,7 +1158,7 @@ function check_value($mask,$value)
|
|||||||
|
|
||||||
// If an offset is asked
|
// If an offset is asked
|
||||||
if (! empty($reg[2]) && preg_match('/^\+/',$reg[2])) $maskoffset=preg_replace('/^\+/','',$reg[2]);
|
if (! empty($reg[2]) && preg_match('/^\+/',$reg[2])) $maskoffset=preg_replace('/^\+/','',$reg[2]);
|
||||||
if (! empty($reg[3]) && preg_match('^\+',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]);
|
if (! empty($reg[3]) && preg_match('/^\+/',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]);
|
||||||
|
|
||||||
// Define $sqlwhere
|
// Define $sqlwhere
|
||||||
|
|
||||||
|
|||||||
@ -276,3 +276,14 @@ DELETE FROM llx_c_shipment_mode where code IN (select code from tmp_c_shipment_m
|
|||||||
drop table tmp_c_shipment_mode;
|
drop table tmp_c_shipment_mode;
|
||||||
|
|
||||||
|
|
||||||
|
-- Clean product prices
|
||||||
|
--delete from llx_product_price where date_price between '2017-04-20 06:51:00' and '2017-04-20 06:51:05';
|
||||||
|
-- Set product prices into llx_product with last price into llx_product_prices
|
||||||
|
--update llx_product as p set
|
||||||
|
-- p.price = (select pp.price from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1),
|
||||||
|
-- p.price_ttc = (select pp.price_ttc from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1),
|
||||||
|
-- p.price_min = (select pp.price_min from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1),
|
||||||
|
-- p.price_min_ttc = (select pp.price_min_ttc from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1),
|
||||||
|
-- p.tva_tx = 0
|
||||||
|
-- where price = 17.5
|
||||||
|
|
||||||
|
|||||||
@ -42,8 +42,6 @@ $oldvatrate=GETPOST('oldvatrate');
|
|||||||
$newvatrate=GETPOST('newvatrate');
|
$newvatrate=GETPOST('newvatrate');
|
||||||
//$price_base_type=GETPOST('price_base_type');
|
//$price_base_type=GETPOST('price_base_type');
|
||||||
|
|
||||||
$objectstatic = new Product($db);
|
|
||||||
$objectstatic2 = new ProductFournisseur($db);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -87,6 +85,7 @@ if ($action == 'convert')
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$objectstatic = new Product($db); // Object init must be into loop to avoid to get value of previous step
|
||||||
$ret=$objectstatic->fetch($obj->rowid);
|
$ret=$objectstatic->fetch($obj->rowid);
|
||||||
if ($ret > 0)
|
if ($ret > 0)
|
||||||
{
|
{
|
||||||
@ -150,7 +149,8 @@ if ($action == 'convert')
|
|||||||
if ($ret < 0 || $retm < 0) $error++;
|
if ($ret < 0 || $retm < 0) $error++;
|
||||||
else $nbrecordsmodified++;
|
else $nbrecordsmodified++;
|
||||||
}
|
}
|
||||||
|
unset($objectstatic);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -176,6 +176,7 @@ if ($action == 'convert')
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$objectstatic2 = new ProductFournisseur($db); // Object init must be into loop to avoid to get value of previous step
|
||||||
$ret=$objectstatic2->fetch_product_fournisseur_price($obj->rowid);
|
$ret=$objectstatic2->fetch_product_fournisseur_price($obj->rowid);
|
||||||
if ($ret > 0)
|
if ($ret > 0)
|
||||||
{
|
{
|
||||||
@ -207,6 +208,8 @@ if ($action == 'convert')
|
|||||||
if ($ret < 0 || $retm < 0) $error++;
|
if ($ret < 0 || $retm < 0) $error++;
|
||||||
else $nbrecordsmodified++;
|
else $nbrecordsmodified++;
|
||||||
}
|
}
|
||||||
|
unset($objectstatic2);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user