diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 324c4161ac6..df6e32f5cf8 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -211,7 +211,7 @@ if (empty($reshook)) { if ($action == 'confirm_paiement' && $confirm == 'yes' && $usercanissuepayment) { $error = 0; - $datepaye = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $datepaye = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzuser'); $db->begin(); diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 7d3025475e7..2306e99899b 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -271,7 +271,7 @@ print '
| '.$form->editfieldkey("Date", 'datep', $object->date, $object, $user->rights->facture->paiement).' | '; -print $form->editfieldval("Date", 'datep', $object->date, $object, $user->rights->facture->paiement, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); +print $form->editfieldval("Date", 'datep', $object->date, $object, $user->rights->facture->paiement, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'), '', 0, '', 'id', 'tzuser'); print ' | '.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).' | '; + print ''.dol_print_date($db->jdate($objp->datep), $dateformatforpayment, 'tzuser').' | '; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f07b82a4c74..a20d2cd62b2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -200,9 +200,10 @@ class Form * @param int $notabletag Do no output table tags * @param string $formatfunc Call a specific function to output field in view mode (For example: 'dol_print_email') * @param string $paramid Key of parameter for id ('id', 'socid') + * @param string $gm 'auto' or 'tzuser' or 'tzserver' (when $typeofdata is a date) * @return string HTML edit field */ - public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id') + public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id', $gm = 'auto') { global $conf, $langs; @@ -257,9 +258,9 @@ class Form $ret .= dol_string_neverthesehtmltags($valuetoshow, array('textarea')); $ret .= ''; } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { - $ret .= $this->selectDate($value, $htmlname, 0, 0, 1, 'form'.$htmlname, 1, 0); + $ret .= $this->selectDate($value, $htmlname, 0, 0, 1, 'form'.$htmlname, 1, 0, 0, '', '', '', '', 1, '', '', $gm); } elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { - $ret .= $this->selectDate($value, $htmlname, 1, 1, 1, 'form'.$htmlname, 1, 0); + $ret .= $this->selectDate($value, $htmlname, 1, 1, 1, 'form'.$htmlname, 1, 0, 0, '', '', '', '', 1, '', '', $gm); } elseif (preg_match('/^select;/', $typeofdata)) { $arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata)); $arraylist = array(); @@ -311,9 +312,9 @@ class Form } elseif (preg_match('/^restricthtml/', $typeofdata)) { $ret .= dol_string_onlythesehtmltags($value); } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { - $ret .= ''.dol_print_date($value, 'day').''; + $ret .= ''.dol_print_date($value, 'day', $gm).''; } elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { - $ret .= ''.dol_print_date($value, 'dayhour').''; + $ret .= ''.dol_print_date($value, 'dayhour', $gm).''; } elseif (preg_match('/^select;/', $typeofdata)) { $arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata)); $arraylist = array(); diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 6066cc1a8f9..cc77c2b7e81 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -93,7 +93,7 @@ if (!GETPOST("currency", 'alpha')) { $currency = GETPOST("currency", 'aZ09'); } $source = GETPOST("s", 'aZ09') ?GETPOST("s", 'aZ09') : GETPOST("source", 'aZ09'); -$download = GETPOST('d', 'int') ?GETPOST('d', 'int') : GETPOST('download', 'int'); +//$download = GETPOST('d', 'int') ?GETPOST('d', 'int') : GETPOST('download', 'int'); if (!$action) { if (!GETPOST("amount", 'alpha') && !$source) { @@ -490,7 +490,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $amountstripe = $amountstripe * 100; } - dol_syslog("--- newpayment.php Execute action = ".$action, LOG_DEBUG, 0, '_stripe'); + dol_syslog("--- newpayment.php Execute action = ".$action." STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION'), LOG_DEBUG, 0, '_stripe'); dol_syslog("GET=".var_export($_GET, true), LOG_DEBUG, 0, '_stripe'); dol_syslog("POST=".var_export($_POST, true), LOG_DEBUG, 0, '_stripe'); @@ -511,7 +511,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $errormessage = ''; // When using the old Charge API architecture - if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { + if (!getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')) { try { $metadata = array( 'dol_version' => DOL_VERSION, @@ -726,7 +726,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { } // When using the PaymentIntent API architecture (mode set on by default into conf.class.php) - if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { + if (getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')) { $service = 'StripeTest'; $servicestatus = 0; if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'int')) { @@ -798,7 +798,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) { $_SESSION['TRANSACTIONID'] = (is_object($charge) ? $charge->id : (is_object($paymentintent) ? $paymentintent->id : '')); $_SESSION['errormessage'] = $errormessage; - dol_syslog("Action charge stripe ip=".$remoteip, LOG_DEBUG, 0, '_stripe'); + dol_syslog("Action charge stripe STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')." ip=".$remoteip, LOG_DEBUG, 0, '_stripe'); dol_syslog("onlinetoken=".$_SESSION["onlinetoken"]." FinalPaymentAmt=".$_SESSION["FinalPaymentAmt"]." currencyCodeType=".$_SESSION["currencyCodeType"]." payerID=".$_SESSION['payerID']." TRANSACTIONID=".$_SESSION['TRANSACTIONID'], LOG_DEBUG, 0, '_stripe'); dol_syslog("FULLTAG=".$FULLTAG, LOG_DEBUG, 0, '_stripe'); dol_syslog("error=".$error." errormessage=".$errormessage, LOG_DEBUG, 0, '_stripe'); @@ -2163,13 +2163,14 @@ print '