mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-07 17:42:53 +01:00
Fix : php 8.0 warnings + errors
This commit is contained in:
@@ -2129,6 +2129,7 @@ if (empty($reshook)) {
|
||||
$date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||
$date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||
$price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT');
|
||||
$tva_npr = "";
|
||||
|
||||
// Define special_code for special lines
|
||||
$special_code = 0;
|
||||
@@ -2157,8 +2158,7 @@ if (empty($reshook)) {
|
||||
|
||||
//$tva_tx = $datapriceofproduct['tva_tx'];
|
||||
//$tva_npr = $datapriceofproduct['tva_npr'];
|
||||
|
||||
$tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx));
|
||||
$tmpvat = (float) price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx));
|
||||
$tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx));
|
||||
|
||||
// Set unit price to use
|
||||
|
||||
@@ -406,7 +406,7 @@ if ($object->id > 0) {
|
||||
print '<span class="badgeneutral">';
|
||||
print $object->getLibType();
|
||||
print '</span>';
|
||||
if ($object->module_source) {
|
||||
if (!empty($object->module_source)) {
|
||||
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')</span>';
|
||||
}
|
||||
if ($object->type == $object::TYPE_REPLACEMENT) {
|
||||
|
||||
@@ -365,11 +365,11 @@ class Stripe extends CommonObject
|
||||
$stripeamount = $amount;
|
||||
}
|
||||
|
||||
$fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE;
|
||||
if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
|
||||
$fee = $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL;
|
||||
} elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
|
||||
$fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL;
|
||||
$fee = $amount * (getDolGlobalString("STRIPE_APPLICATION_FEE_PERCENT", '0') / 100) + getDolGlobalString("STRIPE_APPLICATION_FEE", '0');
|
||||
if ($fee >= getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0') && getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0') > getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0')) {
|
||||
$fee = getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0');
|
||||
} elseif ($fee < getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0')) {
|
||||
$fee = getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0');
|
||||
}
|
||||
if (!in_array($currency_code, $arrayzerounitcurrency)) {
|
||||
$stripefee = round($fee * 100);
|
||||
|
||||
Reference in New Issue
Block a user