@@ -374,10 +374,10 @@ discard block |
||
| 374 | 374 | if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { |
| 375 | 375 | if ($tmpsource && $REF) { |
| 376 | 376 | // Use the source in the hash to avoid duplicates if the references are identical |
| 377 | - $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $tmpsource.$REF, $SECUREKEY, '2'); |
|
| 377 | + $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$tmpsource.$REF, $SECUREKEY, '2'); |
|
| 378 | 378 | // Do a second test for retro-compatibility (token may have been hashed with membersubscription in external module) |
| 379 | 379 | if ($tmpsource != $source) { |
| 380 | - $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $source.$REF, $SECUREKEY, '2'); |
|
| 380 | + $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$source.$REF, $SECUREKEY, '2'); |
|
| 381 | 381 | } |
| 382 | 382 | } else { |
| 383 | 383 | $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN'), $SECUREKEY, '2'); |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $tokenisok = (getDolGlobalString('PAYMENT_SECURITY_TOKEN') == $SECUREKEY); |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | - if (! $tokenisok) { |
|
| 389 | + if (!$tokenisok) { |
|
| 390 | 390 | if (!getDolGlobalString('PAYMENT_SECURITY_ACCEPT_ANY_TOKEN')) { |
| 391 | 391 | $valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility |
| 392 | 392 | } else { |
@@ -416,9 +416,9 @@ discard block |
||
| 416 | 416 | $paramcreditor = 'ONLINE_PAYMENT_CREDITOR'; |
| 417 | 417 | $paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix; |
| 418 | 418 | if (getDolGlobalString($paramcreditorlong)) { |
| 419 | - $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show |
|
| 419 | + $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show |
|
| 420 | 420 | } elseif (getDolGlobalString($paramcreditor)) { |
| 421 | - $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 421 | + $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | $mesg = ''; |
@@ -807,13 +807,13 @@ discard block |
||
| 807 | 807 | } |
| 808 | 808 | |
| 809 | 809 | if ($error) { |
| 810 | - $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 811 | - $_SESSION['paymentkosessioncode'] = $randomseckey; // key between newpayment.php to paymentko.php |
|
| 810 | + $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 811 | + $_SESSION['paymentkosessioncode'] = $randomseckey; // key between newpayment.php to paymentko.php |
|
| 812 | 812 | |
| 813 | 813 | $urlko .= '&paymentkosessioncode='.urlencode($randomseckey); |
| 814 | 814 | } else { |
| 815 | - $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 816 | - $_SESSION['paymentoksessioncode'] = $randomseckey; // key between newpayment.php to paymentok.php |
|
| 815 | + $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 816 | + $_SESSION['paymentoksessioncode'] = $randomseckey; // key between newpayment.php to paymentok.php |
|
| 817 | 817 | |
| 818 | 818 | $urlok .= '&paymentoksessioncode='.urlencode($randomseckey); |
| 819 | 819 | } |
@@ -860,8 +860,8 @@ discard block |
||
| 860 | 860 | setEventMessages($paymentintent->status, null, 'errors'); |
| 861 | 861 | $action = ''; |
| 862 | 862 | |
| 863 | - $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 864 | - $_SESSION['paymentkosessioncode'] = $randomseckey; // key between newpayment.php to paymentko.php |
|
| 863 | + $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 864 | + $_SESSION['paymentkosessioncode'] = $randomseckey; // key between newpayment.php to paymentko.php |
|
| 865 | 865 | |
| 866 | 866 | $urlko .= '&paymentkosessioncode='.urlencode($randomseckey); |
| 867 | 867 | } else { |
@@ -887,8 +887,8 @@ discard block |
||
| 887 | 887 | |
| 888 | 888 | dol_syslog("StatusOfRetrievedIntent is succeeded for amount = ".$amount." currency = ".$currency, LOG_DEBUG, 0, '_payment'); |
| 889 | 889 | |
| 890 | - $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 891 | - $_SESSION['paymentoksessioncode'] = $randomseckey; // key between newpayment.php to paymentok.php |
|
| 890 | + $randomseckey = getRandomPassword(true, null, 20); // TODO Generate a key including fulltag to avoid forging URL. |
|
| 891 | + $_SESSION['paymentoksessioncode'] = $randomseckey; // key between newpayment.php to paymentok.php |
|
| 892 | 892 | |
| 893 | 893 | $urlok .= '&paymentoksessioncode='.urlencode($randomseckey); |
| 894 | 894 | } |
@@ -898,8 +898,8 @@ discard block |
||
| 898 | 898 | $remoteip = getUserRemoteIP(); |
| 899 | 899 | |
| 900 | 900 | $_SESSION["onlinetoken"] = $stripeToken; |
| 901 | - $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
| 902 | - $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
| 901 | + $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
| 902 | + $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
| 903 | 903 | $_SESSION["paymentType"] = ''; |
| 904 | 904 | $_SESSION['ipaddress'] = ($remoteip ? $remoteip : 'unknown'); // Payer ip |
| 905 | 905 | $_SESSION['payerID'] = is_object($customer) ? $customer->id : ''; |
@@ -948,7 +948,7 @@ discard block |
||
| 948 | 948 | |
| 949 | 949 | $head = ''; |
| 950 | 950 | if (getDolGlobalString('ONLINE_PAYMENT_CSS_URL')) { |
| 951 | - $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.(!empty($getpostlang) ? $getpostlang : $langs->defaultlang).'">'."\n"; |
|
| 951 | + $head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.(!empty($getpostlang) ? $getpostlang : $langs->defaultlang).'">'."\n"; |
|
| 952 | 952 | } |
| 953 | 953 | |
| 954 | 954 | $conf->dol_hide_topmenu = 1; |
@@ -1023,7 +1023,7 @@ discard block |
||
| 1023 | 1023 | // Output html code for logo |
| 1024 | 1024 | if ($ws) { |
| 1025 | 1025 | // Look for a personalized header file (htmlheaderpayment.html) if the payment system is called from a website |
| 1026 | - $filehtmlheader = dol_sanitizePathName(DOL_DATA_ROOT . ($conf->entity > 1 ? '/' . $conf->entity : '') . '/website/' . $ws . '/htmlheaderpayment.html'); |
|
| 1026 | + $filehtmlheader = dol_sanitizePathName(DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/'.$ws.'/htmlheaderpayment.html'); |
|
| 1027 | 1027 | if (dol_is_file($filehtmlheader)) { |
| 1028 | 1028 | print file_get_contents(dol_osencode($filehtmlheader)); |
| 1029 | 1029 | } |
@@ -1084,7 +1084,7 @@ discard block |
||
| 1084 | 1084 | if (preg_match('/^\((.*)\)$/', getDolGlobalString('PAYMENT_NEWFORM_TEXT'), $reg)) { |
| 1085 | 1085 | $text .= $langs->trans($reg[1])."<br>\n"; |
| 1086 | 1086 | } else { |
| 1087 | - $text .= getDolGlobalString('PAYMENT_NEWFORM_TEXT') . "<br>\n"; |
|
| 1087 | + $text .= getDolGlobalString('PAYMENT_NEWFORM_TEXT')."<br>\n"; |
|
| 1088 | 1088 | } |
| 1089 | 1089 | $text = '<tr><td class="center"><br>'.$text.'<br></td></tr>'."\n"; |
| 1090 | 1090 | } |
@@ -1095,7 +1095,7 @@ discard block |
||
| 1095 | 1095 | print $text; |
| 1096 | 1096 | |
| 1097 | 1097 | // Output payment summary form |
| 1098 | -print '<tr><td align="center">'; // class=center does not have the payment button centered so we keep align here. |
|
| 1098 | +print '<tr><td align="center">'; // class=center does not have the payment button centered so we keep align here. |
|
| 1099 | 1099 | print '<table class="centpercent left" id="tablepublicpayment">'; |
| 1100 | 1100 | print '<tr class="hideonsmartphone"><td colspan="2" class="opacitymedium">'.$langs->trans("ThisIsInformationOnPayment").'...<br><br></td></tr>'."\n"; |
| 1101 | 1101 | |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | // Currency |
| 1138 | 1138 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1139 | 1139 | } else { |
| 1140 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1140 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1141 | 1141 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1142 | 1142 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1143 | 1143 | } |
@@ -1242,7 +1242,7 @@ discard block |
||
| 1242 | 1242 | // Currency |
| 1243 | 1243 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1244 | 1244 | } else { |
| 1245 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1245 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1246 | 1246 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1247 | 1247 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1248 | 1248 | } |
@@ -1378,12 +1378,12 @@ discard block |
||
| 1378 | 1378 | print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">'; |
| 1379 | 1379 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1380 | 1380 | } else { |
| 1381 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1381 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1382 | 1382 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1383 | 1383 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1384 | 1384 | } |
| 1385 | 1385 | } else { |
| 1386 | - print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1386 | + print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1387 | 1387 | } |
| 1388 | 1388 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
| 1389 | 1389 | print '</td></tr>'."\n"; |
@@ -1587,7 +1587,7 @@ discard block |
||
| 1587 | 1587 | // Currency |
| 1588 | 1588 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1589 | 1589 | } else { |
| 1590 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1590 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1591 | 1591 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1592 | 1592 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1593 | 1593 | } |
@@ -1649,7 +1649,7 @@ discard block |
||
| 1649 | 1649 | $member = new Adherent($db); |
| 1650 | 1650 | $adht = new AdherentType($db); |
| 1651 | 1651 | |
| 1652 | - $result = $member->fetch(0, $ref, 0, '', true, true); // This fetch also ->last_subscription_amount |
|
| 1652 | + $result = $member->fetch(0, $ref, 0, '', true, true); // This fetch also ->last_subscription_amount |
|
| 1653 | 1653 | if ($result <= 0) { |
| 1654 | 1654 | $mesg = $member->error; |
| 1655 | 1655 | $error++; |
@@ -1753,7 +1753,7 @@ discard block |
||
| 1753 | 1753 | $newtypeid = (int) (GETPOSTISSET("typeid") ? GETPOSTINT("typeid") : $member->typeid); |
| 1754 | 1754 | if (getDolGlobalString('MEMBER_ALLOW_CHANGE_OF_TYPE')) { |
| 1755 | 1755 | $typeid = $newtypeid; |
| 1756 | - $adht->fetch($typeid); // Reload with the new type id |
|
| 1756 | + $adht->fetch($typeid); // Reload with the new type id |
|
| 1757 | 1757 | } |
| 1758 | 1758 | |
| 1759 | 1759 | $caneditamount = $adht->caneditamount; |
@@ -1813,7 +1813,7 @@ discard block |
||
| 1813 | 1813 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
| 1814 | 1814 | // This place no longer allows amount edition |
| 1815 | 1815 | if (getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO')) { |
| 1816 | - print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1816 | + print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1817 | 1817 | } |
| 1818 | 1818 | print '</td><td class="CTableRow2">'; |
| 1819 | 1819 | |
@@ -1827,9 +1827,9 @@ discard block |
||
| 1827 | 1827 | print '<input type="text" class="width75" name="newamount" value="'.price($amount, 1, $langs, 1, -1, -1).'">'; |
| 1828 | 1828 | } |
| 1829 | 1829 | } else { |
| 1830 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1830 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1831 | 1831 | if ($minimumamount > $amount) { |
| 1832 | - print ' <span class="opacitymedium small">'. $langs->trans("AmountIsLowerToMinimumNotice", price($minimumamount, 1, $langs, 1, -1, -1, $currency)).'</span>'; |
|
| 1832 | + print ' <span class="opacitymedium small">'.$langs->trans("AmountIsLowerToMinimumNotice", price($minimumamount, 1, $langs, 1, -1, -1, $currency)).'</span>'; |
|
| 1833 | 1833 | } |
| 1834 | 1834 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1835 | 1835 | } |
@@ -1950,7 +1950,7 @@ discard block |
||
| 1950 | 1950 | print ' ('.$langs->trans("ToComplete"); |
| 1951 | 1951 | } |
| 1952 | 1952 | if (getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO')) { |
| 1953 | - print ' - <a href="' . getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1953 | + print ' - <a href="'.getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1954 | 1954 | } |
| 1955 | 1955 | if (!getDolGlobalString('DONATION_NEWFORM_AMOUNT')) { |
| 1956 | 1956 | print ')'; |
@@ -1988,7 +1988,7 @@ discard block |
||
| 1988 | 1988 | $valtoshow = max(getDolGlobalString('DONATION_MIN_AMOUNT'), $valtoshow); |
| 1989 | 1989 | $amount = $valtoshow; |
| 1990 | 1990 | } |
| 1991 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1991 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1992 | 1992 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
| 1993 | 1993 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
| 1994 | 1994 | } |
@@ -2064,7 +2064,7 @@ discard block |
||
| 2064 | 2064 | print '</b>'; |
| 2065 | 2065 | print '</td></tr>'."\n"; |
| 2066 | 2066 | |
| 2067 | - if (! is_object($attendee->project)) { |
|
| 2067 | + if (!is_object($attendee->project)) { |
|
| 2068 | 2068 | $text = 'ErrorProjectNotFound'; |
| 2069 | 2069 | } else { |
| 2070 | 2070 | $text = $langs->trans("PaymentEvent").' - '.$attendee->project->title; |
@@ -2081,7 +2081,7 @@ discard block |
||
| 2081 | 2081 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
| 2082 | 2082 | print '</td><td class="CTableRow2">'; |
| 2083 | 2083 | $valtoshow = $amount; |
| 2084 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 2084 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 2085 | 2085 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
| 2086 | 2086 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
| 2087 | 2087 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
@@ -2165,7 +2165,7 @@ discard block |
||
| 2165 | 2165 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
| 2166 | 2166 | print '</td><td class="CTableRow2">'; |
| 2167 | 2167 | $valtoshow = $amount; |
| 2168 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 2168 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 2169 | 2169 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
| 2170 | 2170 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
| 2171 | 2171 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
@@ -2425,7 +2425,7 @@ discard block |
||
| 2425 | 2425 | |
| 2426 | 2426 | //print '<br>'; |
| 2427 | 2427 | |
| 2428 | - print '<!-- Show Stripe form payment-form STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = ' . getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION').' STRIPE_USE_NEW_CHECKOUT = ' . getDolGlobalString('STRIPE_USE_NEW_CHECKOUT').' -->'."\n"; |
|
| 2428 | + print '<!-- Show Stripe form payment-form STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = '.getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION').' STRIPE_USE_NEW_CHECKOUT = '.getDolGlobalString('STRIPE_USE_NEW_CHECKOUT').' -->'."\n"; |
|
| 2429 | 2429 | print '<form action="'.$_SERVER['REQUEST_URI'].'" method="POST" id="payment-form">'."\n"; |
| 2430 | 2430 | |
| 2431 | 2431 | print '<input type="hidden" name="token" value="'.newToken().'">'."\n"; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $search_date_order_endday = GETPOSTINT('search_date_order_endday'); |
| 79 | 79 | $search_date_order_endmonth = GETPOSTINT('search_date_order_endmonth'); |
| 80 | 80 | $search_date_order_endyear = GETPOSTINT('search_date_order_endyear'); |
| 81 | -$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
| 81 | +$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
| 82 | 82 | $search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear); |
| 83 | 83 | |
| 84 | 84 | $search_date_delivery_startday = GETPOSTINT('search_date_delivery_startday'); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $search_date_delivery_endday = GETPOSTINT('search_date_delivery_endday'); |
| 88 | 88 | $search_date_delivery_endmonth = GETPOSTINT('search_date_delivery_endmonth'); |
| 89 | 89 | $search_date_delivery_endyear = GETPOSTINT('search_date_delivery_endyear'); |
| 90 | -$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
| 90 | +$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
| 91 | 91 | $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear); |
| 92 | 92 | |
| 93 | 93 | $search_date_valid_startday = GETPOSTINT('search_date_valid_startday'); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $search_date_valid_endday = GETPOSTINT('search_date_valid_endday'); |
| 97 | 97 | $search_date_valid_endmonth = GETPOSTINT('search_date_valid_endmonth'); |
| 98 | 98 | $search_date_valid_endyear = GETPOSTINT('search_date_valid_endyear'); |
| 99 | -$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 99 | +$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
| 100 | 100 | $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear); |
| 101 | 101 | |
| 102 | 102 | $search_date_approve_startday = GETPOSTINT('search_date_approve_startday'); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $search_date_approve_endday = GETPOSTINT('search_date_approve_endday'); |
| 106 | 106 | $search_date_approve_endmonth = GETPOSTINT('search_date_approve_endmonth'); |
| 107 | 107 | $search_date_approve_endyear = GETPOSTINT('search_date_approve_endyear'); |
| 108 | -$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
| 108 | +$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
| 109 | 109 | $search_date_approve_end = dol_mktime(23, 59, 59, $search_date_approve_endmonth, $search_date_approve_endday, $search_date_approve_endyear); |
| 110 | 110 | |
| 111 | 111 | $search_all = trim(GETPOST('search_all', 'alphanohtml')); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | $search_multicurrency_montant_tva = GETPOST('search_multicurrency_montant_tva', 'alpha'); |
| 144 | 144 | $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); |
| 145 | 145 | $optioncss = GETPOST('optioncss', 'alpha'); |
| 146 | -$billed = GETPOST('billed', 'int'); // Value '' must be possible |
|
| 146 | +$billed = GETPOST('billed', 'int'); // Value '' must be possible |
|
| 147 | 147 | $search_project_ref = GETPOST('search_project_ref', 'alpha'); |
| 148 | 148 | $search_btn = GETPOST('button_search', 'alpha'); |
| 149 | 149 | $search_remove_btn = GETPOST('button_removefilter', 'alpha'); |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | |
| 463 | 463 | if ($objecttmp->id > 0) { |
| 464 | 464 | if (empty($objecttmp->note_public)) { |
| 465 | - $objecttmp->note_public = $langs->transnoentities("Orders"); |
|
| 465 | + $objecttmp->note_public = $langs->transnoentities("Orders"); |
|
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; |
@@ -790,8 +790,8 @@ discard block |
||
| 790 | 790 | } else { |
| 791 | 791 | $db->rollback(); |
| 792 | 792 | $action = 'create'; |
| 793 | - $_GET["origin"] = $_POST["origin"]; // Keep this ? |
|
| 794 | - $_GET["originid"] = $_POST["originid"]; // Keep this ? |
|
| 793 | + $_GET["origin"] = $_POST["origin"]; // Keep this ? |
|
| 794 | + $_GET["originid"] = $_POST["originid"]; // Keep this ? |
|
| 795 | 795 | setEventMessages("Error", null, 'errors'); |
| 796 | 796 | $error++; |
| 797 | 797 | } |
@@ -964,9 +964,9 @@ discard block |
||
| 964 | 964 | if ($search_user > 0) { |
| 965 | 965 | $sql .= " AND EXISTS ("; |
| 966 | 966 | $sql .= " SELECT ec.rowid "; |
| 967 | - $sql .= " FROM " . MAIN_DB_PREFIX . "element_contact as ec"; |
|
| 968 | - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact"; |
|
| 969 | - $sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = " . ((int) $search_user); |
|
| 967 | + $sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec"; |
|
| 968 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact"; |
|
| 969 | + $sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = ".((int) $search_user); |
|
| 970 | 970 | $sql .= " AND tc.element = 'order_supplier' AND tc.source = 'internal'"; |
| 971 | 971 | $sql .= ")"; |
| 972 | 972 | } |
@@ -1016,7 +1016,7 @@ discard block |
||
| 1016 | 1016 | if ($searchCategorySupplierOrderOperator == 0) { |
| 1017 | 1017 | $searchCategorySupplierOrderSqlList[] = " EXISTS (SELECT ck.fk_supplier_order FROM ".MAIN_DB_PREFIX."categorie_supplier_order as ck WHERE cf.rowid = ck.fk_supplier_order AND ck.fk_categorie = ".((int) $searchCategorySupplierOrder).")"; |
| 1018 | 1018 | } else { |
| 1019 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplierOrder); |
|
| 1019 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategorySupplierOrder); |
|
| 1020 | 1020 | } |
| 1021 | 1021 | } |
| 1022 | 1022 | } |
@@ -1046,7 +1046,7 @@ discard block |
||
| 1046 | 1046 | if ($searchCategoryProductOperator == 0) { |
| 1047 | 1047 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commande_fournisseurdet as cd WHERE cd.fk_commande = cf.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 1048 | 1048 | } else { |
| 1049 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 1049 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 1050 | 1050 | } |
| 1051 | 1051 | } |
| 1052 | 1052 | } |
@@ -1331,7 +1331,7 @@ discard block |
||
| 1331 | 1331 | |
| 1332 | 1332 | $topicmail = "SendOrderRef"; |
| 1333 | 1333 | $modelmail = "order_supplier_send"; |
| 1334 | - $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
| 1334 | + $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
| 1335 | 1335 | $trackid = 'sord'.$object->id; |
| 1336 | 1336 | include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; |
| 1337 | 1337 | |
@@ -1417,7 +1417,7 @@ discard block |
||
| 1417 | 1417 | } |
| 1418 | 1418 | // alert on late date |
| 1419 | 1419 | $moreforfilter .= '<div class="divsearchfield valignmiddle" title="'.$langs->trans("Alert").' '.$langs->trans("Late").'">'; |
| 1420 | - $moreforfilter .= '<label class="valignmiddle" for="search_option">'.$langs->trans('Alert').'</label> <input type="checkbox" class="valignmiddle" id="search_option" name="search_option" value="'.(($search_status == '3,4') ? 'recv_late' : 'late').'"'.((array_search($search_option, array('late','recv_late')) !== false) ? ' checked' : '').'>'; |
|
| 1420 | + $moreforfilter .= '<label class="valignmiddle" for="search_option">'.$langs->trans('Alert').'</label> <input type="checkbox" class="valignmiddle" id="search_option" name="search_option" value="'.(($search_status == '3,4') ? 'recv_late' : 'late').'"'.((array_search($search_option, array('late', 'recv_late')) !== false) ? ' checked' : '').'>'; |
|
| 1421 | 1421 | $moreforfilter .= '</div>'; |
| 1422 | 1422 | $parameters = array(); |
| 1423 | 1423 | $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | $num = $this->db->num_rows($resql); |
| 260 | 260 | |
| 261 | 261 | if (!isModenabled("partnership")) { |
| 262 | - $num = 0; // Force empty list if module is not enabled |
|
| 262 | + $num = 0; // Force empty list if module is not enabled |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | if ($num) { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | include_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; |
| 286 | 286 | $tmppartnership = new Partnership($this->db); |
| 287 | 287 | |
| 288 | - $dummy = $tmppartnership->getLibStatut(0); // We call this only to have $tmppartnership->labelStatus loaded |
|
| 288 | + $dummy = $tmppartnership->getLibStatut(0); // We call this only to have $tmppartnership->labelStatus loaded |
|
| 289 | 289 | |
| 290 | 290 | $s .= $form->selectarray('filter_status_partnership', $tmppartnership->labelStatus, GETPOST('filter_status_partnership'), $langs->trans("Status")); |
| 291 | 291 | |
@@ -150,11 +150,11 @@ discard block |
||
| 150 | 150 | if ($old != $obj->email) { |
| 151 | 151 | $cibles[$j] = array( |
| 152 | 152 | 'email' => $obj->email, |
| 153 | - 'lastname' => $obj->name, // For thirdparties, lastname must be name |
|
| 154 | - 'firstname' => '', // For thirdparties, firstname is '' |
|
| 153 | + 'lastname' => $obj->name, // For thirdparties, lastname must be name |
|
| 154 | + 'firstname' => '', // For thirdparties, firstname is '' |
|
| 155 | 155 | 'other' => |
| 156 | - ('DateStart='.dol_print_date($this->db->jdate($obj->date_start_real), 'day')).';'. // date start real |
|
| 157 | - ('DateEnd='.dol_print_date($this->db->jdate($obj->date_end), 'day')).';'. // date end planned |
|
| 156 | + ('DateStart='.dol_print_date($this->db->jdate($obj->date_start_real), 'day')).';'.// date start real |
|
| 157 | + ('DateEnd='.dol_print_date($this->db->jdate($obj->date_end), 'day')).';'.// date end planned |
|
| 158 | 158 | ('Contract='.$obj->fk_contrat).';'. |
| 159 | 159 | ('ContactLine='.$obj->cdid), |
| 160 | 160 | 'source_url' => $this->url($obj->id), |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $socid = $user->socid; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - $filtertype = (getDolGlobalString('CONTRACT_SUPPORT_PRODUCTS') ? '' : 1); // '' in select_produits means all, 1 means services only |
|
| 248 | + $filtertype = (getDolGlobalString('CONTRACT_SUPPORT_PRODUCTS') ? '' : 1); // '' in select_produits means all, 1 means services only |
|
| 249 | 249 | $showempty = $langs->trans("ProductOrService"); |
| 250 | 250 | |
| 251 | 251 | $s = img_picto('', 'product', 'class="pictofixedwidth"'); |
@@ -349,9 +349,9 @@ discard block |
||
| 349 | 349 | |
| 350 | 350 | // Add font-awesome for level 0 and 1 (if $val2['level'] == 1, we are on level2, if $val2['level'] == 2, we are on level 3...) |
| 351 | 351 | if ($val2['level'] == 0 && !empty($val2['prefix'])) { |
| 352 | - print $val2['prefix']; // the picto must have class="pictofixedwidth paddingright" |
|
| 352 | + print $val2['prefix']; // the picto must have class="pictofixedwidth paddingright" |
|
| 353 | 353 | } else { |
| 354 | - print '<i class="fa fa-does-not-exists fa-fw paddingright pictofixedwidth level'.($val2['level']+1).'"></i>'; |
|
| 354 | + print '<i class="fa fa-does-not-exists fa-fw paddingright pictofixedwidth level'.($val2['level'] + 1).'"></i>'; |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | print $val2['titre']; |
@@ -371,18 +371,18 @@ discard block |
||
| 371 | 371 | $fromcursor = 0; |
| 372 | 372 | while ($fromcursor < ($currentlevel - $nextlevel)) { |
| 373 | 373 | print str_pad('', $currentlevel - $fromcursor).'</ul>'."\n"; |
| 374 | - print str_pad('', $currentlevel - $fromcursor - 1).'</li>'."\n"; // end level $val2['level']+1 |
|
| 374 | + print str_pad('', $currentlevel - $fromcursor - 1).'</li>'."\n"; // end level $val2['level']+1 |
|
| 375 | 375 | $fromcursor++; |
| 376 | 376 | } |
| 377 | 377 | } else { |
| 378 | - print '</li>'."\n"; // end level $val2['level']+1 |
|
| 378 | + print '</li>'."\n"; // end level $val2['level']+1 |
|
| 379 | 379 | } |
| 380 | 380 | } |
| 381 | 381 | //var_dump($submenu); |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | - print str_pad('', $level).'</ul>'."\n"; // end ul level 1 |
|
| 385 | - print str_pad('', $level - 1).'</li>'."\n"; // end ul level 1 |
|
| 384 | + print str_pad('', $level).'</ul>'."\n"; // end ul level 1 |
|
| 385 | + print str_pad('', $level - 1).'</li>'."\n"; // end ul level 1 |
|
| 386 | 386 | } elseif ($val['enabled'] == 2) { |
| 387 | 387 | print '<li class="lilevel0">'; |
| 388 | 388 | |
@@ -397,10 +397,10 @@ discard block |
||
| 397 | 397 | print $val['titre']; |
| 398 | 398 | print '</span>'; |
| 399 | 399 | |
| 400 | - print '</li>'."\n"; // close entry level 0 |
|
| 400 | + print '</li>'."\n"; // close entry level 0 |
|
| 401 | 401 | } |
| 402 | 402 | } |
| 403 | - print '</ul>'."\n"; // close entry level 0 |
|
| 403 | + print '</ul>'."\n"; // close entry level 0 |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | unset($this->menu); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | // $this->menu->liste is top menu |
| 197 | 197 | //var_dump($this->menu->liste);exit; |
| 198 | 198 | $lastlevel = array(); |
| 199 | - $showmenu = true; // Is current menu shown - define here to keep static code checker happy |
|
| 199 | + $showmenu = true; // Is current menu shown - define here to keep static code checker happy |
|
| 200 | 200 | print '<!-- Generate menu list from menu handler '.$this->name.' -->'."\n"; |
| 201 | 201 | print '<ul class="ulmenu ullevel0" data-inset="true">'."\n"; |
| 202 | 202 | foreach ($this->menu->liste as $key => $val) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' |
@@ -357,9 +357,9 @@ discard block |
||
| 357 | 357 | |
| 358 | 358 | // Add font-awesome for level 0 and 1 (if $val2['level'] == 1, we are on level2, if $val2['level'] == 2, we are on level 3...) |
| 359 | 359 | if ($val2['level'] == 0 && !empty($val2['prefix'])) { |
| 360 | - print $val2['prefix']; // the picto must have class="pictofixedwidth paddingright" |
|
| 360 | + print $val2['prefix']; // the picto must have class="pictofixedwidth paddingright" |
|
| 361 | 361 | } else { |
| 362 | - print '<i class="fa fa-does-not-exists fa-fw paddingright pictofixedwidth level'.($val2['level']+1).'"></i>'; |
|
| 362 | + print '<i class="fa fa-does-not-exists fa-fw paddingright pictofixedwidth level'.($val2['level'] + 1).'"></i>'; |
|
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | print $val2['titre']; |
@@ -380,17 +380,17 @@ discard block |
||
| 380 | 380 | $fromcursor = 0; |
| 381 | 381 | while ($fromcursor < ($currentlevel - $nextlevel)) { |
| 382 | 382 | print str_pad('', $currentlevel - $fromcursor).'</ul>'."\n"; |
| 383 | - print str_pad('', $currentlevel - $fromcursor - 1).'</li>'."\n"; // end level $val2['level']+1 |
|
| 383 | + print str_pad('', $currentlevel - $fromcursor - 1).'</li>'."\n"; // end level $val2['level']+1 |
|
| 384 | 384 | $fromcursor++; |
| 385 | 385 | } |
| 386 | 386 | } else { |
| 387 | - print '</li>'."\n"; // end level $val2['level']+1 |
|
| 387 | + print '</li>'."\n"; // end level $val2['level']+1 |
|
| 388 | 388 | } |
| 389 | 389 | } |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | - print str_pad('', $level).'</ul>'."\n"; // end ul level 1 |
|
| 393 | - print str_pad('', $level - 1).'</li>'."\n"; // end ul level 1 |
|
| 392 | + print str_pad('', $level).'</ul>'."\n"; // end ul level 1 |
|
| 393 | + print str_pad('', $level - 1).'</li>'."\n"; // end ul level 1 |
|
| 394 | 394 | } elseif ($val['enabled'] == 2) { |
| 395 | 395 | print '<li class="lilevel0">'; |
| 396 | 396 | |
@@ -405,10 +405,10 @@ discard block |
||
| 405 | 405 | print $val['titre']; |
| 406 | 406 | print '</span>'; |
| 407 | 407 | |
| 408 | - print '</li>'."\n"; // close entry level 0 |
|
| 408 | + print '</li>'."\n"; // close entry level 0 |
|
| 409 | 409 | } |
| 410 | 410 | } |
| 411 | - print '</ul>'."\n"; // close entry level 0 |
|
| 411 | + print '</ul>'."\n"; // close entry level 0 |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | unset($this->menu); |