';
// Ref
- print ''.$langs->trans('Ref').' '.$langs->trans('Draft').' ';
+ print ''.$langs->trans('Ref').' '.$langs->trans('Draft').' ';
// Company
if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) {
// Thirdparty
- print ''.$langs->trans('Customer').' ';
- if ($soc->id > 0 && !GETPOST('fac_rec', 'alpha')) {
- print '';
+ if ($soc->id > 0)
+ {
+ print ' '.$langs->trans('ThirdParty').' ';
+ print '';
print $soc->getNomUrl(1);
print ' ';
// Outstanding Bill
@@ -370,7 +376,8 @@ if ($action == 'create') {
print ')';
print ' ';
} else {
- print '';
+ print ' '.$langs->trans('ThirdParty').' ';
+ print '';
print $form->select_company($soc->id, 'socid', '(s.client = 1 OR s.client = 3) AND status=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
// Option to reload page to retrieve customer informations. Note, this clear other input
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) {
@@ -386,7 +393,7 @@ if ($action == 'create') {
});
';
}
- print ' '.$langs->trans("AddThirdParty").' ';
+ print ' ';
print ' ';
}
print ''."\n";
@@ -540,11 +547,15 @@ if (!empty($id) && $action == 'edit') {
print "";
print "\n";
- if ($object->socid && !empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) {
+ if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) {
$company = new Societe($db);
- $result = $company->fetch($object->socid);
- print ''.$langs->trans("LinkedToDolibarrThirdParty").' '.$company->getNomUrl(1).' ';
+ print ''.$langs->trans("ThirdParty").' ';
+ if ($object->socid > 0) {
+ $result = $company->fetch($object->socid);
+ print $company->getNomUrl(1);
+ }
+ print ' ';
} else {
$langs->load("companies");
print ''.$langs->trans("Company").' ';
@@ -700,11 +711,15 @@ if (!empty($id) && $action != 'edit') {
print yn($object->public);
print '';
- if ($object->socid) {
+ if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) {
$company = new Societe($db);
- $result = $company->fetch($object->socid);
- print ''.$langs->trans("LinkedToDolibarrThirdParty").' '.$company->getNomUrl(1).' ';
+ print ''.$langs->trans("ThirdParty").' ';
+ if ($object->socid > 0) {
+ $result = $company->fetch($object->socid);
+ print $company->getNomUrl(1);
+ }
+ print ' ';
} else {
print ''.$langs->trans("Company").' '.$object->societe.' ';
print ''.$langs->trans("Lastname").' '.$object->lastname.' ';
diff --git a/htdocs/langs/en_US/dict.lang b/htdocs/langs/en_US/dict.lang
index ec315d97142..0524cf1ca18 100644
--- a/htdocs/langs/en_US/dict.lang
+++ b/htdocs/langs/en_US/dict.lang
@@ -21,7 +21,7 @@ CountryNL=Netherlands
CountryHU=Hungary
CountryRU=Russia
CountrySE=Sweden
-CountryCI=Ivoiry Coast
+CountryCI=Ivory Coast
CountrySN=Senegal
CountryAR=Argentina
CountryCM=Cameroon
diff --git a/htdocs/langs/en_US/donations.lang b/htdocs/langs/en_US/donations.lang
index de4bdf68f03..d512abb2eea 100644
--- a/htdocs/langs/en_US/donations.lang
+++ b/htdocs/langs/en_US/donations.lang
@@ -32,3 +32,4 @@ DONATION_ART238=Show article 238 from CGI if you are concerned
DONATION_ART885=Show article 885 from CGI if you are concerned
DonationPayment=Donation payment
DonationValidated=Donation %s validated
+DonationUseThirdparties=Use an existing thirdparty as coordinates of donators
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 67544b46328..58f5307255a 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -1125,3 +1125,4 @@ ConfirmAffectTag=Bulk Tag Affect
ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)?
CategTypeNotFound=No tag type found for type of records
CopiedToClipboard=Copied to clipboard
+InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration.
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index df0bb4ed95c..16cea8746c3 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -871,7 +871,7 @@ if (!$source) {
}
print '';
if (empty($amount) || !is_numeric($amount)) {
- print ' ';
+ print ' ';
print ' ';
} else {
print ''.price($amount).' ';
@@ -914,8 +914,8 @@ if ($source == 'order') {
if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment
$amount = $order->total_ttc;
- if (GETPOST("amount", 'int')) {
- $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) {
+ $amount = GETPOST("amount", 'alpha');
}
$amount = price2num($amount);
}
@@ -966,7 +966,7 @@ if ($source == 'order') {
}
print ' ';
if (empty($amount) || !is_numeric($amount)) {
- print ' ';
+ print ' ';
print ' ';
} else {
print ''.price($amount).' ';
@@ -1038,8 +1038,8 @@ if ($source == 'invoice') {
if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment
$amount = price2num($invoice->total_ttc - ($invoice->getSommePaiement() + $invoice->getSumCreditNotesUsed() + $invoice->getSumDepositsUsed()));
- if (GETPOST("amount", 'int')) {
- $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) {
+ $amount = GETPOST("amount", 'alpha');
}
$amount = price2num($amount);
}
@@ -1093,7 +1093,7 @@ if ($source == 'invoice') {
print ''.$langs->trans("CreditNote").' ';
} elseif (empty($object->paye)) {
if (empty($amount) || !is_numeric($amount)) {
- print ' ';
+ print ' ';
print ' ';
} else {
print ''.price($amount).' ';
@@ -1204,8 +1204,8 @@ if ($source == 'contractline') {
}
}
- if (GETPOST("amount", 'int')) {
- $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) {
+ $amount = GETPOST("amount", 'alpha');
}
$amount = price2num($amount);
}
@@ -1297,7 +1297,7 @@ if ($source == 'contractline') {
}
print ' ';
if (empty($amount) || !is_numeric($amount)) {
- print ' ';
+ print ' ';
print ' ';
} else {
print ''.price($amount).' ';
@@ -1370,10 +1370,10 @@ if ($source == 'membersubscription') {
if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment
$amount = $subscription->total_ttc;
- if (GETPOST("amount", 'int')) {
- $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) {
+ $amount = GETPOST("amount", 'alpha');
}
- $amount = price2num($amount);
+ $amount = price2num($amount, 'MT');
}
if (GETPOST('fulltag', 'alpha')) {
@@ -1473,12 +1473,18 @@ if ($source == 'membersubscription') {
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
}
- print ' ';
- print ' ';
+ print ' ';
+ if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) {
+ print ' ';
+ print ' ';
+ } else {
+ print ' ';
+ }
} else {
$valtoshow = $amount;
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
+ $amount = $valtoshow;
}
print ''.price($valtoshow).' ';
print ' ';
@@ -1548,8 +1554,8 @@ if ($source == 'donation') {
if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment
$amount = $subscription->total_ttc;
- if (GETPOST("amount", 'int')) {
- $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) {
+ $amount = GETPOST("amount", 'alpha');
}
$amount = price2num($amount);
}
@@ -1627,12 +1633,13 @@ if ($source == 'donation') {
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
}
- print ' ';
+ print ' ';
print ' ';
} else {
$valtoshow = $amount;
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
+ $amount = $valtoshow;
}
print ''.price($valtoshow).' ';
print ' ';
@@ -2126,6 +2133,10 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme
}
else
{
+ /* Disable button to pay and show hourglass cursor */
+ jQuery('#hourglasstopay').show();
+ jQuery('#buttontopay').hide();
+
stripe.handleCardPayment(
clientSecret, cardElement, {
payment_method_data: {
diff --git a/htdocs/societe/canvas/company/tpl/card_create.tpl.php b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
index 27faac6de12..8e1eda02c33 100644
--- a/htdocs/societe/canvas/company/tpl/card_create.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
@@ -75,7 +75,7 @@ if (empty($conf) || !is_object($conf)) {
@@ -86,14 +86,14 @@ if (empty($conf) || !is_object($conf)) {
trans('Supplier'); ?>
control->tpl['yn_supplier']; ?>
- trans('SupplierCode'); ?>
-
-
+ trans('SupplierCode'); ?>
+
+
diff --git a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
index 1630a1f5d05..35e38a10f0e 100644
--- a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
@@ -76,7 +76,7 @@ $contact = $GLOBALS['objcanvas']->control->object;
control->tpl['ismodifiable_customercode']) { ?>
-
+
control->tpl['customercode']; ?>
@@ -97,7 +97,7 @@ $contact = $GLOBALS['objcanvas']->control->object;
control->tpl['ismodifiable_suppliercode']) { ?>
-
+
control->tpl['suppliercode']; ?>
diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
index 92793164936..a4c21ddcc2d 100644
--- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
@@ -83,7 +83,7 @@ if (empty($conf) || !is_object($conf)) {
@@ -94,14 +94,14 @@ if (empty($conf) || !is_object($conf)) {
trans('Supplier'); ?>
control->tpl['yn_supplier']; ?>
- trans('SupplierCode'); ?>
-
-
+ trans('SupplierCode'); ?>
+
+
diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
index e7d3e8cc8c7..7a43f256b45 100644
--- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
@@ -72,7 +72,7 @@ if (empty($conf) || !is_object($conf)) {
control->tpl['ismodifiable_customercode']) { ?>
-
+
control->tpl['customercode']; ?>
@@ -93,7 +93,7 @@ if (empty($conf) || !is_object($conf)) {
control->tpl['ismodifiable_suppliercode']) { ?>
-
+
control->tpl['suppliercode']; ?>
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index d0e17b8ba09..9601a49f397 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -1270,7 +1270,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
$tmpcode = $modCodeClient->getNextValue($object, 0);
}
- print ' ';
+ print ' ';
print ' ';
$s = $modCodeClient->getToolTip($langs, $object, 0);
print $form->textwithpicto('', $s, 1);
@@ -1305,7 +1305,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) {
$tmpcode = $modCodeFournisseur->getNextValue($object, 1);
}
- print ' ';
+ print ' ';
print ' ';
$s = $modCodeFournisseur->getToolTip($langs, $object, 1);
print $form->textwithpicto('', $s, 1);
@@ -1944,9 +1944,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
$tmpcode = $modCodeClient->getNextValue($object, 0);
}
- print ' ';
+ print ' ';
} elseif ($object->codeclient_modifiable()) {
- print ' ';
+ print ' ';
} else {
print $object->code_client;
print ' ';
@@ -1984,9 +1984,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) {
$tmpcode = $modCodeFournisseur->getNextValue($object, 1);
}
- print ' ';
+ print ' ';
} elseif ($object->codefournisseur_modifiable()) {
- print ' ';
+ print ' ';
} else {
print $object->code_fournisseur;
print ' ';
diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php
index b5cc638631c..03eacd13745 100644
--- a/test/phpunit/DateLibTest.php
+++ b/test/phpunit/DateLibTest.php
@@ -334,7 +334,6 @@ class DateLibTest extends PHPUnit\Framework\TestCase
print __METHOD__." result=".$result."\n";
$this->assertSame('1 '.strtolower(dol_substr($langs->trans("Day"), 0, 1).'.'), $result);
-
return $result;
}
diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php
index 63893a9c881..7b1e4caa440 100644
--- a/test/phpunit/DateLibTzFranceTest.php
+++ b/test/phpunit/DateLibTzFranceTest.php
@@ -82,9 +82,9 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase
{
global $conf,$user,$langs,$db;
- if (getServerTimeZoneString() != 'Europe/Paris') {
- print "\n".__METHOD__." This PHPUnit test can be launched manually only onto a server with PHP timezone set to TZ+1 Europe/Paris, not a TZ=".getServerTimeZoneString().".\n"; die();
- }
+ if (getServerTimeZoneString() != 'Europe/Paris' && getServerTimeZoneString() != 'Europe/Berlin') {
+ print "\n".__METHOD__." This PHPUnit test can be launched manually only onto a server with PHP timezone set to TZ=Europe/Paris, not a TZ=".getServerTimeZoneString().".\n"; die();
+ }
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.