From 542a4fb0607915e55d3d3297da4cc6f962f81d16 Mon Sep 17 00:00:00 2001 From: ems-co Date: Thu, 17 Oct 2024 02:03:51 +0300 Subject: [PATCH 01/71] Update list.php (#31430) --- htdocs/societe/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index f968f7c4672..bf1f86cc7b5 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1827,6 +1827,7 @@ while ($i < $imaxinloop) { $userstatic->user_mobile = $val['user_mobile']; $userstatic->job = $val['job']; $userstatic->gender = $val['gender']; + $userstatic->statut = $val['statut']; print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2); $j++; if ($j < $nbofsalesrepresentative) { From 202263dbb52e2e8d77e1d24ce998a928119a0ecb Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:04:36 +0300 Subject: [PATCH 02/71] fix PDF proposal signature area (#31420) * fix signature * fix signature --- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index a66489366ee..2f5bc39610b 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1758,7 +1758,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 2); $pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("ProposalCustomerSignature"), 0, 'L', 1); - $pdf->SetXY($posx, $tab_top + $tab_hl); + $pdf->SetXY($posx, $tab_top + $tab_hl + 3); $pdf->MultiCell($largcol, $tab_hl * 3, '', 1, 'R'); if (getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) { $pdf->addEmptySignatureAppearance($posx, $tab_top + $tab_hl, $largcol, $tab_hl * 3); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index b9617aa6ed0..dba0f3c90f1 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1824,7 +1824,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 2); $pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("ProposalCustomerSignature"), 0, 'L', 1); - $pdf->SetXY($posx, $tab_top + $tab_hl); + $pdf->SetXY($posx, $tab_top + $tab_hl + 3); $pdf->MultiCell($largcol, $tab_hl * 3, '', 1, 'R'); if (getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) { $pdf->addEmptySignatureAppearance($posx, $tab_top + $tab_hl, $largcol, $tab_hl * 3); From 7903a8b7804780d9395d1a49004c63ce27cb5a93 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:14:26 +0300 Subject: [PATCH 03/71] fix typo (#31418) --- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 09c7e82c1f5..2b11fbd3ff6 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2616,7 +2616,7 @@ class pdf_sponge extends ModelePDFFactures $this->cols['totalexcltax'] = array( 'rank' => $rank, 'width' => 26, // in mm - 'status' => !getDolGlobalString('PDF_PROPAL_HIDE_PRICE_EXCL_TAX') ? true : false, + 'status' => !getDolGlobalString('PDF_INVOICE_HIDE_PRICE_EXCL_TAX') ? true : false, 'title' => array( 'textkey' => 'TotalHTShort' ), @@ -2627,7 +2627,7 @@ class pdf_sponge extends ModelePDFFactures $this->cols['totalincltax'] = array( 'rank' => $rank, 'width' => 26, // in mm - 'status' => !getDolGlobalString('PDF_PROPAL_SHOW_PRICE_INCL_TAX') ? false : true, + 'status' => !getDolGlobalString('PDF_INVOICE_SHOW_PRICE_INCL_TAX') ? false : true, 'title' => array( 'textkey' => 'TotalTTCShort' ), From 84225c90770ba485eef09f613a9247e1fa2f5e6e Mon Sep 17 00:00:00 2001 From: Can Arslan <138895927+mc2rcanarslan@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:24:59 -0600 Subject: [PATCH 04/71] fix: variable name (#31411) --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 92474605915..e28c1c0bea6 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1342,7 +1342,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ if ($bentityon) { // only if entity enable $maskrefclient_sql .= " AND entity IN (".getEntity($sharetable).")"; } elseif (!empty($forceentity)) { - $sql .= " AND entity IN (".$db->sanitize($forceentity).")"; + $maskrefclient_sql .= " AND entity IN (".$db->sanitize($forceentity).")"; } if ($where) { $maskrefclient_sql .= $where; //use the same optional where as general mask From 59fd0dbae7109d42fb1c40115b81ed862b2a0f9b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 Oct 2024 20:46:52 +0200 Subject: [PATCH 05/71] NEW Can choose the zip handler to build ODT --- htdocs/core/class/html.formfile.class.php | 2 +- .../modules/asset/doc/doc_generic_asset_odt.modules.php | 8 ++++---- .../core/modules/bom/doc/doc_generic_bom_odt.modules.php | 8 ++++---- .../commande/doc/doc_generic_order_odt.modules.php | 8 ++++---- .../contract/doc/doc_generic_contract_odt.modules.php | 8 ++++---- .../expedition/doc/doc_generic_shipment_odt.modules.php | 8 ++++---- .../facture/doc/doc_generic_invoice_odt.modules.php | 8 ++++---- .../modules/member/doc/doc_generic_member_odt.class.php | 2 +- .../core/modules/mrp/doc/doc_generic_mo_odt.modules.php | 2 +- .../product/doc/doc_generic_product_odt.modules.php | 2 +- .../project/doc/doc_generic_project_odt.modules.php | 8 ++++---- .../project/task/doc/doc_generic_task_odt.modules.php | 8 ++++---- .../propale/doc/doc_generic_proposal_odt.modules.php | 8 ++++---- .../reception/doc/doc_generic_reception_odt.modules.php | 8 ++++---- .../core/modules/societe/doc/doc_generic_odt.modules.php | 2 +- .../modules/stock/doc/doc_generic_stock_odt.modules.php | 2 +- .../doc/doc_generic_supplier_invoice_odt.modules.php | 8 ++++---- .../doc/doc_generic_supplier_order_odt.modules.php | 8 ++++---- .../doc/doc_generic_supplier_proposal_odt.modules.php | 2 +- .../modules/ticket/doc/doc_generic_ticket_odt.modules.php | 2 +- .../modules/user/doc/doc_generic_user_odt.modules.php | 2 +- .../usergroup/doc/doc_generic_usergroup_odt.modules.php | 2 +- .../mymodule/doc/doc_generic_myobject_odt.modules.php | 8 ++++---- .../doc_generic_recruitmentjobposition_odt.modules.php | 6 +++--- 24 files changed, 65 insertions(+), 65 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 5262e6ba369..f988590e45a 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -906,7 +906,7 @@ class FormFile // Show file size $size = (!empty($file['size']) ? $file['size'] : dol_filesize($filedir."/".$file["name"])); - $out .= ''.dol_print_size($size, 1, 1).''; + $out .= ''.dol_print_size($size, 1, 1).''; // Show file date $date = (!empty($file['date']) ? $file['date'] : dol_filemtime($filedir."/".$file["name"])); diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index c9b72c8ca83..1f63e7bac91 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -327,10 +327,10 @@ class doc_generic_asset_odt extends ModelePDFAsset $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->asset->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->asset->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index b9aebc42a5b..34cb01441c5 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -333,10 +333,10 @@ class doc_generic_bom_odt extends ModelePDFBom $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->bom->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->bom->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 4f8f554c2a0..a4dd2d4df94 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -343,10 +343,10 @@ class doc_generic_order_odt extends ModelePDFCommandes $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->commande->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->commande->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index 5fc3d4b5cc5..5bd1064aa12 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -355,10 +355,10 @@ class doc_generic_contract_odt extends ModelePDFContract $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->contrat->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->contrat->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index e20b163e229..4d9231c410d 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -341,10 +341,10 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->expedition->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->expedition->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 8e0fba186b6..625c1a94ce8 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -383,10 +383,10 @@ class doc_generic_invoice_odt extends ModelePDFFactures $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->facture->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->facture->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index d21191fc63d..f840303ab8f 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -312,7 +312,7 @@ class doc_generic_member_odt extends ModelePDFMember $srctemplatepath, array( 'PATH_TO_TMP' => $conf->adherent->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index c0593db24f3..d53ceb6c5dd 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -327,7 +327,7 @@ class doc_generic_mo_odt extends ModelePDFMo $srctemplatepath, array( 'PATH_TO_TMP' => $conf->mrp->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 842ba71402d..00a5e921099 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -339,7 +339,7 @@ class doc_generic_product_odt extends ModelePDFProduct $srctemplatepath, array( 'PATH_TO_TMP' => $conf->product->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 5360a18d382..2bf654acb04 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -614,10 +614,10 @@ class doc_generic_project_odt extends ModelePDFProjects $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->project->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->project->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index d542d255b4a..57183399fae 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -549,10 +549,10 @@ class doc_generic_task_odt extends ModelePDFTask $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->project->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->project->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 01f3e26666e..e704c179129 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -375,10 +375,10 @@ class doc_generic_proposal_odt extends ModelePDFPropales $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity], - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity], + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 868364d088e..667716cc5bf 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -336,10 +336,10 @@ class doc_generic_reception_odt extends ModelePdfReception $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->reception->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->reception->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 2022fd03dd8..8236016c4b9 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -280,7 +280,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc $srctemplatepath, array( 'PATH_TO_TMP' => $conf->societe->multidir_temp[$object->entity], - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 38be94f3266..847ea2bcabf 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -342,7 +342,7 @@ class doc_generic_stock_odt extends ModelePDFStock $srctemplatepath, array( 'PATH_TO_TMP' => $conf->product->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php index e3a0f521083..a355edff010 100644 --- a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php @@ -339,10 +339,10 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->fournisseur->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->fournisseur->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index 775571b5081..0a6ab9690e8 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -334,10 +334,10 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->fournisseur->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->fournisseur->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index dbb72c23aed..80202ddf29d 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -364,7 +364,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $srctemplatepath, array( 'PATH_TO_TMP' => $conf->supplier_proposal->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index acfdee2c9b5..a6eb2b37288 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -310,7 +310,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket $srctemplatepath, array( 'PATH_TO_TMP' => $conf->ticket->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 95fe0f72147..48bffa5948a 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -341,7 +341,7 @@ class doc_generic_user_odt extends ModelePDFUser $srctemplatepath, array( 'PATH_TO_TMP' => $conf->user->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index d96b2c0b740..f6052a07415 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -363,7 +363,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $srctemplatepath, array( 'PATH_TO_TMP' => $conf->user->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'DELIMITER_LEFT' => '{', 'DELIMITER_RIGHT' => '}' ) diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index b6b9a986715..7788a8e05b6 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -352,10 +352,10 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $odfHandler = new Odf( $srctemplatepath, array( - 'PATH_TO_TMP' => $conf->mymodule->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'PATH_TO_TMP' => $conf->mymodule->dir_temp, + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { diff --git a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php index d6a3309058f..f81991cfbd3 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php @@ -352,9 +352,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $srctemplatepath, array( 'PATH_TO_TMP' => $conf->recruitment->dir_temp, - 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. - 'DELIMITER_LEFT' => '{', - 'DELIMITER_RIGHT' => '}' + 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' ) ); } catch (Exception $e) { From d97ff764ab91f0df49f58489a79c971b03f23d8d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 13:37:23 +0200 Subject: [PATCH 06/71] Do not show qty 0 is zero. --- htdocs/core/lib/functions.lib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 14efd3bad62..4dd7669e549 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6451,7 +6451,7 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '', print ''; print '
'; print ''.$title.''; // $title may contains HTML like a combo list from page consumption.php, so we do not use dolPrintLabel here() - if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') { + if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '' && $totalnboflines > 0) { print '('.$totalnboflines.')'; } print '
'; @@ -6584,8 +6584,9 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be if (empty($hidenavigation)) { if ((int) $limit > 0 && (empty($selectlimitsuffix) || !is_numeric($selectlimitsuffix))) { $pagesizechoices = '10:10,15:15,20:20,25:25,50:50,100:100,250:250,500:500,1000:1000'; - $pagesizechoices .= ',5000:5000,10000:10000'; - //$pagesizechoices .= ',20000:20000'; // Memory trouble on browsers + $pagesizechoices .= ',5000:5000'; + //$pagesizechoices .= ',10000:10000'; // Memory trouble on most browsers + //$pagesizechoices .= ',20000:20000'; // Memory trouble on most browsers //$pagesizechoices .= ',0:'.$langs->trans("All"); // Not yet supported //$pagesizechoices .= ',2:2'; if (getDolGlobalString('MAIN_PAGESIZE_CHOICES')) { @@ -6603,11 +6604,11 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be $tmpchoice = explode(',', $pagesizechoices); $tmpkey = $limit.':'.$limit; if (!in_array($tmpkey, $tmpchoice)) { - $tmpchoice[] = $tmpkey; + $tmpchoice[$tmpkey] = $tmpkey; } $tmpkey = $conf->liste_limit.':'.$conf->liste_limit; if (!in_array($tmpkey, $tmpchoice)) { - $tmpchoice[] = $tmpkey; + $tmpchoice[$tmpkey] = $tmpkey; } asort($tmpchoice, SORT_NUMERIC); foreach ($tmpchoice as $val) { From 1c763a792377fc10b4f695e9fd1c34d64bc8f159 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 18:16:51 +0200 Subject: [PATCH 07/71] Fix missing migration on model_pdf --- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index d22410d64ff..f7bbf0c6461 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -45,6 +45,9 @@ ALTER TABLE llx_c_holiday_types DROP INDEX uk_c_holiday_types; ALTER TABLE llx_c_holiday_types ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid; ALTER TABLE llx_c_holiday_types ADD UNIQUE INDEX uk_c_holiday_types (entity, code); +ALTER TABLE llx_hrm_evaluation MODIFY COLUMN modelpdf varchar(255) DEFAULT NULL; + + -- V21 migration From 4f71729311e0d39ac37c65060829258e92cff402 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 18:17:12 +0200 Subject: [PATCH 08/71] Fix missing migration on model_pdf --- htdocs/install/mysql/migration/19.0.0-20.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql index 483e98a4fba..65901dcd91e 100644 --- a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql +++ b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql @@ -268,6 +268,8 @@ ALTER TABLE llx_ticket ADD COLUMN origin_references text DEFAULT NULL; ALTER TABLE llx_expensereport MODIFY COLUMN model_pdf varchar(255) DEFAULT NULL; ALTER TABLE llx_fichinter_rec MODIFY COLUMN modelpdf varchar(255) DEFAULT NULL; +ALTER TABLE llx_hrm_evaluation MODIFY COLUMN modelpdf varchar(255) DEFAULT NULL; + ALTER TABLE llx_societe ADD COLUMN geolat double(24,8) DEFAULT NULL; ALTER TABLE llx_societe ADD COLUMN geolong double(24,8) DEFAULT NULL; ALTER TABLE llx_societe ADD COLUMN geopoint point DEFAULT NULL; From 9045a22478b537b7b3eb3736c3177d172fe5efd6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 18:30:41 +0200 Subject: [PATCH 09/71] Add field to track origin of an extrafield --- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 1 + htdocs/install/mysql/tables/llx_extrafields.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index f7bbf0c6461..04f14b80010 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -160,6 +160,7 @@ ALTER TABLE llx_multicurrency ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ALTER TABLE llx_multicurrency_rate ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +ALTER TABLE llx_extrafields ADD COLUMN module varchar(64); -- Copy categories from llx_category_bank into llx_categorie diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql index 37deb0a227a..eb276c74653 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.sql @@ -32,6 +32,7 @@ create table llx_extrafields fieldrequired integer DEFAULT 0, perms varchar(255), -- not used yet enabled varchar(255), + module varchar(64), pos integer DEFAULT 0, alwayseditable integer DEFAULT 0, -- 1 if field can be edited whatever is element status param text, -- extra parameters to define possible values of field From 2c1eb06fe170a785d26fae4543d2fc95fe4fa4b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 18:36:40 +0200 Subject: [PATCH 10/71] Look and feel v21 --- htdocs/theme/eldy/global.inc.php | 1 + htdocs/theme/md/style.css.php | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 304d9eab5fb..f759742ac47 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2371,6 +2371,7 @@ div.blockvmenulogo width: inherit; height: inherit; image-rendering: -webkit-optimize-contrast; + border-radius: 3px; } #mainmenutd_companylogo::after, #mainmenutd_menu::after { content: unset !important; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 9245ccf663a..6ef834a1d51 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3743,6 +3743,7 @@ div.blockvmenulogo width: inherit; height: inherit; image-rendering: -webkit-optimize-contrast; + border-radius: 3px; } #mainmenutd_companylogo::after { content: unset; From ffe51062e45d7fde285f8da860375755c1edc0a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 20:08:55 +0200 Subject: [PATCH 11/71] NEW Look and feel v21 - Can have rounded border on tables --- htdocs/comm/card.php | 2 +- htdocs/core/tpl/list_print_total.tpl.php | 4 +- htdocs/theme/eldy/global.inc.php | 84 +++++++++++++++++------- 3 files changed, 64 insertions(+), 26 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index e0cbadb55b4..082614b4cec 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -1106,7 +1106,7 @@ if ($object->id > 0) { print ''; print ''; - print ''; + + echo '
'; + print ''; print ''; diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php index 7a1d9311067..39087c9fe42 100644 --- a/htdocs/core/tpl/list_print_total.tpl.php +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -13,7 +13,7 @@ if (!empty($totalarray['totalizable']) && is_array($totalarray['totalizable'])) } // Show total line if (isset($totalarray['pos'])) { - print ''; + //print ''; print ''; $i = 0; while ($i < $totalarray['nbfield']) { @@ -86,7 +86,7 @@ if (isset($totalarray['pos'])) { } } } - print ''; + //print ''; } /** print a total cell value according to its type diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index f759742ac47..5dc15717a95 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3827,9 +3827,6 @@ div.tabBar { width: auto; background: var(--colorbackbody); } -table.noborder { - background: var(--colorbacktabcard1); -} div.tabBar tr.titre td { padding-top: 20px; @@ -4206,7 +4203,9 @@ td.border, div.tagtable div div.border { border-bottom: 1px solid var(--colortopbordertitle1); } - +table.noborder { + background: var(--colorbacktabcard1); +} .fichehalfright table.noborder , .fichehalfleft table.noborder{ margin: 0px 0px 0px 0px; } @@ -4226,9 +4225,8 @@ table.liste, table.noborder, table.formdoc, div.noborder { border-top-style: solid; margin: 0px 0px 20px 0px; - border-radius: 2px; - - /*width: calc(100% - 7px); + /*border-radius: 2px; + width: calc(100% - 7px); border-collapse: separate !important; border-spacing: 0px; border-top-width: 0px; @@ -4255,6 +4253,54 @@ table.nointerlines tr:not(:last-child) td { } +/* Experimental code to manage rounding */ + +table.noborder { + border-radius: px; +} +table.liste:not(.listwithfilterbefore) { + border-top-left-radius: px; + border-top-right-radius: px; +} +table.liste { + border-bottom-left-radius: px; + border-bottom-right-radius: px; +} +table.noborder tr.liste_titre:first-child td:first-child, +table.noborder tr.liste_titre:first-child th:first-child { + border-top-left-radius: px; +} +table.noborder tr.liste_titre:first-child td:last-child, +table.noborder tr.liste_titre:first-child th:last-child { + border-top-right-radius: px; +} +table.noborder tr:last-child td:first-child, +table.noborder tr:last-child th:first-child { + border-bottom-left-radius: px; +} +table.noborder tr:last-child td:last-child, +table.noborder tr:last-child th:last-child { + border-bottom-right-radius: px; +} + +table.liste tr.liste_titre_filter:first-child td:first-child, +table.liste tr.liste_titre_filter:first-child th:first-child { + border-top-left-radius: px; +} +div.liste_titre_bydiv { + border-top-left-radius: px; + border-top-right-radius: px; +} +table.liste tr:last-child td:first-child, +table.liste tr:last-child th:first-child { + border-bottom-left-radius: px; +} +table.liste tr:last-child td:last-child, +table.liste tr:last-child th:last-child { + border-bottom-right-radius: px; +} + + /* div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):not(.lastrecordtable):last-of-type { border-bottom: 1px solid var(--colortopbordertitle1); @@ -4452,9 +4498,6 @@ div.pagination li span.inactive:hover { -webkit-box-shadow: none !important; box-shadow: none !important; } -/*div.pagination li.litext { - padding-top: 8px; -}*/ div.pagination li.litext a { border: none; padding-right: 10px; @@ -4481,13 +4524,6 @@ div.pagination li:first-child span { border-bottom-left-radius: 4px;*/ } -/*div.pagination li a:hover, -div.pagination li:not(.paginationbeforearrows,.paginationafterarrows,.title-button) span:hover, -div.pagination li a:focus, -div.pagination li:not(.paginationbeforearrows,.paginationafterarrows,.title-button) span:focus { - -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); - box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); -}*/ div.pagination li .active a, div.pagination li .active span, div.pagination li .active a:hover, @@ -5351,9 +5387,16 @@ div.divphotoref > div > .photowithmargin, div.divphotoref > img.photowithmargin, opacity: 0.5; } -table.table-fiche-title tr.toptitle { +/* height of top title */ +.fiche > table.table-fiche-title tr.toptitle, .fiche > form > table.table-fiche-title tr.toptitle { height: 60px; } +/* height of other title */ +table.table-fiche-title tr.toptitle, table.table-fiche-title tr.toptitle { + height: 44px; +} + + div.titre { font-size: 1.1em; text-decoration: none; @@ -5381,11 +5424,6 @@ div.titre { color: var(--colortexttitlenotab2); } -/* -table.table-fiche-title .col-title div.titre, .col-center .btnTitle-icon, .col-right .btnTitle-icon { - line-height: 40px; -} -*/ table.table-fiche-title .col-title div.titre > span:not(.print-barre-liste) { line-height: normal; } From a41a162e2b44c1732f6574c8cca911db5df25f74 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 21:01:20 +0200 Subject: [PATCH 12/71] NEW Look and feel --- htdocs/core/class/html.form.class.php | 2 +- htdocs/hrm/index.php | 31 ++++++++++++++++++++------- htdocs/theme/eldy/dropdown.inc.php | 13 +++++++++++ htdocs/theme/eldy/global.inc.php | 5 ++++- htdocs/theme/md/dropdown.inc.php | 13 +++++++++++ htdocs/theme/md/style.css.php | 3 +++ 6 files changed, 57 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3f87ee8a07f..59308c3ca6d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9293,7 +9293,7 @@ class Form '; @@ -264,9 +270,17 @@ if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) { $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning'; $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon'; - print ''; + print ''; print ''; print ''; @@ -286,7 +300,7 @@ if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) { // Latest modified expense report if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) { - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo,"; + $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo, u.gender,"; $sql .= " x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ht, x.total_ttc, x.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u"; //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -339,6 +353,7 @@ if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) { $userstatic->email = $obj->email; $userstatic->login = $obj->login; $userstatic->status = $obj->user_status; + $userstatic->gender = $obj->gender; $userstatic->photo = $obj->photo; print ''; diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 597406c2d9a..8e15d9062fc 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -414,6 +414,19 @@ a.dropdown-item { background: rgb(); } + +/* + * SELECT FIELDS + */ + +li.liinputsearch { + position: sticky; + display: block; + top: 0; + background: var(--colorbackbody); +} + + /* * SEARCH */ diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 5dc15717a95..aeaffc982d3 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -894,6 +894,9 @@ textarea.centpercent { .small, small { font-size: 85%; } +.lineheightsmall { + line-height: 1.2em; +} .large { font-size: 125%; } @@ -4255,7 +4258,7 @@ table.nointerlines tr:not(:last-child) td { /* Experimental code to manage rounding */ -table.noborder { +table.noborder:not(.cal_month) { border-radius: px; } table.liste:not(.listwithfilterbefore) { diff --git a/htdocs/theme/md/dropdown.inc.php b/htdocs/theme/md/dropdown.inc.php index cd770873b0e..c5c521a3ac5 100644 --- a/htdocs/theme/md/dropdown.inc.php +++ b/htdocs/theme/md/dropdown.inc.php @@ -438,6 +438,19 @@ a.dropdown-item { background: rgb(); } + +/* + * SELECT FIELDS + */ + +li.liinputsearch { + position: sticky; + display: block; + top: 0; + background: var(--colorbackbody); +} + + /* * SEARCH */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6ef834a1d51..7fed5a4dcce 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1108,6 +1108,9 @@ textarea.centpercent { .small, small { font-size: 85%; } +.lineheightsmall { + line-height: 1.2em; +} .large { font-size: 125%; } From 622a296d0ee71d04f329760034d370d4e90b6cf9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 22:20:39 +0200 Subject: [PATCH 13/71] Look adn feel v21 --- htdocs/blockedlog/admin/blockedlog_list.php | 2 +- htdocs/comm/action/class/cactioncomm.class.php | 16 +++++++++++++--- htdocs/comm/action/index.php | 17 +++++++++++------ htdocs/comm/action/list.php | 2 ++ htdocs/core/class/html.formactions.class.php | 8 +------- htdocs/core/class/html.formfile.class.php | 6 ++++-- htdocs/core/lib/agenda.lib.php | 2 +- htdocs/hrm/index.php | 2 +- htdocs/theme/eldy/global.inc.php | 10 +++++++--- htdocs/theme/md/style.css.php | 2 +- 10 files changed, 42 insertions(+), 25 deletions(-) diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 0571ec3056f..8a886c78e11 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -333,7 +333,7 @@ if (GETPOST('withtab', 'alpha')) { print dol_get_fiche_head($head, 'fingerprints', '', -1); } -print ''.$langs->trans("FingerprintsDesc")."
\n"; +print '
'.$langs->trans("FingerprintsDesc")."
\n"; print '
'; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index aaad9fa40d8..7054b13febe 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -162,6 +162,8 @@ class CActionComm global $langs, $conf, $user; $langs->load("commercial"); + $actionstatic = new ActionComm($this->db); + $rep_id = array(); $rep_code = array(); $rep_all = array(); @@ -294,17 +296,25 @@ class CActionComm } $label = (($transcode != $keyfortrans) ? $transcode : $langs->trans($obj->label)); + /* + $actionstatic->type_color = $obj->type_color; + $actionstatic->type_picto = $obj->type_picto; + $actionstatic->type = $obj->type; + $picto = $actionstatic->getTypePicto(); + $label = $picto.$label; + */ + if (($onlyautoornot == -1 || $onlyautoornot == -2) && getDolGlobalString('AGENDA_USE_EVENT_TYPE')) { // Add a group of elements if ($typecalendar == 'system' || $typecalendar == 'user') { $label = '   '.$label; $TSystem['id'][-99] = $langs->trans("ActionAC_MANUAL"); - $TSystem['code']['AC_NON_AUTO'] = '-- '.$langs->trans("ActionAC_MANUAL"); + $TSystem['code']['AC_NON_AUTO'] = '-- '.$langs->trans("ActionAC_MANUAL").''; } if ($typecalendar == 'systemauto') { $label = '   '.$label; $TSystemAuto['id'][-98] = $langs->trans("ActionAC_AUTO"); - $TSystemAuto['code']['AC_ALL_AUTO'] = '-- '.$langs->trans("ActionAC_AUTO"); + $TSystemAuto['code']['AC_ALL_AUTO'] = '-- '.$langs->trans("ActionAC_AUTO").''; } if ($typecalendar == 'module') { @@ -314,7 +324,7 @@ class CActionComm $idforallfornewmodule--; } $TModule['id'][-1 * $idforallfornewmodule] = $langs->trans("ActionAC_ALL_".strtoupper($module)); - $TModule['code']['AC_ALL_'.strtoupper($module)] = '-- '.$langs->trans("Module").' '.ucfirst($module); + $TModule['code']['AC_ALL_'.strtoupper($module)] = '-- '.$langs->trans("Module").' '.ucfirst($module).''; } } // Add element diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index bff470b4ba1..78b71241705 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1726,11 +1726,11 @@ if (empty($mode) || $mode == 'show_month') { // View by month print ''; print '
'; - echo '
'.$langs->trans("LastSendings", ($num <= $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllSendings").''.$num.''; print ''; print '
'.$langs->trans("LastSendings", ($num < $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllSendings").''.$num.''.img_picto($langs->trans("Statistics"), 'stats').'
'.dol_print_date($db->jdate($obj->date_start), 'dayreduceformat').' '.$langs->trans($listhalfday[$starthalfday]).''; - print ''.dol_print_date($db->jdate($obj->date_end), 'dayreduceformat').' '.$langs->trans($listhalfday[$endhalfday]).''; - print ''.dol_print_date($db->jdate($obj->dm), 'dayreduceformat').''.dol_print_date($db->jdate($obj->date_start), 'dayreduceformat'); + print '
'; + $labelshort = $langs->trans($listhalfday[$starthalfday.'short']) != $listhalfday[$starthalfday.'short'] ? $langs->trans($listhalfday[$starthalfday.'short']) : $langs->trans($listhalfday[$starthalfday]); + print $labelshort; + print ''; + print '
'.dol_print_date($db->jdate($obj->date_end), 'dayreduceformat'); + print '
'; + $labelshort = $langs->trans($listhalfday[$endhalfday.'short']) != $listhalfday[$endhalfday.'short'] ? $langs->trans($listhalfday[$endhalfday.'short']) : $langs->trans($listhalfday[$starthalfday]); + print $labelshort; + print ''; + print '
jdate($obj->dm), 'dayhourreduceformat').'">'.dol_print_date($db->jdate($obj->dm), 'dayreduceformat').''.$holidaystatic->LibStatut($obj->status, 3, $holidaystatic->date_debut).'
'; + echo '
'; echo ' '; echo ' \n"; - echo " \n"; + echo " \n"; /* echo '
'; @@ -1741,13 +1741,12 @@ if (empty($mode) || $mode == 'show_month') { // View by month echo "
\n"; */ - echo '
'.$langs->trans("Day".$arraytimestamp['wday'])."
'; - print ''; + print '
'; /* WIP View per hour */ $useviewhour = 0; if ($useviewhour) { - print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table + print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table $maxheightwin = (isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 500) ? ($_SESSION["dol_screenheight"] - 200) : 660; // Also into index.php file @@ -1787,13 +1786,19 @@ if (empty($mode) || $mode == 'show_month') { // View by month print '
'; } else { - print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table + print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table // @phan-suppress-next-line PhanPluginSuspiciousParamPosition show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, 0, $bookcalcalendars); print '
'; } + + + print '
'; + print ''; } print "\n".''; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 07a9095d0a6..456adbdcb78 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -761,6 +761,8 @@ print '
'; print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, '', $filtert, '', $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid, $search_categ_cus); print '
'; +$moreforfilter = 1; + print '
'; print ''."\n"; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 96f4a3b7780..9a213d994a6 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -383,13 +383,6 @@ class FormActions // Suggest a list with manual events or all auto events $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. - /* Removed. The empty line must now be managed with param showempty - if (empty($multiselect)) { - // Add empty line at start only if no multiselect - array_unshift($arraylist, ' '); - } - */ - //asort($arraylist); if ($selected == 'manual') { $selected = 'AC_OTH'; @@ -411,6 +404,7 @@ class FormActions if (strpos($key, 'AC_ALL_') !== false && strpos($key, 'AC_ALL_AUTO') === false) { $disabled = 'disabled'; } + $newarraylist[$key] = array('id' => $key, 'label' => $value, 'disabled' => $disabled); } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 68b0cdbf8c0..59001843f2d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -176,7 +176,9 @@ class FormFile $out .= ' '; if ($sectionid) { // Show overwrite if exists for ECM module only $langs->load('link'); - $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; } $out .= 'transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Security"); $langs->load('other'); $out .= ' '; - $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetupAt", $menudolibarrsetupmax, $max, $maxphptoshowparam, $maxphptoshow), 1); + $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetupAt", $menudolibarrsetupmax, $max, $maxphptoshowparam, $maxphptoshow), 1, 0, '1', 'classfortooltip'); } } else { $out .= ' ('.$langs->trans("UploadDisabled").')'; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index cbcdf3b0019..b63a6806d99 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -97,7 +97,7 @@ function print_actions_filter( $multiselect = (getDolGlobalString('AGENDA_USE_EVENT_TYPE')); } print img_picto($langs->trans("ActionType"), 'square', 'class="pictofixedwidth inline-block" style="color: #ddd;"'); - print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 0, $multiselect, 0, 'minwidth200 maxwidth250 widthcentpercentminusx', 1); + print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 0, $multiselect, 0, 'minwidth150 maxwidth200 widthcentpercentminusx', 1); print ''; if ($canedit) { diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 6eb801f3595..d1b47859496 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -166,7 +166,7 @@ if (isModEnabled('holiday')) { print '
'; print '
'; print ''; - print ''; + print ''; print '\n"; + print "\n"; foreach ($this->lines as $line) { //Line extrafield $line->fetch_optionals(); @@ -5271,7 +5271,7 @@ abstract class CommonObject $i++; } - print "\n"; + print "\n"; } /** diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index 5ad2b836f1b..a4a68577a95 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -213,7 +213,7 @@ TITLE BUTTON .btnTitle, a.btnTitle { display: inline-block; - padding: 4px 4px 4px 4px; + padding: 6px; font-weight: 400; /* line-height: 1; */ text-align: center; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 1df1a1c3640..f896504af21 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -4258,7 +4258,7 @@ table.nointerlines tr:not(:last-child) td { /* Experimental code to manage rounding */ -table.noborder:not(.cal_month) { +table.noborder:not(.cal_month, .paymenttable) { border-radius: px; } table.noborder.cal_month { @@ -4273,20 +4273,20 @@ table.liste { border-bottom-left-radius: px; border-bottom-right-radius: px; } -table.noborder tr.liste_titre:first-child td:first-child, -table.noborder tr.liste_titre:first-child th:first-child { +table.noborder:not(.paymenttable, .margintable) tr.liste_titre:first-child td:first-child, +table.noborder:not(.paymenttable, .margintable) tr.liste_titre:first-child th:first-child { border-top-left-radius: px; } -table.noborder tr.liste_titre:first-child td:last-child, -table.noborder tr.liste_titre:first-child th:last-child { +table.noborder:not(.paymenttable, .margintable) tr.liste_titre:first-child td:last-child, +table.noborder:not(.paymenttable, .margintable) tr.liste_titre:first-child th:last-child { border-top-right-radius: px; } -table.noborder tr:last-child td:first-child, -table.noborder tr:last-child th:first-child { +table.noborder:not(.paymenttable, .margintable) tr:last-child td:first-child, +table.noborder:not(.paymenttable, .margintable) tr:last-child th:first-child { border-bottom-left-radius: px; } -table.noborder tr:last-child td:last-child, -table.noborder tr:last-child th:last-child { +table.noborder:not(.paymenttable, .margintable) tr:last-child td:last-child, +table.noborder:not(.paymenttable, .margintable) tr:last-child th:last-child { border-bottom-right-radius: px; } @@ -4307,6 +4307,13 @@ table.liste tr:last-child th:last-child { border-bottom-right-radius: px; } +table#tablelines tr:last-of-type td:first-child, table#tablelines tr#trlinefordates, table#tablelines tr#trlinefordates td { + border-bottom-left-radius: px; +} +table#tablelines tr:last-of-type td:last-child, table#tablelines tr#trlinefordates, table#tablelines tr#trlinefordates td { + border-bottom-right-radius: px; +} + /* div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):not(.lastrecordtable):last-of-type { @@ -4349,7 +4356,7 @@ tr.liste_titre_filter td.liste_titre { border-top-color: var(--colortopbordertitle1); border-top-style: solid; } -tr.liste_titre_create td { +tr.liste_titre_create td:not(.linecoldescription) { padding-right: 4px !important; padding-left: 4px !important; } @@ -4369,6 +4376,9 @@ table.liste tr, table.noborder tr, div.noborder form { table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td { padding: 6px 10px 6px 12px; /* t r b l */ } +td.linecoldescription { + padding: 6px 10px 6px 12px !important; /* t r b l */ +} table.tableforfield td, .tagtr.table-border-row .tagtd { padding: 2px 4px 2px 10px; /* t r b l */ } From cf6b02b341be33108d7ac4d22b8de0e34b60d1c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 15:35:24 +0200 Subject: [PATCH 25/71] Fix regression, avoid using global variable --- htdocs/core/class/extrafields.class.php | 44 +++++++++++++------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c1a76a53a9e..f7eeb005770 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1935,16 +1935,17 @@ class ExtraFields /** * Return HTML string to put an output field into a page * - * @param string $key Key of attribute - * @param string $value Value to show - * @param string $moreparam To add more parameters on html input tag (only checkbox use html input for output rendering) - * @param string $extrafieldsobjectkey Required (for example $object->table_element). - * @param Translate $outputlangs Output language - * @return string Formatted value + * @param string $key Key of attribute + * @param string $value Value to show + * @param string $moreparam To add more parameters on html input tag (only checkbox use html input for output rendering) + * @param string $extrafieldsobjectkey Required (for example $object->table_element). + * @param Translate $outputlangs Output + * @param object $object The parent object of field to show + * @return string Formatted value */ - public function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '', $outputlangs = null) + public function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '', $outputlangs = null, $object = null) { - global $conf, $langs, $object; + global $conf, $langs; if (is_null($outputlangs) || !is_object($outputlangs)) { $outputlangs = $langs; @@ -2270,10 +2271,10 @@ class ExtraFields if (!empty($classpath)) { dol_include_once($InfoFieldList[1]); if ($classname && class_exists($classname)) { - $object = new $classname($this->db); - '@phan-var-force CommonObject $object'; - $object->fetch($value); - $value = $object->getNomUrl(3); + $tmpobject = new $classname($this->db); + '@phan-var-force CommonObject $tmpobject'; + $tmpobject->fetch($value); + $value = $tmpobject->getNomUrl(3); } } else { dol_syslog('Error bad setup of extrafield', LOG_WARNING); @@ -2303,8 +2304,9 @@ class ExtraFields } elseif ($type == 'password') { $value = dol_trunc(preg_replace('/./i', '*', $value), 8, 'right', 'UTF-8', 1); } elseif ($type == 'stars') { - $value = ''; - $value .= '
'; + $objectid = (int) $object->id; + $value = ''; + $value .= '
'; $i = 1; while ($i <= $size) { $value .= ''.img_picto('', 'fontawesome_star_fas').''; @@ -2313,8 +2315,8 @@ class ExtraFields $value .= '
'; $value .= '
'.$langs->trans("Holidays").'
'; $out = ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index aeaffc982d3..f32232dfebe 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -4257,10 +4257,14 @@ table.nointerlines tr:not(:last-child) td { /* Experimental code to manage rounding */ - + table.noborder:not(.cal_month) { border-radius: px; } +table.noborder.cal_month { + border-bottom-left-radius: px; + border-bottom-right-radius: px; +} table.liste:not(.listwithfilterbefore) { border-top-left-radius: px; border-top-right-radius: px; @@ -5959,14 +5963,14 @@ table.cal_month td { padding-left: 1px !important; padding-right: 1px !important .cal_other_month_right { border-right: solid 1px #C0C0C0; } .cal_other_month { /* opacity: 0.6; */ background: #FAFAFA; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past_month { /* opacity: 0.6; */ background: #EEEEEE; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px !important; } +.cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_current_month_peruserleft { background: #FFFFFF; border-left: solid 2px #6C7C7B; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today { background: #FDFDF0; border-left: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today_peruser { background: #FDFDF0; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 2px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } .cal_peruser { padding-top: 0 !important; padding-bottom: 0 !important; padding-: 1px !important; padding-: 1px !important; } -.cal_impair { ackground: linear-gradient(bottom, var(--colorbacklinepair2) 85%, var(--colorbacklinepair2) 100%); } +.cal_impair { background: linear-gradient(bottom, var(--colorbacklinepair2) 85%, var(--colorbacklinepair2) 100%); } .cal_today_peruser_impair { background: #F8F8F0; } .peruser_busy { } .peruser_notbusy { opacity: 0.5; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 7fed5a4dcce..bc4c8c00040 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -166,7 +166,7 @@ $dol_no_mouse_hover = $conf->dol_no_mouse_hover; //$user->conf->THEME_ELDY_ENABLE_PERSONALIZED=0; //var_dump($user->conf->THEME_ELDY_RGB); -$useboldtitle = (isset($conf->global->THEME_ELDY_USEBOLDTITLE) ? $conf->global->THEME_ELDY_USEBOLDTITLE : 0); +$useboldtitle = getDolGlobalInt('THEME_ELDY_USEBOLDTITLE'); $borderwidth = 2; $userborderontable = getDolGlobalInt('THEME_ELDY_USEBORDERONTABLE'); From a7a251717ee940c37c8f2b0002e6ac64dee92a3a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 23:08:48 +0200 Subject: [PATCH 14/71] Minor fix in azur/cyan --- .../modules/propale/doc/pdf_azur.modules.php | 28 +++++++++---------- .../modules/propale/doc/pdf_cyan.modules.php | 14 ++++++---- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 282edf31742..b66f019bfe4 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1016,7 +1016,7 @@ class pdf_azur extends ModelePDFPropales $posy = $pdf->GetY() + 2; } } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) { + if (getDolGlobalInt('FACTURE_CHQ_NUMBER') == -1) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0); @@ -1035,8 +1035,8 @@ class pdf_azur extends ModelePDFPropales // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { if (!empty($object->fk_account) || !empty($object->fk_bank) || getDolGlobalInt('FACTURE_RIB_NUMBER')) { - $bankid = (empty($object->fk_account) ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); - if (!empty($object->fk_bank)) { + $bankid = (empty($object->fk_account) ? getDolGlobalInt('FACTURE_RIB_NUMBER') : $object->fk_account); + if (!empty($object->fk_bank) && $object->fk_bank > 0) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank } $account = new Account($this->db); @@ -1516,12 +1516,12 @@ class pdf_azur extends ModelePDFPropales } else { $pdf->SetTextColor(200, 0, 0); $pdf->SetFont('', 'B', $default_font_size - 2); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } } else { $text = $this->emetteur->name; - $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection); + $pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection); } } @@ -1534,7 +1534,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetTextColor(128, 0, 0); $title .= ' - '.$outputlangs->transnoentities("NotValidated"); } - $pdf->MultiCell(100, 4, $title, '', 'R'); + $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size); @@ -1552,7 +1552,7 @@ class pdf_azur extends ModelePDFPropales $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } if (getDolGlobalString('PDF_SHOW_PROJECT_TITLE')) { @@ -1586,18 +1586,18 @@ class pdf_azur extends ModelePDFPropales $posy = $pdf->getY(); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, $displaydate, false, $outputlangs, true), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, $displaydate, false, $outputlangs, true), '', 'R'); $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEndPropal")." : ".dol_print_date($object->fin_validite, $displaydate, false, $outputlangs, true), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateEndPropal")." : ".dol_print_date($object->fin_validite, $displaydate, false, $outputlangs, true), '', 'R'); if (!getDolGlobalString('MAIN_PDF_HIDE_CUSTOMER_CODE') && $object->thirdparty->code_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R'); } // Get contact @@ -1609,7 +1609,7 @@ class pdf_azur extends ModelePDFPropales $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); } } @@ -1618,7 +1618,7 @@ class pdf_azur extends ModelePDFPropales $top_shift = 0; // Show list of linked objects $current_y = $pdf->getY(); - $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); + $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } @@ -1758,7 +1758,7 @@ class pdf_azur extends ModelePDFPropales * Show area for the customer to sign * * @param TCPDF $pdf Object PDF - * @param Propal $object Object invoice + * @param Propal $object Object proposal * @param int $posy Position depart * @param Translate $outputlangs Object langs * @return int Position pour suite diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 6b75bc4663a..9904071d7f4 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -999,7 +999,7 @@ class pdf_cyan extends ModelePDFPropales } $posxval = 52; - if (getDolGlobalString('MAIN_PDF_DATE_TEXT')) { + if (getDolGlobalString('MAIN_PDF_DELIVERY_DATE_TEXT')) { $displaydate = "daytext"; } else { $displaydate = "day"; @@ -1133,7 +1133,7 @@ class pdf_cyan extends ModelePDFPropales // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) { - $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); + $bankid = ($object->fk_account <= 0 ? getDolGlobalInt('FACTURE_RIB_NUMBER') : $object->fk_account); if ($object->fk_bank > 0) { $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank } @@ -1361,7 +1361,12 @@ class pdf_cyan extends ModelePDFPropales $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT2", $mysoc->country_code) : ''); $totalvat .= ' '; - $totalvat .= vatrate(abs($tvakey), 1).$tvacompl; + if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') { + $totalvat .= $tvacompl; + } else { + $totalvat .= vatrate(abs($tvakey), 1).$tvacompl; + } + $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1); $total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval); @@ -1404,8 +1409,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', 0); /* - if ($object->close_code == 'discount_vat') - { + if ($object->close_code == 'discount_vat') { $index++; $pdf->SetFillColor(255,255,255); From 3aedad68e12297256b09dcedaa3e4354b244f533 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 23:15:32 +0200 Subject: [PATCH 15/71] FIX duplicate answers in list when using global search on proposals --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 69c0204929b..510d75874e4 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -561,7 +561,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $sql = 'SELECT'; -if ($search_all > 0) { +if ($search_all) { $sql = 'SELECT DISTINCT'; } $sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax , s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client,'; From 59829485c67d8ea1286c48c380afbb0c2221cea8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 23:15:32 +0200 Subject: [PATCH 16/71] FIX duplicate answers in list when using global search on proposals --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 69c0204929b..1cd7f22552e 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -561,7 +561,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $sql = 'SELECT'; -if ($search_all > 0) { +if ($search_all !== '') { $sql = 'SELECT DISTINCT'; } $sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax , s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client,'; From 3eebba611672c6a8f3636ea9cbb8417643bbb20e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Oct 2024 23:46:30 +0200 Subject: [PATCH 17/71] FIX When PDF_ADD_POSITION is on, the number was doing pagebreak before the pagebreak done by the addition of description. --- .../modules/propale/doc/pdf_cyan.modules.php | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 9904071d7f4..2276252ca3f 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -568,10 +568,6 @@ class pdf_cyan extends ModelePDFPropales $posYAfterImage = 0; $posYAfterDescription = 0; - if ($this->getColumnStatus('position')) { - $this->printStdColumnContent($pdf, $curY, 'position', $i + 1); - } - if ($this->getColumnStatus('photo')) { // We start with Photo of product line if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // If photo too high, we moved completely on new page @@ -606,18 +602,18 @@ class pdf_cyan extends ModelePDFPropales $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) { // There is a pagebreak + if ($pageposafter > $pageposbefore) { // There is a pagebreak (not enough space for total+free text+footer) $pdf->rollbackTransaction(true); - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it to simple footer, so we can retry as if we have just the simple footer. $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // There is no space left for total+free text - if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // There is no space left for total+free text but no page break. + if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page manually because no break page was done automatically for the last part. $pdf->AddPage('', '', true); if (!empty($tplidx)) { $pdf->useTemplate($tplidx); @@ -625,7 +621,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->setPage($pageposafter + 1); } } else { - // We found a page break + // We found a page break that was done automatically and there is ow enough space for total+free text+footer. // Allows data in the first page if description is long enough to break in multiples pages if (getDolGlobalString('MAIN_PDF_DATA_ON_FIRST_PAGE')) { $showpricebeforepagebreak = 1; @@ -646,7 +642,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->setTopMargin($this->marge_haute); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - // We suppose that a too long description or photo were moved completely on next page + // We suppose that a too long description or photo were moved completely on next page, so we set the value for $curY and current page that will be used by the following output. if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { $pdf->setPage($pageposafter); $curY = $tab_top_newpage; @@ -654,6 +650,11 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font + // Position + if ($this->getColumnStatus('position')) { + $this->printStdColumnContent($pdf, $curY, 'position', $i + 1); + } + // VAT Rate if ($this->getColumnStatus('vat')) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); From edd33fd17b48384efefe8cf21c82061d6e67f67d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 00:25:34 +0200 Subject: [PATCH 18/71] FIX Error management on cheque deposit. --- htdocs/compta/paiement/cheque/card.php | 1 + .../compta/paiement/cheque/class/remisecheque.class.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 9af72aa1a1f..a9a66b683f2 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -168,6 +168,7 @@ if ($action == 'create' && GETPOSTINT("accountid") > 0 && $user->hasRight('banqu exit; } else { setEventMessages($object->error, $object->errors, 'errors'); + $action = 'new'; } } else { setEventMessages($langs->trans("ErrorSelectAtLeastOne"), null, 'mesgs'); diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 70274fd13c3..e74ea51730c 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -357,7 +357,7 @@ class RemiseCheque extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque"; $sql .= " SET statut = 1, ref = '".$this->db->escape($numref)."'"; $sql .= " WHERE rowid = ".((int) $this->id); - $sql .= " AND entity = ".$conf->entity; + $sql .= " AND entity = ".((int) $conf->entity); $sql .= " AND statut = 0"; dol_syslog("RemiseCheque::Validate", LOG_DEBUG); @@ -368,13 +368,15 @@ class RemiseCheque extends CommonObject if ($num == 1) { $this->ref = $numref; $this->statut = 1; + $this->status = 1; } else { $this->errno = -1029; - dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); + dol_syslog("Remisecheque::validate Error ".$this->errno, LOG_ERR); } } else { $this->errno = -1033; - dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); + $this->error = $this->db->lasterror(); + dol_syslog("Remisecheque::validate Error ".$this->errno, LOG_ERR); } } From 65e750cb4e49e708a1dc036839fd6f61f09658bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 00:47:46 +0200 Subject: [PATCH 19/71] FIX Get number of bank deposit wa not using the date. --- htdocs/compta/paiement/cheque/card.php | 1 + htdocs/compta/paiement/cheque/class/remisecheque.class.php | 2 +- htdocs/core/modules/cheque/mod_chequereceipt_mint.php | 7 ++++--- htdocs/core/modules/cheque/mod_chequereceipt_thyme.php | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index a9a66b683f2..4c997d5b9ad 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -144,6 +144,7 @@ if ($action == 'setref' && $user->hasRight('banque', 'cheque')) { if ($action == 'create' && GETPOSTINT("accountid") > 0 && $user->hasRight('banque', 'cheque')) { if (GETPOSTISARRAY('toRemise')) { $object->type = $type; + $object->date_bordereau = dol_now(); $arrayofid = GETPOST('toRemise', 'array:int'); $result = $object->create($user, GETPOSTINT("accountid"), 0, $arrayofid); diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index e74ea51730c..1b091ec27b6 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -345,7 +345,7 @@ class RemiseCheque extends CommonObject */ public function validate($user) { - global $langs, $conf; + global $conf; $this->errno = 0; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index 3f760794750..7bbea64d472 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -124,7 +124,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."bordereau_cheque"; $sql .= " WHERE ref like '".$db->escape($this->prefix)."____-%'"; - $sql .= " AND entity = ".$conf->entity; + $sql .= " AND entity = ".((int) $conf->entity); $resql = $db->query($sql); if ($resql) { @@ -139,8 +139,8 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts return -1; } - //$date=time(); - $date = $object->date_bordereau; + $date = (empty($object) ? dol_now() : $object->date_bordereau); + $yymm = dol_print_date($date, "%y%m"); if ($max >= (pow(10, 4) - 1)) { @@ -150,6 +150,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts } dol_syslog(__METHOD__." return ".$this->prefix.$yymm."-".$num); + return $this->prefix.$yymm."-".$num; } } diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 9b97481dcba..dd6eea47d85 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -128,7 +128,9 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts return 0; } - $numFinal = get_next_value($db, $mask, 'bordereau_cheque', 'ref', '', $objsoc, empty($object) ? dol_now() : $object->date_bordereau); + $date = (empty($object) ? dol_now() : $object->date_bordereau); + + $numFinal = get_next_value($db, $mask, 'bordereau_cheque', 'ref', '', $objsoc, $date); return $numFinal; } From 8f868ef3b9e2a723888d9ac2fcb879ba0f476de1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 01:07:31 +0200 Subject: [PATCH 20/71] Fix text overlapping --- htdocs/core/modules/cheque/doc/pdf_blochet.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 5cecdaa413d..560c7ad1ec9 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -292,7 +292,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $pdf->SetFont('', '', $default_font_size); $pdf->SetXY(10, 32); - $pdf->MultiCell(0, 2, $outputlangs->transnoentities("BankAccount"), 0, 'L'); + $pdf->MultiCell(22, 2, $outputlangs->transnoentities("BankAccount"), 0, 'L'); pdf_bank($pdf, $outputlangs, 32, 32, $this->account, 1); $pdf->SetFont('', '', $default_font_size); From 67498edf137f2ca2a40b89c852872aac922f685d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 02:48:42 +0200 Subject: [PATCH 21/71] Fix background on over --- htdocs/theme/eldy/btn.inc.php | 2 ++ htdocs/theme/eldy/global.inc.php | 28 +++++++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index 3aa33b12a99..5ad2b836f1b 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -293,7 +293,9 @@ a.btnTitle.btnTitleSelected { } div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrows a.btnTitle, +table.table-fiche-title tr.toptitle td.col-center div.nowraponall a.btnTitle, table.table-fiche-title tr.titre td.col-center div.nowraponall a.btnTitle, +table.table-fiche-title tr.toptitle td.col-right a.btnTitle, table.table-fiche-title tr.titre td.col-right a.btnTitle { margin-: 10px; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index f32232dfebe..dbca4f81993 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -4257,7 +4257,7 @@ table.nointerlines tr:not(:last-child) td { /* Experimental code to manage rounding */ - + table.noborder:not(.cal_month) { border-radius: px; } @@ -4874,6 +4874,9 @@ div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) > .border > tbody div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) .oddeven.tagtr:nth-of-type(even):not(.liste_titre):not(.nooddeven) { background: linear-gradient(bottom, var(----colorbacklineimpair2) 0%, var(--colorbacklineimpair2) 100%); + background: -o-linear-gradient(bottom, var(--colorbacklineimpair2) 0%, var(--colorbacklineimpair2) 100%); + background: -moz-linear-gradient(bottom, var(--colorbacklineimpair2) 0%, var(--colorbacklineimpair2) 100%); + background: -webkit-linear-gradient(bottom, var(--colorbacklineimpair2) 0%, var(--colorbacklineimpair2) 100%); } .noborder > tbody > tr:nth-child(even):not(:last-of-type) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-of-type) td:not(.liste_titre), .noborder .oddeven.tagtr:nth-child(even):not(:last-of-type) .tagtd:not(.liste_titre) @@ -4886,6 +4889,9 @@ div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) > .border > tbody div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre):not(.nooddeven) { background: linear-gradient(bottom, var(--colorbacklinepair2) 0%, var(--colorbacklinepair2) 100%); + background: -o-linear-gradient(bottom, var(--colorbacklinepair2) 0%, var(--colorbacklinepair2) 100%); + background: -moz-linear-gradient(bottom, var(--colorbacklinepair2) 0%, var(--colorbacklinepair2) 100%); + background: -webkit-linear-gradient(bottom, var(--colorbacklinepair2) 0%, var(--colorbacklinepair2) 100%); } .noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .noborder .oddeven.tagtr:nth-child(odd):not(:last-child) .tagtd:not(.liste_titre) @@ -5115,13 +5121,13 @@ span.dashboardlineko { .fichecenter .tableforfield tr td, .tagtr.table-border-row { - background: var(--colorbacklineimpair2) !important; + background-color: var(--colorbacklineimpair2); } -table.liste tr.oddeven:nth-of-type(odd) td{ - background: var(--colorbacklineimpair2) !important; +table.liste tr.oddeven:nth-of-type(odd) { + background-color: var(--colorbacklineimpair2); } -table.liste tr.oddeven:nth-of-type(even) td{ - background: var(--colorbacklinepair2) !important; +table.liste tr.oddeven:nth-of-type(even) { + background-color: var(--colorbacklinepair2); } .boxtable { @@ -5970,7 +5976,12 @@ table.cal_month td { padding-left: 1px !important; padding-right: 1px !important .cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 2px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } .cal_peruser { padding-top: 0 !important; padding-bottom: 0 !important; padding-: 1px !important; padding-: 1px !important; } -.cal_impair { background: linear-gradient(bottom, var(--colorbacklinepair2) 85%, var(--colorbacklinepair2) 100%); } +.cal_impair { + background: linear-gradient(bottom, var(--colorbacklinepair2) 85%, var(--colorbacklinepair2) 100%); + background: -o-linear-gradient(bottom, var(--colorbacklinepair2) 85%, var(--colorbacklinepair2) 100%); + background: -moz-linear-gradient(bottom, var(--colorbacklinepair2) 85%, var(--colorbacklinepair2) 100%); + background: -webkit-linear-gradient(bottom, var(--colorbacklinepair2) 85%, var(--colorbacklinepair2) 100%); +} .cal_today_peruser_impair { background: #F8F8F0; } .peruser_busy { } .peruser_notbusy { opacity: 0.5; } @@ -8009,6 +8020,9 @@ div.tabsElem a.tab { background: white; border-radius: 0.25em; padding: 1em; + background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(230,230,230,0.4) 100%); + background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(230,230,230,0.4) 100%); + background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(230,230,230,0.4) 100%); background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(230,230,230,0.4) 100%); } .cd-timeline-content:after { From b196c61a7d32b083e8094a16c98cecc8815da5a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 03:27:39 +0200 Subject: [PATCH 22/71] Look and feel v21 --- htdocs/theme/eldy/global.inc.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index dbca4f81993..1df1a1c3640 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6288,14 +6288,21 @@ A.none, A.none:active, A.none:visited, A.none:hover { font-weight: bold; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover { - background: #007fff !important; + background: var(--colorbackhmenu1); color: #ffffff !important; + border: 1px solid var(--colorbackhmenu1); +} +.ui-menu { + padding: 5px; +/* + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; + */ } - .ui-menu .ui-menu-item a { text-decoration:none; display:block; - padding:.2em .4em; + padding:.5em .6em; line-height:1.5; font-weight: normal; font-family:; From 1d2683da890b6ec9c3bfbd4b06186afa61c98df3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 03:27:57 +0200 Subject: [PATCH 23/71] FIX permission on stock transfer pages --- .../stocktransfer/stocktransfer_agenda.php | 15 +++++++++++-- .../stocktransfer/stocktransfer_card.php | 3 ++- .../stocktransfer/stocktransfer_contact.php | 21 ++++++++++++++++++- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php b/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php index 9f9ce23f608..b00fe32afa7 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php @@ -83,12 +83,23 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->stocktransfer->multidir_output[$object->entity]."/".$object->id; } +$permissiontoread = $user->hasRight('stocktransfer', 'stocktransfer', 'read'); +$permissiontoadd = $user->hasRight('stocktransfer', 'stocktransfer', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissionnote = $user->hasRight('stocktransfer', 'stocktransfer', 'write'); // Used by the include of actions_setnotes.inc.php +$permissiontodelete = $user->rights->stocktransfer->stocktransfer->delete || ($permissiontoadd && isset($object->status) && $object->status < $object::STATUS_TRANSFERED); +$permissiondellink = $user->hasRight('stocktransfer', 'stocktransfer', 'write'); // Used by the include of actions_dellink.inc.php +$upload_dir = $conf->stocktransfer->multidir_output[isset($object->entity) ? $object->entity : 1]; + // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -$result = restrictedArea($user, 'stocktransfer', $object->id, '', 'stocktransfer'); +//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); +//$result = restrictedArea($user, 'stocktransfer', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); +//$result = restrictedArea($user, 'stocktransfer', $object->id, '', 'stocktransfer'); -$permissiontoadd = $user->hasRight('stocktransfer', 'stocktransfer', 'write'); // Used by the include of actions_addupdatedelete.inc.php +if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) { + accessforbidden(); +} /* diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index ca0aadaa047..51909829285 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -46,6 +46,7 @@ if (isModEnabled('incoterm')) { // Get parameters $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); + $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); @@ -630,7 +631,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Project if (isModEnabled('project')) { $langs->load("projects"); - $morehtmlref .= '
'; + $morehtmlref .= (empty($object->thirdparty) ? '' : '
'); if ($permissiontoadd) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_contact.php b/htdocs/product/stock/stocktransfer/stocktransfer_contact.php index 8f599eb71de..11b058e11ce 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_contact.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_contact.php @@ -40,11 +40,13 @@ $langs->loadLangs(array('facture', 'orders', 'sendings', 'companies', 'stocks')) $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $lineid = GETPOSTINT('lineid'); + $action = GETPOST('action', 'alpha'); $object = new StockTransfer($db); // Load object +//include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); if ($ret == 0) { @@ -68,7 +70,24 @@ if ($user->socid) { $socid = $user->socid; } -$result = restrictedArea($user, 'stocktransfer', $id, '', 'stocktransfer'); + +$permissiontoread = $user->hasRight('stocktransfer', 'stocktransfer', 'read'); +$permissiontoadd = $user->hasRight('stocktransfer', 'stocktransfer', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissionnote = $user->hasRight('stocktransfer', 'stocktransfer', 'write'); // Used by the include of actions_setnotes.inc.php +$permissiontodelete = $user->rights->stocktransfer->stocktransfer->delete || ($permissiontoadd && isset($object->status) && $object->status < $object::STATUS_TRANSFERED); +$permissiondellink = $user->hasRight('stocktransfer', 'stocktransfer', 'write'); // Used by the include of actions_dellink.inc.php +$upload_dir = $conf->stocktransfer->multidir_output[isset($object->entity) ? $object->entity : 1]; + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); +//$result = restrictedArea($user, 'stocktransfer', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); +//$result = restrictedArea($user, 'stocktransfer', $object->id, '', 'stocktransfer'); + +if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) { + accessforbidden(); +} /* From b43f0079d6a2c1b8a2b7f81b35b613a9fdc10bce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 04:14:02 +0200 Subject: [PATCH 24/71] css --- htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/theme/eldy/btn.inc.php | 2 +- htdocs/theme/eldy/global.inc.php | 30 ++++++++++++++++-------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 7ec0096615c..015b0d7ba2d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5250,7 +5250,7 @@ abstract class CommonObject $i = 0; - print "