From d08db86ba11829397efcb451da70c317c21e17ae Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Thu, 11 Apr 2019 18:55:16 +0200 Subject: [PATCH 1/7] Fix customer order updateline --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 52a73732d8d..5506d8a4770 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2955,7 +2955,7 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::updateline id=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, date_start=$date_start, date_end=$date_end, type=$type, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, special_code=$special_code"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - if ($this->statut == Propal::STATUS_DRAFT) + if ($this->statut == Commande::STATUS_DRAFT) { // Clean parameters From 728381e6e6f45b1d9973e852136179811e4c70ad Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 15 Apr 2019 15:10:44 +0200 Subject: [PATCH 2/7] FIX : bug #11018 --- htdocs/compta/sociales/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 8893447ebf3..01efe621dc8 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -28,6 +28,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'banks', 'bills')); From 1669d497b43f08143791d81c93cc593be32c45d4 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Tue, 16 Apr 2019 17:36:03 +0200 Subject: [PATCH 3/7] FIX: actioncomm: sort events by date after external calendars and hook --- htdocs/comm/action/index.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 4a909f1adeb..3145fc649ef 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1001,6 +1001,11 @@ if (! empty($hookmanager->resArray['eventarray'])) { } } +// Sort events +foreach($eventarray as $keyDate => &$dateeventarray) +{ + usort($dateeventarray, 'sort_events_by_date'); +} $maxnbofchar=0; @@ -1630,3 +1635,22 @@ function dol_color_minus($color, $minus, $minusunit = 16) } return $newcolor; } + + +/** + * Sort events by date + * + * @param object $a Event A + * @param object $b Event B + * @return int < 0 if event A should be before event B, > 0 otherwise, 0 if they have the exact same time slot + */ +function sort_events_by_date($a, $b) +{ + if($a->datep != $b->datep) + { + return $a->datep - $b->datep; + } + + // If both events have the same start time, longest first + return $b->datef - $a->datef; +} \ No newline at end of file From c0defe3965a7b65607d89e3e55b8dc7f162238b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Apr 2019 23:27:45 +0200 Subject: [PATCH 4/7] Update index.php --- htdocs/comm/action/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 3145fc649ef..358da27b07b 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1653,4 +1653,4 @@ function sort_events_by_date($a, $b) // If both events have the same start time, longest first return $b->datef - $a->datef; -} \ No newline at end of file +} From b5bf6830e94deb4382c9187bd7c98681232147de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Apr 2019 01:13:59 +0200 Subject: [PATCH 5/7] Introduce method convertBackOfficeMediasLinksToPublicLinks so links to media added from filemanager in notes are visible by PDFs builder. --- htdocs/comm/propal/card.php | 2 +- htdocs/core/lib/functions2.lib.php | 18 ++++++++++++++++++ .../commande/doc/pdf_einstein.modules.php | 3 ++- .../commande/doc/pdf_eratosthene.modules.php | 3 ++- .../expensereport/doc/pdf_standard.modules.php | 3 ++- .../modules/facture/doc/pdf_crabe.modules.php | 3 ++- .../modules/facture/doc/pdf_sponge.modules.php | 4 ++-- .../fichinter/doc/pdf_soleil.modules.php | 4 +++- .../product/doc/pdf_standard.modules.php | 3 ++- .../project/doc/pdf_baleine.modules.php | 4 +++- .../modules/project/doc/pdf_beluga.modules.php | 4 +++- .../project/doc/pdf_timespent.modules.php | 4 +++- .../modules/propale/doc/pdf_azur.modules.php | 3 ++- .../modules/propale/doc/pdf_cyan.modules.php | 4 ++-- .../modules/stock/doc/pdf_standard.modules.php | 3 ++- .../stock/doc/pdf_stdmovement.modules.php | 3 ++- .../supplier_order/pdf/pdf_cornas.modules.php | 3 ++- .../doc/pdf_aurore.modules.php | 3 ++- 18 files changed, 55 insertions(+), 19 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 4919be7f463..94a3a884e77 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1624,7 +1624,7 @@ if ($action == 'create') print '' . $langs->trans("ValidityDuration") . ' ' . $langs->trans("days") . ''; // Terms of payment - print '' . $langs->trans('PaymentConditionsShort') . ''; + print '' . $langs->trans('PaymentConditionsShort') . ''; $form->select_conditions_paiements($soc->cond_reglement_id, 'cond_reglement_id', -1, 1); print ''; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 7fea3d20360..45fea25224b 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2492,3 +2492,21 @@ function autoOrManual($automaticmanual, $case = 1, $color = 0) if ($color) return ''.$result.''; return $result; } + + +/** + * Convert links to local wrapper to medias files into a string into a public external URL readable on internet + * + * @param string $notetoshow Text to convert + * @return string String + */ +function convertBackOfficeMediasLinksToPublicLinks($notetoshow) +{ + global $dolibarr_main_url_root; + // Define $urlwithroot + $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); + $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current + $notetoshow=preg_replace('/src="[a-zA-Z0-9_\/\-\.]*(viewimage\.php\?modulepart=medias[^"]*)"/', 'src="'.$urlwithroot.'/\1"', $notetoshow); + return $notetoshow; +} diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 3f3c5b5b93f..e076245f3be 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -378,7 +378,8 @@ class pdf_einstein extends ModelePDFCommandes $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($notetoshow), 0, 1); $nexY = $pdf->GetY(); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 1f6248a8655..3695576d0d3 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -423,7 +423,8 @@ class pdf_eratosthene extends ModelePDFCommandes $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top -= 2; $pdf->startTransaction(); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index aa3e49f837f..96665e1b819 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -325,7 +325,8 @@ class pdf_standard extends ModeleExpenseReport $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top = 95; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 8795544f565..444a2cdcb4e 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -443,7 +443,8 @@ class pdf_crabe extends ModelePDFFactures $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($notetoshow), 0, 1); $nexY = $pdf->GetY(); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 10834dd7a28..9c7c7797841 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -448,8 +448,8 @@ class pdf_sponge extends ModelePDFFactures $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $pdf->startTransaction(); $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 09473e4b65d..41edc6c0a1d 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; /** @@ -272,7 +273,8 @@ class pdf_soleil extends ModelePDFFicheinter $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index e9b95b4e1d7..546dca9d298 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -319,7 +319,8 @@ class pdf_standard extends ModelePDFProduct $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index f99a68b29d7..c7005206fcc 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; /** @@ -285,7 +286,8 @@ class pdf_baleine extends ModelePDFProjects $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 95bba01ad23..10a2ce752d8 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -258,7 +259,8 @@ class pdf_beluga extends ModelePDFProjects $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 1846e556b1e..007bf9c8e1d 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; /** @@ -216,7 +217,8 @@ class pdf_timespent extends ModelePDFProjects $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 548b8eb81e5..999a6fa836e 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -448,7 +448,8 @@ class pdf_azur extends ModelePDFPropales $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($notetoshow), 0, 1); $nexY = $pdf->GetY(); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 655d6a5d98e..62e268874e8 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -433,8 +433,8 @@ class pdf_cyan extends ModelePDFPropales $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $pdf->startTransaction(); $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index af03aa8daee..f9bbb436d5a 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -549,7 +549,8 @@ class pdf_standard extends ModelePDFStock $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index dd52b001479..2a1819a3aa0 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -723,7 +723,8 @@ class pdf_stdmovement extends ModelePDFMovement $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php index 270450b86a2..0e3da7781cd 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php @@ -375,7 +375,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $tab_top -= 2; $pdf->startTransaction(); diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 2d9f6796df7..cee18c61e46 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -381,7 +381,8 @@ class pdf_aurore extends ModelePDFSupplierProposal $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($notetoshow), 0, 1); $nexY = $pdf->GetY(); From 8310e09786c4f30f86eac8cf251eb4414f9703f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Apr 2019 01:18:02 +0200 Subject: [PATCH 6/7] Fix td balance --- htdocs/compta/bank/list.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index c18791f8329..080cef69778 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -575,7 +575,13 @@ foreach ($accounts as $key=>$type) $i++; } -if (! $found) print ''.$langs->trans("None").''; +// If no record found +if (! $found) +{ + $colspan=1; + foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; } + print ''.$langs->trans("NoRecordFound").''; +} // Show total line if (isset($totalarray['totalbalancefield']) && $lastcurrencycode != 'various') // If there is several currency, $lastcurrencycode is set to 'various' before From e6ffaeefe5504a084f8647bb58ad6b1a02b7e368 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Apr 2019 10:39:30 +0200 Subject: [PATCH 7/7] CSS --- htdocs/comm/propal/card.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/compta/facture/card.php | 2 +- htdocs/contrat/card.php | 2 +- htdocs/don/card.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/projet/card.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 94a3a884e77..264905776cd 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1591,7 +1591,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index bdd17ad217f..9e48fd2303a 100755 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1637,7 +1637,7 @@ if ($action == 'create' && $user->rights->commande->creer) }); '; } - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index d7abfb36f42..c0da8f364fc 100755 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2724,7 +2724,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index c61e2e6177a..443cf984f79 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1212,7 +1212,7 @@ if ($action == 'create') { print ''; print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print ''."\n"; diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 2e80e4a1fc9..5662b3272f0 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -372,7 +372,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 7fc1b990c09..a6abd723355 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1559,7 +1559,7 @@ if ($action=='create') }); '; } - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; } print ''; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 1007a745a81..6dc48d88753 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1755,7 +1755,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; } print ''; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index d55d8651642..7023f2d871e 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -556,7 +556,7 @@ if ($action == 'create' && $user->rights->projet->creer) print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1); } else print $text; - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; print ''; } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index c87411cfb83..1701a95af73 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1084,7 +1084,7 @@ if ($action == 'create') } else { print ''; print $form->select_company('', 'socid', 's.fournisseur = 1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); - print ' '.$langs->trans("AddThirdParty").''; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n";