@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | if (getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC')) { |
| 168 | 168 | print '<div class="clearboth"></div><strong>'.(getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC') ? getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC') : $langs->trans("BookCalSystem")).'</strong>'; |
| 169 | 169 | } |
| 170 | - if (empty($urllogo) && ! getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC')) { |
|
| 170 | + if (empty($urllogo) && !getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC')) { |
|
| 171 | 171 | print $mysoc->name; |
| 172 | 172 | } |
| 173 | 173 | print '</div>'; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | * Actions |
| 187 | 187 | */ |
| 188 | 188 | |
| 189 | -if ($action == 'add' ) { // Test on permission not required here (anonymous action protected by mitigation of /public/... urls) |
|
| 189 | +if ($action == 'add') { // Test on permission not required here (anonymous action protected by mitigation of /public/... urls) |
|
| 190 | 190 | $error = 0; |
| 191 | 191 | $idcontact = 0; |
| 192 | 192 | $calendar = $object; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | /** |
| 71 | 71 | * @var ?int Page ID |
| 72 | 72 | */ |
| 73 | - public $fk_page; // If translation of another page |
|
| 73 | + public $fk_page; // If translation of another page |
|
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | 76 | * @var string Page url |
@@ -168,8 +168,8 @@ discard block |
||
| 168 | 168 | public $newid; |
| 169 | 169 | |
| 170 | 170 | |
| 171 | - const STATUS_DRAFT = 0; // offline |
|
| 172 | - const STATUS_VALIDATED = 1; // online |
|
| 171 | + const STATUS_DRAFT = 0; // offline |
|
| 172 | + const STATUS_VALIDATED = 1; // online |
|
| 173 | 173 | |
| 174 | 174 | |
| 175 | 175 | /** |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | $sql .= " t.htmlheader,"; |
| 297 | 297 | $sql .= " t.content,"; |
| 298 | 298 | $sql .= " t.lang,"; |
| 299 | - $sql .= " t.fk_page,"; // Translation parent page (in mani language) |
|
| 299 | + $sql .= " t.fk_page,"; // Translation parent page (in mani language) |
|
| 300 | 300 | $sql .= " t.allowed_in_frames,"; |
| 301 | 301 | $sql .= " t.status,"; |
| 302 | 302 | $sql .= " t.grabbed_from,"; |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | } |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | -$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
| 345 | +$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
| 346 | 346 | |
| 347 | 347 | if ($action == 'replacesite' || $mode == 'replacesite') { // Test on permission not required |
| 348 | 348 | $containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : ''; |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | $usercanedit = $user->hasRight('website', 'write'); |
| 359 | -$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
| 359 | +$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
| 360 | 360 | $permissiontodelete = $user->hasRight('website', 'delete'); |
| 361 | 361 | |
| 362 | 362 | |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | if ($sortorder) { |
| 424 | 424 | $backtopage .= '&sortorder='.urlencode($sortorder); |
| 425 | 425 | } |
| 426 | -include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
| 426 | +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
| 427 | 427 | |
| 428 | 428 | $backtopage = $savbacktopage; |
| 429 | 429 | //var_dump($backtopage); |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | |
| 584 | 584 | // Replacement of string into pages |
| 585 | 585 | if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { |
| 586 | - $replacestring = GETPOST('replacestring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
| 586 | + $replacestring = GETPOST('replacestring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
| 587 | 587 | |
| 588 | 588 | $dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); |
| 589 | 589 | $allowimportsite = true; |
@@ -1153,7 +1153,7 @@ discard block |
||
| 1153 | 1153 | $objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha'); |
| 1154 | 1154 | $objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); |
| 1155 | 1155 | $objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0; |
| 1156 | - $objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '<script>' and '<link>' |
|
| 1156 | + $objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '<script>' and '<link>' |
|
| 1157 | 1157 | $objectpage->author_alias = GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml'); |
| 1158 | 1158 | $objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS'); |
| 1159 | 1159 | $objectpage->fk_object = GETPOST('WEBSITE_OBJECTID'); |
@@ -1186,7 +1186,7 @@ discard block |
||
| 1186 | 1186 | $content = ''; |
| 1187 | 1187 | if (GETPOSTISSET('content')) { |
| 1188 | 1188 | //$content = GETPOST('content', 'restricthtmlallowunvalid'); // @TODO Use a restricthtmlallowunvalidwithphp |
| 1189 | - $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
| 1189 | + $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
| 1190 | 1190 | |
| 1191 | 1191 | $objectpage->content = make_substitutions($content, $substitutionarray); |
| 1192 | 1192 | } else { |
@@ -1559,7 +1559,7 @@ discard block |
||
| 1559 | 1559 | $error++; |
| 1560 | 1560 | setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
| 1561 | 1561 | } |
| 1562 | - if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
| 1562 | + if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
| 1563 | 1563 | $error++; |
| 1564 | 1564 | setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
| 1565 | 1565 | } |
@@ -1571,7 +1571,7 @@ discard block |
||
| 1571 | 1571 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
| 1572 | 1572 | $action = 'preview'; |
| 1573 | 1573 | if ($backtopage) { |
| 1574 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1574 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1575 | 1575 | header("Location: ".$backtopage); |
| 1576 | 1576 | exit; |
| 1577 | 1577 | } |
@@ -1595,7 +1595,7 @@ discard block |
||
| 1595 | 1595 | } |
| 1596 | 1596 | |
| 1597 | 1597 | |
| 1598 | - $dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
| 1598 | + $dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
| 1599 | 1599 | $dataposted = preg_replace(array('/<html>\n*/ims', '/<\/html>\n*/ims'), array('', ''), $dataposted); |
| 1600 | 1600 | $dataposted = str_replace('<?=', '<?php', $dataposted); |
| 1601 | 1601 | |
@@ -1604,7 +1604,7 @@ discard block |
||
| 1604 | 1604 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1605 | 1605 | |
| 1606 | 1606 | // Security analysis |
| 1607 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1607 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1608 | 1608 | |
| 1609 | 1609 | if (!$errorphpcheck) { |
| 1610 | 1610 | $htmlheadercontent = ''; |
@@ -1642,7 +1642,7 @@ discard block |
||
| 1642 | 1642 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1643 | 1643 | |
| 1644 | 1644 | // Security analysis |
| 1645 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1645 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1646 | 1646 | |
| 1647 | 1647 | if (!$errorphpcheck) { |
| 1648 | 1648 | $csscontent = ''; |
@@ -1685,7 +1685,7 @@ discard block |
||
| 1685 | 1685 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1686 | 1686 | |
| 1687 | 1687 | // Security analysis |
| 1688 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1688 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1689 | 1689 | |
| 1690 | 1690 | if (!$errorphpcheck) { |
| 1691 | 1691 | $jscontent = ''; |
@@ -1723,7 +1723,7 @@ discard block |
||
| 1723 | 1723 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1724 | 1724 | |
| 1725 | 1725 | // Security analysis |
| 1726 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1726 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1727 | 1727 | |
| 1728 | 1728 | if (!$errorphpcheck) { |
| 1729 | 1729 | $robotcontent = ''; |
@@ -1761,7 +1761,7 @@ discard block |
||
| 1761 | 1761 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1762 | 1762 | |
| 1763 | 1763 | // Security analysis |
| 1764 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1764 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1765 | 1765 | |
| 1766 | 1766 | if (!$errorphpcheck) { |
| 1767 | 1767 | $htaccesscontent = ''; |
@@ -1785,7 +1785,7 @@ discard block |
||
| 1785 | 1785 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1786 | 1786 | |
| 1787 | 1787 | // Security analysis |
| 1788 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1788 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1789 | 1789 | |
| 1790 | 1790 | if (!$errorphpcheck) { |
| 1791 | 1791 | $manifestjsoncontent = ''; |
@@ -1824,7 +1824,7 @@ discard block |
||
| 1824 | 1824 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1825 | 1825 | |
| 1826 | 1826 | // Security analysis |
| 1827 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1827 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1828 | 1828 | |
| 1829 | 1829 | if (!$errorphpcheck) { |
| 1830 | 1830 | $readmecontent = ''; |
@@ -1863,7 +1863,7 @@ discard block |
||
| 1863 | 1863 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1864 | 1864 | |
| 1865 | 1865 | // Security analysis |
| 1866 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1866 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1867 | 1867 | |
| 1868 | 1868 | if (!$errorphpcheck) { |
| 1869 | 1869 | $licensecontent = ''; |
@@ -1905,7 +1905,7 @@ discard block |
||
| 1905 | 1905 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
| 1906 | 1906 | $action = 'preview'; |
| 1907 | 1907 | if ($backtopage) { |
| 1908 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1908 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1909 | 1909 | header("Location: ".$backtopage); |
| 1910 | 1910 | exit; |
| 1911 | 1911 | } |
@@ -1924,7 +1924,7 @@ discard block |
||
| 1924 | 1924 | |
| 1925 | 1925 | $object->fk_default_home = $pageid; |
| 1926 | 1926 | $res = $object->update($user); |
| 1927 | - if (! ($res > 0)) { |
|
| 1927 | + if (!($res > 0)) { |
|
| 1928 | 1928 | $error++; |
| 1929 | 1929 | setEventMessages($object->error, $object->errors, 'errors'); |
| 1930 | 1930 | } |
@@ -2039,7 +2039,7 @@ discard block |
||
| 2039 | 2039 | $objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha'); |
| 2040 | 2040 | $objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); |
| 2041 | 2041 | $objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0; |
| 2042 | - $objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
| 2042 | + $objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
| 2043 | 2043 | $objectpage->fk_page = (GETPOSTINT('pageidfortranslation') > 0 ? GETPOSTINT('pageidfortranslation') : 0); |
| 2044 | 2044 | $objectpage->author_alias = trim(GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml')); |
| 2045 | 2045 | $objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS', 'alpha'); |
@@ -2315,7 +2315,7 @@ discard block |
||
| 2315 | 2315 | |
| 2316 | 2316 | $phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content); |
| 2317 | 2317 | |
| 2318 | - $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
| 2318 | + $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
| 2319 | 2319 | |
| 2320 | 2320 | $phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content); |
| 2321 | 2321 | |
@@ -2536,7 +2536,7 @@ discard block |
||
| 2536 | 2536 | $fileofzip = ''; |
| 2537 | 2537 | if (GETPOSTISSET('templateuserfile')) { |
| 2538 | 2538 | // Case we selected one template |
| 2539 | - $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
| 2539 | + $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
| 2540 | 2540 | } elseif (!empty($_FILES) && is_array($_FILES['userfile'])) { |
| 2541 | 2541 | // Case we upload a new template |
| 2542 | 2542 | if (is_array($_FILES['userfile']['tmp_name'])) { |
@@ -2618,7 +2618,7 @@ discard block |
||
| 2618 | 2618 | if ($website->virtualhost) { |
| 2619 | 2619 | $domainname = $website->virtualhost; |
| 2620 | 2620 | } |
| 2621 | - if (! preg_match('/^http/i', $domainname)) { |
|
| 2621 | + if (!preg_match('/^http/i', $domainname)) { |
|
| 2622 | 2622 | $domainname = 'https://'.$domainname; |
| 2623 | 2623 | } |
| 2624 | 2624 | |
@@ -2684,7 +2684,7 @@ discard block |
||
| 2684 | 2684 | $url->appendChild($lastmod); |
| 2685 | 2685 | // Add suggested frequency for refresh |
| 2686 | 2686 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
| 2687 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2687 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2688 | 2688 | $url->appendChild($changefreq); |
| 2689 | 2689 | } |
| 2690 | 2690 | // Add higher priority for home page |
@@ -2789,7 +2789,7 @@ discard block |
||
| 2789 | 2789 | $url->appendChild($lastmod); |
| 2790 | 2790 | // Add suggested frequency for refresh |
| 2791 | 2791 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
| 2792 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2792 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2793 | 2793 | $url->appendChild($changefreq); |
| 2794 | 2794 | } |
| 2795 | 2795 | |
@@ -3077,11 +3077,11 @@ discard block |
||
| 3077 | 3077 | |
| 3078 | 3078 | // // Export web site |
| 3079 | 3079 | $extraCssClass = getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE') ? 'hideobject' : ''; |
| 3080 | - print '<input type="submit" class="button bordertransp ' . $extraCssClass . '" ' . $disabledexport . ' value="' . dol_escape_htmltag($exportlabel) . '" name="exportsite">'; |
|
| 3080 | + print '<input type="submit" class="button bordertransp '.$extraCssClass.'" '.$disabledexport.' value="'.dol_escape_htmltag($exportlabel).'" name="exportsite">'; |
|
| 3081 | 3081 | |
| 3082 | 3082 | if (getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')) { |
| 3083 | 3083 | // Overwrite template in sources |
| 3084 | - $overwriteGitUrl = $_SERVER["PHP_SELF"] . '?action=overwritesite&website=' . urlencode($website->ref); |
|
| 3084 | + $overwriteGitUrl = $_SERVER["PHP_SELF"].'?action=overwritesite&website='.urlencode($website->ref); |
|
| 3085 | 3085 | print dolButtonToOpenExportDialog('exportpopup', $langs->trans('ExportOptions'), $langs->trans('ExportSite'), 'exportsite', $overwriteGitUrl, $website); |
| 3086 | 3086 | //print '<a href="'.$_SERVER["PHP_SELF"].'?action=overwritesite&website='.urlencode($website->ref).'" class="button bordertransp hideobject" title="'.dol_escape_htmltag($langs->trans("ExportIntoGIT").". Directory ".getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')).'">'.dol_escape_htmltag($langs->trans("ExportIntoGIT")).'</a>'; |
| 3087 | 3087 | } |
@@ -3442,7 +3442,7 @@ discard block |
||
| 3442 | 3442 | print '<!-- button EditInLine and ShowSubcontainers -->'."\n"; |
| 3443 | 3443 | print '<div class="websiteselectionsection inline-block">'; |
| 3444 | 3444 | |
| 3445 | - print '<div class="inline-block marginrightonly">'; // Button includes dynamic content |
|
| 3445 | + print '<div class="inline-block marginrightonly">'; // Button includes dynamic content |
|
| 3446 | 3446 | print $langs->trans("ShowSubcontainers"); |
| 3447 | 3447 | if (!getDolGlobalString('WEBSITE_SUBCONTAINERSINLINE')) { |
| 3448 | 3448 | print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', 0, 0, 0, '', 'nomarginleft').'</a>'; |
@@ -3451,7 +3451,7 @@ discard block |
||
| 3451 | 3451 | } |
| 3452 | 3452 | print '</div>'; |
| 3453 | 3453 | |
| 3454 | - print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
| 3454 | + print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
| 3455 | 3455 | |
| 3456 | 3456 | print '<span id="switchckeditorinline">'."\n"; |
| 3457 | 3457 | // Enable CKEditor inline with js on section and div with conteneditable=true |
@@ -3543,15 +3543,15 @@ discard block |
||
| 3543 | 3543 | // Sending data via AJAX |
| 3544 | 3544 | $.ajax({ |
| 3545 | 3545 | type: \'POST\', |
| 3546 | - url: \'' . DOL_URL_ROOT . '/core/ajax/editinline.php\', |
|
| 3546 | + url: \'' . DOL_URL_ROOT.'/core/ajax/editinline.php\', |
|
| 3547 | 3547 | data: { |
| 3548 | 3548 | website_ref: \''.$website->ref.'\', |
| 3549 | - page_id: \'' . $websitepage->id . '\', |
|
| 3549 | + page_id: \'' . $websitepage->id.'\', |
|
| 3550 | 3550 | content: content, |
| 3551 | 3551 | element_id: elementId, |
| 3552 | 3552 | element_type: elementType, |
| 3553 | 3553 | action: \'updatedElementContent\', |
| 3554 | - token: \'' . newToken() . '\' |
|
| 3554 | + token: \'' . newToken().'\' |
|
| 3555 | 3555 | }, |
| 3556 | 3556 | success: function(response) { |
| 3557 | 3557 | console.log(response); |
@@ -3637,7 +3637,7 @@ discard block |
||
| 3637 | 3637 | } else { |
| 3638 | 3638 | $disabled = ''; |
| 3639 | 3639 | $title = ''; |
| 3640 | - $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
| 3640 | + $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
| 3641 | 3641 | } |
| 3642 | 3642 | print '<a href="'.$url.'" class="button buttonDelete bordertransp'.($disabled ? ' disabled' : '').'"'.$disabled.' title="'.dol_escape_htmltag($title).'">'.img_picto('', 'delete', 'class=""').'<span class="hideonsmartphone paddingleft">'.$langs->trans("Delete").'</span></a>'; |
| 3643 | 3643 | print '</span>'; |
@@ -3826,7 +3826,7 @@ discard block |
||
| 3826 | 3826 | // Clean the php htmlheader file to remove php code and get only html part |
| 3827 | 3827 | $htmlheadercontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htmlheadercontent); |
| 3828 | 3828 | } else { |
| 3829 | - $htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); // Must accept tags like '<script>' and '<link>' |
|
| 3829 | + $htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); // Must accept tags like '<script>' and '<link>' |
|
| 3830 | 3830 | } |
| 3831 | 3831 | if (!trim($htmlheadercontent)) { |
| 3832 | 3832 | $htmlheadercontent = "<html>\n"; |
@@ -3857,7 +3857,7 @@ discard block |
||
| 3857 | 3857 | // Clean the php htaccesscontent file to remove php code and get only html part |
| 3858 | 3858 | $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htaccesscontent); |
| 3859 | 3859 | } else { |
| 3860 | - $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
| 3860 | + $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
| 3861 | 3861 | } |
| 3862 | 3862 | if (!trim($htaccesscontent)) { |
| 3863 | 3863 | $htaccesscontent .= "# Order allow,deny\n"; |
@@ -3958,7 +3958,7 @@ discard block |
||
| 3958 | 3958 | $maxfilesizearray = getMaxFileSizeArray(); |
| 3959 | 3959 | $maxmin = $maxfilesizearray['maxmin']; |
| 3960 | 3960 | if ($maxmin > 0) { |
| 3961 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 3961 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 3962 | 3962 | } |
| 3963 | 3963 | print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
| 3964 | 3964 | |
@@ -4000,7 +4000,7 @@ discard block |
||
| 4000 | 4000 | print '<tr><td class="tdtop">'; |
| 4001 | 4001 | print $langs->trans('WEBSITE_HTML_HEADER'); |
| 4002 | 4002 | $htmlhelp = $langs->trans("Example").' :<br>'; |
| 4003 | - $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
| 4003 | + $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
| 4004 | 4004 | $textwithhelp = $form->textwithpicto('', $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); |
| 4005 | 4005 | $htmlhelp2 = $langs->trans("LinkAndScriptsHereAreNotLoadedInEditor").'<br>'; |
| 4006 | 4006 | print $form->textwithpicto($textwithhelp, $htmlhelp2, 1, 'warning', '', 0, 2, 'htmlheadertooltip2'); |
@@ -4215,7 +4215,7 @@ discard block |
||
| 4215 | 4215 | $maxfilesizearray = getMaxFileSizeArray(); |
| 4216 | 4216 | $maxmin = $maxfilesizearray['maxmin']; |
| 4217 | 4217 | if ($maxmin > 0) { |
| 4218 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 4218 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 4219 | 4219 | } |
| 4220 | 4220 | print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
| 4221 | 4221 | print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">'; |
@@ -4735,7 +4735,7 @@ discard block |
||
| 4735 | 4735 | print '<tr><td class="tdhtmlheader tdtop">'; |
| 4736 | 4736 | $htmlhelp = $langs->trans("EditTheWebSiteForACommonHeader").'<br><br>'; |
| 4737 | 4737 | $htmlhelp .= $langs->trans("Example").' :<br>'; |
| 4738 | - $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
| 4738 | + $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
| 4739 | 4739 | print $form->textwithpicto($langs->transnoentitiesnoconv('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); |
| 4740 | 4740 | print '</td><td>'; |
| 4741 | 4741 | $poscursor = array('x' => GETPOST('htmlheader_x'), 'y' => GETPOST('htmlheader_y')); |
@@ -4874,7 +4874,7 @@ discard block |
||
| 4874 | 4874 | |
| 4875 | 4875 | |
| 4876 | 4876 | $module = 'medias'; |
| 4877 | - $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
| 4877 | + $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
| 4878 | 4878 | if (empty($url)) { |
| 4879 | 4879 | $url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param |
| 4880 | 4880 | } |
@@ -5111,8 +5111,8 @@ discard block |
||
| 5111 | 5111 | print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
| 5112 | 5112 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
| 5113 | 5113 | print getTitleFieldOfList("UserCreation", 0, $_SERVER['PHP_SELF'], 'fk_user_creat', '', $param, '', $sortfield, $sortorder, '')."\n"; |
| 5114 | - print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date creation |
|
| 5115 | - print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
| 5114 | + print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date creation |
|
| 5115 | + print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
| 5116 | 5116 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
| 5117 | 5117 | // Action column |
| 5118 | 5118 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -46,20 +46,20 @@ discard block |
||
| 46 | 46 | $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
| 47 | 47 | $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
| 48 | 48 | $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
| 49 | -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'salestaxeslist'; |
|
| 49 | +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'salestaxeslist'; |
|
| 50 | 50 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
| 51 | 51 | $optioncss = GETPOST('optioncss', 'alpha'); |
| 52 | 52 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
| 53 | 53 | $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
| 54 | 54 | |
| 55 | -$search_ref = GETPOST('search_ref', 'alpha'); |
|
| 55 | +$search_ref = GETPOST('search_ref', 'alpha'); |
|
| 56 | 56 | $search_label = GETPOST('search_label', 'alpha'); |
| 57 | 57 | $search_dateend_start = dol_mktime(0, 0, 0, GETPOSTINT('search_dateend_startmonth'), GETPOSTINT('search_dateend_startday'), GETPOSTINT('search_dateend_startyear')); |
| 58 | 58 | $search_dateend_end = dol_mktime(23, 59, 59, GETPOSTINT('search_dateend_endmonth'), GETPOSTINT('search_dateend_endday'), GETPOSTINT('search_dateend_endyear')); |
| 59 | 59 | $search_datepayment_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datepayment_startmonth'), GETPOSTINT('search_datepayment_startday'), GETPOSTINT('search_datepayment_startyear')); |
| 60 | 60 | $search_datepayment_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datepayment_endmonth'), GETPOSTINT('search_datepayment_endday'), GETPOSTINT('search_datepayment_endyear')); |
| 61 | 61 | $search_type = GETPOST('search_type', 'intcomma'); |
| 62 | -$search_account = GETPOST('search_account', 'alpha'); |
|
| 62 | +$search_account = GETPOST('search_account', 'alpha'); |
|
| 63 | 63 | $search_amount = GETPOST('search_amount', 'alpha'); |
| 64 | 64 | $search_status = GETPOST('search_status', 'intcomma'); |
| 65 | 65 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 100 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 100 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 101 | 101 | |
| 102 | 102 | // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context |
| 103 | 103 | $hookmanager->initHooks(array('salestaxeslist')); |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 404 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 404 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 405 | 405 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 406 | 406 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 407 | 407 | |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | |
| 726 | 726 | // Amount |
| 727 | 727 | if (!empty($arrayfields['t.amount']['checked'])) { |
| 728 | - print '<td class="nowrap right"><span class="amount">' . price($obj->amount) . '</span></td>'; |
|
| 728 | + print '<td class="nowrap right"><span class="amount">'.price($obj->amount).'</span></td>'; |
|
| 729 | 729 | if (!$i) { |
| 730 | 730 | $totalarray['nbfield']++; |
| 731 | 731 | } |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | $totalallpayments = $obj->alreadypayed; |
| 749 | 749 | // TODO Add deposit and credit notes |
| 750 | 750 | |
| 751 | - print '<td class="nowrap right">' . $tva_static->getLibStatut(5, $totalallpayments) . '</td>'; |
|
| 751 | + print '<td class="nowrap right">'.$tva_static->getLibStatut(5, $totalallpayments).'</td>'; |
|
| 752 | 752 | if (!$i) { |
| 753 | 753 | $totalarray['nbfield']++; |
| 754 | 754 | } |
@@ -81,14 +81,14 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | // General $Variables |
| 84 | -$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
| 84 | +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
| 85 | 85 | $ref = GETPOST('ref', 'alpha'); |
| 86 | 86 | $socid = GETPOSTINT('socid'); |
| 87 | 87 | $action = GETPOST('action', 'aZ09'); |
| 88 | 88 | $confirm = GETPOST('confirm', 'alpha'); |
| 89 | 89 | $cancel = GETPOST('cancel', 'alpha'); |
| 90 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 91 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 90 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 91 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 92 | 92 | $lineid = GETPOSTINT('lineid'); |
| 93 | 93 | $userid = GETPOSTINT('userid'); |
| 94 | 94 | $search_ref = GETPOST('sf_ref', 'alpha') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | setEventMessages('', $warningMsgLineList, 'warnings'); |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | - header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result); |
|
| 259 | + header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result); |
|
| 260 | 260 | exit(); |
| 261 | 261 | } else { |
| 262 | 262 | $langs->load("errors"); |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | // Validation |
| 348 | 348 | $object->fetch($id); |
| 349 | 349 | |
| 350 | - if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
| 350 | + if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
| 351 | 351 | getDolGlobalString('FAC_FORCE_DATE_VALIDATION') // If option enabled, we force invoice date |
| 352 | 352 | ) { |
| 353 | 353 | $object->date = dol_now(); |
@@ -1059,7 +1059,7 @@ discard block |
||
| 1059 | 1059 | $error++; |
| 1060 | 1060 | } |
| 1061 | 1061 | |
| 1062 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 1062 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 1063 | 1063 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
| 1064 | 1064 | |
| 1065 | 1065 | // Replacement invoice |
@@ -1091,7 +1091,7 @@ discard block |
||
| 1091 | 1091 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
| 1092 | 1092 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
| 1093 | 1093 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
| 1094 | - $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
| 1094 | + $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
| 1095 | 1095 | $object->fk_project = GETPOSTINT('projectid'); |
| 1096 | 1096 | $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); |
| 1097 | 1097 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
@@ -1152,9 +1152,9 @@ discard block |
||
| 1152 | 1152 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
| 1153 | 1153 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
| 1154 | 1154 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
| 1155 | - $object->model_pdf = GETPOST('model'); |
|
| 1155 | + $object->model_pdf = GETPOST('model'); |
|
| 1156 | 1156 | $object->fk_project = GETPOSTINT('projectid'); |
| 1157 | - $object->cond_reglement_id = 0; // No payment term for a credit note |
|
| 1157 | + $object->cond_reglement_id = 0; // No payment term for a credit note |
|
| 1158 | 1158 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
| 1159 | 1159 | $object->fk_account = GETPOSTINT('fk_account'); |
| 1160 | 1160 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
@@ -1476,7 +1476,7 @@ discard block |
||
| 1476 | 1476 | $object->note_public = trim(GETPOST('note_public', 'restricthtml')); |
| 1477 | 1477 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
| 1478 | 1478 | $object->ref_client = GETPOST('ref_client'); |
| 1479 | - $object->ref_customer = GETPOST('ref_client'); |
|
| 1479 | + $object->ref_customer = GETPOST('ref_client'); |
|
| 1480 | 1480 | $object->model_pdf = GETPOST('model'); |
| 1481 | 1481 | $object->fk_project = GETPOSTINT('projectid'); |
| 1482 | 1482 | $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id')); |
@@ -1540,7 +1540,7 @@ discard block |
||
| 1540 | 1540 | $element = $subelement = 'expedition'; |
| 1541 | 1541 | } |
| 1542 | 1542 | |
| 1543 | - $object->origin = $origin; // deprecated |
|
| 1543 | + $object->origin = $origin; // deprecated |
|
| 1544 | 1544 | $object->origin_type = $origin; |
| 1545 | 1545 | $object->origin_id = $originid; |
| 1546 | 1546 | |
@@ -1973,7 +1973,7 @@ discard block |
||
| 1973 | 1973 | if (!empty($origin) && !empty($originid)) { |
| 1974 | 1974 | include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; |
| 1975 | 1975 | |
| 1976 | - $object->origin = $origin; // deprecated |
|
| 1976 | + $object->origin = $origin; // deprecated |
|
| 1977 | 1977 | $object->origin_type = $origin; |
| 1978 | 1978 | $object->origin_id = $originid; |
| 1979 | 1979 | |
@@ -1999,7 +1999,7 @@ discard block |
||
| 1999 | 1999 | $line->fk_prev_id = $line->id; |
| 2000 | 2000 | $line->fetch_optionals(); |
| 2001 | 2001 | if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) { |
| 2002 | - $line->situation_percent = $line->getAllPrevProgress($object->id); // get good progress including credit note |
|
| 2002 | + $line->situation_percent = $line->getAllPrevProgress($object->id); // get good progress including credit note |
|
| 2003 | 2003 | } else { |
| 2004 | 2004 | $line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note |
| 2005 | 2005 | } |
@@ -2109,7 +2109,7 @@ discard block |
||
| 2109 | 2109 | } else { |
| 2110 | 2110 | $db->rollback(); |
| 2111 | 2111 | $action = 'create'; |
| 2112 | - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
| 2112 | + $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
| 2113 | 2113 | $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? |
| 2114 | 2114 | setEventMessages($object->error, $object->errors, 'errors'); |
| 2115 | 2115 | } |
@@ -2657,7 +2657,7 @@ discard block |
||
| 2657 | 2657 | // Define special_code for special lines |
| 2658 | 2658 | $special_code = GETPOSTINT('special_code'); |
| 2659 | 2659 | if ($special_code == 3) { |
| 2660 | - $special_code = 0; // Options should not exists on invoices |
|
| 2660 | + $special_code = 0; // Options should not exists on invoices |
|
| 2661 | 2661 | } |
| 2662 | 2662 | |
| 2663 | 2663 | $line = new FactureLigne($db); |
@@ -3221,7 +3221,7 @@ discard block |
||
| 3221 | 3221 | $fk_account = GETPOSTINT('fk_account'); |
| 3222 | 3222 | |
| 3223 | 3223 | // Load objectsrc |
| 3224 | - $objectsrc = null; // Initialise |
|
| 3224 | + $objectsrc = null; // Initialise |
|
| 3225 | 3225 | //$remise_absolue = 0; |
| 3226 | 3226 | if (!empty($origin) && !empty($originid)) { |
| 3227 | 3227 | // Parse element/subelement (ex: project_task) |
@@ -3232,7 +3232,7 @@ discard block |
||
| 3232 | 3232 | $subelement = $regs[2]; |
| 3233 | 3233 | } |
| 3234 | 3234 | |
| 3235 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 3235 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
| 3236 | 3236 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
| 3237 | 3237 | |
| 3238 | 3238 | if ($element == 'project') { |
@@ -3305,8 +3305,8 @@ discard block |
||
| 3305 | 3305 | $fk_account = (!empty($expesrc->fk_account) ? $expesrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); |
| 3306 | 3306 | |
| 3307 | 3307 | if (isModEnabled('multicurrency')) { |
| 3308 | - $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
| 3309 | - $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
| 3308 | + $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
| 3309 | + $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
| 3310 | 3310 | } |
| 3311 | 3311 | |
| 3312 | 3312 | //Replicate extrafields |
@@ -3399,7 +3399,7 @@ discard block |
||
| 3399 | 3399 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">'; |
| 3400 | 3400 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 3401 | 3401 | print '<input type="hidden" name="action" id="formtocreateaction" value="add">'; |
| 3402 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 3402 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 3403 | 3403 | if ($soc->id > 0) { |
| 3404 | 3404 | print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n"; |
| 3405 | 3405 | } |
@@ -3920,8 +3920,8 @@ discard block |
||
| 3920 | 3920 | if ($socid > 0) { |
| 3921 | 3921 | print '<tr><td>'.$langs->trans('DiscountStillRemaining').'</td><td colspan="2">'; |
| 3922 | 3922 | |
| 3923 | - $thirdparty = $soc; // used by object_discounts.tpl.php |
|
| 3924 | - $discount_type = 0; // used by object_discounts.tpl.php |
|
| 3923 | + $thirdparty = $soc; // used by object_discounts.tpl.php |
|
| 3924 | + $discount_type = 0; // used by object_discounts.tpl.php |
|
| 3925 | 3925 | $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); |
| 3926 | 3926 | include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
| 3927 | 3927 | |
@@ -4445,7 +4445,7 @@ discard block |
||
| 4445 | 4445 | $nbMandated = 0; |
| 4446 | 4446 | foreach ($object->lines as $line) { |
| 4447 | 4447 | $res = $line->fetch_product(); |
| 4448 | - if ($res > 0) { |
|
| 4448 | + if ($res > 0) { |
|
| 4449 | 4449 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
| 4450 | 4450 | $nbMandated++; |
| 4451 | 4451 | break; |
@@ -4654,7 +4654,7 @@ discard block |
||
| 4654 | 4654 | } |
| 4655 | 4655 | // Ref customer |
| 4656 | 4656 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string', '', 0, 1); |
| 4657 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 4657 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 4658 | 4658 | // Thirdparty |
| 4659 | 4659 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer'); |
| 4660 | 4660 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { |
@@ -5044,45 +5044,45 @@ discard block |
||
| 5044 | 5044 | } |
| 5045 | 5045 | print '<tr>'; |
| 5046 | 5046 | // Amount HT |
| 5047 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 5048 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 5047 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 5048 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 5049 | 5049 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 5050 | 5050 | // Multicurrency Amount HT |
| 5051 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 5051 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 5052 | 5052 | } |
| 5053 | 5053 | print '</tr>'; |
| 5054 | 5054 | |
| 5055 | 5055 | print '<tr>'; |
| 5056 | 5056 | // Amount VAT |
| 5057 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
| 5058 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 5057 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
| 5058 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 5059 | 5059 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 5060 | 5060 | // Multicurrency Amount VAT |
| 5061 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 5061 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 5062 | 5062 | } |
| 5063 | 5063 | print '</tr>'; |
| 5064 | 5064 | |
| 5065 | 5065 | // Amount Local Taxes |
| 5066 | 5066 | if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) { |
| 5067 | 5067 | print '<tr>'; |
| 5068 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 5069 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 5068 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 5069 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 5070 | 5070 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 5071 | 5071 | $object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
| 5072 | 5072 | |
| 5073 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 5073 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 5074 | 5074 | } |
| 5075 | 5075 | print '</tr>'; |
| 5076 | 5076 | } |
| 5077 | 5077 | |
| 5078 | 5078 | if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) { |
| 5079 | 5079 | print '<tr>'; |
| 5080 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 5081 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 5080 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 5081 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 5082 | 5082 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 5083 | 5083 | $object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
| 5084 | 5084 | |
| 5085 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 5085 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 5086 | 5086 | } |
| 5087 | 5087 | print '</tr>'; |
| 5088 | 5088 | } |
@@ -5142,11 +5142,11 @@ discard block |
||
| 5142 | 5142 | |
| 5143 | 5143 | print '<tr>'; |
| 5144 | 5144 | // Amount TTC |
| 5145 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 5146 | - print '<td class="nowrap amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 5145 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 5146 | + print '<td class="nowrap amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 5147 | 5147 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 5148 | 5148 | // Multicurrency Amount TTC |
| 5149 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 5149 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 5150 | 5150 | } |
| 5151 | 5151 | print '</tr>'; |
| 5152 | 5152 | |
@@ -5817,7 +5817,7 @@ discard block |
||
| 5817 | 5817 | $langs->load("contracts"); |
| 5818 | 5818 | |
| 5819 | 5819 | if ($usercancreatecontract) { |
| 5820 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>'; |
|
| 5820 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>'; |
|
| 5821 | 5821 | } |
| 5822 | 5822 | } |
| 5823 | 5823 | } |
@@ -6041,7 +6041,7 @@ discard block |
||
| 6041 | 6041 | if ($usercandelete || ($usercancreate && $isErasable == 1)) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) |
| 6042 | 6042 | $enableDelete = false; |
| 6043 | 6043 | $deleteHref = '#'; |
| 6044 | - if ($isErasable > 0 && ! $objectidnext) { |
|
| 6044 | + if ($isErasable > 0 && !$objectidnext) { |
|
| 6045 | 6045 | $deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken(); |
| 6046 | 6046 | $enableDelete = true; |
| 6047 | 6047 | } |
@@ -1476,7 +1476,7 @@ discard block |
||
| 1476 | 1476 | if ($objsoc->id > 0 && !empty($object->lines)) { |
| 1477 | 1477 | if ($update_prices === true && getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { |
| 1478 | 1478 | // If price per customer |
| 1479 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1479 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1480 | 1480 | } |
| 1481 | 1481 | |
| 1482 | 1482 | foreach ($object->lines as $line) { |
@@ -1670,7 +1670,7 @@ discard block |
||
| 1670 | 1670 | $this->ref_customer = $obj->ref_client; |
| 1671 | 1671 | $this->ref_ext = $obj->ref_ext; |
| 1672 | 1672 | |
| 1673 | - $this->total = $obj->total_ttc; // TODO deprecated |
|
| 1673 | + $this->total = $obj->total_ttc; // TODO deprecated |
|
| 1674 | 1674 | $this->total_ttc = $obj->total_ttc; |
| 1675 | 1675 | $this->total_ht = $obj->total_ht; |
| 1676 | 1676 | $this->total_tva = $obj->total_tva; |
@@ -2585,7 +2585,7 @@ discard block |
||
| 2585 | 2585 | */ |
| 2586 | 2586 | public function closeProposal($user, $status, $note_private = '', $notrigger = 0, $note_public = '') |
| 2587 | 2587 | { |
| 2588 | - global $langs,$conf; |
|
| 2588 | + global $langs, $conf; |
|
| 2589 | 2589 | |
| 2590 | 2590 | $error = 0; |
| 2591 | 2591 | $now = dol_now(); |
@@ -2620,10 +2620,10 @@ discard block |
||
| 2620 | 2620 | if ($resql) { |
| 2621 | 2621 | // Status self::STATUS_REFUSED by default |
| 2622 | 2622 | $modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_CLOSED', $this->model_pdf); |
| 2623 | - $trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger() |
|
| 2623 | + $trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger() |
|
| 2624 | 2624 | |
| 2625 | 2625 | if ($status == self::STATUS_SIGNED) { // Status self::STATUS_SIGNED |
| 2626 | - $trigger_name = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger() |
|
| 2626 | + $trigger_name = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger() |
|
| 2627 | 2627 | $modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_TOBILL') ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->model_pdf; |
| 2628 | 2628 | |
| 2629 | 2629 | // The connected company is classified as a client |
@@ -2790,10 +2790,10 @@ discard block |
||
| 2790 | 2790 | |
| 2791 | 2791 | $this->db->begin(); |
| 2792 | 2792 | |
| 2793 | - $sql = "UPDATE ". MAIN_DB_PREFIX . "propal"; |
|
| 2794 | - $sql .= " SET fk_statut = " . self::STATUS_CANCELED . ","; |
|
| 2795 | - $sql .= " fk_user_modif = " . ((int) $user->id); |
|
| 2796 | - $sql .= " WHERE rowid = " . ((int) $this->id); |
|
| 2793 | + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; |
|
| 2794 | + $sql .= " SET fk_statut = ".self::STATUS_CANCELED.","; |
|
| 2795 | + $sql .= " fk_user_modif = ".((int) $user->id); |
|
| 2796 | + $sql .= " WHERE rowid = ".((int) $this->id); |
|
| 2797 | 2797 | |
| 2798 | 2798 | dol_syslog(get_class($this)."::cancel", LOG_DEBUG); |
| 2799 | 2799 | if ($this->db->query($sql)) { |
@@ -3156,7 +3156,7 @@ discard block |
||
| 3156 | 3156 | } |
| 3157 | 3157 | } |
| 3158 | 3158 | if (file_exists($dir)) { |
| 3159 | - $res = @dol_delete_dir_recursive($dir); // delete files physically + into ecm tables |
|
| 3159 | + $res = @dol_delete_dir_recursive($dir); // delete files physically + into ecm tables |
|
| 3160 | 3160 | if (!$res) { |
| 3161 | 3161 | $this->error = 'ErrorFailToDeleteDir'; |
| 3162 | 3162 | $this->errors[] = $this->error; |
@@ -3890,7 +3890,7 @@ discard block |
||
| 3890 | 3890 | } |
| 3891 | 3891 | |
| 3892 | 3892 | global $action; |
| 3893 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 3893 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 3894 | 3894 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
| 3895 | 3895 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 3896 | 3896 | if ($reshook > 0) { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 109 | 109 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
| 110 | 110 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
| 111 | -$confirm = GETPOST('confirm', 'alpha'); |
|
| 111 | +$confirm = GETPOST('confirm', 'alpha'); |
|
| 112 | 112 | |
| 113 | 113 | $dol_openinpopup = ''; |
| 114 | 114 | if (!empty($backtopagejsfields)) { |
@@ -159,12 +159,12 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | // Permissions |
| 162 | -$permissiontoread = $user->hasRight('societe', 'lire'); |
|
| 163 | -$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 162 | +$permissiontoread = $user->hasRight('societe', 'lire'); |
|
| 163 | +$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 164 | 164 | $permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0); |
| 165 | -$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
| 165 | +$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
| 166 | 166 | $permissiondellink = $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php |
| 167 | -$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
| 167 | +$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
| 168 | 168 | |
| 169 | 169 | // Security check |
| 170 | 170 | $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | if ($action == 'confirm_merge' && $confirm == 'yes' && $permissiontoadd) { |
| 210 | 210 | $soc_origin_id = GETPOSTINT('soc_origin'); |
| 211 | - $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
| 211 | + $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
| 212 | 212 | |
| 213 | 213 | if ($soc_origin_id <= 0) { |
| 214 | 214 | $langs->load('errors'); |
@@ -324,19 +324,19 @@ discard block |
||
| 324 | 324 | $object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml')); |
| 325 | 325 | $object->civility_id = GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int |
| 326 | 326 | // Add non official properties |
| 327 | - $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
| 328 | - $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
| 327 | + $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
| 328 | + $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
| 329 | 329 | } else { |
| 330 | - $object->name = GETPOST('name', 'alphanohtml'); |
|
| 330 | + $object->name = GETPOST('name', 'alphanohtml'); |
|
| 331 | 331 | } |
| 332 | 332 | $object->entity = ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity); |
| 333 | - $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
| 333 | + $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
| 334 | 334 | $object->parent = GETPOSTISSET('parent_company_id') ? GETPOSTINT('parent_company_id') : $object->parent; |
| 335 | 335 | $object->address = GETPOST('address', 'alphanohtml'); |
| 336 | - $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
| 337 | - $object->town = GETPOST('town', 'alphanohtml'); |
|
| 338 | - $object->country_id = GETPOSTINT('country_id'); |
|
| 339 | - $object->state_id = GETPOSTINT('state_id'); |
|
| 336 | + $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
| 337 | + $object->town = GETPOST('town', 'alphanohtml'); |
|
| 338 | + $object->country_id = GETPOSTINT('country_id'); |
|
| 339 | + $object->state_id = GETPOSTINT('state_id'); |
|
| 340 | 340 | |
| 341 | 341 | $object->socialnetworks = array(); |
| 342 | 342 | if (isModEnabled('socialnetworks')) { |
@@ -348,10 +348,10 @@ discard block |
||
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | $object->phone = GETPOST('phone', 'alpha'); |
| 351 | - $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 351 | + $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 352 | 352 | $object->fax = GETPOST('fax', 'alpha'); |
| 353 | 353 | $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); |
| 354 | - $object->no_email = GETPOSTINT("no_email"); |
|
| 354 | + $object->no_email = GETPOSTINT("no_email"); |
|
| 355 | 355 | $object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); |
| 356 | 356 | $object->idprof1 = trim(GETPOST('idprof1', 'alphanohtml')); |
| 357 | 357 | $object->idprof2 = trim(GETPOST('idprof2', 'alphanohtml')); |
@@ -361,13 +361,13 @@ discard block |
||
| 361 | 361 | $object->idprof6 = trim(GETPOST('idprof6', 'alphanohtml')); |
| 362 | 362 | $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); |
| 363 | 363 | $object->code_client = GETPOSTISSET('customer_code') ? GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha'); |
| 364 | - $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
| 364 | + $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
| 365 | 365 | $object->capital = GETPOST('capital', 'alphanohtml'); |
| 366 | 366 | $object->barcode = GETPOST('barcode', 'alphanohtml'); |
| 367 | 367 | |
| 368 | 368 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
| 369 | 369 | $object->tva_assuj = GETPOST('assujtva_value', 'alpha'); |
| 370 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 370 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 371 | 371 | $object->status = GETPOST('status', 'alpha'); |
| 372 | 372 | |
| 373 | 373 | // Local Taxes |
@@ -377,9 +377,9 @@ discard block |
||
| 377 | 377 | $object->localtax1_value = GETPOST('lt1', 'alpha'); |
| 378 | 378 | $object->localtax2_value = GETPOST('lt2', 'alpha'); |
| 379 | 379 | |
| 380 | - $object->forme_juridique_code = GETPOSTINT('forme_juridique_code'); |
|
| 380 | + $object->forme_juridique_code = GETPOSTINT('forme_juridique_code'); |
|
| 381 | 381 | $object->effectif_id = GETPOSTINT('effectif_id'); |
| 382 | - $object->typent_id = GETPOSTINT('typent_id'); |
|
| 382 | + $object->typent_id = GETPOSTINT('typent_id'); |
|
| 383 | 383 | |
| 384 | 384 | $object->typent_code = dol_getIdFromCode($db, $object->typent_id, 'c_typent', 'id', 'code'); // Force typent_code too so check in verify() will be done on new type |
| 385 | 385 | |
@@ -388,8 +388,8 @@ discard block |
||
| 388 | 388 | $prospect = (GETPOSTINT('prospect') > 0 ? 2 : 0); |
| 389 | 389 | $prospectcustomer = $customer + $prospect; |
| 390 | 390 | |
| 391 | - $object->client = $prospectcustomer; |
|
| 392 | - $object->fournisseur = (GETPOSTINT('supplier') > 0 ? 1 : 0); |
|
| 391 | + $object->client = $prospectcustomer; |
|
| 392 | + $object->fournisseur = (GETPOSTINT('supplier') > 0 ? 1 : 0); |
|
| 393 | 393 | |
| 394 | 394 | if ($action == 'add') { |
| 395 | 395 | // for prospect, customer or supplier |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | if ($object->fournisseur > 0) { |
| 412 | - $object->cond_reglement_supplier_id = $paymentTermId; |
|
| 412 | + $object->cond_reglement_supplier_id = $paymentTermId; |
|
| 413 | 413 | |
| 414 | 414 | $filterPaymentTypeIdArr = array(1, 2, 3); // allow payment type for supplier (filter is "DBIT" in "Form::select_types_paiements()" method) |
| 415 | 415 | if (!empty($form->cache_types_paiements[$paymentTypeId]) && isset($form->cache_types_paiements[$paymentTypeId]['type']) && in_array($form->cache_types_paiements[$paymentTypeId]['type'], $filterPaymentTypeIdArr)) { |
@@ -419,15 +419,15 @@ discard block |
||
| 419 | 419 | } |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - $object->commercial_id = GETPOSTINT('commercial_id'); |
|
| 423 | - $object->default_lang = GETPOST('default_lang'); |
|
| 422 | + $object->commercial_id = GETPOSTINT('commercial_id'); |
|
| 423 | + $object->default_lang = GETPOST('default_lang'); |
|
| 424 | 424 | |
| 425 | 425 | // Webservices url/key |
| 426 | 426 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
| 427 | 427 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
| 428 | 428 | |
| 429 | 429 | if (GETPOSTISSET('accountancy_code_sell')) { |
| 430 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 430 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 431 | 431 | |
| 432 | 432 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
| 433 | 433 | $object->accountancy_code_sell = ''; |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | } |
| 438 | 438 | if (GETPOSTISSET('accountancy_code_buy')) { |
| 439 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 439 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 440 | 440 | |
| 441 | 441 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
| 442 | 442 | $object->accountancy_code_buy = ''; |
@@ -907,7 +907,7 @@ discard block |
||
| 907 | 907 | } else { |
| 908 | 908 | $db->commit(); |
| 909 | 909 | $db->close(); |
| 910 | - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); |
|
| 910 | + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); |
|
| 911 | 911 | exit; |
| 912 | 912 | } |
| 913 | 913 | } else { |
@@ -1088,21 +1088,21 @@ discard block |
||
| 1088 | 1088 | } |
| 1089 | 1089 | |
| 1090 | 1090 | $object->phone = GETPOST('phone', 'alpha'); |
| 1091 | - $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 1091 | + $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 1092 | 1092 | $object->fax = GETPOST('fax', 'alpha'); |
| 1093 | 1093 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
| 1094 | 1094 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
| 1095 | - $object->capital = GETPOST('capital', 'alphanohtml'); |
|
| 1095 | + $object->capital = GETPOST('capital', 'alphanohtml'); |
|
| 1096 | 1096 | $paymentTermId = GETPOSTINT('cond_reglement_id'); // can be set by default values on create page and not already in get or post variables |
| 1097 | 1097 | if (empty($paymentTermId) && !GETPOSTISSET('cond_reglement_id')) { |
| 1098 | 1098 | $paymentTermId = getDolGlobalString('MAIN_DEFAULT_PAYMENT_TERM_ID'); |
| 1099 | 1099 | } |
| 1100 | - $object->cond_reglement_id = $paymentTermId; |
|
| 1100 | + $object->cond_reglement_id = $paymentTermId; |
|
| 1101 | 1101 | $paymentTypeId = GETPOSTINT('mode_reglement_id'); // can be set by default values on create page and not already in get or post variables |
| 1102 | 1102 | if (empty($paymentTypeId) && !GETPOSTISSET('mode_reglement_id')) { |
| 1103 | 1103 | $paymentTypeId = getDolGlobalString('MAIN_DEFAULT_PAYMENT_TYPE_ID'); |
| 1104 | 1104 | } |
| 1105 | - $object->mode_reglement_id = $paymentTypeId; |
|
| 1105 | + $object->mode_reglement_id = $paymentTypeId; |
|
| 1106 | 1106 | $object->barcode = GETPOST('barcode', 'alphanohtml'); |
| 1107 | 1107 | $object->idprof1 = GETPOST('idprof1', 'alphanohtml'); |
| 1108 | 1108 | $object->idprof2 = GETPOST('idprof2', 'alphanohtml'); |
@@ -1115,7 +1115,7 @@ discard block |
||
| 1115 | 1115 | $object->civility_id = GETPOST('civility_id', 'alpha'); |
| 1116 | 1116 | |
| 1117 | 1117 | $object->tva_assuj = GETPOSTINT('assujtva_value'); |
| 1118 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 1118 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 1119 | 1119 | $object->status = GETPOSTINT('status'); |
| 1120 | 1120 | |
| 1121 | 1121 | //Local Taxes |
@@ -1131,7 +1131,7 @@ discard block |
||
| 1131 | 1131 | $object->default_lang = GETPOST('default_lang'); |
| 1132 | 1132 | |
| 1133 | 1133 | if (GETPOSTISSET('accountancy_code_sell')) { |
| 1134 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 1134 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 1135 | 1135 | |
| 1136 | 1136 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
| 1137 | 1137 | $object->accountancy_code_sell = ''; |
@@ -1140,7 +1140,7 @@ discard block |
||
| 1140 | 1140 | } |
| 1141 | 1141 | } |
| 1142 | 1142 | if (GETPOSTISSET('accountancy_code_buy')) { |
| 1143 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 1143 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 1144 | 1144 | |
| 1145 | 1145 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
| 1146 | 1146 | $object->accountancy_code_buy = ''; |
@@ -1265,7 +1265,7 @@ discard block |
||
| 1265 | 1265 | |
| 1266 | 1266 | print '<script type="text/javascript">'; |
| 1267 | 1267 | print '$(document).ready(function () { |
| 1268 | - var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . '; |
|
| 1268 | + var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').'; |
|
| 1269 | 1269 | |
| 1270 | 1270 | init_customer_categ(); |
| 1271 | 1271 | $("#customerprospect").change(function() { |
@@ -1337,7 +1337,7 @@ discard block |
||
| 1337 | 1337 | print '</td><td'.(!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '').'>'; |
| 1338 | 1338 | |
| 1339 | 1339 | print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">'; |
| 1340 | - print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
| 1340 | + print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
| 1341 | 1341 | // This implementation of the feature to search already existing company has been disabled. It must be implemented by keeping the "input text" and we must call the search ajax societe/ajax/ajaxcompanies.php |
| 1342 | 1342 | // on a keydown of the input. We should show data about a duplicate found if we found less than 5 answers into a div under the input. |
| 1343 | 1343 | /* |
@@ -1704,7 +1704,7 @@ discard block |
||
| 1704 | 1704 | print '<td></td>'; |
| 1705 | 1705 | print '<td></td>'; |
| 1706 | 1706 | } |
| 1707 | - print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
| 1707 | + print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
| 1708 | 1708 | print '<td class="individualline" '.(($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'</td>'; |
| 1709 | 1709 | print '</tr>'; |
| 1710 | 1710 | } |
@@ -1752,7 +1752,7 @@ discard block |
||
| 1752 | 1752 | // Vat is used |
| 1753 | 1753 | print '<tr><td><label for="assujtva_value">'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</label></td>'; |
| 1754 | 1754 | print '<td>'; |
| 1755 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? (GETPOST('assujtva', 'alpha') != '' ? ' checked="checked"' : '') : 'checked="checked"') . ' value="1">'; // Assujeti par default en creation |
|
| 1755 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.(GETPOSTISSET('assujtva_value') ? (GETPOST('assujtva', 'alpha') != '' ? ' checked="checked"' : '') : 'checked="checked"').' value="1">'; // Assujeti par default en creation |
|
| 1756 | 1756 | print '</td>'; |
| 1757 | 1757 | if ($conf->browser->layout == 'phone') { |
| 1758 | 1758 | print '</tr><tr>'; |
@@ -1793,7 +1793,7 @@ discard block |
||
| 1793 | 1793 | |
| 1794 | 1794 | // VAT reverse charge by default |
| 1795 | 1795 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
| 1796 | - print '<tr><td><label for="vat_reverse_charge">' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</label></td><td colspan="3">'; |
|
| 1796 | + print '<tr><td><label for="vat_reverse_charge">'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</label></td><td colspan="3">'; |
|
| 1797 | 1797 | print '<input type="checkbox" name="vat_reverse_charge" id="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
| 1798 | 1798 | print '</td></tr>'; |
| 1799 | 1799 | } |
@@ -1802,21 +1802,21 @@ discard block |
||
| 1802 | 1802 | //TODO: Place into a function to control showing by country or study better option |
| 1803 | 1803 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
| 1804 | 1804 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; |
| 1805 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1805 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">'; |
|
| 1806 | 1806 | print '</td>'; |
| 1807 | 1807 | if ($conf->browser->layout == 'phone') { |
| 1808 | 1808 | print '</tr><tr>'; |
| 1809 | 1809 | } |
| 1810 | 1810 | print '<td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; |
| 1811 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1811 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
| 1812 | 1812 | print '</td></tr>'; |
| 1813 | 1813 | } elseif ($mysoc->localtax1_assuj == "1") { |
| 1814 | 1814 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
| 1815 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1815 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">'; |
|
| 1816 | 1816 | print '</td></tr>'; |
| 1817 | 1817 | } elseif ($mysoc->localtax2_assuj == "1") { |
| 1818 | 1818 | print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
| 1819 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1819 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
| 1820 | 1820 | print '</td></tr>'; |
| 1821 | 1821 | } |
| 1822 | 1822 | |
@@ -2077,10 +2077,10 @@ discard block |
||
| 2077 | 2077 | } |
| 2078 | 2078 | |
| 2079 | 2079 | $object->phone = GETPOST('phone', 'alpha'); |
| 2080 | - $object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha'); |
|
| 2080 | + $object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha'); |
|
| 2081 | 2081 | $object->fax = GETPOST('fax', 'alpha'); |
| 2082 | 2082 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
| 2083 | - $object->no_email = GETPOSTINT("no_email"); |
|
| 2083 | + $object->no_email = GETPOSTINT("no_email"); |
|
| 2084 | 2084 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
| 2085 | 2085 | $object->capital = GETPOST('capital', 'alphanohtml'); |
| 2086 | 2086 | $object->idprof1 = GETPOST('idprof1', 'alphanohtml'); |
@@ -2096,16 +2096,16 @@ discard block |
||
| 2096 | 2096 | $object->default_lang = GETPOST('default_lang', 'alpha'); |
| 2097 | 2097 | |
| 2098 | 2098 | $object->tva_assuj = GETPOSTINT('assujtva_value'); |
| 2099 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 2099 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 2100 | 2100 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
| 2101 | - $object->status = GETPOSTINT('status'); |
|
| 2101 | + $object->status = GETPOSTINT('status'); |
|
| 2102 | 2102 | |
| 2103 | 2103 | // Webservices url/key |
| 2104 | 2104 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
| 2105 | 2105 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
| 2106 | 2106 | |
| 2107 | 2107 | if (GETPOSTISSET('accountancy_code_sell')) { |
| 2108 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 2108 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 2109 | 2109 | |
| 2110 | 2110 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
| 2111 | 2111 | $object->accountancy_code_sell = ''; |
@@ -2114,7 +2114,7 @@ discard block |
||
| 2114 | 2114 | } |
| 2115 | 2115 | } |
| 2116 | 2116 | if (GETPOSTISSET('accountancy_code_buy')) { |
| 2117 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 2117 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 2118 | 2118 | |
| 2119 | 2119 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
| 2120 | 2120 | $object->accountancy_code_buy = ''; |
@@ -2196,7 +2196,7 @@ discard block |
||
| 2196 | 2196 | } |
| 2197 | 2197 | }); |
| 2198 | 2198 | |
| 2199 | - var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0') . '; |
|
| 2199 | + var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0').'; |
|
| 2200 | 2200 | |
| 2201 | 2201 | init_customer_categ(); |
| 2202 | 2202 | $("#customerprospect").change(function() { |
@@ -2563,14 +2563,14 @@ discard block |
||
| 2563 | 2563 | |
| 2564 | 2564 | // VAT is used |
| 2565 | 2565 | print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">'; |
| 2566 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . ($object->tva_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2566 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.($object->tva_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2567 | 2567 | print '</td></tr>'; |
| 2568 | 2568 | |
| 2569 | 2569 | // Local Taxes |
| 2570 | 2570 | //TODO: Place into a function to control showing by country or study better option |
| 2571 | 2571 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
| 2572 | 2572 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>'; |
| 2573 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2573 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2574 | 2574 | if (!isOnlyOneLocalTax(1)) { |
| 2575 | 2575 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2576 | 2576 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2579,7 +2579,7 @@ discard block |
||
| 2579 | 2579 | print '</td>'; |
| 2580 | 2580 | print '</tr><tr>'; |
| 2581 | 2581 | print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>'; |
| 2582 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1"></td></tr>'; |
|
| 2582 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1"></td></tr>'; |
|
| 2583 | 2583 | if (!isOnlyOneLocalTax(2)) { |
| 2584 | 2584 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2585 | 2585 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2588,7 +2588,7 @@ discard block |
||
| 2588 | 2588 | print '</td></tr>'; |
| 2589 | 2589 | } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { |
| 2590 | 2590 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">'; |
| 2591 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2591 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2592 | 2592 | if (!isOnlyOneLocalTax(1)) { |
| 2593 | 2593 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2594 | 2594 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2597,7 +2597,7 @@ discard block |
||
| 2597 | 2597 | print '</td></tr>'; |
| 2598 | 2598 | } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { |
| 2599 | 2599 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">'; |
| 2600 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2600 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2601 | 2601 | if (!isOnlyOneLocalTax(2)) { |
| 2602 | 2602 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2603 | 2603 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2608,7 +2608,7 @@ discard block |
||
| 2608 | 2608 | |
| 2609 | 2609 | // VAT reverse charge by default |
| 2610 | 2610 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
| 2611 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
| 2611 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
| 2612 | 2612 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
| 2613 | 2613 | print '</td></tr>'; |
| 2614 | 2614 | } |
@@ -2777,7 +2777,7 @@ discard block |
||
| 2777 | 2777 | $maxfilesizearray = getMaxFileSizeArray(); |
| 2778 | 2778 | $maxmin = $maxfilesizearray['maxmin']; |
| 2779 | 2779 | if ($maxmin > 0) { |
| 2780 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 2780 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 2781 | 2781 | } |
| 2782 | 2782 | print '<input type="file" class="flat" name="photo" id="photoinput">'; |
| 2783 | 2783 | print '</td></tr>'; |
@@ -3008,7 +3008,7 @@ discard block |
||
| 3008 | 3008 | print '<tr><td>'; |
| 3009 | 3009 | print $form->textwithpicto($langs->trans('VATReverseChargeByDefault'), $langs->trans('VATReverseChargeByDefaultDesc')); |
| 3010 | 3010 | print '</td><td>'; |
| 3011 | - print '<input type="checkbox" name="vat_reverse_charge" ' . ($object->vat_reverse_charge == '1' ? ' checked' : '') . ' disabled>'; |
|
| 3011 | + print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').' disabled>'; |
|
| 3012 | 3012 | print '</td>'; |
| 3013 | 3013 | print '</tr>'; |
| 3014 | 3014 | } |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | $this->tpl['country'] = ($img ? $img.' ' : '').$this->object->country; |
| 324 | 324 | |
| 325 | 325 | $this->tpl['phone'] = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL'); |
| 326 | - $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
| 326 | + $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
| 327 | 327 | $this->tpl['fax'] = dol_print_phone($this->object->fax, $this->object->country_code, 0, $this->object->id, 'AC_FAX'); |
| 328 | 328 | $this->tpl['email'] = dol_print_email($this->object->email, 0, $this->object->id, 1); |
| 329 | 329 | $this->tpl['url'] = dol_print_url($this->object->url); |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | $this->object->country_id = GETPOST("country_id") ? GETPOST("country_id") : $mysoc->country_id; |
| 429 | 429 | $this->object->state_id = GETPOSTINT("state_id"); |
| 430 | 430 | $this->object->phone = GETPOST("phone"); |
| 431 | - $this->object->phone_mobile = GETPOST("phone_mobile"); |
|
| 431 | + $this->object->phone_mobile = GETPOST("phone_mobile"); |
|
| 432 | 432 | $this->object->fax = GETPOST("fax"); |
| 433 | 433 | $this->object->email = GETPOST("email", 'alphawithlgt'); |
| 434 | 434 | $this->object->url = GETPOST("url"); |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | $geom = geoPHP::load($value, 'wkt'); |
| 101 | 101 | if ($geom) { |
| 102 | 102 | '@phan-var-force Geometry $geom'; |
| 103 | - $value = get_class($geom) . ' : '. $geom->numPoints() . ' Points'; |
|
| 103 | + $value = get_class($geom).' : '.$geom->numPoints().' Points'; |
|
| 104 | 104 | } |
| 105 | 105 | return $value; |
| 106 | 106 | } |