From f82e1f1155ec7b475810025ac79a1fa1daad1527 Mon Sep 17 00:00:00 2001 From: jcp Date: Fri, 19 Jul 2019 10:44:12 +0200 Subject: [PATCH 01/10] Fix: Use special_code=4 for Takepos --- htdocs/takepos/invoice.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 510b949b92b..79c7eee3d56 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -306,14 +306,14 @@ if ($action == "order" and $placeid != 0) $catsprinter2 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_2); foreach($invoice->lines as $line) { - if ($line->special_code == "3") { continue; + if ($line->special_code == "4") { continue; } $c = new Categorie($db); $existing = $c->containing($line->fk_product, Categorie::TYPE_PRODUCT, 'id'); $result = array_intersect($catsprinter1, $existing); $count = count($result); if ($count > 0) { - $sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet set special_code='3' where rowid=$line->rowid"; + $sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet set special_code='4' where rowid=$line->rowid"; $db->query($sql); $order_receipt_printer1.= '' . $line->product_label . '' . $line->qty; if (!empty($line->array_options['options_order_notes'])) $order_receipt_printer1.="
(".$line->array_options['options_order_notes'].")"; @@ -323,14 +323,14 @@ if ($action == "order" and $placeid != 0) foreach($invoice->lines as $line) { - if ($line->special_code == "3") { continue; + if ($line->special_code == "4") { continue; } $c = new Categorie($db); $existing = $c->containing($line->fk_product, Categorie::TYPE_PRODUCT, 'id'); $result = array_intersect($catsprinter2, $existing); $count = count($result); if ($count > 0) { - $sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet set special_code='3' where rowid=$line->rowid"; + $sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet set special_code='4' where rowid=$line->rowid"; $db->query($sql); $order_receipt_printer2.= '' . $line->product_label . '' . $line->qty; if (!empty($line->array_options['options_order_notes'])) $order_receipt_printer2.="
(".$line->array_options['options_order_notes'].")"; @@ -512,7 +512,7 @@ if ($placeid > 0) $htmlforlines = ''; $htmlforlines.= 'special_code == "4") { $htmlforlines.= ' order'; } $htmlforlines.= '" id="' . $line->id . '">'; From cfaf9ce0ea906f337845a6e8029d56410194419d Mon Sep 17 00:00:00 2001 From: jcp Date: Mon, 22 Jul 2019 11:44:18 +0200 Subject: [PATCH 02/10] SET special_code=4 for existing records --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index c2d4809f958..89abab54011 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -395,3 +395,6 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); ALTER TABLE llx_ticket_extrafields ADD INDEX idx_ticket_extrafields (fk_object); + +-- Use special_code=3 in Takepos +UPDATE llx_facturedet AS fd LEFT JOIN llx_facture AS f ON f.rowid = fd.fk_facture SET fd.special_code = 4 WHERE f.module_source = 'takepos' AND fd.special_code = 3 From 6409cc06ae8d3827610497c8bda26b6671482080 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Jul 2019 11:42:25 +0200 Subject: [PATCH 03/10] FIX duplicate on the check (TODO field $onetrtd not used ?) --- htdocs/core/class/commonobject.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 7cf3273b818..b2826737d0d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6289,7 +6289,7 @@ abstract class CommonObject * @param array $params Optional parameters. Example: array('style'=>'class="oddeven"', 'colspan'=>$colspan) * @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names) * @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names) - * @param string $onetrtd All fields in same tr td + * @param string $onetrtd All fields in same tr td (TODO field not used ?) * @return string */ function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0) @@ -6386,10 +6386,7 @@ abstract class CommonObject $out .= ''; - if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) - { - if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan='0'; } - } + if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan='0'; } if ($action == 'selectlines') { $colspan++; } From 0b69bf995760d52e08606fe24edd213909e8cf2d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Jul 2019 18:17:17 +0200 Subject: [PATCH 04/10] FIX #11553 --- .../core/modules/commande/doc/pdf_einstein.modules.php | 10 ++++++++-- .../modules/commande/doc/pdf_eratosthene.modules.php | 10 ++++++++-- .../core/modules/commande/doc/pdf_proforma.modules.php | 5 ++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 5975da49fbe..1c1fa12c665 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1217,6 +1217,8 @@ class pdf_einstein extends ModelePDFCommandes } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show top header of page. * @@ -1227,8 +1229,9 @@ class pdf_einstein extends ModelePDFCommandes * @param string $titlekey Translation key to show as title of document * @return void */ - private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") + protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") { + // phpcs:enable global $conf,$langs,$hookmanager; // Load traductions files requiredby by page @@ -1429,6 +1432,8 @@ class pdf_einstein extends ModelePDFCommandes return $top_shift; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show footer of page. Need this->emetteur object * @@ -1438,8 +1443,9 @@ class pdf_einstein extends ModelePDFCommandes * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) + protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { + // phpcs:enable global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 1abc6c95e20..51e36b53476 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1352,6 +1352,8 @@ class pdf_eratosthene extends ModelePDFCommandes } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show top header of page. * @@ -1362,8 +1364,9 @@ class pdf_eratosthene extends ModelePDFCommandes * @param string $titlekey Translation key to show as title of document * @return void */ - private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") + protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle") { + // phpcs:enable global $conf,$langs,$hookmanager; // Translations @@ -1564,6 +1567,8 @@ class pdf_eratosthene extends ModelePDFCommandes return $top_shift; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show footer of page. Need this->emetteur object * @@ -1573,8 +1578,9 @@ class pdf_eratosthene extends ModelePDFCommandes * @param int $hidefreetext 1=Hide free text * @return int Return height of bottom margin including footer text */ - private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) + protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { + // phpcs:enable global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index f10f858544f..f1e591d73a8 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -57,6 +57,8 @@ class pdf_proforma extends pdf_einstein } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show top header of page. * @@ -67,8 +69,9 @@ class pdf_proforma extends pdf_einstein * @param string $titlekey Translation key to show as title of document * @return void */ - private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma") + protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma") { + // phpcs:enable global $conf,$langs,$hookmanager; parent::_pagehead($pdf, $object, $showaddress, $outputlangs, $titlekey); From e92c6c87a0f20fda7690480d465c968fc469abf0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2019 13:16:49 +0200 Subject: [PATCH 05/10] FIX API return 404 sometimes even if API exists --- htdocs/api/index.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index e55a30304a4..6788b208a2e 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -88,17 +88,22 @@ if (preg_match('/api\/index\.php\/explorer/', $_SERVER["PHP_SELF"]) && ! empty($ // index.php/xxx called by any REST client to run API +$reg=array(); preg_match('/index\.php\/([^\/]+)(.*)$/', $_SERVER["PHP_SELF"], $reg); // .../index.php/categories?sortfield=t.rowid&sortorder=ASC // Set the flag to say to refresh (when we reload the explorer, production must be for API call only) -$refreshcache=false; +/*$refreshcache=false; if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root')) { $refreshcache=true; -} - +}*/ +// When in production mode, a file api/temp/routes.php is created with the API available of current call. +// But, if we set $refreshcache to false, so it may have only one API in the routes.php file if we make a call for one API without +// using the explorer. And when we make another call for another API, the API is not into the api/temp/routes.php and a 404 is returned. +// So we force refresh to each call. +$refreshcache=true; $api = new DolibarrApi($db, '', $refreshcache); //var_dump($api->r->apiVersionMap); @@ -115,7 +120,7 @@ UploadFormat::$allowedMimeTypes = array('image/jpeg', 'image/png', 'text/plain', -// Call Explorer file for all APIs definitions +// Call Explorer file for all APIs definitions (this part is slow) if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root')) { // Scan all API files to load them @@ -253,5 +258,6 @@ if (! empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && //var_dump($api->r->apiVersionMap); //exit; -// Call API (we suppose we found it) +// Call API (we suppose we found it). +// The handle will use the file api/temp/routes.php to get data to run the API. If the file exists and the entry for API is not found, it will return 404. $api->r->handle(); From 8b81702dd7805d31a46f3a55ac6942de41bc5161 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2019 13:23:42 +0200 Subject: [PATCH 06/10] Fix API 404 errors --- htdocs/api/index.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 6788b208a2e..38050592a37 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -93,17 +93,15 @@ preg_match('/index\.php\/([^\/]+)(.*)$/', $_SERVER["PHP_SELF"], $reg); // .../index.php/categories?sortfield=t.rowid&sortorder=ASC -// Set the flag to say to refresh (when we reload the explorer, production must be for API call only) -/*$refreshcache=false; +// When in production mode, a file api/temp/routes.php is created with the API available of current call. +// But, if we set $refreshcache to false, so it may have only one API in the routes.php file if we make a call for one API without +// using the explorer. And when we make another call for another API, the API is not into the api/temp/routes.php and a 404 is returned. +// So we force refresh to each call. +$refreshcache=(empty($conf->global->API_PRODUCTION_DO_NOT_ALWAYS_REFRESH_CACHE) ? true : false); if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root')) { $refreshcache=true; -}*/ -// When in production mode, a file api/temp/routes.php is created with the API available of current call. -// But, if we set $refreshcache to false, so it may have only one API in the routes.php file if we make a call for one API without -// using the explorer. And when we make another call for another API, the API is not into the api/temp/routes.php and a 404 is returned. -// So we force refresh to each call. -$refreshcache=true; +} $api = new DolibarrApi($db, '', $refreshcache); //var_dump($api->r->apiVersionMap); From 97c950badb48efd7b7aaab1efc9815062268f444 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2019 16:30:16 +0200 Subject: [PATCH 07/10] FIX Attachment was lost when we validate an expense report --- .../class/expensereport.class.php | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 0041974d4e9..bffe8d146d5 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1132,17 +1132,51 @@ class ExpenseReport extends CommonObject $resql=$this->db->query($sql); if ($resql) { - if (!$notrigger) + if (! $error && ! $notrigger) { // Call trigger $result=$this->call_trigger('EXPENSE_REPORT_VALIDATE', $fuser); - if ($result < 0) { $error++; } // End call triggers } + if (! $error) + { + $this->oldref = $this->ref; + + // Rename directory if dir was a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref)) + { + // On renomme repertoire ($this->ref = ancienne ref, $num = nouvelle ref) + // in order not to lose the attachments + $oldref = dol_sanitizeFileName($this->ref); + $newref = dol_sanitizeFileName($num); + $dirsource = $conf->expensereport->dir_output.'/'.$oldref; + $dirdest = $conf->expensereport->dir_output.'/'.$newref; + if (file_exists($dirsource)) + { + dol_syslog(get_class($this)."::setValidate() rename dir ".$dirsource." into ".$dirdest); + + if (@rename($dirsource, $dirdest)) + { + dol_syslog("Rename ok"); + // Rename docs starting with $oldref with $newref + $listoffiles=dol_dir_list($conf->expensereport->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + foreach($listoffiles as $fileentry) + { + $dirsource=$fileentry['name']; + $dirdest=preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirsource=$fileentry['path'].'/'.$dirsource; + $dirdest=$fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } + } + } + } + } + if (! $error) { $this->oldref = $this->ref; From 471a947e8abe8789fc49da2ed99c679cedd4349d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2019 16:30:16 +0200 Subject: [PATCH 08/10] FIX Attachment was lost when we validate an expense report Conflicts: htdocs/expensereport/class/expensereport.class.php --- htdocs/expensereport/class/expensereport.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index dd2818f28bf..aec06b7972b 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1120,11 +1120,10 @@ class ExpenseReport extends CommonObject $resql=$this->db->query($sql); if ($resql) { - if (!$notrigger) + if (! $error && ! $notrigger) { // Call trigger - $result=$this->call_trigger('EXPENSE_REPORT_VALIDATE',$fuser); - + $result=$this->call_trigger('EXPENSE_REPORT_VALIDATE', $fuser); if ($result < 0) { $error++; } @@ -1148,7 +1147,7 @@ class ExpenseReport extends CommonObject $dirdest = $conf->expensereport->dir_output.'/'.$newref; if (file_exists($dirsource)) { - dol_syslog(get_class($this)."::valid() rename dir ".$dirsource." into ".$dirdest); + dol_syslog(get_class($this)."::setValidate() rename dir ".$dirsource." into ".$dirdest); if (@rename($dirsource, $dirdest)) { From 4ed7571a3f5b0d3de7f62dd2ace23a367c3e2716 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2019 16:36:39 +0200 Subject: [PATCH 09/10] Merge --- .../class/expensereport.class.php | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 684786f7e27..3bdd026e62f 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1142,41 +1142,6 @@ class ExpenseReport extends CommonObject // End call triggers } - if (! $error) - { - $this->oldref = $this->ref; - - // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref)) - { - // On renomme repertoire ($this->ref = ancienne ref, $num = nouvelle ref) - // in order not to lose the attachments - $oldref = dol_sanitizeFileName($this->ref); - $newref = dol_sanitizeFileName($num); - $dirsource = $conf->expensereport->dir_output.'/'.$oldref; - $dirdest = $conf->expensereport->dir_output.'/'.$newref; - if (file_exists($dirsource)) - { - dol_syslog(get_class($this)."::setValidate() rename dir ".$dirsource." into ".$dirdest); - - if (@rename($dirsource, $dirdest)) - { - dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles=dol_dir_list($conf->expensereport->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach($listoffiles as $fileentry) - { - $dirsource=$fileentry['name']; - $dirdest=preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); - $dirsource=$fileentry['path'].'/'.$dirsource; - $dirdest=$fileentry['path'].'/'.$dirdest; - @rename($dirsource, $dirdest); - } - } - } - } - } - if (! $error) { $this->oldref = $this->ref; From 2867e31a6379740723fa1021fc157392435bd4b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2019 01:13:39 +0200 Subject: [PATCH 10/10] Fix CSS --- htdocs/comm/card.php | 14 +++++++------- htdocs/fourn/card.php | 8 ++++---- htdocs/margin/tabs/thirdpartyMargins.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/ticket/list.php | 4 +++- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 721aba20de8..285ed03e7c3 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -694,7 +694,7 @@ if ($object->id > 0) if ($num > 0) { print '
'; - print ''; + print '
'; print ''; print '
'; @@ -779,7 +779,7 @@ if ($object->id > 0) $db->free($resql2); print '
'; - print '
'.$langs->trans("LastPropals", ($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' '.$num.'
'; + print '
'; print ''; print '
'; @@ -855,7 +855,7 @@ if ($object->id > 0) $num = $db->num_rows($resql); if ($num > 0) { print '
'; - print '
'.$langs->trans("LastCustomerOrders", ($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' '.$num.'
'; + print '
'; print ''; print '
'; @@ -919,7 +919,7 @@ if ($object->id > 0) if ($num >0) { print '
'; - print '
'.$langs->trans("LastSendings", ($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllSendings").' '.$num.'
'; + print '
'; print ''; print '
'; @@ -989,7 +989,7 @@ if ($object->id > 0) if ($num > 0) { print '
'; - print '
'.$langs->trans("LastContracts", ($num<=$MAXLIST?"":$MAXLIST)).'
'; + print '
'; print ''; print '
'; @@ -1062,7 +1062,7 @@ if ($object->id > 0) if ($num > 0) { print '
'; - print '
'.$langs->trans("LastInterventions", ($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllInterventions").' '.$num.'
'; + print '
'; print ''; print '
'; @@ -1167,7 +1167,7 @@ if ($object->id > 0) if ($num > 0) { print '
'; - print '
'.$langs->trans("LatestCustomerTemplateInvoices", ($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllCustomerTemplateInvoices").' '.$num.'
'; + print '
'; print ''; print '
'; diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 2c6580be662..c65c1fde57f 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -469,7 +469,7 @@ if ($object->id > 0) $num = $db->num_rows($query); - print '
'.$langs->trans("LastCustomersBills", ($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' '.$num.'
'; + print '
'; print ''; print '
'.$langs->trans("ProductsAndServices").''; print ''.$langs->trans("AllProductReferencesOfSupplier").' '.$object->nbOfProductRefs().''; @@ -541,7 +541,7 @@ if ($object->id > 0) if ($num > 0) { - print ''; + print '
'; print ''; print '
'; @@ -644,7 +644,7 @@ if ($object->id > 0) if ($num > 0) { - print ''; + print '
'; print ''; print '
'; @@ -717,7 +717,7 @@ if ($object->id > 0) $num = $db->num_rows($resql); if ($num > 0) { - print ''; + print '
'; print ''; print '
'; diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index a69b98a9ac1..1d0897a72b0 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -18,7 +18,7 @@ /** * \file htdocs/margin/tabs/thirdpartyMargins.php * \ingroup product margins - * \brief Page des marges des factures clients pour un tiers + * \brief Page for invoice margins of a thirdparty */ require '../../main.inc.php'; @@ -170,7 +170,7 @@ if ($socid > 0) { $num = $db->num_rows($result); - print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "&socid=".$object->id, $sortfield, $sortorder, '', 0, 0, ''); + print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "&socid=".$object->id, $sortfield, $sortorder, '', $num, $num, ''); $i = 0; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 7c2bbba5c42..58b076a953c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2519,7 +2519,7 @@ table.liste tr:last-of-type td, table.noborder:not(#tablelines) tr:last-of-type border-bottom-color: rgb(); border-bottom-style: solid; } -div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):last-of-type { +div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):not(.lastrecordtable):last-of-type { border-bottom: 1px solid rgb(); } div.tabBar table.border>tbody>tr:last-of-type>td { diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 0f415ddbf33..f40d3afce33 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -450,8 +450,10 @@ if ($projectid) print '' . $langs->trans('TicketAssignedToMeInfos') . '

';