Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3b22b6192d
@ -34,7 +34,7 @@ class modExpenseReport extends DolibarrModules
|
|||||||
/**
|
/**
|
||||||
* Constructor. Define names, constants, directories, boxes, permissions
|
* Constructor. Define names, constants, directories, boxes, permissions
|
||||||
*
|
*
|
||||||
* @param Database $db Database handler
|
* @param DoliDb $db Database handler
|
||||||
*/
|
*/
|
||||||
public function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -553,8 +553,6 @@ class MultiCurrency extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way = 'dolibarr', $table = 'facture')
|
public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way = 'dolibarr', $table = 'facture')
|
||||||
{
|
{
|
||||||
global $db;
|
|
||||||
|
|
||||||
$multicurrency_tx = self::getInvoiceRate($fk_facture, $table);
|
$multicurrency_tx = self::getInvoiceRate($fk_facture, $table);
|
||||||
|
|
||||||
if ($multicurrency_tx)
|
if ($multicurrency_tx)
|
||||||
@ -588,10 +586,11 @@ class MultiCurrency extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* With free account we can't set source then recalcul all rates to force another source
|
* With free account we can't set source then recalcul all rates to force another source.
|
||||||
|
* This modify the array &$TRate.
|
||||||
*
|
*
|
||||||
* @param stdClass $TRate Object containing all currencies rates
|
* @param stdClass $TRate Object containing all currencies rates
|
||||||
* @return -1 if KO, 0 if nothing, 1 if OK
|
* @return int -1 if KO, 0 if nothing, 1 if OK
|
||||||
*/
|
*/
|
||||||
public static function recalculRates(&$TRate)
|
public static function recalculRates(&$TRate)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -542,18 +542,10 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1";
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Final weight impact
|
//Final weight impact
|
||||||
$weight_impact = $forced_weightvar;
|
$weight_impact = (float) $forced_weightvar; // If false, return 0
|
||||||
|
|
||||||
if ($forced_weightvar === false) {
|
|
||||||
$weight_impact = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Final price impact
|
//Final price impact
|
||||||
$price_impact = $forced_pricevar;
|
$price_impact = (float) $forced_pricevar; // If false, return 0
|
||||||
|
|
||||||
if ($forced_pricevar === false) {
|
|
||||||
$price_impact = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$newcomb = new ProductCombination($db);
|
$newcomb = new ProductCombination($db);
|
||||||
$existingCombination = $newcomb->fetchByProductCombination2ValuePairs($product->id, $combinations);
|
$existingCombination = $newcomb->fetchByProductCombination2ValuePairs($product->id, $combinations);
|
||||||
|
|||||||
@ -1003,7 +1003,7 @@ function getListOfProductsOrServices($authentication, $filterproduct)
|
|||||||
*
|
*
|
||||||
* @param array $authentication Array of authentication information
|
* @param array $authentication Array of authentication information
|
||||||
* @param array $id Category id
|
* @param array $id Category id
|
||||||
* @param $lang $lang Force lang
|
* @param Translate $lang Force lang
|
||||||
* @return array Array result
|
* @return array Array result
|
||||||
*/
|
*/
|
||||||
function getProductsForCategory($authentication, $id, $lang = '')
|
function getProductsForCategory($authentication, $id, $lang = '')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user