@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | $this->url = DOL_URL_ROOT.'/admin/modules.php?mode=marketplace'; |
| 140 | 140 | |
| 141 | 141 | // For dolistore modules |
| 142 | - $this->dolistore_api_url = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV', 'https://www.dolistore.com/api/'); // 'https://www.dolistore.com/api/', 'https://admin2.dolibarr.org/api/index.php/marketplace/' |
|
| 142 | + $this->dolistore_api_url = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV', 'https://www.dolistore.com/api/'); // 'https://www.dolistore.com/api/', 'https://admin2.dolibarr.org/api/index.php/marketplace/' |
|
| 143 | 143 | $this->dolistore_api_key = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_KEY', 'dolistorepublicapi'); |
| 144 | - $this->shop_url = getDolGlobalString('MAIN_MODULE_DOLISTORE_SHOP_URL', 'https://www.dolistore.com'); |
|
| 144 | + $this->shop_url = getDolGlobalString('MAIN_MODULE_DOLISTORE_SHOP_URL', 'https://www.dolistore.com'); |
|
| 145 | 145 | |
| 146 | 146 | // For community modules |
| 147 | 147 | $this->file_source_url = "https://raw.githubusercontent.com/Dolibarr/dolibarr-community-modules/refs/heads/main/index.yaml"; |
@@ -204,12 +204,12 @@ discard block |
||
| 204 | 204 | $httpheader[] = 'Authorization: Basic '.base64_encode($basicAuthLogin.':'.$basicAuthPassword); |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | - $url = $this->dolistore_api_url . (preg_match('/\/$/', $this->dolistore_api_url) ? '' : '/') . $resource; |
|
| 207 | + $url = $this->dolistore_api_url.(preg_match('/\/$/', $this->dolistore_api_url) ? '' : '/').$resource; |
|
| 208 | 208 | |
| 209 | 209 | $options['apikey'] = $this->dolistore_api_key; |
| 210 | 210 | |
| 211 | 211 | if ($options) { |
| 212 | - $url .= '?' . http_build_query($options); |
|
| 212 | + $url .= '?'.http_build_query($options); |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | $response = getURLContent($url, 'GET', '', 1, $httpheader, array('https'), 0, -1, 5, 5); |
@@ -251,13 +251,13 @@ discard block |
||
| 251 | 251 | $modules = array(); |
| 252 | 252 | |
| 253 | 253 | if (!empty($this->cache_file) && file_exists($this->cache_file)) { |
| 254 | - dol_syslog(__METHOD__ . " - Loading cache file: " . $this->cache_file, LOG_DEBUG); |
|
| 254 | + dol_syslog(__METHOD__." - Loading cache file: ".$this->cache_file, LOG_DEBUG); |
|
| 255 | 255 | |
| 256 | 256 | $content = file_get_contents($this->cache_file); |
| 257 | 257 | if ($content !== false) { |
| 258 | 258 | $modules = $this->readYaml($content); |
| 259 | 259 | } else { |
| 260 | - dol_syslog(__METHOD__ . " - Error reading cache file", LOG_ERR); |
|
| 260 | + dol_syslog(__METHOD__." - Error reading cache file", LOG_ERR); |
|
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | |
@@ -285,20 +285,20 @@ discard block |
||
| 285 | 285 | if (isset($resCategories['response']) && is_array($resCategories['response'])) { |
| 286 | 286 | $organized_tree = $resCategories['response']; |
| 287 | 287 | } else { |
| 288 | - return $html ; |
|
| 288 | + return $html; |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | $html = ''; |
| 292 | 292 | foreach ($organized_tree as $key => $value) { |
| 293 | 293 | if ($value['label'] != "Versions" && $value['label'] != "Specials") { |
| 294 | - $html .= '<li' . ($current == $value['rowid'] ? ' class="active"' : '') . '>'; |
|
| 295 | - $html .= '<a href="?mode=marketplace&categorie=' . $value['rowid'] . '">' . $value['label'] . '</a>'; |
|
| 294 | + $html .= '<li'.($current == $value['rowid'] ? ' class="active"' : '').'>'; |
|
| 295 | + $html .= '<a href="?mode=marketplace&categorie='.$value['rowid'].'">'.$value['label'].'</a>'; |
|
| 296 | 296 | if (isset($value['children'])) { |
| 297 | 297 | $html .= '<ul>'; |
| 298 | 298 | usort($value['children'], $this->buildSorter('position')); |
| 299 | 299 | foreach ($value['children'] as $key_children => $value_children) { |
| 300 | - $html .= '<li' . ($current == $value_children['rowid'] ? ' class="active"' : '') . '>'; |
|
| 301 | - $html .= '<a href="?mode=marketplace&categorie=' . $value_children['rowid'] . '" title="' . dol_escape_htmltag(strip_tags($value_children['description'])) . '">' . $value_children['label'] . '</a>'; |
|
| 300 | + $html .= '<li'.($current == $value_children['rowid'] ? ' class="active"' : '').'>'; |
|
| 301 | + $html .= '<a href="?mode=marketplace&categorie='.$value_children['rowid'].'" title="'.dol_escape_htmltag(strip_tags($value_children['description'])).'">'.$value_children['label'].'</a>'; |
|
| 302 | 302 | $html .= '</li>'; |
| 303 | 303 | } |
| 304 | 304 | $html .= '</ul>'; |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | |
| 324 | 324 | $html = ""; |
| 325 | 325 | $last_month = dol_now() - (30 * 24 * 60 * 60); |
| 326 | - $dolibarrversiontouse = DOL_VERSION; // full string with version |
|
| 326 | + $dolibarrversiontouse = DOL_VERSION; // full string with version |
|
| 327 | 327 | |
| 328 | 328 | $this->products = array(); |
| 329 | 329 | |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | $this->no_page = $options['no_page'] ?? 1; |
| 333 | 333 | $this->search = $options['search'] ?? ''; |
| 334 | 334 | |
| 335 | - $this->per_page = 11; // We fix number of products per page to 11 |
|
| 335 | + $this->per_page = 11; // We fix number of products per page to 11 |
|
| 336 | 336 | |
| 337 | 337 | // Length of $search must be at least 2 characters |
| 338 | 338 | if (!empty($this->search) && strlen(str_replace(' ', '', (string) $this->search)) < 2) { |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | $fileProducts = array(); |
| 374 | 374 | $fileProductsTotal = 0; |
| 375 | 375 | if (!empty($this->githubFileStatus) && getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_COMMUNITY')) { |
| 376 | - $fileProducts = $this->fetchModulesFromFile($data); // Return an array with all modules from the cache filecontent in $data |
|
| 376 | + $fileProducts = $this->fetchModulesFromFile($data); // Return an array with all modules from the cache filecontent in $data |
|
| 377 | 377 | |
| 378 | 378 | $fileProducts = $this->adaptData($fileProducts, 'githubcommunity'); |
| 379 | 379 | |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | $download_link .= img_picto('', 'file-code', 'class="size2x paddingright colorgrey"'); |
| 432 | 432 | $download_link .= '</a>'; |
| 433 | 433 | |
| 434 | - $urlview = $product["dolistore-download"]; // In a future, we will have the download to the zip file |
|
| 434 | + $urlview = $product["dolistore-download"]; // In a future, we will have the download to the zip file |
|
| 435 | 435 | if ($urlview) { |
| 436 | 436 | $download_link .= '<a class="paddingleft paddingright" target="_blank" title="'.$langs->trans("View").'" href="'.$urlview.'" rel="noopener noreferrer">'; |
| 437 | 437 | $download_link .= img_picto('', 'url', 'class="size2x"'); |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | } |
| 450 | 450 | } |
| 451 | 451 | } elseif ($product['source'] === 'dolistore') { |
| 452 | - $urldownload = 'https://www.dolistore.com/_service_download.php?t=free&p=' . $product['id']; |
|
| 452 | + $urldownload = 'https://www.dolistore.com/_service_download.php?t=free&p='.$product['id']; |
|
| 453 | 453 | $download_link = '<a class="paddingleft paddingright" target="_blank" title="'.$langs->trans("View").'" href="'.$this->shop_url.'/product.php?id='.((int) $product["id"]).'">'; |
| 454 | 454 | $download_link .= img_picto('', 'url', 'class="size2x"'); |
| 455 | 455 | $download_link .= '</a>'; |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | |
| 510 | 510 | // Logo |
| 511 | 511 | $html .= '<td class="center width150"><div class="newAppParent">'; |
| 512 | - $html .= $newapp.$images; // No dol_escape_htmltag, it is already escape html |
|
| 512 | + $html .= $newapp.$images; // No dol_escape_htmltag, it is already escape html |
|
| 513 | 513 | $html .= '</div></td>'; |
| 514 | 514 | |
| 515 | 515 | // Description |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | $html .= '</small>'; |
| 526 | 526 | } |
| 527 | 527 | $html .= '<br><small>'; |
| 528 | - $html .= $version; // Version Dolibarr. No dol_escape_htmltag, it is already escape html |
|
| 528 | + $html .= $version; // Version Dolibarr. No dol_escape_htmltag, it is already escape html |
|
| 529 | 529 | $html .= '</small>'; |
| 530 | 530 | $html .= '</h2>'; |
| 531 | 531 | |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | $this->numberOfProducts = count($this->products); |
| 587 | 587 | |
| 588 | - return $html ; |
|
| 588 | + return $html; |
|
| 589 | 589 | } |
| 590 | 590 | |
| 591 | 591 | /** |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | * @param array<string, mixed> $b |
| 603 | 603 | * @return int |
| 604 | 604 | */ |
| 605 | - function (array $a, array $b) use ($key) { |
|
| 605 | + function(array $a, array $b) use ($key) { |
|
| 606 | 606 | $valA = isset($a[$key]) && is_scalar($a[$key]) ? (string) $a[$key] : ''; |
| 607 | 607 | $valB = isset($b[$key]) && is_scalar($b[$key]) ? (string) $b[$key] : ''; |
| 608 | 608 | |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | $pagelist .= '<li class="pagination">'; |
| 764 | 764 | $pagelist .= '<label for="page_input">Page </label>'; |
| 765 | 765 | if ($this->categorie != 0) { |
| 766 | - $pagelist .= '<input type="hidden" name="categorie" value="' . $this->categorie . '">'; |
|
| 766 | + $pagelist .= '<input type="hidden" name="categorie" value="'.$this->categorie.'">'; |
|
| 767 | 767 | } |
| 768 | 768 | $pagelist .= '<input type="text" id="page_input" name="no_page" value="'.($page).'" min="1" max="'.$nbpages.'" class="width40 page_input" oninput="if(this.value > '.$nbpages.') this.value='.$nbpages.'">'; |
| 769 | 769 | $pagelist .= ' / '.$nbpages; |
@@ -813,17 +813,17 @@ discard block |
||
| 813 | 813 | } |
| 814 | 814 | |
| 815 | 815 | // Get the predefined error message or use a default one |
| 816 | - $error_message = $error_messages[$request['status_code']] ?? 'Unexpected HTTP status: ' . $request['status_code']; |
|
| 816 | + $error_message = $error_messages[$request['status_code']] ?? 'Unexpected HTTP status: '.$request['status_code']; |
|
| 817 | 817 | |
| 818 | 818 | // Append error details if available |
| 819 | 819 | if (!empty($request['response']) && isset($request['response']['errors']) && is_array($request['response']['errors'])) { |
| 820 | 820 | foreach ($request['response']['errors'] as $error) { |
| 821 | - $error_message .= ' - (Code ' . $error['code'] . '): ' . $error['message']; |
|
| 821 | + $error_message .= ' - (Code '.$error['code'].'): '.$error['message']; |
|
| 822 | 822 | } |
| 823 | 823 | } |
| 824 | 824 | |
| 825 | 825 | if (!empty($request['curl_error_msg'])) { |
| 826 | - $error_message .= ' - ' . $request['curl_error_msg']; |
|
| 826 | + $error_message .= ' - '.$request['curl_error_msg']; |
|
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | // Return the formatted error message |
@@ -851,7 +851,7 @@ discard block |
||
| 851 | 851 | if (!file_exists($cache_file) || filemtime($cache_file) < (dol_now() - $cache_time)) { |
| 852 | 852 | // We get remote url |
| 853 | 853 | $addheaders = array(); |
| 854 | - $result = getURLContent($file_source_url, 'GET', '', 1, $addheaders); // TODO Force timeout to 5 s on both connect and response. |
|
| 854 | + $result = getURLContent($file_source_url, 'GET', '', 1, $addheaders); // TODO Force timeout to 5 s on both connect and response. |
|
| 855 | 855 | if (!empty($result) && $result['http_code'] == 200) { |
| 856 | 856 | $yaml = $result['content']; |
| 857 | 857 | file_put_contents($cache_file, $yaml); |
@@ -956,7 +956,7 @@ discard block |
||
| 956 | 956 | continue; |
| 957 | 957 | } |
| 958 | 958 | $adaptedPackage = [ |
| 959 | - 'ref' => str_replace(' ', '', $package['modulename'] . '-' . $package['current_version'] . '@' . |
|
| 959 | + 'ref' => str_replace(' ', '', $package['modulename'].'-'.$package['current_version'].'@'. |
|
| 960 | 960 | (array_key_exists('author', $package) ? $package['author'] : 'unkownauthor')), |
| 961 | 961 | 'label' => !empty($package['label'][substr($this->lang, 0, 2)]) |
| 962 | 962 | ? $package['label'][substr($this->lang, 0, 2)] |
@@ -1065,7 +1065,7 @@ discard block |
||
| 1065 | 1065 | * |
| 1066 | 1066 | * @return int |
| 1067 | 1067 | */ |
| 1068 | - static function ($a, $b) { |
|
| 1068 | + static function($a, $b) { |
|
| 1069 | 1069 | return strtotime($b['datec'] ?? '0') - strtotime($a['datec'] ?? '0'); |
| 1070 | 1070 | } |
| 1071 | 1071 | ); |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | * |
| 1081 | 1081 | * @return bool |
| 1082 | 1082 | */ |
| 1083 | - static function ($package) use ($options) { |
|
| 1083 | + static function($package) use ($options) { |
|
| 1084 | 1084 | return stripos($package['label'], $options['search']) !== false || stripos($package['description'], $options['search']) !== false; |
| 1085 | 1085 | } |
| 1086 | 1086 | ); |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | * |
| 1097 | 1097 | * @return bool |
| 1098 | 1098 | */ |
| 1099 | - static function ($package) use ($options) { |
|
| 1099 | + static function($package) use ($options) { |
|
| 1100 | 1100 | return in_array($options['categorieid'], $package['category']); |
| 1101 | 1101 | } |
| 1102 | 1102 | ); |
@@ -96,9 +96,9 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | // MAIN_ENABLE_EXTERNALMODULES_DOLISTORE is 1 if we enabled the dolistore modules |
| 99 | -$options['search_source_dolistore'] = getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_DOLISTORE'); |
|
| 99 | +$options['search_source_dolistore'] = getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_DOLISTORE'); |
|
| 100 | 100 | // MAIN_ENABLE_EXTERNALMODULES_COMMUNITY is 1 if we enabled the community modules |
| 101 | -$options['search_source_github'] = getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_COMMUNITY'); |
|
| 101 | +$options['search_source_github'] = getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_COMMUNITY'); |
|
| 102 | 102 | |
| 103 | 103 | if (!$user->admin) { |
| 104 | 104 | accessforbidden(); |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | //var_dump($modulenamearrays);exit; |
| 338 | 338 | |
| 339 | 339 | // Lop on each packages (can have several if package is a metapackage) |
| 340 | - if (! $error) { |
|
| 340 | + if (!$error) { |
|
| 341 | 341 | foreach ($modulenamearrays as $modulenameval) { |
| 342 | 342 | if (strpos($modulenameval, '#') === 0) { |
| 343 | 343 | continue; // Discard comments |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | 'search_version' => '-1' |
| 397 | 397 | ); |
| 398 | 398 | $queryString = http_build_query($searchParams); |
| 399 | - $redirectUrl = DOL_URL_ROOT . '/admin/modules.php?' . $queryString; |
|
| 399 | + $redirectUrl = DOL_URL_ROOT.'/admin/modules.php?'.$queryString; |
|
| 400 | 400 | |
| 401 | 401 | $message = $langs->trans("SetupIsReadyForUse", $redirectUrl, $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules")); |
| 402 | 402 | |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | } else { |
| 600 | 600 | $familykey = $objMod->family; |
| 601 | 601 | } |
| 602 | - '@phan-var-force string $familykey'; // if not, phan considers $familykey may be null |
|
| 602 | + '@phan-var-force string $familykey'; // if not, phan considers $familykey may be null |
|
| 603 | 603 | |
| 604 | 604 | $moduleposition = ($objMod->module_position ? $objMod->module_position : '50'); |
| 605 | 605 | if ($objMod->isCoreOrExternalModule() == 'external' && $moduleposition < 100000) { |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup'); |
| 707 | 707 | |
| 708 | 708 | // Start to show page |
| 709 | -$deschelp = ''; |
|
| 709 | +$deschelp = ''; |
|
| 710 | 710 | if ($mode == 'common' || $mode == 'commonkanban') { |
| 711 | 711 | $desc = $langs->trans("ModulesDesc", '{picto}'); |
| 712 | 712 | $desc .= ' '.$langs->trans("ModulesDesc2", '{picto2}'); |
@@ -993,7 +993,7 @@ discard block |
||
| 993 | 993 | } |
| 994 | 994 | |
| 995 | 995 | if ($objMod->isCoreOrExternalModule() == 'external' && $action == 'checklastversion' && !getDolGlobalString('DISABLE_CHECK_ON_MALWARE_MODULES')) { |
| 996 | - $checkRes = $objMod->checkForCompliance(); // Check if module is reported as non compliant with Dolibarr rules and law |
|
| 996 | + $checkRes = $objMod->checkForCompliance(); // Check if module is reported as non compliant with Dolibarr rules and law |
|
| 997 | 997 | if (!is_numeric($checkRes) && $checkRes != '') { |
| 998 | 998 | $langs->load("errors"); |
| 999 | 999 | setEventMessages($objMod->getName().' : '.$langs->trans($checkRes), null, 'errors'); |
@@ -1358,7 +1358,7 @@ discard block |
||
| 1358 | 1358 | |
| 1359 | 1359 | print '<span class="opacitymedium hideonsmartphone">'.$langs->trans('DOLISTOREdescriptionLong').'</span><br><br>'; |
| 1360 | 1360 | |
| 1361 | - $categories_tree = $remotestore->getCategories($options['categorie']); // Call API to get the categories |
|
| 1361 | + $categories_tree = $remotestore->getCategories($options['categorie']); // Call API to get the categories |
|
| 1362 | 1362 | |
| 1363 | 1363 | $products_list = $remotestore->getProducts($options); |
| 1364 | 1364 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $this->watermark = ''; |
| 117 | 117 | |
| 118 | 118 | if ($mysoc === null) { |
| 119 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
| 119 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
| 120 | 120 | return; |
| 121 | 121 | } |
| 122 | 122 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
| 221 | 221 | // Set path to the background PDF File |
| 222 | 222 | if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
| 223 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 223 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 224 | 224 | $tplidx = $pdf->importPage(1); |
| 225 | 225 | } |
| 226 | 226 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $pdf->SetDrawColor(128, 128, 128); |
| 230 | 230 | |
| 231 | 231 | if (method_exists($pdf, 'AliasNbPages')) { |
| 232 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 232 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $pdf->MultiCell(0, 3, ''); // Set interline to 3 |
| 261 | 261 | $pdf->SetTextColor(0, 0, 0); |
| 262 | 262 | |
| 263 | - $tab_top = 40; // position of top tab |
|
| 263 | + $tab_top = 40; // position of top tab |
|
| 264 | 264 | $tab_top_newpage = (getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 10 : $tab_top); |
| 265 | 265 | |
| 266 | 266 | $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | $nbMonths = (((int) $toYear - (int) $fromYear) * 12) + ((int) $toMonth - (int) $fromMonth) + 1; |
| 295 | 295 | $datePlusOneMonth = strtotime("-1 month", $this->fromDate); |
| 296 | 296 | $dates = []; |
| 297 | - for ($i = 0; $i < $nbMonths; $i++) { |
|
| 297 | + for ($i = 0; $i < $nbMonths; $i++) { |
|
| 298 | 298 | $datePlusOneMonth = strtotime("+1 month", $datePlusOneMonth); |
| 299 | 299 | $dates[$datePlusOneMonth] = dol_print_date($datePlusOneMonth, "%B %Y"); |
| 300 | 300 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $curY, |
| 318 | 318 | $nexY, |
| 319 | 319 | $default_font_size, |
| 320 | - $langs->trans('Total') . ' ' . $langs->trans('AccountancyGroup' . $accountGroup), |
|
| 320 | + $langs->trans('Total').' '.$langs->trans('AccountancyGroup'.$accountGroup), |
|
| 321 | 321 | $tab_top_newpage, |
| 322 | 322 | $groupDebit, |
| 323 | 323 | $groupCredit |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | $pdf->setPage($pageposafter); |
| 361 | 361 | $curY = $tab_top_newpage + $this->tabTitleHeight; |
| 362 | 362 | if ($this->balanceType == "sub") { |
| 363 | - $this->printStdColumnContent($pdf, $curY, 'account_label', $object->lines[$i]->subledger_label); |
|
| 363 | + $this->printStdColumnContent($pdf, $curY, 'account_label', $object->lines[$i]->subledger_label); |
|
| 364 | 364 | } else { |
| 365 | 365 | $this->printStdColumnContent($pdf, $curY, 'account_label', $accountingAccount->label); |
| 366 | 366 | } |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | |
| 434 | 434 | if ($this->getColumnStatus('balance')) { |
| 435 | 435 | $solde = $object->lines[$i]->credit - $object->lines[$i]->debit; |
| 436 | - $soldeText = price(price2num(abs($solde), 'MT')) . ($solde >= 0 ? ' ' . $langs->trans('CreditShort') : ' ' . $langs->trans('DebitShort')); |
|
| 436 | + $soldeText = price(price2num(abs($solde), 'MT')).($solde >= 0 ? ' '.$langs->trans('CreditShort') : ' '.$langs->trans('DebitShort')); |
|
| 437 | 437 | $this->printStdColumnContent($pdf, $curY, 'balance', $soldeText); |
| 438 | 438 | $nexY = max($pdf->GetY(), $nexY); |
| 439 | 439 | } |
@@ -499,19 +499,19 @@ discard block |
||
| 499 | 499 | $this->addDashLine($pdf, $pdf->getPage(), $nexY); |
| 500 | 500 | } |
| 501 | 501 | // check if translation for AccountancyGroupXXX exists |
| 502 | - $translationKey = 'AccountancyGroup' . $accountingAccount->pcg_type; |
|
| 502 | + $translationKey = 'AccountancyGroup'.$accountingAccount->pcg_type; |
|
| 503 | 503 | $translation = $langs->transnoentitiesnoconv($translationKey); |
| 504 | 504 | if ($translation !== $translationKey) { |
| 505 | - $output = $langs->transnoentitiesnoconv('Total') . ' ' . $translation; |
|
| 505 | + $output = $langs->transnoentitiesnoconv('Total').' '.$translation; |
|
| 506 | 506 | } else { |
| 507 | - $output = $langs->transnoentitiesnoconv('Total') . ' ' . $langs->transnoentitiesnoconv('AccountancyGroup') . ' ' . $accountingAccount->pcg_type; |
|
| 507 | + $output = $langs->transnoentitiesnoconv('Total').' '.$langs->transnoentitiesnoconv('AccountancyGroup').' '.$accountingAccount->pcg_type; |
|
| 508 | 508 | } |
| 509 | 509 | $this->addTotalLine( |
| 510 | 510 | $pdf, |
| 511 | 511 | $curY, |
| 512 | 512 | $nexY, |
| 513 | 513 | $default_font_size, |
| 514 | - $langs->transnoentitiesnoconv('Total') . ' ' . $langs->trans('AccountancyGroup' . $accountingAccount->pcg_type), |
|
| 514 | + $langs->transnoentitiesnoconv('Total').' '.$langs->trans('AccountancyGroup'.$accountingAccount->pcg_type), |
|
| 515 | 515 | $tab_top_newpage, |
| 516 | 516 | $groupDebit, |
| 517 | 517 | $groupCredit |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | // Pagefoot |
| 548 | 548 | $this->_pagefoot($pdf, $object, $outputlangs); |
| 549 | 549 | if (method_exists($pdf, 'AliasNbPages')) { |
| 550 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 550 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 551 | 551 | } |
| 552 | 552 | |
| 553 | 553 | $pdf->Close(); |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | $pdf->SetXY($this->marge_gauche + 2, $nexY); |
| 677 | 677 | $pdf->SetTextColor(0, 0, 60); |
| 678 | 678 | $textDateNow = $outputlangs->transnoentities("PrintDate"); |
| 679 | - $pdf->MultiCell($w / 3, 3, $textDateNow . " : " . date('d/m/Y', dol_now()), '', 'L'); |
|
| 679 | + $pdf->MultiCell($w / 3, 3, $textDateNow." : ".date('d/m/Y', dol_now()), '', 'L'); |
|
| 680 | 680 | $nexY = max($pdf->GetY(), $nexY); |
| 681 | 681 | |
| 682 | 682 | // Page title |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | |
| 699 | 699 | $fromDate = dol_print_date($this->fromDate, 'day'); |
| 700 | 700 | $toDate = dol_print_date($this->toDate, 'day'); |
| 701 | - $textDate = $outputlangs->transnoentities("From") . " " . $fromDate . " " . $outputlangs->transnoentities("To") . " " . $toDate; |
|
| 701 | + $textDate = $outputlangs->transnoentities("From")." ".$fromDate." ".$outputlangs->transnoentities("To")." ".$toDate; |
|
| 702 | 702 | $pdf->MultiCell($w / 3, 4, $textDate, 0, 'R'); |
| 703 | 703 | $nexY = max($pdf->GetY(), $nexY); |
| 704 | 704 | |
@@ -938,7 +938,7 @@ discard block |
||
| 938 | 938 | |
| 939 | 939 | if ($this->getColumnStatus('balance')) { |
| 940 | 940 | $solde = $credit - $debit; |
| 941 | - $soldeText = price(price2num(abs($solde), 'MT')) . ($solde >= 0 ? ' ' . $langs->trans('CreditShort') : ' ' . $langs->trans('DebitShort')); |
|
| 941 | + $soldeText = price(price2num(abs($solde), 'MT')).($solde >= 0 ? ' '.$langs->trans('CreditShort') : ' '.$langs->trans('DebitShort')); |
|
| 942 | 942 | $this->printStdColumnContent($pdf, $curY, 'balance', $soldeText); |
| 943 | 943 | $nexY = max($pdf->GetY(), $nexY); |
| 944 | 944 | } |