Fix : php 8.0 warnings + errors
This commit is contained in:
parent
49a403b4a5
commit
6d6ba3fa83
@ -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_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'));
|
$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');
|
$price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT');
|
||||||
|
$tva_npr = "";
|
||||||
|
|
||||||
// Define special_code for special lines
|
// Define special_code for special lines
|
||||||
$special_code = 0;
|
$special_code = 0;
|
||||||
@ -2157,8 +2158,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
//$tva_tx = $datapriceofproduct['tva_tx'];
|
//$tva_tx = $datapriceofproduct['tva_tx'];
|
||||||
//$tva_npr = $datapriceofproduct['tva_npr'];
|
//$tva_npr = $datapriceofproduct['tva_npr'];
|
||||||
|
$tmpvat = (float) price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx));
|
||||||
$tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx));
|
|
||||||
$tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx));
|
$tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx));
|
||||||
|
|
||||||
// Set unit price to use
|
// Set unit price to use
|
||||||
|
|||||||
@ -406,7 +406,7 @@ if ($object->id > 0) {
|
|||||||
print '<span class="badgeneutral">';
|
print '<span class="badgeneutral">';
|
||||||
print $object->getLibType();
|
print $object->getLibType();
|
||||||
print '</span>';
|
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>';
|
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')</span>';
|
||||||
}
|
}
|
||||||
if ($object->type == $object::TYPE_REPLACEMENT) {
|
if ($object->type == $object::TYPE_REPLACEMENT) {
|
||||||
|
|||||||
@ -365,11 +365,11 @@ class Stripe extends CommonObject
|
|||||||
$stripeamount = $amount;
|
$stripeamount = $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE;
|
$fee = $amount * (getDolGlobalString("STRIPE_APPLICATION_FEE_PERCENT", '0') / 100) + getDolGlobalString("STRIPE_APPLICATION_FEE", '0');
|
||||||
if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
|
if ($fee >= getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0') && getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0') > getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0')) {
|
||||||
$fee = $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL;
|
$fee = getDolGlobalString("STRIPE_APPLICATION_FEE_MAXIMAL", '0');
|
||||||
} elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
|
} elseif ($fee < getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0')) {
|
||||||
$fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL;
|
$fee = getDolGlobalString("STRIPE_APPLICATION_FEE_MINIMAL", '0');
|
||||||
}
|
}
|
||||||
if (!in_array($currency_code, $arrayzerounitcurrency)) {
|
if (!in_array($currency_code, $arrayzerounitcurrency)) {
|
||||||
$stripefee = round($fee * 100);
|
$stripefee = round($fee * 100);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user