forked from Wavyzz/dolibarr
Fix CI
This commit is contained in:
@@ -376,7 +376,7 @@ if ($mode == 'overwrite') {
|
||||
|
||||
// If a cache for translation is on, show a warning.
|
||||
if (isModEnabled('memcached') || getDolGlobalInt('MAIN_USE_CACHE_FOR_TRANSLATION')) {
|
||||
$infoOnTransProcess .= info_admin($langs->trans("CacheForTranslationIsUsed"), 0, 0, 1, 'warning');
|
||||
$infoOnTransProcess .= info_admin($langs->trans("CacheForTranslationIsUsed"), 0, 0, '1', 'warning');
|
||||
}
|
||||
|
||||
print $infoOnTransProcess;
|
||||
|
||||
@@ -1080,7 +1080,7 @@ class Facture extends CommonInvoice
|
||||
0,
|
||||
$fk_parent_line,
|
||||
$fk_product_fournisseur_price,
|
||||
$buyprice,
|
||||
is_null($buyprice) ? '' : $buyprice, // do not use (float) here, it may be ''
|
||||
$_facrec->lines[$i]->label,
|
||||
empty($_facrec->lines[$i]->array_options) ? null : $_facrec->lines[$i]->array_options,
|
||||
100, // situation percent is undefined on recurring invoice lines
|
||||
|
||||
@@ -9773,7 +9773,7 @@ abstract class CommonObject
|
||||
* @param float $unitPrice Product unit price
|
||||
* @param float $discountPercent Line discount percent
|
||||
* @param int $fk_product Product id
|
||||
* @return float|int<-1,-1> Return buy price if OK, integer <0 if KO
|
||||
* @return float|int<-2,-1> Return buy price if OK, integer <0 if KO
|
||||
*/
|
||||
public function defineBuyPrice($unitPrice = 0.0, $discountPercent = 0.0, $fk_product = 0)
|
||||
{
|
||||
@@ -9826,7 +9826,8 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
}
|
||||
return $buyPrice;
|
||||
|
||||
return (float) $buyPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7058,7 +7058,7 @@ function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0,
|
||||
* Function to format a value into an amount for visual output
|
||||
* Function used into PDF and HTML pages
|
||||
*
|
||||
* @param string|float $amount Amount value to format
|
||||
* @param int|float[string $amount Amount value to format
|
||||
* @param int<0,1> $form Type of formatting: 1=HTML, 0=no formatting (no by default)
|
||||
* @param Translate|string|null $outlangs Object langs for output. '' use default lang. 'none' use international separators.
|
||||
* @param int $trunc 1=Truncate if there is more decimals than MAIN_MAX_DECIMALS_SHOWN (default), 0=Does not truncate. Deprecated because amount are rounded (to unit or total amount accuracy) before being inserted into database or after a computation, so this parameter should be useless.
|
||||
@@ -7178,7 +7178,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
||||
* Function to use on each input amount before any numeric test or database insert. A better name for this function
|
||||
* should be roundtext2num().
|
||||
*
|
||||
* @param string|float $amount Amount to convert/clean or round
|
||||
* @param int|float|string $amount Amount to convert/clean or round
|
||||
* @param ''|'MU'|'MT'|'MS'|'CU'|'CT'|int<0,max> $rounding ''=No rounding
|
||||
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
||||
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
|
||||
|
||||
@@ -122,7 +122,7 @@ if ($idprod > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
$prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price()
|
||||
$prices[] = array("id" => 'pmpprice', "price" => price2num((float) $price), "label" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price()
|
||||
}
|
||||
|
||||
// Add price for costprice (at end)
|
||||
|
||||
@@ -1149,7 +1149,7 @@ if ($resql) {
|
||||
}
|
||||
$pmp_valuation = $pmp_expected * $valuetoshow;
|
||||
print '<td class="right">';
|
||||
print price($pmp_expected);
|
||||
print is_null($pmp_expected) ? '' : price($pmp_expected);
|
||||
print '<input type="hidden" name="expectedpmp_'.$obj->rowid.'" value="'.$pmp_expected.'"/>';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
@@ -1171,7 +1171,7 @@ if ($resql) {
|
||||
$pmp_real = $product_static->pmp;
|
||||
}
|
||||
$pmp_valuation_real = $pmp_real * $qty_view;
|
||||
print '<input type="text" class="maxwidth75 right realpmp'.$obj->fk_product.'" name="realpmp_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input_pmp" value="'.price2num($pmp_real).'">';
|
||||
print '<input type="text" class="maxwidth75 right realpmp'.$obj->fk_product.'" name="realpmp_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input_pmp" value="'.(is_null($pmp_real) ? '' : price2num($pmp_real)).'">';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="text" class="maxwidth75 right realvaluation'.$obj->fk_product.'" name="realvaluation_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input_real_valuation" value="'.$pmp_valuation_real.'">';
|
||||
|
||||
Reference in New Issue
Block a user