Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts: scripts/cron/cron_run_jobs.php
This commit is contained in:
commit
206d46cbb7
@ -66,7 +66,7 @@ $hookmanager->initHooks(array('suppliercard','globalcard'));
|
|||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$parameters=array('socid'=>$socid);
|
$parameters=array('id'=>$id);
|
||||||
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
|||||||
@ -588,7 +588,8 @@ class ProductFournisseur extends Product
|
|||||||
foreach($record_array as $record)
|
foreach($record_array as $record)
|
||||||
{
|
{
|
||||||
$fourn_price = $record["price"];
|
$fourn_price = $record["price"];
|
||||||
$fourn_unitprice = $record["unitprice"];
|
// discount calculated buy price
|
||||||
|
$fourn_unitprice = $record["unitprice"] * (1 - $record["remise_percent"] / 100) + $record["unitcharges"] - $record["remise"];
|
||||||
if (!empty($conf->dynamicprices->enabled) && !empty($record["fk_supplier_price_expression"])) {
|
if (!empty($conf->dynamicprices->enabled) && !empty($record["fk_supplier_price_expression"])) {
|
||||||
$prod_supplier = new ProductFournisseur($this->db);
|
$prod_supplier = new ProductFournisseur($this->db);
|
||||||
$prod_supplier->product_fourn_price_id = $record["product_fourn_price_id"];
|
$prod_supplier->product_fourn_price_id = $record["product_fourn_price_id"];
|
||||||
@ -620,7 +621,7 @@ class ProductFournisseur extends Product
|
|||||||
$this->fourn_qty = $record["quantity"];
|
$this->fourn_qty = $record["quantity"];
|
||||||
$this->fourn_remise_percent = $record["remise_percent"];
|
$this->fourn_remise_percent = $record["remise_percent"];
|
||||||
$this->fourn_remise = $record["remise"];
|
$this->fourn_remise = $record["remise"];
|
||||||
$this->fourn_unitprice = $fourn_unitprice;
|
$this->fourn_unitprice = $record["unitprice"];
|
||||||
$this->fourn_charges = $record["charges"]; // deprecated
|
$this->fourn_charges = $record["charges"]; // deprecated
|
||||||
$this->fourn_unitcharges = $record["unitcharges"]; // deprecated
|
$this->fourn_unitcharges = $record["unitcharges"]; // deprecated
|
||||||
$this->fourn_tva_tx = $record["tva_tx"];
|
$this->fourn_tva_tx = $record["tva_tx"];
|
||||||
@ -629,7 +630,7 @@ class ProductFournisseur extends Product
|
|||||||
$this->delivery_time_days = $record["delivery_time_days"];
|
$this->delivery_time_days = $record["delivery_time_days"];
|
||||||
$this->fk_supplier_price_expression = $record["fk_supplier_price_expression"];
|
$this->fk_supplier_price_expression = $record["fk_supplier_price_expression"];
|
||||||
$this->id = $prodid;
|
$this->id = $prodid;
|
||||||
$min = $this->fourn_unitprice;
|
$min = $fourn_unitprice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@ ALTER TABLE llx_product_customer_price ADD COLUMN localtax1_type varchar(10) NO
|
|||||||
ALTER TABLE llx_product_customer_price ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
|
ALTER TABLE llx_product_customer_price ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
|
||||||
ALTER TABLE llx_product_customer_price_log ADD COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0' after localtax1_tx;
|
ALTER TABLE llx_product_customer_price_log ADD COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0' after localtax1_tx;
|
||||||
ALTER TABLE llx_product_customer_price_log ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
|
ALTER TABLE llx_product_customer_price_log ADD COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0' after localtax2_tx;
|
||||||
|
ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_supplier_proposal integer NOT NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_opensurvey_sondage ADD COLUMN status integer DEFAULT 1 after date_fin;
|
ALTER TABLE llx_opensurvey_sondage ADD COLUMN status integer DEFAULT 1 after date_fin;
|
||||||
|
|
||||||
|
|||||||
@ -55,10 +55,10 @@ $key=$argv[1];
|
|||||||
if (! isset($argv[2]) || ! $argv[2]) {
|
if (! isset($argv[2]) || ! $argv[2]) {
|
||||||
usage($path,$script_file);
|
usage($path,$script_file);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
} else {
|
|
||||||
$userlogin=$argv[2];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$userlogin=$argv[2];
|
||||||
|
|
||||||
|
|
||||||
// Global variables
|
// Global variables
|
||||||
$version=DOL_VERSION;
|
$version=DOL_VERSION;
|
||||||
@ -69,8 +69,11 @@ $error=0;
|
|||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// current date
|
||||||
|
$now=dol_now();
|
||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." ***** userlogin=" . $userlogin . " ***** " . $now . " *****\n";
|
||||||
|
|
||||||
// Check security key
|
// Check security key
|
||||||
if ($key != $conf->global->CRON_KEY)
|
if ($key != $conf->global->CRON_KEY)
|
||||||
@ -114,6 +117,7 @@ else
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$user->getrights();
|
||||||
|
|
||||||
if (isset($argv[3]) || $argv[3])
|
if (isset($argv[3]) || $argv[3])
|
||||||
{
|
{
|
||||||
@ -136,6 +140,7 @@ if ($result<0)
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$qualifiedjobs = array();
|
$qualifiedjobs = array();
|
||||||
foreach($object->lines as $val)
|
foreach($object->lines as $val)
|
||||||
{
|
{
|
||||||
@ -145,8 +150,6 @@ foreach($object->lines as $val)
|
|||||||
|
|
||||||
// TODO This sequence of code must be shared with code into public/cron/cron_run_jobs.php php page.
|
// TODO This sequence of code must be shared with code into public/cron/cron_run_jobs.php php page.
|
||||||
|
|
||||||
// current date
|
|
||||||
$now=dol_now();
|
|
||||||
$nbofjobs=count($qualifiedjobs);
|
$nbofjobs=count($qualifiedjobs);
|
||||||
$nbofjobslaunchedok=0;
|
$nbofjobslaunchedok=0;
|
||||||
$nbofjobslaunchedko=0;
|
$nbofjobslaunchedko=0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user