diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 2ec6f63d84c..3a8e4f99a65 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -444,13 +444,13 @@ if (empty($reshook))
$error++;
}
- $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'));
- if (!empty($date_start) && !empty($date_end) && $date_start > $date_end)
- {
- setEventMessages($langs->trans("Error").': '.$langs->trans("DateStartPlanned").' > '.$langs->trans("DateEndPlanned"), null, 'errors');
- $error++;
- }
+ $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'));
+ if (!empty($date_start) && !empty($date_end) && $date_start > $date_end)
+ {
+ setEventMessages($langs->trans("Error").': '.$langs->trans("DateStartPlanned").' > '.$langs->trans("DateEndPlanned"), null, 'errors');
+ $error++;
+ }
// Extrafields
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
@@ -531,7 +531,7 @@ if (empty($reshook))
$pu_ht = price2num($pu_ttc / (1 + ($tmpvat/100)), 'MU');
}
else
- {
+ {
$pu_ttc = price2num($pu_ht * (1 + ($tmpvat/100)), 'MU');
}
}
@@ -727,9 +727,9 @@ if (empty($reshook))
$objectline->pa_ht=$pa_ht;
if ($fk_unit > 0) {
- $objectline->fk_unit = GETPOST('unit');
+ $objectline->fk_unit = GETPOST('unit');
} else {
- $objectline->fk_unit = null;
+ $objectline->fk_unit = null;
}
// Extrafields
@@ -1418,19 +1418,20 @@ else
$morehtmlref.=' '.$langs->trans('Project') . ' ';
if ($user->rights->contrat->creer)
{
- if ($action != 'classify')
+ if ($action != 'classify') {
$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref.='
';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
- }
+ }
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
@@ -2253,7 +2254,7 @@ $db->close();
if (! empty($conf->margin->enabled) && $action == 'editline')
{
// TODO Why this ? To manage margin on contracts ?
-?>
+ ?>
-
* Copyright (C) 2014-2015 Marcos García
* Copyright (C) 2018 Nicolas ZABOURI
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2018-2019 Frédéric France
* Copyright (C) 2015-2018 Ferran Marcet
*
* This program is free software; you can redistribute it and/or modify
@@ -861,9 +861,9 @@ class Contrat extends CommonObject
// multilangs
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
- $line = new Product($this->db);
- $line->fetch($objp->fk_product);
- $line->getMultiLangs();
+ $line = new Product($this->db);
+ $line->fetch($objp->fk_product);
+ $line->getMultiLangs();
}
$this->lines[$pos] = $line;
diff --git a/htdocs/dav/dav.lib.php b/htdocs/dav/dav.lib.php
index c2c0895c4d8..e428faa0f85 100644
--- a/htdocs/dav/dav.lib.php
+++ b/htdocs/dav/dav.lib.php
@@ -24,19 +24,19 @@
// define CDAV_CONTACT_TAG if not
if(!defined('CDAV_CONTACT_TAG'))
{
- if(isset($conf->global->CDAV_CONTACT_TAG))
+ if (isset($conf->global->CDAV_CONTACT_TAG))
define('CDAV_CONTACT_TAG', $conf->global->CDAV_CONTACT_TAG);
- else
- define('CDAV_CONTACT_TAG', '');
+ else
+ define('CDAV_CONTACT_TAG', '');
}
// define CDAV_URI_KEY if not
if(!defined('CDAV_URI_KEY'))
{
- if(isset($conf->global->CDAV_URI_KEY))
+ if (isset($conf->global->CDAV_URI_KEY))
define('CDAV_URI_KEY', $conf->global->CDAV_URI_KEY);
- else
- define('CDAV_URI_KEY', substr(md5($_SERVER['HTTP_HOST']), 0, 8));
+ else
+ define('CDAV_URI_KEY', substr(md5($_SERVER['HTTP_HOST']), 0, 8));
}
diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php
index d2f11419ef9..9b76f2b90b3 100644
--- a/htdocs/public/agenda/agendaexport.php
+++ b/htdocs/public/agenda/agendaexport.php
@@ -220,7 +220,7 @@ if ($format == 'rss')
$result=readfile($outputfile);
if (! $result) print 'File '.$outputfile.' was empty.';
- // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
+ // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
exit;
}
else
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index f82e3549630..067c371bf67 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -1878,42 +1878,37 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
//if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || ! empty($paymentintent))
//{
- print '
-
- ';
+ print '
+
+ ';
- if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION))
- {
- print '
';
- }
+ if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION))
+ {
+ print '
';
+ }
- print '
-
-
- ';
-
- print ''.$langs->trans("ValidatePayment").' ';
- print ' ';
-
- print '
-
-
';
+ print ' ';
+ print '
';
//}
if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION))
@@ -2006,7 +2001,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
{
print $e->getMessage();
}
- ?>
+ ?>
// Code for payment with option STRIPE_USE_NEW_CHECKOUT set
// Create a Stripe client.
@@ -2049,11 +2044,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
});
- global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION))
{
- ?>
+ ?>
// Code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION set
// Create a Stripe client.
@@ -2153,11 +2148,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
}
});
-
+ ?>
// Old code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION off and STRIPE_USE_NEW_CHECKOUT off
// Create a Stripe client.
@@ -2209,7 +2204,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
global->STRIPE_USE_3DSECURE)) // Ask credit card directly, no 3DS test
{
- ?>
+ ?>
/* Use token */
stripe.createToken(card).then(function(result) {
if (result.error) {
@@ -2221,11 +2216,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
stripeTokenHandler(result.token);
}
});
-
+ ?>
/* Use 3DS source */
stripe.createSource(card).then(function(result) {
if (result.error) {
@@ -2237,7 +2232,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
stripeSourceHandler(result.source);
}
});
-
});
@@ -2291,7 +2286,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
form.submit();
}
- ';