From 89d1389e2d2c7c79bfd517df05a96b10b2d3b9b2 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Mon, 27 Jun 2022 12:46:39 +0200 Subject: [PATCH 01/71] fix page titles --- htdocs/comm/propal/card.php | 6 +++++- htdocs/comm/propal/contact.php | 3 ++- htdocs/comm/propal/document.php | 2 +- htdocs/comm/propal/info.php | 2 +- htdocs/comm/propal/list.php | 5 +++-- htdocs/comm/propal/note.php | 3 ++- htdocs/commande/card.php | 6 +++++- htdocs/commande/contact.php | 8 ++++---- htdocs/commande/document.php | 2 +- htdocs/commande/note.php | 2 +- htdocs/compta/bank/annuel.php | 9 ++++----- htdocs/compta/bank/bankentries_list.php | 2 +- htdocs/compta/bank/card.php | 11 ++++++----- htdocs/compta/bank/document.php | 3 +-- htdocs/compta/bank/graph.php | 9 ++++----- htdocs/compta/bank/releve.php | 9 ++++----- htdocs/compta/bank/treso.php | 8 +++----- htdocs/compta/bank/various_payment/card.php | 10 +++++++--- htdocs/compta/bank/various_payment/list.php | 2 +- htdocs/compta/facture/card.php | 6 ++++-- htdocs/compta/facture/contact.php | 2 +- htdocs/compta/facture/document.php | 3 +-- htdocs/compta/facture/info.php | 2 +- htdocs/compta/facture/note.php | 2 +- htdocs/contact/list.php | 14 ++++++-------- htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/expedition/card.php | 6 +++++- htdocs/expedition/shipment.php | 2 +- htdocs/fourn/commande/card.php | 5 ++++- htdocs/fourn/commande/contact.php | 8 ++++---- htdocs/fourn/commande/dispatch.php | 3 ++- htdocs/fourn/commande/document.php | 2 +- htdocs/fourn/commande/info.php | 2 +- htdocs/fourn/commande/note.php | 2 +- htdocs/fourn/facture/card.php | 7 +++++-- htdocs/fourn/facture/contact.php | 9 ++++----- htdocs/fourn/facture/document.php | 2 +- htdocs/fourn/facture/info.php | 11 ++++------- htdocs/fourn/facture/note.php | 2 +- htdocs/langs/en_US/suppliers.lang | 1 + htdocs/product/card.php | 17 +++++++++++++---- htdocs/product/list.php | 10 ++++------ htdocs/product/stock/card.php | 7 ++++++- htdocs/product/stock/movement_list.php | 17 +++++++++++------ htdocs/projet/card.php | 1 + htdocs/projet/document.php | 2 +- htdocs/projet/info.php | 4 ++-- htdocs/projet/note.php | 2 +- htdocs/projet/tasks.php | 5 ++++- htdocs/projet/tasks/contact.php | 13 +++++++++---- htdocs/projet/tasks/document.php | 9 +++++++-- htdocs/projet/tasks/note.php | 11 ++++++++--- htdocs/projet/tasks/task.php | 14 ++++++++++---- htdocs/projet/tasks/time.php | 15 ++++++++++----- htdocs/societe/card.php | 4 +++- htdocs/societe/list.php | 2 +- htdocs/societe/paymentmodes.php | 2 +- htdocs/supplier_proposal/card.php | 7 +++++-- htdocs/supplier_proposal/contact.php | 8 ++++---- htdocs/supplier_proposal/document.php | 2 +- htdocs/supplier_proposal/info.php | 11 ++++------- htdocs/supplier_proposal/list.php | 6 ++++-- htdocs/supplier_proposal/note.php | 8 ++++---- htdocs/user/agenda_extsites.php | 6 +++++- htdocs/user/bank.php | 5 ++++- htdocs/user/card.php | 10 +++++++++- htdocs/user/clicktodial.php | 8 ++++---- htdocs/user/document.php | 6 +++++- htdocs/user/group/card.php | 7 ++++++- htdocs/user/group/ldap.php | 4 +++- htdocs/user/group/list.php | 4 ++-- htdocs/user/group/perms.php | 4 +++- htdocs/user/home.php | 5 +++-- htdocs/user/info.php | 5 ++++- htdocs/user/ldap.php | 5 ++++- htdocs/user/list.php | 4 ++-- htdocs/user/note.php | 8 +++++--- htdocs/user/param_ihm.php | 5 ++++- htdocs/user/perms.php | 5 ++++- 79 files changed, 287 insertions(+), 176 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index c56f1840ab7..5ea0636cc16 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1463,8 +1463,12 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } -$title = $langs->trans('Proposal')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewPropal"); +} $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos|DE:Modul_Angebote'; + llxHeader('', $title, $help_url); $now = dol_now(); diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index fedf6a6233d..ceb25175596 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -118,8 +118,9 @@ elseif ($action == 'setaddress' && $user->rights->propale->creer) /* * View */ -$title = $langs->trans('Proposal')." - ".$langs->trans('ContactsAddresses'); +$title = $object->ref." - ".$langs->trans('ContactsAddresses'); $help_url = "EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos"; + llxHeader('', $title, $help_url); $form = new Form($db); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 804fedd623b..b6fbb97cdf7 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -104,7 +104,7 @@ if ($object->id > 0) { /* * View */ -$title = $langs->trans('Proposal')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; llxHeader('', $title, $help_url); diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index dc43af9ceff..1782e39e2d2 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -59,7 +59,7 @@ restrictedArea($user, 'propal', $object->id); $form = new Form($db); -$title = $langs->trans('Proposal')." - ".$langs->trans('Info'); +$title = $object->ref." - ".$langs->trans('Info'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; llxHeader('', $title, $help_url); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index e0eb8a23e3e..38ad80d964f 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -491,8 +491,9 @@ $companystatic = new Societe($db); $projectstatic = new Project($db); $formcompany = new FormCompany($db); +$title = $langs->trans('ListOfProposals'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; -//llxHeader('',$langs->trans('Proposal'),$help_url); +llxHeader('', $title, $help_url); $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) { @@ -750,7 +751,7 @@ if ($resql) { exit; } - llxHeader('', $langs->trans('Proposal'), $help_url); +// llxHeader('', $langs->trans('Proposal'), $help_url); $param = '&search_status='.urlencode($search_status); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 13fa42edb29..6aba2973975 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -81,8 +81,9 @@ if (empty($reshook)) { $form = new Form($db); -$title = $langs->trans('Proposal')." - ".$langs->trans('Notes'); +$title = $object->ref." - ".$langs->trans('Notes'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; + llxHeader('', $title, $help_url); if ($object->id > 0) { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 20bc5462d5e..401622957c7 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1428,8 +1428,12 @@ if (empty($reshook)) { * View */ -$title = $langs->trans('Order')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewOrder"); +} $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; + llxHeader('', $title, $help_url); $form = new Form($db); diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index a4d857a47fd..b3b1319fa76 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -103,10 +103,6 @@ elseif ($action == 'setaddress' && $user->rights->commande->creer) /* * View */ -$title = $langs->trans('Order')." - ".$langs->trans('ContactsAddresses'); -$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; -llxHeader('', $title, $help_url); - $form = new Form($db); $formcompany = new FormCompany($db); $formother = new FormOther($db); @@ -124,6 +120,10 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); + $title = $object->ref." - ".$langs->trans('ContactsAddresses'); + $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; + llxHeader('', $title, $help_url); + $head = commande_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order'); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 684d8e61334..0e96c21db97 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -96,7 +96,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ -$title = $langs->trans('Order')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 55140c30ae2..961aec01fa4 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -77,7 +77,7 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans('Order')." - ".$langs->trans('Notes'); +$title = $object->ref." - ".$langs->trans('Notes'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 36a9d17315a..e1d0f7b8382 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -60,11 +60,6 @@ if (!$year_start) { /* * View */ - -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("IOMonthlyReporting"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $form = new Form($db); // Get account informations @@ -78,6 +73,10 @@ if (!empty($ref)) { $id = $object->id; } +$title = $object->ref.' - '.$langs->trans("IOMonthlyReporting"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + // Ce rapport de tresorerie est base sur llx_bank (car doit inclure les transactions sans facture) // plutot que sur llx_paiement + llx_paiementfourn diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 421080951f2..5c4d7824a82 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -506,7 +506,7 @@ $buttonreconcile = ''; $morehtmlref = ''; if ($id > 0 || !empty($ref)) { - $title = $langs->trans("FinancialAccount").' - '.$langs->trans("Transactions"); + $title = $object->ref.' - '.$langs->trans("Transactions"); $helpurl = ""; llxHeader('', $title, $helpurl); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 5c91a9f504d..cbf7b75a3b3 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -329,18 +329,16 @@ if (!empty($conf->accounting->enabled)) { $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; -$title = $langs->trans("FinancialAccount")." - ".$langs->trans("Card"); - $help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas|DE:Modul_Banken_und_Barbestände'; -llxHeader("", $title, $help_url); - - // Creation if ($action == 'create') { $object = new Account($db); + $title = $langs->trans("NewFinancialAccount"); + llxHeader("", $title, $help_url); + print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'bank_account'); if ($conf->use_javascript_ajax) { @@ -605,6 +603,9 @@ if ($action == 'create') { $_GET["id"] = $object->id; } + $title = $object->ref." - ".$langs->trans("Card"); + llxHeader("", $title, $help_url); + // Show tabs $head = bank_prepare_head($object); print dol_get_fiche_head($head, 'bankname', $langs->trans("FinancialAccount"), -1, 'account'); diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 78d45beadf3..91f514948a6 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -93,8 +93,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; * View */ -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents"); - +$title = $object->ref.' - '.$langs->trans("Documents"); $help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; llxHeader("", $title, $help_url); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 4c0efec57d2..119266b7901 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -55,11 +55,6 @@ $error = 0; /* * View */ - -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Graph"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $form = new Form($db); $datetime = dol_now(); @@ -83,6 +78,10 @@ if (GETPOST("ref")) { $account = $object->id; } +$title = $object->ref.' - '.$langs->trans("Graph"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + $result = dol_mkdir($conf->bank->dir_temp); if ($result < 0) { $langs->load("errors"); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 2385f2210a5..624830dfb1d 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -194,11 +194,6 @@ if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($n /* * View */ - -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $form = new Form($db); $societestatic = new Societe($db); $chargestatic = new ChargeSociales($db); @@ -250,6 +245,10 @@ if (empty($numref)) { $numrows = $db->num_rows($result); $i = 0; + $title = $object->ref.' - '.$langs->trans("AccountStatements"); + $helpurl = ""; + llxHeader('', $title, $helpurl); + // Onglets $head = bank_prepare_head($object); print dol_get_fiche_head($head, 'statement', $langs->trans("FinancialAccount"), 0, 'account'); diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 98a51947c0e..94711d1cfe9 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -57,11 +57,6 @@ $hookmanager->initHooks(array('banktreso', 'globalcard')); /* * View */ - -$title = $langs->trans("FinancialAccount").' - '.$langs->trans("PlannedTransactions"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $societestatic = new Societe($db); $facturestatic = new Facture($db); $facturefournstatic = new FactureFournisseur($db); @@ -85,6 +80,9 @@ if (GETPOST("account") || GETPOST("ref")) { $_GET["account"] = $object->id; } + $title = $object->ref.' - '.$langs->trans("PlannedTransactions"); + $helpurl = ""; + llxHeader('', $title, $helpurl); // Onglets $head = bank_prepare_head($object); diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index ab4b24e3889..254507db375 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -304,9 +304,6 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->banque->m /* * View */ - -llxHeader("", $langs->trans("VariousPayment")); - $form = new Form($db); if (!empty($conf->accounting->enabled)) { $formaccounting = new FormAccounting($db); @@ -324,6 +321,13 @@ if ($id) { } } +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewVariousPayment"); +} +$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen'; +llxHeader('', $title, $help_url); + $options = array(); // Load bank groups diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index bbec4f23fc6..7831a1b7ba0 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -290,7 +290,7 @@ if ($result) { } // must be place behind the last "header(...)" call - llxHeader(); + llxHeader('', $langs->trans("VariousPayments")); $i = 0; $total = 0; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index b31d65fdcaf..8e68945739c 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2840,8 +2840,10 @@ if (!empty($conf->projet->enabled)) { $now = dol_now(); -$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Card'); - +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewBill"); +} $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 43897172779..35e49518231 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -100,7 +100,7 @@ if ($action == 'addcontact' && $user->rights->facture->creer) { * View */ -$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('ContactsAddresses'); +$title = $object->ref." - ".$langs->trans('ContactsAddresses'); $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $helpurl); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 6eb05a16922..aa781610a70 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -100,8 +100,7 @@ if (empty($object->id)) { exit; } -$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents'); - +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 60efaf36e3d..1c462d60ef2 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -65,7 +65,7 @@ $result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', $field $form = new Form($db); -$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info'); +$title = $object->ref." - ".$langs->trans('Info'); $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 6f699774d32..199ffce653d 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -85,7 +85,7 @@ if (empty($object->id)) { exit; } -$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes'); +$title = $object->ref." - ".$langs->trans('Notes'); $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $helpurl); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 66561730829..95c298f7244 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -132,31 +132,31 @@ if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('b } $offset = $limit * $page; -$titre = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); +$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); if ($type == "p") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactprospectlist'; } - $titre .= ' ('.$langs->trans("ThirdPartyProspects").')'; + $title .= ' ('.$langs->trans("ThirdPartyProspects").')'; $urlfiche = "card.php"; } if ($type == "c") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactcustomerlist'; } - $titre .= ' ('.$langs->trans("ThirdPartyCustomers").')'; + $title .= ' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche = "card.php"; } elseif ($type == "f") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactsupplierlist'; } - $titre .= ' ('.$langs->trans("ThirdPartySuppliers").')'; + $title .= ' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche = "card.php"; } elseif ($type == "o") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactotherlist'; } - $titre .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; + $title .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; $urlfiche = ""; } @@ -345,8 +345,6 @@ if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES) $contactstatic->loadCacheOfProspStatus(); } -$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); - // Select every potentiels, and note each potentiels which fit in search parameters $tab_level = array(); $sql = "SELECT code, label, sortorder"; @@ -709,7 +707,7 @@ print ''; print ''; print ''; -print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "Information"; $modelmail = "contact"; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index accbd84ba8c..b4cac4a82a0 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -211,7 +211,7 @@ function group_prepare_head($object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/user/group/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("GroupCard"); + $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'group'; $h++; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 03595b022a5..89678ad95dc 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -803,9 +803,13 @@ if (empty($reshook)) { * View */ +$title = $langs->trans("Shipment"); +if ($action == 'create2') { + $title = $langs->trans("CreateShipment"); +} $help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen'; -llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url); +llxHeader('', $title, 'Expedition', $help_url); if (empty($action)) { $action = 'view'; diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index bfa48e9aa0f..cea7c59fdc6 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -232,7 +232,7 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } -$title = $langs->trans('Order')." - ".$langs->trans('Shipments'); +$title = $object->ref." - ".$langs->trans('Shipments'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 35e5257fce0..f1e02f203e7 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1529,7 +1529,10 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } -$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewOrderSupplier"); +} $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index e521caf1080..d3477503e4e 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -99,10 +99,6 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $ /* * View */ -$title = $langs->trans('SupplierOrder')." - ".$langs->trans('ContactsAddresses'); -$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; -llxHeader('', $title, $help_url); - $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); @@ -121,6 +117,10 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); + $title = $object->ref." - ".$langs->trans('ContactsAddresses'); + $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; + llxHeader('', $title, $help_url); + $head = ordersupplier_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("SupplierOrder"), -1, 'order'); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index a1ddef959a0..52f4c37d8a1 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -505,10 +505,11 @@ $formproduct = new FormProduct($db); $warehouse_static = new Entrepot($db); $supplierorderdispatch = new CommandeFournisseurDispatch($db); +$title = $object->ref." - ".$langs->trans('OrderDispatch'); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; $morejs = array('/fourn/js/lib_dispatch.js.php'); -llxHeader('', $langs->trans("OrderDispatch"), $help_url, '', 0, 0, $morejs); +llxHeader('', $title, $help_url, '', 0, 0, $morejs); if ($id > 0 || !empty($ref)) { $soc = new Societe($db); diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index d54d5553efb..64e4d1c8b24 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -98,7 +98,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); -$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index 6c64672ee84..dfa5d10a2f6 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -113,7 +113,7 @@ if ($id > 0 || !empty($ref)) { $object->info($object->id); } -$title = $langs->trans("SupplierOrder").' - '.$langs->trans('Info').' - '.$object->ref.' '.$object->name; +$title = $object->ref.' - '.$langs->trans('Info').' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); } diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 1c67c03d727..d32ee8e0641 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -69,7 +69,7 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Notes'); +$title = $object->ref." - ".$langs->trans('Notes'); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 71c7a4beaf5..654fcce3f60 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1831,7 +1831,10 @@ if (!empty($conf->projet->enabled)) { $now = dol_now(); -$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("NewSupplierInvoice"); +} $help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen'; llxHeader('', $title, $help_url); @@ -1839,7 +1842,7 @@ llxHeader('', $title, $help_url); if ($action == 'create') { $facturestatic = new FactureFournisseur($db); - print load_fiche_titre($langs->trans('NewBill'), '', 'supplier_invoice'); + print load_fiche_titre($langs->trans('NewSupplierInvoice'), '', 'supplier_invoice'); dol_htmloutput_events(); diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 927cc5f36b9..a3b4fba9502 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -98,11 +98,6 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->facture->creer || $u /* * View */ - -$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('ContactsAddresses'); -$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; -llxHeader('', $title, $helpurl); - $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); @@ -121,6 +116,10 @@ if ($id > 0 || !empty($ref)) { $alreadypaid = $object->getSommePaiement(); + $title = $object->ref." - ".$langs->trans('ContactsAddresses'); + $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; + llxHeader('', $title, $helpurl); + $head = facturefourn_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 34255541c01..959a1d4020c 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -93,7 +93,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); -$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; llxHeader('', $title, $helpurl); diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index f17d3c3e127..e9c4d2ea0fa 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -53,18 +53,15 @@ $object = new FactureFournisseur($db); */ $form = new Form($db); - -$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Info'); -$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; -llxHeader('', $title, $helpurl); - $object->fetch($id, $ref); $object->fetch_thirdparty(); - $object->info($object->id); - $alreadypaid = $object->getSommePaiement(); +$title = $object->ref." - ".$langs->trans('Info'); +$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; +llxHeader('', $title, $helpurl); + $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index d59aefe7831..97f4d4562b3 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -83,7 +83,7 @@ if ($action == 'setlabel' && ($user->rights->fournisseur->facture->creer || $use $form = new Form($db); -$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Notes'); +$title = $object->ref." - ".$langs->trans('Notes'); $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; llxHeader('', $title, $helpurl); diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index ca9ee174d29..cd75cfba57e 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -4,6 +4,7 @@ SuppliersInvoice=Vendor invoice SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor +NewSupplierInvoice = New vendor invoice History=History ListOfSuppliers=List of vendors ShowSupplier=Show vendor diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 49c70b05641..292d1a59abe 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1022,15 +1022,24 @@ if (!empty($conf->accounting->enabled)) { $title = $langs->trans('ProductServiceCard'); + $help_url = ''; $shortlabel = dol_trunc($object->label, 16); if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { - $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); - $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos|DE:Modul_Produkte'; + if ($action == 'create') { + $title = $langs->trans("NewProduct"); + } else { + $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos|DE:Modul_Produkte'; + } } if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { - $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); - $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen'; + if ($action == 'create') { + $title = $langs->trans("NewService"); + } else { + $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen'; + } } llxHeader('', $title, $help_url); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 942a76585cc..0315922ca28 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -381,16 +381,14 @@ if (empty($reshook)) { * View */ -$title = $langs->trans("ProductsAndServices"); +$title = $langs->trans("ListOfProductsAndServices"); if ($search_type != '' && $search_type != '-1') { if ($search_type == 1) { - $texte = $langs->trans("Services"); + $title = $langs->trans("ListOfServices"); } else { - $texte = $langs->trans("Products"); + $title = $langs->trans("ListOfProducts"); } -} else { - $texte = $langs->trans("ProductsAndServices"); } $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity,'; @@ -783,7 +781,7 @@ if ($resql) { $picto = 'service'; } - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "Information"; $modelmail = "product"; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 8389d63e843..de58f033737 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -279,8 +279,13 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +$title = $langs->trans("WarehouseCard"); +if ($action == 'create') { + $title = $langs->trans("NewWarehouse"); +} + $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; -llxHeader("", $langs->trans("WarehouseCard"), $help_url); +llxHeader("", $title, $help_url); if ($action == 'create') { diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index f5d74c47c8e..6462115182d 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -630,14 +630,19 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); $i = 0; $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; if ($msid) { - $texte = $langs->trans('StockMovementForId', $msid); + $title = $langs->trans('StockMovementForId', $msid); } else { - $texte = $langs->trans("ListOfStockMovements"); + $title = $langs->trans("ListOfStockMovements"); if ($id) { - $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; + if (!empty($object->ref)) { + $title .= ' ('.$object->ref.')'; + } else { + $title .= ' ('.$langs->trans("ForThisWarehouse").')'; + } + } } -llxHeader("", $texte, $help_url); +llxHeader("", $title, $help_url); /* * Show tab only if we ask a particular warehouse @@ -897,9 +902,9 @@ if ($id > 0) { } if ($id > 0) { - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); } else { - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); } // Add code for pre mass action (confirmation or email presend form) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index da45abb6168..0e8b5fd4380 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -477,6 +477,7 @@ $title = $langs->trans("Project").' - '.$object->ref.(!empty($object->thirdparty if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE)) { $title = $object->ref.(!empty($object->thirdparty->name) ? ' - '.$object->thirdparty->name : '').(!empty($object->title) ? ' - '.$object->title : ''); } + $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos|DE:Modul_Projekte"; llxHeader("", $title, $help_url); diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 9e8d3a6ce8e..2b5f38dbf02 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -96,7 +96,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; * View */ -$title = $langs->trans('Project').' - '.$langs->trans('Document').' - '.$object->ref.' '.$object->name; +$title = $langs->trans('Documents').' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans('Document'); } diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index c0afe5d1370..7b8d9528cc3 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -107,8 +107,8 @@ if ($id > 0 || !empty($ref)) { } $object->info($object->id); } - -$title = $langs->trans("Project").' - '.$object->ref.' '.$object->name; +$agenda = (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) ? '/'.$langs->trans("Agenda") : ''; +$title = $langs->trans('Events').$agenda.' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); } diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 2ee52d3a247..3eed5e14c60 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -69,7 +69,7 @@ if (empty($reshook)) { * View */ -$title = $langs->trans("Project").' - '.$langs->trans("Note").' - '.$object->ref.' '.$object->name; +$title = $langs->trans("Notes").' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Note"); } diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 64d134a7254..49943b79434 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -404,10 +404,13 @@ $projectstatic = new Project($db); $taskstatic = new Task($db); $userstatic = new User($db); -$title = $langs->trans("Project").' - '.$langs->trans("Tasks").' - '.$object->ref.' '.$object->name; +$title = $langs->trans("Tasks").' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Tasks"); } +if ($action == 'create') { + $title = $langs->trans("NewTask"); +} $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; llxHeader("", $title, $help_url); diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 0b26161c28c..962c9853360 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -140,13 +140,19 @@ if (!empty($project_ref) && !empty($withproject)) { /* * View */ - -llxHeader('', $langs->trans("Task")); - $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); $userstatic = new User($db); +$result = $projectstatic->fetch($object->fk_project); + +$title = $object->ref . ' - ' . $langs->trans("Contacts"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); /* *************************************************************************** */ @@ -162,7 +168,6 @@ if ($id > 0 || !empty($ref)) { } $id = $object->id; // So when doing a search from ref, id is also set correctly. - $result = $projectstatic->fetch($object->fk_project); if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { $projectstatic->fetchComments(); } diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index c57610d0130..77d52fd547f 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -119,10 +119,15 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ - $form = new Form($db); -llxHeader('', $langs->trans('Task')); +$title = $object->ref . ' - ' . $langs->trans("Documents"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); if ($object->id > 0) { $projectstatic->fetch_thirdparty(); diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 3d1ec610b48..ad6a7c6d03c 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -110,14 +110,19 @@ if (empty($reshook)) { /* * View */ - -llxHeader('', $langs->trans("Task")); - $form = new Form($db); $userstatic = new User($db); $now = dol_now(); +$title = $object->ref . ' - ' . $langs->trans("Notes"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); + if ($object->id > 0) { $userWrite = $projectstatic->restrictedProjectArea($user, 'write'); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index f163af75cae..20cb27eb002 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -191,12 +191,18 @@ if ($action == 'remove_file' && $user->rights->projet->creer) { /* * View */ - -llxHeader('', $langs->trans("Task")); - $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); +$result = $projectstatic->fetch($object->fk_project); + +$title = $object->ref; +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); if ($id > 0 || !empty($ref)) { $res = $object->fetch_optionals(); @@ -204,7 +210,7 @@ if ($id > 0 || !empty($ref)) { $object->fetchComments(); } - $result = $projectstatic->fetch($object->fk_project); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { $projectstatic->fetchComments(); } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index ef8ac6aa9df..ef7f98107db 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -699,15 +699,20 @@ if ($action == 'confirm_generateinter') { /* * View */ - -$arrayofselected = is_array($toselect) ? $toselect : array(); - -llxHeader("", $langs->trans("Task")); - $form = new Form($db); $formother = new FormOther($db); $formproject = new FormProjets($db); $userstatic = new User($db); +//$result = $projectstatic->fetch($object->fk_project); +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); +if (!empty($withproject)) { + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; +} +$help_url = ''; + +llxHeader('', $title, $help_url); if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser > 0) { /* diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 3ef501aeac6..8edf9567c79 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -943,10 +943,12 @@ if ($socid > 0 && empty($object->id)) { } $title = $langs->trans("ThirdParty"); +if ($action == 'create') { + $title = $langs->trans("NewThirdParty"); +} if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->name." - ".$langs->trans('Card'); } - $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas|DE:Modul_Geschäftspartner'; llxHeader('', $title, $help_url); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 80b0142a572..a7e6d836218 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -721,7 +721,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ( } $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $langs->trans("ThirdParty"), $help_url); +llxHeader('', $title, $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index dedb1ad445d..2d2e9c16ac7 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -681,7 +681,7 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $title = $object->name." - ".$langs->trans('PaymentInformation'); } -llxHeader(); +llxHeader('', $title, $help_url); $head = societe_prepare_head($object); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 56eef9fb632..9a54edadcd0 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1063,7 +1063,10 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('Card'); +$title = $object->ref." - ".$langs->trans('Card'); +if ($action == 'create') { + $title = $langs->trans("SupplierProposalNew"); +} $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; llxHeader('', $title, $help_url); @@ -1082,7 +1085,7 @@ $now = dol_now(); if ($action == 'create') { $currency_code = $conf->currency; - print load_fiche_titre($langs->trans("NewAskPrice"), '', 'supplier_proposal'); + print load_fiche_titre($langs->trans("SupplierProposalNew"), '', 'supplier_proposal'); $soc = new Societe($db); if ($socid > 0) { diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index f1756f17814..b6a11e9ba17 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -98,10 +98,6 @@ if ($action == 'addcontact' && $permissiontoedit) { /* * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('ContactsAddresses'); -$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -llxHeader('', $title, $help_url); - $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); @@ -120,6 +116,10 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); + $title = $object->ref." - ".$langs->trans('ContactsAddresses'); + $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; + llxHeader('', $title, $help_url); + $head = supplier_proposal_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("CommRequest"), -1, 'supplier_proposal'); diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index fa73ec22fa8..ad4050a6eb4 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -90,7 +90,7 @@ if ($object->id > 0) { * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('Documents'); +$title = $object->ref." - ".$langs->trans('Documents'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; llxHeader('', $title, $help_url); diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index 0b796937d2e..bda854cba23 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -48,19 +48,16 @@ $result = restrictedArea($user, 'supplier_proposal', $id); /* * View */ - $form = new Form($db); - -$title = $langs->trans('CommRequest')." - ".$langs->trans('Info'); -$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -llxHeader('', $title, $help_url); - $object = new SupplierProposal($db); $object->fetch($id); $object->fetch_thirdparty(); - $object->info($object->id); +$title = $object->ref." - ".$langs->trans('Info'); +$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; +llxHeader('', $title, $help_url); + $head = supplier_proposal_prepare_head($object); print dol_get_fiche_head($head, 'info', $langs->trans('CommRequest'), -1, 'supplier_proposal'); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index ad35c8f9914..a07272b13df 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -285,8 +285,10 @@ $formpropal = new FormPropal($db); $companystatic = new Societe($db); $formcompany = new FormCompany($db); +$title = $langs->trans('ListOfSupplierProposals'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -//llxHeader('',$langs->trans('CommRequest'),$help_url); + +llxHeader('', $title, $help_url); $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) { @@ -467,7 +469,7 @@ if ($resql) { exit; } - llxHeader('', $langs->trans('CommRequest'), $help_url); +// llxHeader('', $langs->trans('CommRequest'), $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index 5a19a94b402..dface2f68c5 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -72,10 +72,6 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans('CommRequest')." - ".$langs->trans('Notes'); -$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -llxHeader('', $title, $help_url); - $form = new Form($db); if ($id > 0 || !empty($ref)) { @@ -88,6 +84,10 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref)) { $object->fetch_thirdparty(); + $title = $object->ref." - ".$langs->trans('Notes'); + $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; + llxHeader('', $title, $help_url); + $societe = new Societe($db); if ($societe->fetch($object->socid)) { $head = supplier_proposal_prepare_head($object); diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 5921f7d84cd..09b31e54cd0 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -148,7 +148,11 @@ $formother = new FormOther($db); $arrayofjs = array(); $arrayofcss = array(); -llxHeader('', $langs->trans("UserSetup"), '', '', 0, 0, $arrayofjs, $arrayofcss); +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('ExtSites'); +$help_url = ''; + +llxHeader('', $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss); print '
'; diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 59f593f5b74..eb17903c597 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -259,7 +259,10 @@ $form = new Form($db); $childids = $user->getAllChildIds(1); -llxHeader(null, $langs->trans("BankAccounts")); +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('BankAccounts'); +$help_url = ''; +llxHeader('', $title, $help_url); $head = user_prepare_head($object); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f789023b8d4..b050fb70df7 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -716,9 +716,13 @@ if (!empty($conf->stock->enabled)) { $formproduct = new FormProduct($db); } -llxHeader('', $langs->trans("UserCard")); +$help_url = ''; if ($action == 'create' || $action == 'adduserldap') { + + $title = $langs->trans("NewUser"); + llxHeader('', $title, $help_url); + print load_fiche_titre($langs->trans("NewUser"), '', 'user'); print ''.$langs->trans("CreateInternalUserDesc")."
\n"; @@ -1336,6 +1340,10 @@ if ($action == 'create' || $action == 'adduserldap') { } } + $person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; + $title = $person_name." - ".$langs->trans('Card'); + llxHeader('', $title, $help_url); + // Show tabs if ($mode == 'employee') { // For HRM module development $title = $langs->trans("Employee"); diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 2207e3358ae..9e203db4904 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -74,18 +74,18 @@ if (empty($reshook)) { /* * View */ - $form = new Form($db); -llxHeader("", "ClickToDial"); - - if ($id > 0) { $object = new User($db); $object->fetch($id, '', '', 1); $object->getrights(); $object->fetch_clicktodial(); + $person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; + $title = $person_name." - ".$langs->trans('ClickToDial'); + $help_url = ''; + llxHeader('', $title, $help_url); $head = user_prepare_head($object); diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 142c44d85fe..d33175af8c5 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -129,7 +129,11 @@ if (empty($reshook)) { $form = new Form($db); -llxHeader('', $langs->trans("UserCard").' - '.$langs->trans("Files")); + +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('Documents'); +$help_url = ''; +llxHeader('', $title, $help_url); if ($object->id) { /* diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index f698d1b5a07..7e61fc150b2 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -246,8 +246,13 @@ if (empty($reshook)) { /* * View */ +$title = $object->name.' - '.$langs->trans("Card"); +if ($action == 'create') { + $title = $langs->trans("NewGroup"); +} + +llxHeader('', $title, $help_url); -llxHeader('', $langs->trans("GroupCard")); $form = new Form($db); $fuserstatic = new User($db); diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index af28b979225..0c73b07807e 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -92,7 +92,9 @@ if ($action == 'dolibarr2ldap') { $form = new Form($db); -llxHeader(); +$title = $object->name." - ".$langs->trans('LDAP'); +$help_url = ''; +llxHeader('', $title, $help_url); $head = group_prepare_head($object); diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index 04fa0035418..58d009a7c26 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -120,8 +120,8 @@ if (empty($reshook)) { /* * View */ - -llxHeader(); +$title = $langs->trans("ListOfGroups"); +llxHeader('', $title, $help_url); $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms as datem, COUNT(DISTINCT ugu.fk_user) as nb, COUNT(DISTINCT ugr.fk_id) as nbpermissions"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 478e345f2e3..b959c124a5f 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -128,7 +128,9 @@ if (empty($reshook)) { $form = new Form($db); -llxHeader('', $langs->trans("Permissions")); +$title = $object->name." - ".$langs->trans('Permissions'); +$help_url = ''; +llxHeader('', $title, $help_url); if ($object->id > 0) { $head = group_prepare_head($object); diff --git a/htdocs/user/home.php b/htdocs/user/home.php index c8dbdf2c1b8..b79476e7d5c 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -75,8 +75,9 @@ if (GETPOST('addbox')) { /* * View */ - -llxHeader(); +$title = $langs->trans("MenuUsersAndGroups"); +$help_url = ''; +llxHeader('', $title, $help_url); print load_fiche_titre($langs->trans("MenuUsersAndGroups"), $resultboxes['selectboxlist'], 'user'); diff --git a/htdocs/user/info.php b/htdocs/user/info.php index f6a0c731e14..6104df6f996 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -62,7 +62,10 @@ if (($object->id != $user->id) && (!$user->rights->user->user->lire)) { $form = new Form($db); -llxHeader(); +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('Info'); +$help_url = ''; +llxHeader('', $title, $help_url); $head = user_prepare_head($object); diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 5e6cf57bfd4..8a8ca28092e 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -89,7 +89,10 @@ if (empty($reshook)) { $form = new Form($db); -llxHeader(); +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('LDAP'); +$help_url = ''; +llxHeader('', $title, $help_url); $head = user_prepare_head($object); diff --git a/htdocs/user/list.php b/htdocs/user/list.php index cd87e286225..a01394604de 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -473,8 +473,8 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ // Output page // -------------------------------------------------------------------- - -llxHeader('', $langs->trans("ListOfUsers"), $help_url); +$title = $langs->trans("ListOfUsers"); +llxHeader('', $title, $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 1cf1f112df4..a8e01536408 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -84,11 +84,13 @@ if (empty($reshook)) { /* * View */ - -llxHeader(); - $form = new Form($db); +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('Notes'); +$help_url = ''; +llxHeader('', $title, $help_url); + if ($id) { $head = user_prepare_head($object); diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index bb1320ecd0b..3bed57c38bc 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -178,8 +178,11 @@ if (empty($reshook)) { /* * View */ +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('Card'); +$help_url = ''; -llxHeader(); +llxHeader('', $title, $help_url); // List of possible landing pages $tmparray = array('index.php'=>'Dashboard'); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 6e28a77b5bc..0fd3ee23ebb 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -143,7 +143,10 @@ if (empty($reshook)) { $form = new Form($db); -llxHeader('', $langs->trans("Permissions")); +$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; +$title = $person_name." - ".$langs->trans('Permissions'); +$help_url = ''; +llxHeader('', $title, $help_url); $head = user_prepare_head($object); From 23d948cec4a6a91a556118ba98a3c4357ee86ea4 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 27 Jun 2022 10:56:08 +0000 Subject: [PATCH 02/71] Fixing style errors. --- htdocs/comm/propal/list.php | 2 +- htdocs/product/stock/movement_list.php | 1 - htdocs/supplier_proposal/list.php | 2 +- htdocs/user/card.php | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 38ad80d964f..d6dcd0e4576 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -751,7 +751,7 @@ if ($resql) { exit; } -// llxHeader('', $langs->trans('Proposal'), $help_url); + // llxHeader('', $langs->trans('Proposal'), $help_url); $param = '&search_status='.urlencode($search_status); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 6462115182d..416843aca50 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -639,7 +639,6 @@ if ($msid) { } else { $title .= ' ('.$langs->trans("ForThisWarehouse").')'; } - } } llxHeader("", $title, $help_url); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index a07272b13df..36706610a2d 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -469,7 +469,7 @@ if ($resql) { exit; } -// llxHeader('', $langs->trans('CommRequest'), $help_url); + // llxHeader('', $langs->trans('CommRequest'), $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/user/card.php b/htdocs/user/card.php index b050fb70df7..a1cb7b5c996 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -719,7 +719,6 @@ if (!empty($conf->stock->enabled)) { $help_url = ''; if ($action == 'create' || $action == 'adduserldap') { - $title = $langs->trans("NewUser"); llxHeader('', $title, $help_url); From 4335e6724917b9b5fee4b15a0ba9da07ac1a4f52 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Mon, 27 Jun 2022 12:59:06 +0200 Subject: [PATCH 03/71] remove old commented code --- htdocs/comm/propal/list.php | 2 -- htdocs/supplier_proposal/list.php | 2 -- 2 files changed, 4 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index d6dcd0e4576..fb135aa0205 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -751,8 +751,6 @@ if ($resql) { exit; } - // llxHeader('', $langs->trans('Proposal'), $help_url); - $param = '&search_status='.urlencode($search_status); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 36706610a2d..b13a63ed661 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -469,8 +469,6 @@ if ($resql) { exit; } - // llxHeader('', $langs->trans('CommRequest'), $help_url); - $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); From 739d24e1aeb5ab56f7431c2c634ef89cfa6709e0 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 28 Jun 2022 11:22:01 +0200 Subject: [PATCH 04/71] fix: replannish view lost filter and sort on pagination and sorting --- htdocs/product/stock/replenish.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index a4ce5577361..66ad0889b31 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -137,7 +137,7 @@ if ($reshook < 0) { * Actions */ -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('valid')) { // Both test are required to be compatible with all browsers +if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers $search_ref = ''; $search_label = ''; $sall = ''; @@ -669,6 +669,8 @@ if ($search_ref || $search_label || $sall || $salert || $draftorder || GETPOST(' if ($limit > 0 && $limit != $conf->liste_limit) { $filters .= '&limit='.urlencode($limit); } +if (!empty($includeproductswithoutdesiredqty)) $filters .= '&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty); +if (!empty($salert)) $filters .= '&salert='.urlencode($salert); $param = (isset($type) ? '&type='.urlencode($type) : ''); $param .= '&fourn_id='.urlencode($fourn_id).'&search_label='.urlencode($search_label).'&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty).'&salert='.urlencode($salert).'&draftorder='.urlencode($draftorder); @@ -676,6 +678,8 @@ $param .= '&search_ref='.urlencode($search_ref); $param .= '&mode='.urlencode($mode); $param .= '&fk_supplier='.urlencode($fk_supplier); $param .= '&fk_entrepot='.urlencode($fk_entrepot); +if (!empty($includeproductswithoutdesiredqty)) $param .= '&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty); +if (!empty($salert)) $param .= '&salert='.urlencode($salert); $stocklabel = $langs->trans('Stock'); $stocklabelbis = $langs->trans('Stock'); From bea16a5256c66584259639eebf1c20891fef0780 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Jun 2022 14:50:43 +0200 Subject: [PATCH 05/71] Fix SEPA file with special chars --- .../class/bonprelevement.class.php | 174 +++++++++--------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 8cfdcf7e02b..d87317e2420 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1488,7 +1488,7 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$i.''.$CrLf); fputs($this->file, ' '.$this->total.''.$CrLf); fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf); + fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); @@ -1604,7 +1604,7 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$i.''.$CrLf); fputs($this->file, ' '.$this->total.''.$CrLf); fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf); + fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); @@ -1854,16 +1854,16 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ''))).''.$CrLf; + $XML_DEBITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))).''.$CrLf; $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$row_country_code.''.$CrLf; $addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => "")); if (trim($addressline1)) { - $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if (trim($addressline2)) { - $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; @@ -1908,14 +1908,14 @@ class BonPrelevement extends CommonObject $XML_CREDITOR .= ' '.round($row_somme, 2).''.$CrLf; $XML_CREDITOR .= ' '.$CrLf; /* - $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.$Rum.''.$CrLf; - $XML_CREDITOR .= ' '.$DtOfSgntr.''.$CrLf; - $XML_CREDITOR .= ' false'.$CrLf; - $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.$CrLf; - */ + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$Rum.''.$CrLf; + $XML_CREDITOR .= ' '.$DtOfSgntr.''.$CrLf; + $XML_CREDITOR .= ' false'.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + */ //$XML_CREDITOR .= ' SLEV'.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; @@ -1923,16 +1923,16 @@ class BonPrelevement extends CommonObject $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom)))).''.$CrLf; + $XML_CREDITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))).''.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$row_country_code.''.$CrLf; $addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => "")); if (trim($addressline1)) { - $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if (trim($addressline2)) { - $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; @@ -2096,16 +2096,16 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$dateTime_ETAD.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => "")); if ($addressline1) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if ($addressline2) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2120,11 +2120,11 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; /* $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), '')).''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), '')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), ' ')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), ' ')).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf;*/ $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV @@ -2162,16 +2162,16 @@ class BonPrelevement extends CommonObject } $XML_SEPA_INFO .= ' '.dol_print_date($dateTime_ETAD, 'dayrfc').''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => "")); if ($addressline1) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if ($addressline2) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2186,26 +2186,26 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; /* $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), '')).''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), '')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), ' ')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), ' ')).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf;*/ $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV /*$XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' SEPA'.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf;*/ + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' SEPA'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf;*/ } } else { fputs($this->file, 'INCORRECT EMETTEUR '.$XML_SEPA_INFO.$CrLf); @@ -2343,59 +2343,59 @@ class BonPrelevement extends CommonObject } /* - if ($mode == 'direct_debit') { - $sql = "SELECT b.rowid, f.datedue as datefin"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.entity IN (".getEntity('facture').")"; - $sql .= " AND f.total_ttc > 0"; - } else { - $sql = "SELECT b.rowid, f.datedue as datefin"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; - $sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")"; - $sql .= " AND f.total_ttc > 0"; - } + if ($mode == 'direct_debit') { + $sql = "SELECT b.rowid, f.datedue as datefin"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= " WHERE f.entity IN (".getEntity('facture').")"; + $sql .= " AND f.total_ttc > 0"; + } else { + $sql = "SELECT b.rowid, f.datedue as datefin"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + $sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")"; + $sql .= " AND f.total_ttc > 0"; + } - $resql = $this->db->query($sql); - if ($resql) { - $langs->load("banks"); - $now = dol_now(); + $resql = $this->db->query($sql); + if ($resql) { + $langs->load("banks"); + $now = dol_now(); - $response = new WorkboardResponse(); - if ($mode == 'direct_debit') { - $response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("PendingDirectDebitToComplete"); - $response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort"); - $response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank'; - } else { - $response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("PendingCreditTransferToComplete"); - $response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort"); - $response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank'; - } - $response->img = img_object('', "payment"); + $response = new WorkboardResponse(); + if ($mode == 'direct_debit') { + $response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("PendingDirectDebitToComplete"); + $response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort"); + $response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank'; + } else { + $response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("PendingCreditTransferToComplete"); + $response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort"); + $response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank'; + } + $response->img = img_object('', "payment"); - while ($obj = $this->db->fetch_object($resql)) { - $response->nbtodo++; + while ($obj = $this->db->fetch_object($resql)) { + $response->nbtodo++; - if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) { - $response->nbtodolate++; - } - } + if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) { + $response->nbtodolate++; + } + } - $response->nbtodo = 0; - $response->nbtodolate = 0; - // Return workboard only if quantity is not 0 - if ($response->nbtodo) { - return $response; - } else { - return 0; - } - } else { - dol_print_error($this->db); - $this->error = $this->db->error(); - return -1; - } - */ + $response->nbtodo = 0; + $response->nbtodolate = 0; + // Return workboard only if quantity is not 0 + if ($response->nbtodo) { + return $response; + } else { + return 0; + } + } else { + dol_print_error($this->db); + $this->error = $this->db->error(); + return -1; + } + */ return 0; } } From cbaa8b4304c7f725af4d90be3233c21aa0046b37 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Jun 2022 16:40:19 +0200 Subject: [PATCH 06/71] FIX False alert of WAF when there is "set" into some URL action=update. --- htdocs/main.inc.php | 2 +- test/phpunit/SecurityTest.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1d09b9f9887..b97312859b9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -130,7 +130,7 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login $inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database $inj += preg_match('/assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL1b. Should find an attack on GET param and did not.'); + $test = '... update ... set ... ='; + $result=testSqlAndScriptInject($test, 1); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2a. Should find an attack on GET param and did not.'); + + $test = 'action=update& ... set ... ='; + $result=testSqlAndScriptInject($test, 1); + $this->assertEquals(0, $result, 'Error on testSqlAndScriptInject for SQL2b. Should not find an attack on GET param and did.'); + $test = '... union ... selection '; $result=testSqlAndScriptInject($test, 1); - $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2. Should find an attack on GET param and did not.'); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2c. Should find an attack on GET param and did not.'); $test = 'javascript:'; $result=testSqlAndScriptInject($test, 0); From 71bf338127751ecf1b6e7779bfcac0de22242af3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Jun 2022 16:50:17 +0200 Subject: [PATCH 07/71] Fix regression --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 94789239d43..cbe2df19026 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1655,7 +1655,7 @@ if ($action == 'create') { // Mode of payment print '
'.$langs->trans('PaymentMode').''; print img_picto('', 'bank').' '; - $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && (GETPOST('mode_reglement_id') != 0 ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id)), 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx'); + $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && GETPOST('mode_reglement_id') != 0) ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx'); print '
'; // Bank Account From bf98c77d73c97f2a42a803b6d904589d76b415d0 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Thu, 30 Jun 2022 10:24:47 +0200 Subject: [PATCH 08/71] FIX : french traductions for payment methods --- htdocs/langs/fr_FR/bills.lang | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index d1a0dbbbe92..a250e2f383e 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -81,14 +81,14 @@ PaymentsReports=Rapports de règlements PaymentsAlreadyDone=Versements déjà effectués PaymentsBackAlreadyDone=Remboursements déjà effectués PaymentRule=Mode de paiement -PaymentMode=Payment method -PaymentModes=Payment methods -DefaultPaymentMode=Default Payment method +PaymentMode=Mode de règlement +PaymentModes=Modes de règlement +DefaultPaymentMode=Mode de règlement par défaut DefaultBankAccount=Compte bancaire par défaut -IdPaymentMode=Payment method (id) -CodePaymentMode=Payment method (code) -LabelPaymentMode=Payment method (label) -PaymentModeShort=Payment method +IdPaymentMode=Mode de règlement (id) +CodePaymentMode=Mode de règlement (code) +LabelPaymentMode=Mode de règlement (label) +PaymentModeShort=Mode règlement PaymentTerm=Condition de règlement PaymentConditions=Conditions de règlement PaymentConditionsShort=Conditions de règlement From 3e70223961fca79104eb7ad5996c61a9edc43295 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Jul 2022 13:15:15 +0200 Subject: [PATCH 09/71] Help debug --- htdocs/public/test/test_exec.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/htdocs/public/test/test_exec.php b/htdocs/public/test/test_exec.php index 732bfefa824..94a1d96462b 100644 --- a/htdocs/public/test/test_exec.php +++ b/htdocs/public/test/test_exec.php @@ -41,14 +41,16 @@ if (!defined("NOSESSION")) { define("NOSESSION", '1'); } +print "*** SHOW SESSION STATUS

\n"; print "Legend:
\n"; print 'PHP_SESSION_DISABLED='.PHP_SESSION_DISABLED."
\n"; print 'PHP_SESSION_NONE='.PHP_SESSION_NONE."
\n"; print 'PHP_SESSION_ACTIVE='.PHP_SESSION_ACTIVE."
\n"; print '
'; -print 'session_status='.session_status().' (before main.inc.php)'; -print '
'; +print 'session_status='.session_status().' (before main.inc.php)
'; + +print '

'."\n"; require '../../main.inc.php'; @@ -62,7 +64,8 @@ if ($dolibarr_main_prod) { * View */ -echo "Test
\n"; +print "*** TEST READ OF /tmp/test.txt FILE
\n"; + $out=''; $ret=0; @@ -78,12 +81,19 @@ if ($f) { print '

'."\n"; + +print "*** TEST READ OF /test.txt FILE AND LS /dev/std*
\n"; + exec('cat /test.txt; ls /dev/std*; sleep 1;', $out, $ret); print $ret."
\n"; print_r($out); +print '
'; print '

'."\n"; + +print "*** TRY TO RUN CLAMDSCAN
\n"; + $ret = 0; $out = null; exec('/usr/bin/clamdscan --fdpass filethatdoesnotexists.php', $out, $ret); From 09b8e3b1eef20ffd4238cbdd89cba0ff82665121 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Jul 2022 13:26:32 +0200 Subject: [PATCH 10/71] Better message --- htdocs/public/test/test_exec.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/test/test_exec.php b/htdocs/public/test/test_exec.php index 94a1d96462b..026a8d12b7b 100644 --- a/htdocs/public/test/test_exec.php +++ b/htdocs/public/test/test_exec.php @@ -85,7 +85,7 @@ print '

'."\n"; print "*** TEST READ OF /test.txt FILE AND LS /dev/std*
\n"; exec('cat /test.txt; ls /dev/std*; sleep 1;', $out, $ret); -print $ret."
\n"; +print "ret=".$ret."
\n"; print_r($out); print '
'; @@ -97,5 +97,5 @@ print "*** TRY TO RUN CLAMDSCAN
\n"; $ret = 0; $out = null; exec('/usr/bin/clamdscan --fdpass filethatdoesnotexists.php', $out, $ret); -print $ret."
\n"; +print "ret=".$ret."
\n"; print_r($out); From 5dabcec7671b75f4c978f657aaf1f60e4f4eb44f Mon Sep 17 00:00:00 2001 From: boudet jean pascal <68547382+atm-jpb@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:17:55 +0200 Subject: [PATCH 11/71] rank duplicate on mass action #### rank duplicate on mass action invoice from multiple orders we have to define the max rank for each line which makes it possible not to have a duplicate on the rank field in the case of several order massaction request. --- htdocs/core/actions_massactions.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index b98ce37d8f1..5859760d955 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -791,7 +791,10 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. 'HT', 0, $product_type, - $lines[$i]->rang, + + //we have define the max rank for each line which makes it possible not to have a duplicate on the rank field in the case of several orders + //-1 will give us the right number + -1, // rank $lines[$i]->special_code, $objecttmp->origin, $lines[$i]->rowid, From 244a3fc8199a8969da418aa351aaf9f373b673df Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 4 Jul 2022 15:22:40 +0000 Subject: [PATCH 12/71] Fixing style errors. --- htdocs/core/actions_massactions.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 5859760d955..af0ad2a2eaa 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -791,7 +791,6 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. 'HT', 0, $product_type, - //we have define the max rank for each line which makes it possible not to have a duplicate on the rank field in the case of several orders //-1 will give us the right number -1, // rank From 2e065e1702ef94217ef79e6a6a8cc9a95db0c5cd Mon Sep 17 00:00:00 2001 From: Quentin VIAL-GOUTEYRON Date: Tue, 5 Jul 2022 13:11:36 +0200 Subject: [PATCH 13/71] FIW : add missing thead on table --- htdocs/expedition/shipment.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 42b8630bd3c..15ffab13634 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -613,7 +613,7 @@ if ($id > 0 || !empty($ref)) { * Lines or orders with quantity shipped and remain to ship * Note: Qty shipped are already available into $object->expeditions[fk_product] */ - print ''; + print '
'; $sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,"; $sql .= " cd.price, cd.tva_tx, cd.subprice,"; @@ -635,18 +635,19 @@ if ($id > 0 || !empty($ref)) { if ($resql) { $num = $db->num_rows($resql); $i = 0; - + print ''; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if (!empty($conf->stock->enabled)) { - print ''; + print ''; } else { - print ''; + print ''; } print "\n"; + print ''; $toBeShipped = array(); $toBeShippedTotal = 0; From 4f091c439473f71f26a07a86b0bda4126b2e92dc Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Tue, 5 Jul 2022 17:11:02 +0200 Subject: [PATCH 14/71] Fix: PHP Fatal error: Call to undefined function getOnlineSignatureUrl() --- htdocs/core/actions_massactions.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index b98ce37d8f1..79d70727331 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -74,6 +74,7 @@ if (!$error && $massaction == 'confirm_presend') { $nbignored = 0; $langs->load("mails"); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; $listofobjectid = array(); $listofobjectthirdparties = array(); From f6b0710baf1df6825b1b28e951409597848cd7cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Jul 2022 20:59:42 +0200 Subject: [PATCH 15/71] FIX Can convert a partially closed down payment when close for bankcharge --- htdocs/comm/remx.php | 16 ++++++++-------- htdocs/compta/facture/card.php | 4 ++-- htdocs/compta/facture/class/facture.class.php | 7 +++++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 9322100f732..8ef737bc2eb 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -425,12 +425,12 @@ if ($socid > 0) { print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; @@ -563,12 +563,12 @@ if ($socid > 0) { print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; @@ -736,12 +736,12 @@ if ($socid > 0) { print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; @@ -896,12 +896,12 @@ if ($socid > 0) { print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; if (!empty($conf->multicurrency->enabled)) { - print ''; + print ''; } print ''; print ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index b31d65fdcaf..eb43da88a4b 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5439,9 +5439,9 @@ if ($action == 'create') { ) { print ''.$langs->trans('ConvertToReduc').''; } - // For deposit invoice + // For down payment invoice (deposit) if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > Facture::STATUS_DRAFT && empty($discount->id)) { - if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT')) { + if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT') || ($object->type == Facture::STATUS_ABANDONED && in_array($object->close_code, array('bankcharge', 'discount_vat', 'other')))) { // We can close a down payment only if paid amount is same than amount of down payment (by definition) print ''.$langs->trans('ConvertToReduc').''; } else { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 7164c4e547a..94184934d42 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -160,7 +160,7 @@ class Facture extends CommonInvoice public $revenuestamp; /** - * ! Closing after partial payment: discount_vat, badsupplier, abandon + * ! Closing after partial payment: discount_vat, badcustomer or badsupplier, bankcharge, other * ! Closing when no payment: replaced, abandoned * @var string Close code */ @@ -417,7 +417,10 @@ class Facture extends CommonInvoice const STATUS_ABANDONED = 3; const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandonned remain - escompte - const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned - bad + const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned remain - bad customer + const CLOSECODE_BANKCHARGE = 'bankcharge'; // Abandonned remain - bank charge + const CLOSECODE_OTHER = 'other'; // Abandonned remain - other + const CLOSECODE_ABANDONED = 'abandon'; // Abandonned - other const CLOSECODE_REPLACED = 'replaced'; // Closed after doing a replacement invoice From 76e3c10c06678c0a9567068d7b243d0c80731693 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Jul 2022 15:56:04 +0200 Subject: [PATCH 16/71] Revert "fix page titles" --- htdocs/comm/propal/card.php | 6 +----- htdocs/comm/propal/contact.php | 3 +-- htdocs/comm/propal/document.php | 2 +- htdocs/comm/propal/info.php | 2 +- htdocs/comm/propal/list.php | 5 +++-- htdocs/comm/propal/note.php | 3 +-- htdocs/commande/card.php | 6 +----- htdocs/commande/contact.php | 8 ++++---- htdocs/commande/document.php | 2 +- htdocs/commande/note.php | 2 +- htdocs/compta/bank/annuel.php | 9 +++++---- htdocs/compta/bank/bankentries_list.php | 2 +- htdocs/compta/bank/card.php | 11 +++++------ htdocs/compta/bank/document.php | 3 ++- htdocs/compta/bank/graph.php | 9 +++++---- htdocs/compta/bank/releve.php | 9 +++++---- htdocs/compta/bank/treso.php | 8 +++++--- htdocs/compta/bank/various_payment/card.php | 10 +++------- htdocs/compta/bank/various_payment/list.php | 2 +- htdocs/compta/facture/card.php | 6 ++---- htdocs/compta/facture/contact.php | 2 +- htdocs/compta/facture/document.php | 3 ++- htdocs/compta/facture/info.php | 2 +- htdocs/compta/facture/note.php | 2 +- htdocs/contact/list.php | 14 ++++++++------ htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/expedition/card.php | 6 +----- htdocs/expedition/shipment.php | 2 +- htdocs/fourn/commande/card.php | 5 +---- htdocs/fourn/commande/contact.php | 8 ++++---- htdocs/fourn/commande/dispatch.php | 3 +-- htdocs/fourn/commande/document.php | 2 +- htdocs/fourn/commande/info.php | 2 +- htdocs/fourn/commande/note.php | 2 +- htdocs/fourn/facture/card.php | 7 ++----- htdocs/fourn/facture/contact.php | 9 +++++---- htdocs/fourn/facture/document.php | 2 +- htdocs/fourn/facture/info.php | 13 ++++++++----- htdocs/fourn/facture/note.php | 2 +- htdocs/langs/en_US/suppliers.lang | 1 - htdocs/product/card.php | 17 ++++------------- htdocs/product/list.php | 10 ++++++---- htdocs/product/stock/card.php | 7 +------ htdocs/product/stock/movement_list.php | 16 ++++++---------- htdocs/projet/card.php | 1 - htdocs/projet/document.php | 2 +- htdocs/projet/info.php | 4 ++-- htdocs/projet/note.php | 2 +- htdocs/projet/tasks.php | 5 +---- htdocs/projet/tasks/contact.php | 13 ++++--------- htdocs/projet/tasks/document.php | 9 ++------- htdocs/projet/tasks/note.php | 11 +++-------- htdocs/projet/tasks/task.php | 14 ++++---------- htdocs/projet/tasks/time.php | 15 +++++---------- htdocs/societe/card.php | 4 +--- htdocs/societe/list.php | 2 +- htdocs/societe/paymentmodes.php | 2 +- htdocs/supplier_proposal/card.php | 7 ++----- htdocs/supplier_proposal/contact.php | 8 ++++---- htdocs/supplier_proposal/document.php | 2 +- htdocs/supplier_proposal/info.php | 11 +++++++---- htdocs/supplier_proposal/list.php | 6 +++--- htdocs/supplier_proposal/note.php | 8 ++++---- htdocs/user/agenda_extsites.php | 6 +----- htdocs/user/bank.php | 5 +---- htdocs/user/card.php | 9 +-------- htdocs/user/clicktodial.php | 8 ++++---- htdocs/user/document.php | 6 +----- htdocs/user/group/card.php | 7 +------ htdocs/user/group/ldap.php | 4 +--- htdocs/user/group/list.php | 4 ++-- htdocs/user/group/perms.php | 4 +--- htdocs/user/home.php | 5 ++--- htdocs/user/info.php | 5 +---- htdocs/user/ldap.php | 5 +---- htdocs/user/list.php | 4 ++-- htdocs/user/note.php | 8 +++----- htdocs/user/param_ihm.php | 5 +---- htdocs/user/perms.php | 5 +---- 79 files changed, 179 insertions(+), 284 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index a610925a70e..cbe2df19026 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1463,12 +1463,8 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } -$title = $object->ref." - ".$langs->trans('Card'); -if ($action == 'create') { - $title = $langs->trans("NewPropal"); -} +$title = $langs->trans('Proposal')." - ".$langs->trans('Card'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos|DE:Modul_Angebote'; - llxHeader('', $title, $help_url); $now = dol_now(); diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index ceb25175596..fedf6a6233d 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -118,9 +118,8 @@ elseif ($action == 'setaddress' && $user->rights->propale->creer) /* * View */ -$title = $object->ref." - ".$langs->trans('ContactsAddresses'); +$title = $langs->trans('Proposal')." - ".$langs->trans('ContactsAddresses'); $help_url = "EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos"; - llxHeader('', $title, $help_url); $form = new Form($db); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index b6fbb97cdf7..804fedd623b 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -104,7 +104,7 @@ if ($object->id > 0) { /* * View */ -$title = $object->ref." - ".$langs->trans('Documents'); +$title = $langs->trans('Proposal')." - ".$langs->trans('Documents'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; llxHeader('', $title, $help_url); diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 1782e39e2d2..dc43af9ceff 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -59,7 +59,7 @@ restrictedArea($user, 'propal', $object->id); $form = new Form($db); -$title = $object->ref." - ".$langs->trans('Info'); +$title = $langs->trans('Proposal')." - ".$langs->trans('Info'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; llxHeader('', $title, $help_url); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index fb135aa0205..e0eb8a23e3e 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -491,9 +491,8 @@ $companystatic = new Societe($db); $projectstatic = new Project($db); $formcompany = new FormCompany($db); -$title = $langs->trans('ListOfProposals'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; -llxHeader('', $title, $help_url); +//llxHeader('',$langs->trans('Proposal'),$help_url); $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) { @@ -751,6 +750,8 @@ if ($resql) { exit; } + llxHeader('', $langs->trans('Proposal'), $help_url); + $param = '&search_status='.urlencode($search_status); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 6aba2973975..13fa42edb29 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -81,9 +81,8 @@ if (empty($reshook)) { $form = new Form($db); -$title = $object->ref." - ".$langs->trans('Notes'); +$title = $langs->trans('Proposal')." - ".$langs->trans('Notes'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; - llxHeader('', $title, $help_url); if ($object->id > 0) { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 401622957c7..20bc5462d5e 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1428,12 +1428,8 @@ if (empty($reshook)) { * View */ -$title = $object->ref." - ".$langs->trans('Card'); -if ($action == 'create') { - $title = $langs->trans("NewOrder"); -} +$title = $langs->trans('Order')." - ".$langs->trans('Card'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; - llxHeader('', $title, $help_url); $form = new Form($db); diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index b3b1319fa76..a4d857a47fd 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -103,6 +103,10 @@ elseif ($action == 'setaddress' && $user->rights->commande->creer) /* * View */ +$title = $langs->trans('Order')." - ".$langs->trans('ContactsAddresses'); +$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; +llxHeader('', $title, $help_url); + $form = new Form($db); $formcompany = new FormCompany($db); $formother = new FormOther($db); @@ -120,10 +124,6 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); - $title = $object->ref." - ".$langs->trans('ContactsAddresses'); - $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; - llxHeader('', $title, $help_url); - $head = commande_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order'); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 0e96c21db97..684d8e61334 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -96,7 +96,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ -$title = $object->ref." - ".$langs->trans('Documents'); +$title = $langs->trans('Order')." - ".$langs->trans('Documents'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 961aec01fa4..55140c30ae2 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -77,7 +77,7 @@ if (empty($reshook)) { /* * View */ -$title = $object->ref." - ".$langs->trans('Notes'); +$title = $langs->trans('Order')." - ".$langs->trans('Notes'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index e1d0f7b8382..36a9d17315a 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -60,6 +60,11 @@ if (!$year_start) { /* * View */ + +$title = $langs->trans("FinancialAccount").' - '.$langs->trans("IOMonthlyReporting"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + $form = new Form($db); // Get account informations @@ -73,10 +78,6 @@ if (!empty($ref)) { $id = $object->id; } -$title = $object->ref.' - '.$langs->trans("IOMonthlyReporting"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - // Ce rapport de tresorerie est base sur llx_bank (car doit inclure les transactions sans facture) // plutot que sur llx_paiement + llx_paiementfourn diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 5c4d7824a82..421080951f2 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -506,7 +506,7 @@ $buttonreconcile = ''; $morehtmlref = ''; if ($id > 0 || !empty($ref)) { - $title = $object->ref.' - '.$langs->trans("Transactions"); + $title = $langs->trans("FinancialAccount").' - '.$langs->trans("Transactions"); $helpurl = ""; llxHeader('', $title, $helpurl); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index cbf7b75a3b3..5c91a9f504d 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -329,16 +329,18 @@ if (!empty($conf->accounting->enabled)) { $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; +$title = $langs->trans("FinancialAccount")." - ".$langs->trans("Card"); + $help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas|DE:Modul_Banken_und_Barbestände'; +llxHeader("", $title, $help_url); + + // Creation if ($action == 'create') { $object = new Account($db); - $title = $langs->trans("NewFinancialAccount"); - llxHeader("", $title, $help_url); - print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'bank_account'); if ($conf->use_javascript_ajax) { @@ -603,9 +605,6 @@ if ($action == 'create') { $_GET["id"] = $object->id; } - $title = $object->ref." - ".$langs->trans("Card"); - llxHeader("", $title, $help_url); - // Show tabs $head = bank_prepare_head($object); print dol_get_fiche_head($head, 'bankname', $langs->trans("FinancialAccount"), -1, 'account'); diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 91f514948a6..78d45beadf3 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -93,7 +93,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; * View */ -$title = $object->ref.' - '.$langs->trans("Documents"); +$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents"); + $help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; llxHeader("", $title, $help_url); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 119266b7901..4c0efec57d2 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -55,6 +55,11 @@ $error = 0; /* * View */ + +$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Graph"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + $form = new Form($db); $datetime = dol_now(); @@ -78,10 +83,6 @@ if (GETPOST("ref")) { $account = $object->id; } -$title = $object->ref.' - '.$langs->trans("Graph"); -$helpurl = ""; -llxHeader('', $title, $helpurl); - $result = dol_mkdir($conf->bank->dir_temp); if ($result < 0) { $langs->load("errors"); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 624830dfb1d..2385f2210a5 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -194,6 +194,11 @@ if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($n /* * View */ + +$title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + $form = new Form($db); $societestatic = new Societe($db); $chargestatic = new ChargeSociales($db); @@ -245,10 +250,6 @@ if (empty($numref)) { $numrows = $db->num_rows($result); $i = 0; - $title = $object->ref.' - '.$langs->trans("AccountStatements"); - $helpurl = ""; - llxHeader('', $title, $helpurl); - // Onglets $head = bank_prepare_head($object); print dol_get_fiche_head($head, 'statement', $langs->trans("FinancialAccount"), 0, 'account'); diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 94711d1cfe9..98a51947c0e 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -57,6 +57,11 @@ $hookmanager->initHooks(array('banktreso', 'globalcard')); /* * View */ + +$title = $langs->trans("FinancialAccount").' - '.$langs->trans("PlannedTransactions"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + $societestatic = new Societe($db); $facturestatic = new Facture($db); $facturefournstatic = new FactureFournisseur($db); @@ -80,9 +85,6 @@ if (GETPOST("account") || GETPOST("ref")) { $_GET["account"] = $object->id; } - $title = $object->ref.' - '.$langs->trans("PlannedTransactions"); - $helpurl = ""; - llxHeader('', $title, $helpurl); // Onglets $head = bank_prepare_head($object); diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 254507db375..ab4b24e3889 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -304,6 +304,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->banque->m /* * View */ + +llxHeader("", $langs->trans("VariousPayment")); + $form = new Form($db); if (!empty($conf->accounting->enabled)) { $formaccounting = new FormAccounting($db); @@ -321,13 +324,6 @@ if ($id) { } } -$title = $object->ref." - ".$langs->trans('Card'); -if ($action == 'create') { - $title = $langs->trans("NewVariousPayment"); -} -$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen'; -llxHeader('', $title, $help_url); - $options = array(); // Load bank groups diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 7831a1b7ba0..bbec4f23fc6 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -290,7 +290,7 @@ if ($result) { } // must be place behind the last "header(...)" call - llxHeader('', $langs->trans("VariousPayments")); + llxHeader(); $i = 0; $total = 0; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 464b5aa879b..eb43da88a4b 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2840,10 +2840,8 @@ if (!empty($conf->projet->enabled)) { $now = dol_now(); -$title = $object->ref." - ".$langs->trans('Card'); -if ($action == 'create') { - $title = $langs->trans("NewBill"); -} +$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Card'); + $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 35e49518231..43897172779 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -100,7 +100,7 @@ if ($action == 'addcontact' && $user->rights->facture->creer) { * View */ -$title = $object->ref." - ".$langs->trans('ContactsAddresses'); +$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('ContactsAddresses'); $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $helpurl); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index aa781610a70..6eb05a16922 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -100,7 +100,8 @@ if (empty($object->id)) { exit; } -$title = $object->ref." - ".$langs->trans('Documents'); +$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents'); + $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 1c462d60ef2..60efaf36e3d 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -65,7 +65,7 @@ $result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', $field $form = new Form($db); -$title = $object->ref." - ".$langs->trans('Info'); +$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info'); $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $help_url); diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 199ffce653d..6f699774d32 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -85,7 +85,7 @@ if (empty($object->id)) { exit; } -$title = $object->ref." - ".$langs->trans('Notes'); +$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes'); $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $helpurl); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 95c298f7244..66561730829 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -132,31 +132,31 @@ if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('b } $offset = $limit * $page; -$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); +$titre = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); if ($type == "p") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactprospectlist'; } - $title .= ' ('.$langs->trans("ThirdPartyProspects").')'; + $titre .= ' ('.$langs->trans("ThirdPartyProspects").')'; $urlfiche = "card.php"; } if ($type == "c") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactcustomerlist'; } - $title .= ' ('.$langs->trans("ThirdPartyCustomers").')'; + $titre .= ' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche = "card.php"; } elseif ($type == "f") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactsupplierlist'; } - $title .= ' ('.$langs->trans("ThirdPartySuppliers").')'; + $titre .= ' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche = "card.php"; } elseif ($type == "o") { if (empty($contextpage) || $contextpage == 'contactlist') { $contextpage = 'contactotherlist'; } - $title .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; + $titre .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; $urlfiche = ""; } @@ -345,6 +345,8 @@ if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES) $contactstatic->loadCacheOfProspStatus(); } +$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); + // Select every potentiels, and note each potentiels which fit in search parameters $tab_level = array(); $sql = "SELECT code, label, sortorder"; @@ -707,7 +709,7 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "Information"; $modelmail = "contact"; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index b4cac4a82a0..accbd84ba8c 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -211,7 +211,7 @@ function group_prepare_head($object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/user/group/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("Card"); + $head[$h][1] = $langs->trans("GroupCard"); $head[$h][2] = 'group'; $h++; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 89678ad95dc..03595b022a5 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -803,13 +803,9 @@ if (empty($reshook)) { * View */ -$title = $langs->trans("Shipment"); -if ($action == 'create2') { - $title = $langs->trans("CreateShipment"); -} $help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen'; -llxHeader('', $title, 'Expedition', $help_url); +llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url); if (empty($action)) { $action = 'view'; diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index cea7c59fdc6..bfa48e9aa0f 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -232,7 +232,7 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } -$title = $object->ref." - ".$langs->trans('Shipments'); +$title = $langs->trans('Order')." - ".$langs->trans('Shipments'); $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index f1e02f203e7..35e5257fce0 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1529,10 +1529,7 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } -$title = $object->ref." - ".$langs->trans('Card'); -if ($action == 'create') { - $title = $langs->trans("NewOrderSupplier"); -} +$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Card'); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index d3477503e4e..e521caf1080 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -99,6 +99,10 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $ /* * View */ +$title = $langs->trans('SupplierOrder')." - ".$langs->trans('ContactsAddresses'); +$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; +llxHeader('', $title, $help_url); + $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); @@ -117,10 +121,6 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); - $title = $object->ref." - ".$langs->trans('ContactsAddresses'); - $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; - llxHeader('', $title, $help_url); - $head = ordersupplier_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("SupplierOrder"), -1, 'order'); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 52f4c37d8a1..a1ddef959a0 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -505,11 +505,10 @@ $formproduct = new FormProduct($db); $warehouse_static = new Entrepot($db); $supplierorderdispatch = new CommandeFournisseurDispatch($db); -$title = $object->ref." - ".$langs->trans('OrderDispatch'); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; $morejs = array('/fourn/js/lib_dispatch.js.php'); -llxHeader('', $title, $help_url, '', 0, 0, $morejs); +llxHeader('', $langs->trans("OrderDispatch"), $help_url, '', 0, 0, $morejs); if ($id > 0 || !empty($ref)) { $soc = new Societe($db); diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index 64e4d1c8b24..d54d5553efb 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -98,7 +98,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); -$title = $object->ref." - ".$langs->trans('Documents'); +$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Documents'); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index dfa5d10a2f6..6c64672ee84 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -113,7 +113,7 @@ if ($id > 0 || !empty($ref)) { $object->info($object->id); } -$title = $object->ref.' - '.$langs->trans('Info').' - '.$object->ref.' '.$object->name; +$title = $langs->trans("SupplierOrder").' - '.$langs->trans('Info').' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); } diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index d32ee8e0641..1c67c03d727 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -69,7 +69,7 @@ if (empty($reshook)) { /* * View */ -$title = $object->ref." - ".$langs->trans('Notes'); +$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Notes'); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 654fcce3f60..71c7a4beaf5 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1831,10 +1831,7 @@ if (!empty($conf->projet->enabled)) { $now = dol_now(); -$title = $object->ref." - ".$langs->trans('Card'); -if ($action == 'create') { - $title = $langs->trans("NewSupplierInvoice"); -} +$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Card'); $help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen'; llxHeader('', $title, $help_url); @@ -1842,7 +1839,7 @@ llxHeader('', $title, $help_url); if ($action == 'create') { $facturestatic = new FactureFournisseur($db); - print load_fiche_titre($langs->trans('NewSupplierInvoice'), '', 'supplier_invoice'); + print load_fiche_titre($langs->trans('NewBill'), '', 'supplier_invoice'); dol_htmloutput_events(); diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index a3b4fba9502..927cc5f36b9 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -98,6 +98,11 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->facture->creer || $u /* * View */ + +$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('ContactsAddresses'); +$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; +llxHeader('', $title, $helpurl); + $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); @@ -116,10 +121,6 @@ if ($id > 0 || !empty($ref)) { $alreadypaid = $object->getSommePaiement(); - $title = $object->ref." - ".$langs->trans('ContactsAddresses'); - $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; - llxHeader('', $title, $helpurl); - $head = facturefourn_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 959a1d4020c..34255541c01 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -93,7 +93,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); -$title = $object->ref." - ".$langs->trans('Documents'); +$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Documents'); $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; llxHeader('', $title, $helpurl); diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index e9c4d2ea0fa..f17d3c3e127 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -53,15 +53,18 @@ $object = new FactureFournisseur($db); */ $form = new Form($db); -$object->fetch($id, $ref); -$object->fetch_thirdparty(); -$object->info($object->id); -$alreadypaid = $object->getSommePaiement(); -$title = $object->ref." - ".$langs->trans('Info'); +$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Info'); $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; llxHeader('', $title, $helpurl); +$object->fetch($id, $ref); +$object->fetch_thirdparty(); + +$object->info($object->id); + +$alreadypaid = $object->getSommePaiement(); + $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index 97f4d4562b3..d59aefe7831 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -83,7 +83,7 @@ if ($action == 'setlabel' && ($user->rights->fournisseur->facture->creer || $use $form = new Form($db); -$title = $object->ref." - ".$langs->trans('Notes'); +$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Notes'); $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; llxHeader('', $title, $helpurl); diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index cd75cfba57e..ca9ee174d29 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -4,7 +4,6 @@ SuppliersInvoice=Vendor invoice SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor -NewSupplierInvoice = New vendor invoice History=History ListOfSuppliers=List of vendors ShowSupplier=Show vendor diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 292d1a59abe..49c70b05641 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1022,24 +1022,15 @@ if (!empty($conf->accounting->enabled)) { $title = $langs->trans('ProductServiceCard'); - $help_url = ''; $shortlabel = dol_trunc($object->label, 16); if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { - if ($action == 'create') { - $title = $langs->trans("NewProduct"); - } else { - $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); - $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos|DE:Modul_Produkte'; - } + $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos|DE:Modul_Produkte'; } if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { - if ($action == 'create') { - $title = $langs->trans("NewService"); - } else { - $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); - $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen'; - } + $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen'; } llxHeader('', $title, $help_url); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 0315922ca28..942a76585cc 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -381,14 +381,16 @@ if (empty($reshook)) { * View */ -$title = $langs->trans("ListOfProductsAndServices"); +$title = $langs->trans("ProductsAndServices"); if ($search_type != '' && $search_type != '-1') { if ($search_type == 1) { - $title = $langs->trans("ListOfServices"); + $texte = $langs->trans("Services"); } else { - $title = $langs->trans("ListOfProducts"); + $texte = $langs->trans("Products"); } +} else { + $texte = $langs->trans("ProductsAndServices"); } $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity,'; @@ -781,7 +783,7 @@ if ($resql) { $picto = 'service'; } - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "Information"; $modelmail = "product"; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index de58f033737..8389d63e843 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -279,13 +279,8 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } -$title = $langs->trans("WarehouseCard"); -if ($action == 'create') { - $title = $langs->trans("NewWarehouse"); -} - $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; -llxHeader("", $title, $help_url); +llxHeader("", $langs->trans("WarehouseCard"), $help_url); if ($action == 'create') { diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 416843aca50..f5d74c47c8e 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -630,18 +630,14 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); $i = 0; $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; if ($msid) { - $title = $langs->trans('StockMovementForId', $msid); + $texte = $langs->trans('StockMovementForId', $msid); } else { - $title = $langs->trans("ListOfStockMovements"); + $texte = $langs->trans("ListOfStockMovements"); if ($id) { - if (!empty($object->ref)) { - $title .= ' ('.$object->ref.')'; - } else { - $title .= ' ('.$langs->trans("ForThisWarehouse").')'; - } + $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; } } -llxHeader("", $title, $help_url); +llxHeader("", $texte, $help_url); /* * Show tab only if we ask a particular warehouse @@ -901,9 +897,9 @@ if ($id > 0) { } if ($id > 0) { - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); } else { - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); } // Add code for pre mass action (confirmation or email presend form) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 0e8b5fd4380..da45abb6168 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -477,7 +477,6 @@ $title = $langs->trans("Project").' - '.$object->ref.(!empty($object->thirdparty if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE)) { $title = $object->ref.(!empty($object->thirdparty->name) ? ' - '.$object->thirdparty->name : '').(!empty($object->title) ? ' - '.$object->title : ''); } - $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos|DE:Modul_Projekte"; llxHeader("", $title, $help_url); diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 2b5f38dbf02..9e8d3a6ce8e 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -96,7 +96,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; * View */ -$title = $langs->trans('Documents').' - '.$object->ref.' '.$object->name; +$title = $langs->trans('Project').' - '.$langs->trans('Document').' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans('Document'); } diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index 7b8d9528cc3..c0afe5d1370 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -107,8 +107,8 @@ if ($id > 0 || !empty($ref)) { } $object->info($object->id); } -$agenda = (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) ? '/'.$langs->trans("Agenda") : ''; -$title = $langs->trans('Events').$agenda.' - '.$object->ref.' '.$object->name; + +$title = $langs->trans("Project").' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); } diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 3eed5e14c60..2ee52d3a247 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -69,7 +69,7 @@ if (empty($reshook)) { * View */ -$title = $langs->trans("Notes").' - '.$object->ref.' '.$object->name; +$title = $langs->trans("Project").' - '.$langs->trans("Note").' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Note"); } diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 49943b79434..64d134a7254 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -404,13 +404,10 @@ $projectstatic = new Project($db); $taskstatic = new Task($db); $userstatic = new User($db); -$title = $langs->trans("Tasks").' - '.$object->ref.' '.$object->name; +$title = $langs->trans("Project").' - '.$langs->trans("Tasks").' - '.$object->ref.' '.$object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref.' '.$object->name.' - '.$langs->trans("Tasks"); } -if ($action == 'create') { - $title = $langs->trans("NewTask"); -} $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; llxHeader("", $title, $help_url); diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 962c9853360..0b26161c28c 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -140,19 +140,13 @@ if (!empty($project_ref) && !empty($withproject)) { /* * View */ + +llxHeader('', $langs->trans("Task")); + $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); $userstatic = new User($db); -$result = $projectstatic->fetch($object->fk_project); - -$title = $object->ref . ' - ' . $langs->trans("Contacts"); -if (!empty($withproject)) { - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; -} -$help_url = ''; - -llxHeader('', $title, $help_url); /* *************************************************************************** */ @@ -168,6 +162,7 @@ if ($id > 0 || !empty($ref)) { } $id = $object->id; // So when doing a search from ref, id is also set correctly. + $result = $projectstatic->fetch($object->fk_project); if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { $projectstatic->fetchComments(); } diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 77d52fd547f..c57610d0130 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -119,15 +119,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ + $form = new Form($db); -$title = $object->ref . ' - ' . $langs->trans("Documents"); -if (!empty($withproject)) { - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; -} -$help_url = ''; - -llxHeader('', $title, $help_url); +llxHeader('', $langs->trans('Task')); if ($object->id > 0) { $projectstatic->fetch_thirdparty(); diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index ad6a7c6d03c..3d1ec610b48 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -110,19 +110,14 @@ if (empty($reshook)) { /* * View */ + +llxHeader('', $langs->trans("Task")); + $form = new Form($db); $userstatic = new User($db); $now = dol_now(); -$title = $object->ref . ' - ' . $langs->trans("Notes"); -if (!empty($withproject)) { - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; -} -$help_url = ''; - -llxHeader('', $title, $help_url); - if ($object->id > 0) { $userWrite = $projectstatic->restrictedProjectArea($user, 'write'); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 20cb27eb002..f163af75cae 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -191,18 +191,12 @@ if ($action == 'remove_file' && $user->rights->projet->creer) { /* * View */ + +llxHeader('', $langs->trans("Task")); + $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); -$result = $projectstatic->fetch($object->fk_project); - -$title = $object->ref; -if (!empty($withproject)) { - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; -} -$help_url = ''; - -llxHeader('', $title, $help_url); if ($id > 0 || !empty($ref)) { $res = $object->fetch_optionals(); @@ -210,7 +204,7 @@ if ($id > 0 || !empty($ref)) { $object->fetchComments(); } - + $result = $projectstatic->fetch($object->fk_project); if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { $projectstatic->fetchComments(); } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index ef7f98107db..ef8ac6aa9df 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -699,20 +699,15 @@ if ($action == 'confirm_generateinter') { /* * View */ + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +llxHeader("", $langs->trans("Task")); + $form = new Form($db); $formother = new FormOther($db); $formproject = new FormProjets($db); $userstatic = new User($db); -//$result = $projectstatic->fetch($object->fk_project); -$arrayofselected = is_array($toselect) ? $toselect : array(); - -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); -if (!empty($withproject)) { - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '') ; -} -$help_url = ''; - -llxHeader('', $title, $help_url); if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser > 0) { /* diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 8edf9567c79..3ef501aeac6 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -943,12 +943,10 @@ if ($socid > 0 && empty($object->id)) { } $title = $langs->trans("ThirdParty"); -if ($action == 'create') { - $title = $langs->trans("NewThirdParty"); -} if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->name." - ".$langs->trans('Card'); } + $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas|DE:Modul_Geschäftspartner'; llxHeader('', $title, $help_url); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index a7e6d836218..80b0142a572 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -721,7 +721,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ( } $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $title, $help_url); +llxHeader('', $langs->trans("ThirdParty"), $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 2d2e9c16ac7..dedb1ad445d 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -681,7 +681,7 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $title = $object->name." - ".$langs->trans('PaymentInformation'); } -llxHeader('', $title, $help_url); +llxHeader(); $head = societe_prepare_head($object); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 9a54edadcd0..56eef9fb632 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1063,10 +1063,7 @@ if (empty($reshook)) { /* * View */ -$title = $object->ref." - ".$langs->trans('Card'); -if ($action == 'create') { - $title = $langs->trans("SupplierProposalNew"); -} +$title = $langs->trans('CommRequest')." - ".$langs->trans('Card'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; llxHeader('', $title, $help_url); @@ -1085,7 +1082,7 @@ $now = dol_now(); if ($action == 'create') { $currency_code = $conf->currency; - print load_fiche_titre($langs->trans("SupplierProposalNew"), '', 'supplier_proposal'); + print load_fiche_titre($langs->trans("NewAskPrice"), '', 'supplier_proposal'); $soc = new Societe($db); if ($socid > 0) { diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index b6a11e9ba17..f1756f17814 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -98,6 +98,10 @@ if ($action == 'addcontact' && $permissiontoedit) { /* * View */ +$title = $langs->trans('CommRequest')." - ".$langs->trans('ContactsAddresses'); +$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; +llxHeader('', $title, $help_url); + $form = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); @@ -116,10 +120,6 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); - $title = $object->ref." - ".$langs->trans('ContactsAddresses'); - $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; - llxHeader('', $title, $help_url); - $head = supplier_proposal_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("CommRequest"), -1, 'supplier_proposal'); diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index ad4050a6eb4..fa73ec22fa8 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -90,7 +90,7 @@ if ($object->id > 0) { * View */ -$title = $object->ref." - ".$langs->trans('Documents'); +$title = $langs->trans('CommRequest')." - ".$langs->trans('Documents'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; llxHeader('', $title, $help_url); diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index bda854cba23..0b796937d2e 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -48,15 +48,18 @@ $result = restrictedArea($user, 'supplier_proposal', $id); /* * View */ + $form = new Form($db); + +$title = $langs->trans('CommRequest')." - ".$langs->trans('Info'); +$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; +llxHeader('', $title, $help_url); + $object = new SupplierProposal($db); $object->fetch($id); $object->fetch_thirdparty(); -$object->info($object->id); -$title = $object->ref." - ".$langs->trans('Info'); -$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; -llxHeader('', $title, $help_url); +$object->info($object->id); $head = supplier_proposal_prepare_head($object); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index b13a63ed661..ad35c8f9914 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -285,10 +285,8 @@ $formpropal = new FormPropal($db); $companystatic = new Societe($db); $formcompany = new FormCompany($db); -$title = $langs->trans('ListOfSupplierProposals'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; - -llxHeader('', $title, $help_url); +//llxHeader('',$langs->trans('CommRequest'),$help_url); $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) { @@ -469,6 +467,8 @@ if ($resql) { exit; } + llxHeader('', $langs->trans('CommRequest'), $help_url); + $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index dface2f68c5..5a19a94b402 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -72,6 +72,10 @@ if (empty($reshook)) { /* * View */ +$title = $langs->trans('CommRequest')." - ".$langs->trans('Notes'); +$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; +llxHeader('', $title, $help_url); + $form = new Form($db); if ($id > 0 || !empty($ref)) { @@ -84,10 +88,6 @@ if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref)) { $object->fetch_thirdparty(); - $title = $object->ref." - ".$langs->trans('Notes'); - $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; - llxHeader('', $title, $help_url); - $societe = new Societe($db); if ($societe->fetch($object->socid)) { $head = supplier_proposal_prepare_head($object); diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 09b31e54cd0..5921f7d84cd 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -148,11 +148,7 @@ $formother = new FormOther($db); $arrayofjs = array(); $arrayofcss = array(); -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('ExtSites'); -$help_url = ''; - -llxHeader('', $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss); +llxHeader('', $langs->trans("UserSetup"), '', '', 0, 0, $arrayofjs, $arrayofcss); print ''; diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index eb17903c597..59f593f5b74 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -259,10 +259,7 @@ $form = new Form($db); $childids = $user->getAllChildIds(1); -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('BankAccounts'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader(null, $langs->trans("BankAccounts")); $head = user_prepare_head($object); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index a1cb7b5c996..f789023b8d4 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -716,12 +716,9 @@ if (!empty($conf->stock->enabled)) { $formproduct = new FormProduct($db); } -$help_url = ''; +llxHeader('', $langs->trans("UserCard")); if ($action == 'create' || $action == 'adduserldap') { - $title = $langs->trans("NewUser"); - llxHeader('', $title, $help_url); - print load_fiche_titre($langs->trans("NewUser"), '', 'user'); print ''.$langs->trans("CreateInternalUserDesc")."
\n"; @@ -1339,10 +1336,6 @@ if ($action == 'create' || $action == 'adduserldap') { } } - $person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; - $title = $person_name." - ".$langs->trans('Card'); - llxHeader('', $title, $help_url); - // Show tabs if ($mode == 'employee') { // For HRM module development $title = $langs->trans("Employee"); diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 9e203db4904..2207e3358ae 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -74,18 +74,18 @@ if (empty($reshook)) { /* * View */ + $form = new Form($db); +llxHeader("", "ClickToDial"); + + if ($id > 0) { $object = new User($db); $object->fetch($id, '', '', 1); $object->getrights(); $object->fetch_clicktodial(); - $person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; - $title = $person_name." - ".$langs->trans('ClickToDial'); - $help_url = ''; - llxHeader('', $title, $help_url); $head = user_prepare_head($object); diff --git a/htdocs/user/document.php b/htdocs/user/document.php index d33175af8c5..142c44d85fe 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -129,11 +129,7 @@ if (empty($reshook)) { $form = new Form($db); - -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('Documents'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader('', $langs->trans("UserCard").' - '.$langs->trans("Files")); if ($object->id) { /* diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 7e61fc150b2..f698d1b5a07 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -246,13 +246,8 @@ if (empty($reshook)) { /* * View */ -$title = $object->name.' - '.$langs->trans("Card"); -if ($action == 'create') { - $title = $langs->trans("NewGroup"); -} - -llxHeader('', $title, $help_url); +llxHeader('', $langs->trans("GroupCard")); $form = new Form($db); $fuserstatic = new User($db); diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index 0c73b07807e..af28b979225 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -92,9 +92,7 @@ if ($action == 'dolibarr2ldap') { $form = new Form($db); -$title = $object->name." - ".$langs->trans('LDAP'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader(); $head = group_prepare_head($object); diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index 58d009a7c26..04fa0035418 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -120,8 +120,8 @@ if (empty($reshook)) { /* * View */ -$title = $langs->trans("ListOfGroups"); -llxHeader('', $title, $help_url); + +llxHeader(); $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms as datem, COUNT(DISTINCT ugu.fk_user) as nb, COUNT(DISTINCT ugr.fk_id) as nbpermissions"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index b959c124a5f..478e345f2e3 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -128,9 +128,7 @@ if (empty($reshook)) { $form = new Form($db); -$title = $object->name." - ".$langs->trans('Permissions'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader('', $langs->trans("Permissions")); if ($object->id > 0) { $head = group_prepare_head($object); diff --git a/htdocs/user/home.php b/htdocs/user/home.php index b79476e7d5c..c8dbdf2c1b8 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -75,9 +75,8 @@ if (GETPOST('addbox')) { /* * View */ -$title = $langs->trans("MenuUsersAndGroups"); -$help_url = ''; -llxHeader('', $title, $help_url); + +llxHeader(); print load_fiche_titre($langs->trans("MenuUsersAndGroups"), $resultboxes['selectboxlist'], 'user'); diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 6104df6f996..f6a0c731e14 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -62,10 +62,7 @@ if (($object->id != $user->id) && (!$user->rights->user->user->lire)) { $form = new Form($db); -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('Info'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader(); $head = user_prepare_head($object); diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 8a8ca28092e..5e6cf57bfd4 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -89,10 +89,7 @@ if (empty($reshook)) { $form = new Form($db); -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('LDAP'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader(); $head = user_prepare_head($object); diff --git a/htdocs/user/list.php b/htdocs/user/list.php index a01394604de..cd87e286225 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -473,8 +473,8 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ // Output page // -------------------------------------------------------------------- -$title = $langs->trans("ListOfUsers"); -llxHeader('', $title, $help_url); + +llxHeader('', $langs->trans("ListOfUsers"), $help_url); $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { diff --git a/htdocs/user/note.php b/htdocs/user/note.php index a8e01536408..1cf1f112df4 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -84,12 +84,10 @@ if (empty($reshook)) { /* * View */ -$form = new Form($db); -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('Notes'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader(); + +$form = new Form($db); if ($id) { $head = user_prepare_head($object); diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 3bed57c38bc..bb1320ecd0b 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -178,11 +178,8 @@ if (empty($reshook)) { /* * View */ -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('Card'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader(); // List of possible landing pages $tmparray = array('index.php'=>'Dashboard'); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 0fd3ee23ebb..6e28a77b5bc 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -143,10 +143,7 @@ if (empty($reshook)) { $form = new Form($db); -$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; -$title = $person_name." - ".$langs->trans('Permissions'); -$help_url = ''; -llxHeader('', $title, $help_url); +llxHeader('', $langs->trans("Permissions")); $head = user_prepare_head($object); From db863e4db68d1829c5f0f241888564c02fefe6bf Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 6 Jul 2022 17:58:01 +0200 Subject: [PATCH 17/71] FIX count elements in invoice list (Issue #21444) --- htdocs/compta/facture/list.php | 110 ++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f2cc5943e7a..5456c8bb0a7 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -480,42 +480,47 @@ $facturestatic = new Facture($db); $formcompany = new FormCompany($db); $companystatic = new Societe($db); -$sql = 'SELECT'; +$sql_select = "SELECT"; +$sql_select_count = "SELECT COUNT(f.rowid)"; if ($sall || $search_product_category > 0 || $search_user > 0) { - $sql = 'SELECT DISTINCT'; + $sql_select .= " DISTINCT"; + $sql_select_count = "SELECT COUNT(DISTINCT f.rowid)"; } -$sql .= ' f.rowid as id, f.ref, f.ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; -$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,'; -$sql .= ' f.fk_user_author,'; -$sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,'; -$sql .= ' f.datef, f.date_valid, f.date_lim_reglement as datelimite, f.module_source, f.pos_source,'; -$sql .= ' f.paye as paye, f.fk_statut, f.close_code,'; -$sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; -$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; -$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, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; -$sql .= ' typent.code as typent_code,'; -$sql .= ' state.code_departement as state_code, state.nom as state_name,'; -$sql .= ' country.code as country_code,'; -$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,'; -$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender'; +$sql_select_count .= " as nbtotalofrecords"; +$sql_fields = ""; +$sql_fields .= ' f.rowid as id, f.ref, f.ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; +$sql_fields .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,'; +$sql_fields .= ' f.fk_user_author,'; +$sql_fields .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,'; +$sql_fields .= ' f.datef, f.date_valid, f.date_lim_reglement as datelimite, f.module_source, f.pos_source,'; +$sql_fields .= ' f.paye as paye, f.fk_statut, f.close_code,'; +$sql_fields .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; +$sql_fields .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; +$sql_fields .= ' 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, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; +$sql_fields .= ' typent.code as typent_code,'; +$sql_fields .= ' state.code_departement as state_code, state.nom as state_name,'; +$sql_fields .= ' country.code as country_code,'; +$sql_fields .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,'; +$sql_fields .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender'; // We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0) // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. if (!$sall) { - $sql .= ', SUM(pf.amount) as dynamount_payed, SUM(pf.multicurrency_amount) as multicurrency_dynamount_payed'; + $sql_fields .= ', SUM(pf.amount) as dynamount_payed, SUM(pf.multicurrency_amount) as multicurrency_dynamount_payed'; } if ($search_categ_cus && $search_categ_cus!=-1) { - $sql .= ", cc.fk_categorie, cc.fk_soc"; + $sql_fields .= ", cc.fk_categorie, cc.fk_soc"; } // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + $sql_fields .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); } } // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook -$sql .= $hookmanager->resPrint; +$sql_fields .= $hookmanager->resPrint; +$sql = ""; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; @@ -710,50 +715,53 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; +$sql_group_by = ""; if (!$sall) { - $sql .= ' GROUP BY f.rowid, f.ref, ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; - $sql .= ' f.localtax1, f.localtax2,'; - $sql .= ' f.datef, f.date_valid, f.date_lim_reglement, f.module_source, f.pos_source,'; - $sql .= ' f.paye, f.fk_statut, f.close_code,'; - $sql .= ' f.datec, f.tms, f.date_closing,'; - $sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; - $sql .= ' f.fk_user_author, f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht,'; - $sql .= ' f.multicurrency_total_tva, f.multicurrency_total_ttc,'; - $sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; - $sql .= ' typent.code,'; - $sql .= ' state.code_departement, state.nom,'; - $sql .= ' country.code,'; - $sql .= " p.rowid, p.ref, p.title,"; - $sql .= " u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender"; + $sql_group_by .= ' GROUP BY f.rowid, f.ref, ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; + $sql_group_by .= ' f.localtax1, f.localtax2,'; + $sql_group_by .= ' f.datef, f.date_valid, f.date_lim_reglement, f.module_source, f.pos_source,'; + $sql_group_by .= ' f.paye, f.fk_statut, f.close_code,'; + $sql_group_by .= ' f.datec, f.tms, f.date_closing,'; + $sql_group_by .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; + $sql_group_by .= ' f.fk_user_author, f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht,'; + $sql_group_by .= ' f.multicurrency_total_tva, f.multicurrency_total_ttc,'; + $sql_group_by .= ' s.rowid, s.nom, s.name_alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; + $sql_group_by .= ' typent.code,'; + $sql_group_by .= ' state.code_departement, state.nom,'; + $sql_group_by .= ' country.code,'; + $sql_group_by .= " p.rowid, p.ref, p.title,"; + $sql_group_by .= " u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender"; if ($search_categ_cus && $search_categ_cus!=-1) { - $sql .= ", cc.fk_categorie, cc.fk_soc"; + $sql_group_by .= ", cc.fk_categorie, cc.fk_soc"; } // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); + $sql_group_by .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); } } // Add GroupBy from hooks $parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall); $reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook - $sql .= $hookmanager->resPrint; + $sql_group_by .= $hookmanager->resPrint; } else { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } // Add HAVING from hooks +$sql_having = ""; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook -$sql .= !empty($hookmanager->resPrint) ? (' HAVING 1=1 ' . $hookmanager->resPrint) : ''; +$sql_having .= !empty($hookmanager->resPrint) ? (' HAVING 1=1 ' . $hookmanager->resPrint) : ''; -$sql .= ' ORDER BY '; +$sql_order = ""; +$sql_order .= ' ORDER BY '; $listfield = explode(',', $sortfield); $listorder = explode(',', $sortorder); foreach ($listfield as $key => $value) { - $sql .= $listfield[$key].' '.($listorder[$key] ? $listorder[$key] : 'DESC').','; + $sql_order .= $listfield[$key].' '.($listorder[$key] ? $listorder[$key] : 'DESC').','; } -$sql .= ' f.rowid DESC '; +$sql_order .= ' f.rowid DESC '; $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { @@ -762,13 +770,14 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $db->num_rows($result); */ /* The fast and low memory method to get and count full list converts the sql into a sql count */ - if ($sall || $search_product_category > 0 || $search_user > 0) { - $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql); - } else { - $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(f.rowid) as nbtotalofrecords FROM', $sql); - $sqlforcount = preg_replace('/LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid/', '', $sqlforcount); - } - $sqlforcount = preg_replace('/GROUP BY.*$/', '', $sqlforcount); + //if ($sall || $search_product_category > 0 || $search_user > 0) { + // $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql); + //} else { + // $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(f.rowid) as nbtotalofrecords FROM', $sql); + // $sqlforcount = preg_replace('/LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid/', '', $sqlforcount); + //} + //$sqlforcount = preg_replace('/GROUP BY.*$/', '', $sqlforcount); + $sqlforcount = $sql_select_count . $sql .$sql_having . $sql_order; $resql = $db->query($sqlforcount); $objforcount = $db->fetch_object($resql); @@ -781,6 +790,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $db->free($resql); } +$sql = $sql_select . $sql_fields . $sql . $sql_group_by . $sql_having . $sql_order; $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -888,10 +898,10 @@ if ($resql) { $param .= '&search_type='.urlencode($search_type); } if ($search_company) { - $param .= '&search_societe='.urlencode($search_company); + $param .= '&search_company='.urlencode($search_company); } if ($search_company_alias) { - $param .= '&search_societe_alias='.urlencode($search_company_alias); + $param .= '&search_company_alias='.urlencode($search_company_alias); } if ($search_town) { $param .= '&search_town='.urlencode($search_town); From 3eb3c700b9cd2ccfa99d5dd66a25bf8b1b90cfbe Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 6 Jul 2022 18:28:40 +0200 Subject: [PATCH 18/71] FIX sql order --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 5456c8bb0a7..c57a00afbc1 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -759,7 +759,7 @@ $sql_order .= ' ORDER BY '; $listfield = explode(',', $sortfield); $listorder = explode(',', $sortorder); foreach ($listfield as $key => $value) { - $sql_order .= $listfield[$key].' '.($listorder[$key] ? $listorder[$key] : 'DESC').','; + $sql_order .= $listfield[$key] . ' ' . ($listorder[$key] ? $listorder[$key] : 'DESC') . ','; } $sql_order .= ' f.rowid DESC '; From 77552fa32ae0fa5e3882980f5712318a0c6835e3 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Thu, 7 Jul 2022 10:17:56 +0200 Subject: [PATCH 19/71] FIX : We must remove empty values of $features array in fetchByProductCombination2ValuePairs() because some products can use only several attributes in their variations and not necessarily all. In this case, fetch doesn't work without my correction --- htdocs/variants/class/ProductCombination.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index ac9d5403671..c4c660e61d8 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -602,6 +602,8 @@ class ProductCombination $prodcomb2val = new ProductCombination2ValuePair($this->db); $prodcomb = new ProductCombination($this->db); + $features = array_filter($features); + foreach ($features as $attr => $attr_val) { $actual_comp[$attr] = $attr_val; } From f10788e4c6c50ee60f8722b4cb8d88720d34c121 Mon Sep 17 00:00:00 2001 From: jpb Date: Thu, 7 Jul 2022 10:24:39 +0200 Subject: [PATCH 20/71] fix export resource type filter --- htdocs/core/modules/modResource.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php index 0478cdff2a7..82ee03a4df7 100644 --- a/htdocs/core/modules/modResource.class.php +++ b/htdocs/core/modules/modResource.class.php @@ -238,20 +238,22 @@ class modResource extends DolibarrModules $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = "ResourceSingular"; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r] = array(array("resource", "read")); - $this->export_fields_array[$r] = array('r.rowid'=>'IdResource', 'r.ref'=>'ResourceFormLabel_ref', 'c.code'=>'ResourceTypeCode', 'c.label'=>'ResourceType', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>"DateCreation", 'r.tms'=>"DateLastModification"); - $this->export_TypeFields_array[$r] = array('r.rowid'=>'List:resource:ref', 'r.ref'=>'Text', 'r.asset_number'=>'Text', 'r.description'=>'Text', 'c.code'=>'Text', 'c.label'=>'List:c_type_resource:label', 'r.datec'=>'Date', 'r.tms'=>'Date', 'r.note_private'=>'Text', 'r.note_public'=>'Text'); - $this->export_entities_array[$r] = array('r.rowid'=>'resource', 'r.ref'=>'resource', 'c.code'=>'resource', 'c.label'=>'resource', 'r.description'=>'resource', 'r.note_private'=>"resource", 'r.resource'=>"resource", 'r.asset_number'=>'resource', 'r.datec'=>"resource", 'r.tms'=>"resource"); + $this->export_fields_array[$r] = array('r.rowid'=>'IdResource', 'r.ref'=>'ResourceFormLabel_ref', 'c.code'=>'ResourceTypeCode', 'c.rowid'=>'ResourceType', 'c.label'=>'ResourceTypeLabel', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>"DateCreation", 'r.tms'=>"DateLastModification"); + $this->export_TypeFields_array[$r] = array('r.rowid'=>'List:resource:ref', 'r.ref'=>'Text','r.asset_number'=>'Text', 'r.description'=>'Text', 'c.code'=>'Text', 'c.rowid'=>'List:c_type_resource:label', 'r.datec'=>'Date', 'r.tms'=>'Date', 'r.note_private'=>'Text', 'r.note_public'=>'Text'); + $this->export_entities_array[$r] = array('r.rowid'=>'resource', 'r.ref'=>'resource', 'c.code'=>'resource', 'c.rowid'=>'resource', 'r.description'=>'resource', 'r.note_private'=>"resource", 'r.resource'=>"resource", 'r.asset_number'=>'resource', 'r.datec'=>"resource", 'r.tms'=>"resource"); + $keyforselect = 'resource'; $keyforelement = 'resource'; $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_dependencies_array[$r] = array('resource'=>array('r.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'resource as r'; - $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_resource as c ON c.rowid=r.fk_code_type_resource'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_resource as c ON c.code = r.fk_code_type_resource'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'resource_extrafields as extra ON extra.fk_object = r.rowid'; $this->export_sql_end[$r] .= ' WHERE r.entity IN ('.getEntity('resource').')'; + // Imports //-------- $r = 0; From ea524033391c5fedc3021ddf3ba21df36d8db5dd Mon Sep 17 00:00:00 2001 From: jpb Date: Thu, 7 Jul 2022 11:08:01 +0200 Subject: [PATCH 21/71] rank change. if we only have one order we leave the origin rank otherwise we leave the -1 and let the class set the max rank. --- htdocs/core/actions_massactions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index af0ad2a2eaa..2bebd1ada00 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -641,7 +641,7 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $lastref = ''; $db->begin(); - + $nbOrders = is_array($orders) ? count($orders) : 1; foreach ($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) { @@ -773,7 +773,7 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. } $objecttmp->context['createfromclone']; - + $rankedLine = ($nbOrders > 1) ? -1 : $lines[$i]->rang; $result = $objecttmp->addline( $desc, $lines[$i]->subprice, @@ -793,7 +793,7 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $product_type, //we have define the max rank for each line which makes it possible not to have a duplicate on the rank field in the case of several orders //-1 will give us the right number - -1, // rank + $rankedLine, // rank $lines[$i]->special_code, $objecttmp->origin, $lines[$i]->rowid, From b2e4b6ab5decbb9c8a2e811ce65b5a56e99278fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Jul 2022 19:10:46 +0200 Subject: [PATCH 22/71] FIX Send remind to pay invoice only on validated invoices --- htdocs/compta/facture/class/facture.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 94184934d42..ec8e4a93b80 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5078,6 +5078,7 @@ class Facture extends CommonInvoice $sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp"; } $sql .= " WHERE f.paye = 0"; + $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; $sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'"; $sql .= " AND f.entity IN (".getEntity('facture').")"; if (!empty($paymentmode) && $paymentmode != 'all') { From e10820a350726cfd7bde9a45594ed311ea923038 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Jul 2022 19:59:37 +0200 Subject: [PATCH 23/71] Revert "FIX sql order" This reverts commit 3eb3c700b9cd2ccfa99d5dd66a25bf8b1b90cfbe. --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index c57a00afbc1..5456c8bb0a7 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -759,7 +759,7 @@ $sql_order .= ' ORDER BY '; $listfield = explode(',', $sortfield); $listorder = explode(',', $sortorder); foreach ($listfield as $key => $value) { - $sql_order .= $listfield[$key] . ' ' . ($listorder[$key] ? $listorder[$key] : 'DESC') . ','; + $sql_order .= $listfield[$key].' '.($listorder[$key] ? $listorder[$key] : 'DESC').','; } $sql_order .= ' f.rowid DESC '; From e60c6ae96de4ea3014be670df971e277c401b2e8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Jul 2022 20:00:03 +0200 Subject: [PATCH 24/71] Revert "FIX count elements in invoice list (Issue #21444)" This reverts commit db863e4db68d1829c5f0f241888564c02fefe6bf. --- htdocs/compta/facture/list.php | 110 +++++++++++++++------------------ 1 file changed, 50 insertions(+), 60 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 5456c8bb0a7..f2cc5943e7a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -480,47 +480,42 @@ $facturestatic = new Facture($db); $formcompany = new FormCompany($db); $companystatic = new Societe($db); -$sql_select = "SELECT"; -$sql_select_count = "SELECT COUNT(f.rowid)"; +$sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) { - $sql_select .= " DISTINCT"; - $sql_select_count = "SELECT COUNT(DISTINCT f.rowid)"; + $sql = 'SELECT DISTINCT'; } -$sql_select_count .= " as nbtotalofrecords"; -$sql_fields = ""; -$sql_fields .= ' f.rowid as id, f.ref, f.ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; -$sql_fields .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,'; -$sql_fields .= ' f.fk_user_author,'; -$sql_fields .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,'; -$sql_fields .= ' f.datef, f.date_valid, f.date_lim_reglement as datelimite, f.module_source, f.pos_source,'; -$sql_fields .= ' f.paye as paye, f.fk_statut, f.close_code,'; -$sql_fields .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; -$sql_fields .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; -$sql_fields .= ' 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, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; -$sql_fields .= ' typent.code as typent_code,'; -$sql_fields .= ' state.code_departement as state_code, state.nom as state_name,'; -$sql_fields .= ' country.code as country_code,'; -$sql_fields .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,'; -$sql_fields .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender'; +$sql .= ' f.rowid as id, f.ref, f.ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; +$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,'; +$sql .= ' f.fk_user_author,'; +$sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,'; +$sql .= ' f.datef, f.date_valid, f.date_lim_reglement as datelimite, f.module_source, f.pos_source,'; +$sql .= ' f.paye as paye, f.fk_statut, f.close_code,'; +$sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; +$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; +$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, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; +$sql .= ' typent.code as typent_code,'; +$sql .= ' state.code_departement as state_code, state.nom as state_name,'; +$sql .= ' country.code as country_code,'; +$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,'; +$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender'; // We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0) // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. if (!$sall) { - $sql_fields .= ', SUM(pf.amount) as dynamount_payed, SUM(pf.multicurrency_amount) as multicurrency_dynamount_payed'; + $sql .= ', SUM(pf.amount) as dynamount_payed, SUM(pf.multicurrency_amount) as multicurrency_dynamount_payed'; } if ($search_categ_cus && $search_categ_cus!=-1) { - $sql_fields .= ", cc.fk_categorie, cc.fk_soc"; + $sql .= ", cc.fk_categorie, cc.fk_soc"; } // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - $sql_fields .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); } } // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook -$sql_fields .= $hookmanager->resPrint; -$sql = ""; +$sql .= $hookmanager->resPrint; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; @@ -715,53 +710,50 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql_group_by = ""; if (!$sall) { - $sql_group_by .= ' GROUP BY f.rowid, f.ref, ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; - $sql_group_by .= ' f.localtax1, f.localtax2,'; - $sql_group_by .= ' f.datef, f.date_valid, f.date_lim_reglement, f.module_source, f.pos_source,'; - $sql_group_by .= ' f.paye, f.fk_statut, f.close_code,'; - $sql_group_by .= ' f.datec, f.tms, f.date_closing,'; - $sql_group_by .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; - $sql_group_by .= ' f.fk_user_author, f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht,'; - $sql_group_by .= ' f.multicurrency_total_tva, f.multicurrency_total_ttc,'; - $sql_group_by .= ' s.rowid, s.nom, s.name_alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; - $sql_group_by .= ' typent.code,'; - $sql_group_by .= ' state.code_departement, state.nom,'; - $sql_group_by .= ' country.code,'; - $sql_group_by .= " p.rowid, p.ref, p.title,"; - $sql_group_by .= " u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender"; + $sql .= ' GROUP BY f.rowid, f.ref, ref_client, f.fk_soc, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total_ht, f.total_tva, f.total_ttc,'; + $sql .= ' f.localtax1, f.localtax2,'; + $sql .= ' f.datef, f.date_valid, f.date_lim_reglement, f.module_source, f.pos_source,'; + $sql .= ' f.paye, f.fk_statut, f.close_code,'; + $sql .= ' f.datec, f.tms, f.date_closing,'; + $sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; + $sql .= ' f.fk_user_author, f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht,'; + $sql .= ' f.multicurrency_total_tva, f.multicurrency_total_ttc,'; + $sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; + $sql .= ' typent.code,'; + $sql .= ' state.code_departement, state.nom,'; + $sql .= ' country.code,'; + $sql .= " p.rowid, p.ref, p.title,"; + $sql .= " u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender"; if ($search_categ_cus && $search_categ_cus!=-1) { - $sql_group_by .= ", cc.fk_categorie, cc.fk_soc"; + $sql .= ", cc.fk_categorie, cc.fk_soc"; } // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - $sql_group_by .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); } } // Add GroupBy from hooks $parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall); $reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook - $sql_group_by .= $hookmanager->resPrint; + $sql .= $hookmanager->resPrint; } else { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } // Add HAVING from hooks -$sql_having = ""; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook -$sql_having .= !empty($hookmanager->resPrint) ? (' HAVING 1=1 ' . $hookmanager->resPrint) : ''; +$sql .= !empty($hookmanager->resPrint) ? (' HAVING 1=1 ' . $hookmanager->resPrint) : ''; -$sql_order = ""; -$sql_order .= ' ORDER BY '; +$sql .= ' ORDER BY '; $listfield = explode(',', $sortfield); $listorder = explode(',', $sortorder); foreach ($listfield as $key => $value) { - $sql_order .= $listfield[$key].' '.($listorder[$key] ? $listorder[$key] : 'DESC').','; + $sql .= $listfield[$key].' '.($listorder[$key] ? $listorder[$key] : 'DESC').','; } -$sql_order .= ' f.rowid DESC '; +$sql .= ' f.rowid DESC '; $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { @@ -770,14 +762,13 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $db->num_rows($result); */ /* The fast and low memory method to get and count full list converts the sql into a sql count */ - //if ($sall || $search_product_category > 0 || $search_user > 0) { - // $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql); - //} else { - // $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(f.rowid) as nbtotalofrecords FROM', $sql); - // $sqlforcount = preg_replace('/LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid/', '', $sqlforcount); - //} - //$sqlforcount = preg_replace('/GROUP BY.*$/', '', $sqlforcount); - $sqlforcount = $sql_select_count . $sql .$sql_having . $sql_order; + if ($sall || $search_product_category > 0 || $search_user > 0) { + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql); + } else { + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(f.rowid) as nbtotalofrecords FROM', $sql); + $sqlforcount = preg_replace('/LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid/', '', $sqlforcount); + } + $sqlforcount = preg_replace('/GROUP BY.*$/', '', $sqlforcount); $resql = $db->query($sqlforcount); $objforcount = $db->fetch_object($resql); @@ -790,7 +781,6 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $db->free($resql); } -$sql = $sql_select . $sql_fields . $sql . $sql_group_by . $sql_having . $sql_order; $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -898,10 +888,10 @@ if ($resql) { $param .= '&search_type='.urlencode($search_type); } if ($search_company) { - $param .= '&search_company='.urlencode($search_company); + $param .= '&search_societe='.urlencode($search_company); } if ($search_company_alias) { - $param .= '&search_company_alias='.urlencode($search_company_alias); + $param .= '&search_societe_alias='.urlencode($search_company_alias); } if ($search_town) { $param .= '&search_town='.urlencode($search_town); From 5afe1dbb84e190e6c17f1b2ab8bee157bb0e76ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Jul 2022 20:57:29 +0200 Subject: [PATCH 25/71] Update actions_massactions.inc.php --- htdocs/core/actions_massactions.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 2bebd1ada00..0d279a4ac3d 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -641,7 +641,9 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $lastref = ''; $db->begin(); - $nbOrders = is_array($orders) ? count($orders) : 1; + + $nbOrders = is_array($orders) ? count($orders) : 1; + foreach ($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) { From 7741826d3409f45b9d69a42cc99366556ccde34c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Jul 2022 23:09:39 +0200 Subject: [PATCH 26/71] phpcs --- htdocs/core/actions_massactions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 4f738f68a97..d704d9974f9 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -642,9 +642,9 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $lastref = ''; $db->begin(); - + $nbOrders = is_array($orders) ? count($orders) : 1; - + foreach ($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) { From 787f52fd7f463cdcc7622ae7e8423974071f19e6 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Fri, 8 Jul 2022 09:32:20 +0200 Subject: [PATCH 27/71] FIX : with callback function --- htdocs/variants/class/ProductCombination.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index c4c660e61d8..7d90c1b247d 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -602,7 +602,9 @@ class ProductCombination $prodcomb2val = new ProductCombination2ValuePair($this->db); $prodcomb = new ProductCombination($this->db); - $features = array_filter($features); + $features = array_filter($features, function($v) { + return !empty($v); + }); foreach ($features as $attr => $attr_val) { $actual_comp[$attr] = $attr_val; From 04fd17347e78e480fc99cb1e2d8cc2d1fa326568 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 8 Jul 2022 07:36:09 +0000 Subject: [PATCH 28/71] Fixing style errors. --- htdocs/variants/class/ProductCombination.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 7d90c1b247d..472c474c81c 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -602,7 +602,7 @@ class ProductCombination $prodcomb2val = new ProductCombination2ValuePair($this->db); $prodcomb = new ProductCombination($this->db); - $features = array_filter($features, function($v) { + $features = array_filter($features, function ($v) { return !empty($v); }); From d375c9fbbe7fc44c07c5c6d31aa0ef57ddf91c3d Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Fri, 8 Jul 2022 10:35:43 +0200 Subject: [PATCH 29/71] FIX : backport commit 5b3fcc5e43979b1b0789bf81fb8f1b2b59c93056, chkbxlst cannot be emptied --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6e4f6892e05..3d10525c568 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -2072,7 +2072,7 @@ class ExtraFields if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) { continue; } - if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && $this->attributes[$object->table_element]['type'][$key] != 'boolean') { + if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'chkbxlst')))) { //when unticking boolean field, it's not set in POST continue; } From 9db3c1bbd682670ea3e2543d5e78680f291e2e48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Jul 2022 10:56:36 +0200 Subject: [PATCH 30/71] Fix currency missing --- htdocs/fourn/class/fournisseur.product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 6b11d31c2ff..d1ca876b7cc 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -960,7 +960,7 @@ class ProductFournisseur extends Product public function display_price_product_fournisseur($showunitprice = 1, $showsuptitle = 1, $maxlen = 0, $notooltip = 0, $productFournList = array()) { // phpcs:enable - global $langs; + global $conf, $langs; $out = ''; $langs->load("suppliers"); @@ -978,7 +978,7 @@ class ProductFournisseur extends Product } $out .= '
'.$langs->trans("Description").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("KeepToShip").''.$langs->trans("Description").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("KeepToShip").''.$langs->trans("RealStock").''.$langs->trans("RealStock").'  
'.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("DiscountOfferedBy").' '.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("DiscountOfferedBy").' '.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("Author").' '.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("Author").' 
'; } else { - $out = ($showunitprice ? price($this->fourn_unitprice * (1 - $this->fourn_remise_percent / 100) + $this->fourn_remise).' '.$langs->trans("HT").'   (' : ''); + $out = ($showunitprice ? price($this->fourn_unitprice * (1 - $this->fourn_remise_percent / 100) + $this->fourn_remise, 0, $langs, 1, -1, -1, $conf->currency).' '.$langs->trans("HT").'   (' : ''); $out .= ($showsuptitle ? ''.$langs->trans("Supplier").': ' : '').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / '.$langs->trans("SupplierRef").': '.$this->ref_supplier; $out .= ($showunitprice ? ')' : ''); } From 61f1595f8c8404634add718b000ae7576657e3cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Jul 2022 11:21:54 +0200 Subject: [PATCH 31/71] Fix look and feel v15 --- htdocs/core/lib/functions.lib.php | 5 ++++- htdocs/product/price.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ffc88c157ff..8bc9a453ab2 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5187,9 +5187,10 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be * @param boolean $addpercent Add a percent % sign in output * @param int $info_bits Miscellaneous information on vat (0=Default, 1=French NPR vat) * @param int $usestarfornpr -1=Never show, 0 or 1=Use '*' for NPR vat rates + * @param int $html Used for html output * @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)') */ -function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0) +function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0, $html = 0) { $morelabel = ''; @@ -5197,9 +5198,11 @@ function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0) $rate = str_replace('%', '', $rate); $addpercent = true; } + $reg = array(); if (preg_match('/\((.*)\)/', $rate, $reg)) { $morelabel = ' ('.$reg[1].')'; $rate = preg_replace('/\s*'.preg_quote($morelabel, '/').'/', '', $rate); + $morelabel = ' '.($html ? '' : '').'('.$reg[1].')'.($html ? '' : ''); } if (preg_match('/\*/', $rate)) { $rate = str_replace('*', '', $rate); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index ab3086bfd0b..e83816b84ce 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1177,7 +1177,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ if (empty($positiverates)) { $positiverates = '0'; } - echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr); + echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr, 0, 1); /* if ($object->default_vat_code) { From 226488b7edeb0f89f1740537b1b9dd1dd0837951 Mon Sep 17 00:00:00 2001 From: jpb Date: Fri, 8 Jul 2022 12:32:17 +0200 Subject: [PATCH 32/71] rank change. if we only have one order we leave the origin rank otherwhise we pass -1 --- htdocs/core/actions_massactions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 70b79ffbefc..56492276c73 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -604,7 +604,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $nb_bills_created = 0; $db->begin(); - + $nbOrders = is_array($orders) ? count($orders) : 1; foreach ($orders as $id_order) { $cmd = new Commande($db); @@ -726,7 +726,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $lines[$i]->fetch_optionals(); $array_options = $lines[$i]->array_options; } - + $rankedLine = ($nbOrders > 1) ? -1 : $lines[$i]->rang; $result = $objecttmp->addline( $desc, $lines[$i]->subprice, @@ -744,7 +744,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders 'HT', 0, $product_type, - $lines[$i]->rang, + $rankedLine, $lines[$i]->special_code, $objecttmp->origin, $lines[$i]->rowid, From 56c4817d6decea4c69c16adfa438cf72e51adb16 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 8 Jul 2022 17:30:15 +0200 Subject: [PATCH 33/71] fix: Bad amount calc on Invoice index --- htdocs/core/lib/invoice.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index c64c63fc0dd..552658f091d 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -1165,6 +1165,7 @@ function getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0) $i++; $total += $obj->total_ht; $total_ttc += $obj->total_ttc; + $totalam += $obj->am; continue; } From c16cd502d00b561950525206c255af6a2afe19c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Jul 2022 18:43:25 +0200 Subject: [PATCH 34/71] Update actions_massactions.inc.php --- htdocs/core/actions_massactions.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 56492276c73..811e9b80d44 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -604,7 +604,9 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $nb_bills_created = 0; $db->begin(); - $nbOrders = is_array($orders) ? count($orders) : 1; + + $nbOrders = is_array($orders) ? count($orders) : 1; + foreach ($orders as $id_order) { $cmd = new Commande($db); From 851416a61e266ffdb8d9542388ecf2ca06117b8f Mon Sep 17 00:00:00 2001 From: atm-lena Date: Mon, 11 Jul 2022 11:48:37 +0200 Subject: [PATCH 35/71] No display extrafield line on PDF if empty --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6cee5a01b67..c631b2519bf 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1824,7 +1824,7 @@ class ExtraFields } } } - $value = '
    '.implode(' ', $toprint).'
'; + if(!empty($toprint)) $value = '
    '.implode(' ', $toprint).'
'; } else { dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); } From 3434460cc32cc73c665eed7cc0b3a0f2e31b58ba Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 11 Jul 2022 09:55:39 +0000 Subject: [PATCH 36/71] Fixing style errors. --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c631b2519bf..8418ebcbb22 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1824,7 +1824,7 @@ class ExtraFields } } } - if(!empty($toprint)) $value = '
    '.implode(' ', $toprint).'
'; + if (!empty($toprint)) $value = '
    '.implode(' ', $toprint).'
'; } else { dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); } From b57c40ef78ae366d03f0af2ff733080a47dd88eb Mon Sep 17 00:00:00 2001 From: lvessiller Date: Tue, 12 Jul 2022 11:32:12 +0200 Subject: [PATCH 37/71] FIX load product stock in inventory lines --- htdocs/product/inventory/inventory.php | 56 ++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 85cd0932f46..2c8a9bd2e13 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -103,6 +103,8 @@ if ($cancel) { $action = ''; } +$error = 0; + if ($action == 'cancel_record' && $permissiontoadd) { $object->setCanceled($user); } @@ -111,6 +113,8 @@ if ($action == 'update' && !empty($user->rights->stock->mouvement->creer)) { $stockmovment = new MouvementStock($db); $stockmovment->origin = $object; + $cacheOfProducts = array(); + $db->begin(); $sql = 'SELECT id.rowid, id.datec as date_creation, id.tms as date_modification, id.fk_inventory, id.fk_warehouse,'; @@ -127,8 +131,29 @@ if ($action == 'update' && !empty($user->rights->stock->mouvement->creer)) { $qty_stock = $line->qty_stock; $qty_view = $line->qty_view; // The quantity viewed by inventorier, the qty we target + // Load real stock we have now. + $option = ''; + if (isset($cacheOfProducts[$line->fk_product])) { + $product_static = $cacheOfProducts[$line->fk_product]; + } else { + $product_static = new Product($db); + $result = $product_static->fetch($line->fk_product, '', '', '', 1, 1, 1); + + //$option = 'nobatch'; + $option .= ',novirtual'; + $product_static->load_stock($option); // Load stock_reel + stock_warehouse. + + $cacheOfProducts[$product_static->id] = $product_static; + } + + // Get the real quantity in stock now, but before the stock move for inventory. + $realqtynow = $product_static->stock_warehouse[$line->fk_warehouse]->real; + if ($conf->productbatch->enabled && $product_static->hasbatch()) { + $realqtynow = $product_static->stock_warehouse[$line->fk_warehouse]->detail_batch[$line->batch]->qty; + } + if (!is_null($qty_view)) { - $stock_movement_qty = price2num($qty_view - $qty_stock, 'MS'); + $stock_movement_qty = price2num($qty_view - $realqtynow, 'MS'); if ($stock_movement_qty != 0) { if ($stock_movement_qty < 0) { $movement_type = 1; @@ -144,6 +169,19 @@ if ($action == 'update' && !empty($user->rights->stock->mouvement->creer)) { setEventMessages($stockmovment->error, $stockmovment->errors, 'errors'); break; } + + // Update line with id of stock movement (and the start quantity if it has changed this last recording) + if ($qty_stock != $realqtynow) { + $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."inventorydet"; + $sqlupdate .= " SET qty_stock = ".((float) $realqtynow); + $sqlupdate .= " WHERE rowid = ".((int) $line->rowid); + $resqlupdate = $db->query($sqlupdate); + if (! $resqlupdate) { + $error++; + setEventMessages($db->lasterror(), null, 'errors'); + break; + } + } } } $i++; @@ -191,6 +229,7 @@ if ($action =='updateinventorylines' && $permissiontoadd) { setEventMessages($langs->trans("FieldCannotBeNegative", $langs->transnoentitiesnoconv("RealQty")), null, 'errors'); } if ($result > 0) { + $inventoryline->qty_stock = price2num(GETPOST('stock_qty_'.$lineid, 'alpha'), 'MS'); // The new value that was set in as hidden field $inventoryline->qty_view = $qtytoupdate; $resultupdate = $inventoryline->update($user); } @@ -625,13 +664,14 @@ if ($object->id > 0) { $cacheOfWarehouses[$warehouse_static->id] = $warehouse_static; } + $option = ''; if (isset($cacheOfProducts[$obj->fk_product])) { $product_static = $cacheOfProducts[$obj->fk_product]; } else { $product_static = new Product($db); $result = $product_static->fetch($obj->fk_product, '', '', '', 1, 1, 1); - $option = 'nobatch'; + //$option = 'nobatch'; $option .= ',novirtual'; $product_static->load_stock($option); // Load stock_reel + stock_warehouse. This can also call load_virtual_stock() @@ -654,7 +694,17 @@ if ($object->id > 0) { // Expected quantity print ''; - print $obj->qty_stock; + $valuetoshow = $obj->qty_stock; + // For inventory not yet close, we overwrite with the real value in stock now + if ($object->status == $object::STATUS_DRAFT || $object->status == $object::STATUS_VALIDATED) { + if (!empty($conf->productbatch->enabled) && $product_static->hasbatch()) { + $valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->detail_batch[$obj->batch]->qty; + } else { + $valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->real; + } + } + print price2num($valuetoshow, 'MS'); + print ''; print ''; // Real quantity From c2712242bea6431366c364709688ff9ac0c0ebcf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Jul 2022 17:42:20 +0200 Subject: [PATCH 38/71] Fix css --- htdocs/core/lib/company.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 6b3ced3e621..6be210d507f 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -843,12 +843,12 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel print ''; // Ref - print ''; + print ''; print $projecttmp->getNomUrl(1); print ''; // Label - print ''.$obj->title.''; + print ''.dol_escape_htmltag($obj->title).''; // Date start print ''.dol_print_date($db->jdate($obj->do), "day").''; // Date end From 8c5f4d5ac639ca20782be0a932aba28d9d1089b7 Mon Sep 17 00:00:00 2001 From: Chl Date: Fri, 15 Jul 2022 00:04:00 +0200 Subject: [PATCH 39/71] FIX #20476 migration postgresql 13.0.x to 14.0.x packaging type Taken from ff35bf8d47650b453f7224ced7857e2bbc53ecd5 --- htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 2ec43548bb6..44b1a6b5185 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -85,7 +85,8 @@ UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'c DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', 'amarok', 'cameleo'); ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL; -ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL; +-- VMYSQL4.3 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL USING packaging::real; -- For v14 From be491cc6cf3c226c7528ee589edbc4cc6921c0cb Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 15 Jul 2022 16:22:22 +0200 Subject: [PATCH 40/71] FIX Accountancy - Model account list - Problem of CSRF --- htdocs/accountancy/admin/accountmodel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 0f4d538cfac..d98e444befe 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -679,7 +679,7 @@ if ($id) { // Can an entry be erased or disabled ? $iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default - $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); + $url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); if ($param) { $url .= '&'.$param; } From 71af854bf4f402e5c23cc2eac2b3e6a74f05e5d2 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 15 Jul 2022 17:31:30 +0200 Subject: [PATCH 41/71] FIX Bank transfer - Link on supplier invoice was bad --- htdocs/compta/prelevement/list.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 095d07460b9..1bc250993b8 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -256,9 +256,17 @@ if ($result) { print ''; print ''; - print ''; - print img_object($langs->trans("ShowBill"), "bill"); - print ' '.$obj->invoiceref."\n"; + $link_to_bill = '/compta/facture/card.php?facid='; + $link_title = 'Invoice'; + $link_picto = 'bill'; + if ($type == 'bank-transfer') { + $link_to_bill = '/fourn/facture/card.php?facid='; + $link_title = 'SupplierInvoice'; + $link_picto = 'supplier_invoice'; + } + print ''; + print img_object($langs->trans($link_title), $link_picto); + print ' '.$obj->invoiceref."\n"; print ''; print ''; @@ -266,7 +274,7 @@ if ($result) { print $company->getNomUrl(1); print "\n"; - print ''.$obj->code_client."\n"; + print ''.$obj->code_client."\n"; print ''.dol_print_date($db->jdate($obj->datec), 'day')."\n"; From 149b86e459b3a51604105cafba1c7e05cb804d3d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 16 Jul 2022 06:34:52 +0200 Subject: [PATCH 42/71] FIX Bank transfer - Link on code supplier invoice was bad --- htdocs/compta/prelevement/list.php | 31 +++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 1bc250993b8..787b9d05aaa 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -1,8 +1,9 @@ - * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2018 Juanjo Menent +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2016 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2010-2018 Juanjo Menent + * Copyright (C) 2022 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -108,7 +109,7 @@ llxHeader('', $langs->trans("WithdrawalsLines")); $sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec"; $sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc"; -$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.email"; +$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.email"; $sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl"; @@ -139,7 +140,7 @@ if ($search_bon) { } if ($type == 'bank-transfer') { if ($search_code) { - $sql .= natural_search("s.code_fourn", $search_code); + $sql .= natural_search("s.code_fournisseur", $search_code); } } else { if ($search_code) { @@ -204,7 +205,7 @@ if ($result) { print ''; print ' '; print ''; - print ''; + print ''; print ' '; print ' '; print ''; @@ -214,8 +215,12 @@ if ($result) { print ''; $columntitle = "WithdrawalsReceipts"; + $columntitlethirdparty = "CustomerCode"; + $columncodethirdparty = "s.code_client"; if ($type == 'bank-transfer') { $columntitle = "BankTransferReceipts"; + $columntitlethirdparty = "SupplierCode"; + $columncodethirdparty = "s.code_fournisseur"; } print ''; @@ -223,7 +228,7 @@ if ($result) { print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); - print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($columntitlethirdparty, $_SERVER["PHP_SELF"], $columncodethirdparty, '', $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre(''); @@ -274,7 +279,15 @@ if ($result) { print $company->getNomUrl(1); print "\n"; - print ''.$obj->code_client."\n"; + + print ''; + $link_to_tab = '/comm/card.php?socid='; + $link_code = $obj->code_client; + if ($type == 'bank-transfer') { + $link_to_tab = 'fourn/card.php?socid='; + $link_code = $obj->code_fournisseur; + } + print ''.$link_code."\n"; print ''.dol_print_date($db->jdate($obj->datec), 'day')."\n"; From ce15b8c44ec86773664764f801f5ed6f09a2ae5d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 18 Jul 2022 07:23:25 +0200 Subject: [PATCH 43/71] FIX #21472 On the bank transfer lists, a change of page switches to the lists of the direct debit module --- htdocs/compta/prelevement/list.php | 5 ++++- htdocs/compta/prelevement/orders_list.php | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 787b9d05aaa..a7bab4281c2 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -173,6 +173,9 @@ if ($result) { $param = "&statut=".urlencode($statut); $param .= "&search_bon=".urlencode($search_bon); + if ($type == 'bank-transfer') { + $param .= '&type=bank-transfer'; + } if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.urlencode($limit); } @@ -284,7 +287,7 @@ if ($result) { $link_to_tab = '/comm/card.php?socid='; $link_code = $obj->code_client; if ($type == 'bank-transfer') { - $link_to_tab = 'fourn/card.php?socid='; + $link_to_tab = '/fourn/card.php?socid='; $link_code = $obj->code_fournisseur; } print ''.$link_code."\n"; diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php index 2733223b5b5..6737ea258ea 100644 --- a/htdocs/compta/prelevement/orders_list.php +++ b/htdocs/compta/prelevement/orders_list.php @@ -132,6 +132,9 @@ if ($result) { if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } + if ($type == 'bank-transfer') { + $param .= '&type=bank-transfer'; + } if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.urlencode($limit); } From ade854a469dbe756572927ca0f24f9e1c5368347 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 18 Jul 2022 16:48:53 +0200 Subject: [PATCH 44/71] FIX security breach if we have same ref number in multiple entities --- htdocs/comm/propal/class/propal.class.php | 5 ++- htdocs/core/lib/signature.lib.php | 7 ++-- htdocs/public/onlinesign/newonlinesign.php | 42 +++++++++------------- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index c18e0e7a6df..37d6c96a6e5 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1452,6 +1452,8 @@ class Propal extends CommonObject */ public function fetch($rowid, $ref = '', $ref_ext = '') { + global $conf; + $sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; $sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht"; $sql .= ", p.datec"; @@ -1490,9 +1492,10 @@ class Propal extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON p.fk_incoterms = i.rowid'; if ($ref) { - $sql .= " WHERE p.entity IN (".getEntity('propal').")"; // Dont't use entity if you use rowid + $sql .= " WHERE p.entity = ".(int) $conf->entity; // Check only the current entity because we may have the same reference in several entities $sql .= " AND p.ref='".$this->db->escape($ref)."'"; } else { + // Dont't use entity if you use rowid $sql .= " WHERE p.rowid = ".((int) $rowid); } diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index c57807800d7..5c6e8a08eed 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -59,7 +59,8 @@ function showOnlineSignatureUrl($type, $ref) */ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1) { - global $conf, $db, $langs, $dolibarr_main_url_root; + global $conf, $dolibarr_main_url_root; + global $object; $ref = str_replace(' ', '', $ref); $out = ''; @@ -90,7 +91,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1) if ($mode == 1) { $out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)"; } else { - $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref, '0'); + $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.$object->entity, '0'); } /* if ($mode == 1) { @@ -120,7 +121,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1) // For multicompany if (!empty($out) && !empty($conf->multicompany->enabled)) { - $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities + $out .= "&entity=".$object->entity; // Check the entity of object because we may have the same reference in several entities } return $out; diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index d1020dc2c1d..06332d5867a 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -139,7 +139,7 @@ if ($source == 'proposal') { $securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN; } -if (!dol_verifyHash($securekeyseed.$type.$ref, $SECUREKEY, '0')) { +if (!dol_verifyHash($securekeyseed.$type.$ref.$object->entity, $SECUREKEY, '0')) { http_response_code(403); print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref); exit(-1); @@ -288,18 +288,8 @@ $error = 0; // Signature on commercial proposal if ($source == 'proposal') { $found = true; - $langs->load("proposal"); - require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; - - $proposal = new Propal($db); - $result = $proposal->fetch('', $ref); - if ($result <= 0) { - $mesg = $proposal->error; - $error++; - } else { - $result = $proposal->fetch_thirdparty($proposal->socid); - } + $result = $object->fetch_thirdparty($object->socid); // Creditor @@ -315,39 +305,39 @@ if ($source == 'proposal') { print ''.$langs->trans("ThirdParty"); print ''; print img_picto('', 'company', 'class="pictofixedwidth"'); - print ''.$proposal->thirdparty->name.''; + print ''.$object->thirdparty->name.''; print ''."\n"; // Amount print ''.$langs->trans("Amount"); print ''; - print ''.price($proposal->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).''; + print ''.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).''; print ''."\n"; // Object - $text = ''.$langs->trans("SignatureProposalRef", $proposal->ref).''; + $text = ''.$langs->trans("SignatureProposalRef", $object->ref).''; print ''.$langs->trans("Designation"); print ''.$text; - if ($proposal->status == $proposal::STATUS_VALIDATED) { - $directdownloadlink = $proposal->getLastMainDocLink('proposal'); + if ($object->status == $object::STATUS_VALIDATED) { + $directdownloadlink = $object->getLastMainDocLink('proposal'); if ($directdownloadlink) { print '
'; - print img_mime($proposal->last_main_doc, ''); + print img_mime($object->last_main_doc, ''); print $langs->trans("DownloadDocument").''; } } else { - $last_main_doc_file = $proposal->last_main_doc; + $last_main_doc_file = $object->last_main_doc; - if ($proposal->status == $proposal::STATUS_NOTSIGNED) { - $directdownloadlink = $proposal->getLastMainDocLink('proposal'); + if ($object->status == $object::STATUS_NOTSIGNED) { + $directdownloadlink = $object->getLastMainDocLink('proposal'); if ($directdownloadlink) { print '
'; - print img_mime($proposal->last_main_doc, ''); + print img_mime($object->last_main_doc, ''); print $langs->trans("DownloadDocument").''; } - } elseif ($proposal->status == $proposal::STATUS_SIGNED || $proposal->status == $proposal::STATUS_BILLED) { + } elseif ($object->status == $object::STATUS_SIGNED || $object->status == $object::STATUS_BILLED) { if (preg_match('/_signed-(\d+)/', $last_main_doc_file)) { // If the last main doc has been signed $last_main_doc_file_not_signed = preg_replace('/_signed-(\d+)/', '', $last_main_doc_file); @@ -355,10 +345,10 @@ if ($source == 'proposal') { $datefilenotsigned = dol_filemtime($last_main_doc_file_not_signed); if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) { - $directdownloadlink = $proposal->getLastMainDocLink('proposal'); + $directdownloadlink = $object->getLastMainDocLink('proposal'); if ($directdownloadlink) { print '
'; - print img_mime($proposal->last_main_doc, ''); + print img_mime($object->last_main_doc, ''); print $langs->trans("DownloadDocument").''; } } @@ -367,7 +357,7 @@ if ($source == 'proposal') { } print ''; - print ''; + print ''; print ''."\n"; // TODO Add link to download PDF (similar code than for invoice) From 7db5f7eb1ce7fc996379dd95e3f60c0bcc749b20 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 18 Jul 2022 19:26:13 +0200 Subject: [PATCH 45/71] FIX regression + add $forceentity parameter --- htdocs/comm/propal/class/propal.class.php | 21 ++++++++++++--------- htdocs/core/lib/signature.lib.php | 2 +- htdocs/public/onlinesign/newonlinesign.php | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 37d6c96a6e5..5b91caa2673 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1445,15 +1445,14 @@ class Propal extends CommonObject /** * Load a proposal from database. Get also lines. * - * @param int $rowid id of object to load - * @param string $ref Ref of proposal - * @param string $ref_ext Ref ext of proposal - * @return int >0 if OK, <0 if KO + * @param int $rowid id of object to load + * @param string $ref Ref of proposal + * @param string $ref_ext Ref ext of proposal + * @param int $forceentity Entity id to force + * @return int >0 if OK, <0 if KO */ - public function fetch($rowid, $ref = '', $ref_ext = '') + public function fetch($rowid, $ref = '', $ref_ext = '', $forceentity = 0) { - global $conf; - $sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; $sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht"; $sql .= ", p.datec"; @@ -1491,8 +1490,12 @@ class Propal extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON p.fk_input_reason = dr.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON p.fk_incoterms = i.rowid'; - if ($ref) { - $sql .= " WHERE p.entity = ".(int) $conf->entity; // Check only the current entity because we may have the same reference in several entities + if (!empty($ref)) { + if (!empty($forceentity)) { + $sql .= " WHERE p.entity = ".(int) $forceentity; // Check only the current entity because we may have the same reference in several entities + } else { + $sql .= " WHERE p.entity IN (".getEntity('propal').")"; + } $sql .= " AND p.ref='".$this->db->escape($ref)."'"; } else { // Dont't use entity if you use rowid diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index 5c6e8a08eed..6a8d824872d 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -26,7 +26,7 @@ */ function showOnlineSignatureUrl($type, $ref) { - global $conf, $langs; + global $langs; // Load translation files required by the page $langs->loadLangs(array("payment", "paybox")); diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 06332d5867a..9ebea80aeb3 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -126,7 +126,7 @@ $creditor = $mysoc->name; $type = $source; if ($source == 'proposal') { $object = new Propal($db); - $object->fetch(0, $ref); + $object->fetch(0, $ref, '', $entity); } else { accessforbidden('Bad value for source'); exit; From 888328b03b5c9a464490f48b181c7829fc4ec46f Mon Sep 17 00:00:00 2001 From: comaiteseb <109105553+comaiteseb@users.noreply.github.com> Date: Tue, 19 Jul 2022 15:31:29 +0200 Subject: [PATCH 46/71] FIX issue Dolibarr#21495 for v15 FIX #21495 Error when calculate the date when AGENDA_EXPORT_FIX_TZ is set. The resulting date is 1969-12-31 --- htdocs/comm/action/class/actioncomm.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index a5c8a11ade0..627855a94e8 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2065,8 +2065,8 @@ class ActionComm extends CommonObject } if (!empty($conf->global->AGENDA_EXPORT_FIX_TZ)) { - $timestampStart = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); - $timestampEnd = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); + $timestampStart = $timestampStart - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); + $timestampEnd = $timestampEnd - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); } $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); From 276168ef6faea6cc6288d9d5cb578b3ce4895963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Tue, 19 Jul 2022 17:14:57 +0200 Subject: [PATCH 47/71] Fix: tabhelp must be present in every module --- htdocs/core/modules/modIncoterm.class.php | 3 ++- .../template/core/modules/modMyModule.class.php | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modIncoterm.class.php b/htdocs/core/modules/modIncoterm.class.php index 70e6c738801..c13555ef7cf 100644 --- a/htdocs/core/modules/modIncoterm.class.php +++ b/htdocs/core/modules/modIncoterm.class.php @@ -94,7 +94,8 @@ class modIncoterm extends DolibarrModules 'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record) 'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert) 'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->incoterm->enabled) + 'tabcond'=>array($conf->incoterm->enabled), + 'tabhelp' => array(array()) ); $this->boxes = array(); // List of boxes diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 0959a650d6e..3fca508f961 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -221,7 +221,10 @@ class modMyModule extends DolibarrModules // Name of columns with primary key (try to always name it 'rowid') 'tabrowid'=>array("rowid", "rowid", "rowid"), // Condition to show each dictionary - 'tabcond'=>array($conf->mymodule->enabled, $conf->mymodule->enabled, $conf->mymodule->enabled) + 'tabcond'=>array($conf->mymodule->enabled, $conf->mymodule->enabled, $conf->mymodule->enabled), + // Tooltip for every fields of dictionaries: DO NOT PUT AN EMPTY ARRAY + 'tabhelp'=>array(array('field1' => 'field1tooltip', 'field2' => 'field2tooltip'), array('field1' => 'field1tooltip', 'field2' => 'field2tooltip'), ...), + ); */ From 2aae7525daee3c79bf40c99d8c1d99fd951b42ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Tue, 19 Jul 2022 17:27:15 +0200 Subject: [PATCH 48/71] Fix: tabhelp must be present in every module --- htdocs/core/modules/modPartnership.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modPartnership.class.php b/htdocs/core/modules/modPartnership.class.php index d7041eca754..36cad1a5b06 100644 --- a/htdocs/core/modules/modPartnership.class.php +++ b/htdocs/core/modules/modPartnership.class.php @@ -231,7 +231,8 @@ class modPartnership extends DolibarrModules // Name of columns with primary key (try to always name it 'rowid') 'tabrowid'=>array("rowid"), // Condition to show each dictionary - 'tabcond'=>array($conf->partnership->enabled) + 'tabcond'=>array($conf->partnership->enabled), + 'tabhelp' => array(array()) ); // Boxes/Widgets From 840437d312ce755f36ee727c093f018cb37463e2 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Tue, 19 Jul 2022 23:55:55 +0200 Subject: [PATCH 49/71] Fixed labels for permission errors --- htdocs/expensereport/card.php | 2 +- htdocs/expensereport/list.php | 2 +- htdocs/langs/en_US/main.lang | 3 ++- htdocs/user/bank.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 2e811445c90..8770c23ce42 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -263,7 +263,7 @@ if (empty($reshook)) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) { $error++; - setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); } if (!$error) { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 760c25e4db8..ed03f603a18 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -482,7 +482,7 @@ if ($resql) { if ($canedit) { print ''.$langs->trans("AddTrip").''; } else { - print ''.$langs->trans("AddTrip").''; + print ''.$langs->trans("AddTrip").''; } print ''; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 6cb069d53c3..b31a8335fb5 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -344,7 +344,7 @@ KiloBytes=Kilobytes MegaBytes=Megabytes GigaBytes=Gigabytes TeraBytes=Terabytes -UserAuthor=Ceated by +UserAuthor=Created by UserModif=Updated by b=b. Kb=Kb @@ -709,6 +709,7 @@ FeatureDisabled=Feature disabled MoveBox=Move widget Offered=Offered NotEnoughPermissions=You don't have permission for this action +UserNotInHierachy=This action is reserved to the supervisors of this user SessionName=Session name Method=Method Receive=Receive diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 59f593f5b74..d2379388cb4 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -692,7 +692,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac if ($permissiontoaddbankaccount) { $morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create'); } else { - $morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'NotEnoughPermission', 'fa fa-plus-circle', '', '', -2); + $morehtmlright = dolGetButtonTitle($langs->trans('Add'), $langs->trans('NotEnoughPermissions'), 'fa fa-plus-circle', '', '', -2); } } else { $morehtmlright = dolGetButtonTitle($langs->trans('Add'), 'AlreadyOneBankAccount', 'fa fa-plus-circle', '', '', -2); From 46075188b2461f0d9901e77afac2d59f199cf0dd Mon Sep 17 00:00:00 2001 From: atm-lena Date: Thu, 21 Jul 2022 15:59:46 +0200 Subject: [PATCH 50/71] Tasks List Search : several same lines --- htdocs/projet/tasks/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 697969c6060..4af49c7a3d5 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -322,7 +322,7 @@ $sql .= " t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effectiv $sql .= " t.description, t.fk_task_parent"; $sql .= " ,t.budget_amount"; // We'll need these fields in order to filter by categ -if ($search_categ) { +if ($search_categ > 0) { $sql .= ", cs.fk_categorie, cs.fk_project"; } // Add sum fields @@ -342,7 +342,7 @@ $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; // We'll need this table joined to the select in order to filter by categ -if (!empty($search_categ)) { +if ($search_categ > 0) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ } $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; From a7b593026b134ed0706541b9bd553d4636add04e Mon Sep 17 00:00:00 2001 From: marc Date: Fri, 22 Jul 2022 00:55:14 +0200 Subject: [PATCH 51/71] Fix #21449 --- htdocs/supplier_proposal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index ad35c8f9914..595be78d4df 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -302,7 +302,7 @@ $sql .= " p.rowid as project_id, p.ref as project_ref,"; if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " sc.fk_soc, sc.fk_user,"; } -$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as status, u.admin, u.employee, u.email as uemail"; +$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as statut, u.admin, u.employee, u.email as uemail"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { From 5d75ea015b0d69c59899032aaccc3aa9dbce7a1b Mon Sep 17 00:00:00 2001 From: spooky360 Date: Fri, 22 Jul 2022 09:51:57 +0200 Subject: [PATCH 52/71] Added "$object" parameter to $formfile->showdocuments call Added "$object" parameter to $formfile->showdocuments call in order to use the $object reference on the showDocuments hook called inside showdocuments function. Otherwise, the hook is called with a null reference. --- htdocs/fourn/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 35e5257fce0..d1e1dc85c9a 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2665,7 +2665,7 @@ if ($action == 'create') { $delallowed = $usercancreate; $modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->COMMANDE_SUPPLIER_ADDON_PDF)); - print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang); + print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang, '', $object); $somethingshown = $formfile->numoffiles; // Show links to link elements From e9ae888fc7d746584ffaf23519dba7c584645d0f Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 22 Jul 2022 16:01:39 +0200 Subject: [PATCH 53/71] FIX Accountancy - Label of VAT account is empty --- htdocs/accountancy/journal/expensereportsjournal.php | 2 +- htdocs/accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 96ab150dd24..8a2bbcdf81c 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -328,7 +328,7 @@ if ($action == 'writebookkeeping') { foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { - $accountingaccount->fetch($k, null, true); // TODO Use a cache for label + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label $account_label = $accountingaccount->label; // get compte id and label diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 9a65844871d..dbee23abaa8 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -441,7 +441,7 @@ if ($action == 'writebookkeeping') { foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { - $accountingaccount->fetch($k, null, true); // TODO Use a cache for label + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label $label_account = $accountingaccount->label; $bookkeeping = new BookKeeping($db); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index bd476173427..84d4b616ec3 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -453,7 +453,7 @@ if ($action == 'writebookkeeping') { foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { - $accountingaccount->fetch($k, null, true); // TODO Use a cache for label + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label $label_account = $accountingaccount->label; $bookkeeping = new BookKeeping($db); From 1dec64e32042af4c04fea7d352e6f9c0288ccc54 Mon Sep 17 00:00:00 2001 From: Chl Date: Fri, 22 Jul 2022 19:03:08 +0200 Subject: [PATCH 54/71] FIX #20476 migration postgresql 13.0.x to 14.0.x packaging type Taken from ff35bf8d47650b453f7224ced7857e2bbc53ecd5 --- htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 0b6d36d6743..a1b6a210a5b 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -85,7 +85,8 @@ UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'c DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', 'amarok', 'cameleo'); ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL; -ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL; +-- VMYSQL4.3 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL USING packaging::real; -- For v14 From 3af167db6c656d144ade2d84eca2b6c0f9beb7a5 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 23 Jul 2022 13:54:07 +0200 Subject: [PATCH 55/71] fix: #21553, fourn prod Id is required to find emballage value --- htdocs/fourn/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 35e5257fce0..8a3a303c522 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -590,7 +590,7 @@ if (empty($reshook)) { $localtax1_tx, $localtax2_tx, $idprod, - 0, // We already have the $idprod always defined + $productsupplier->product_fourn_price_id, $ref_supplier, $remise_percent, $price_base_type, From 9463f24a73dd9af2808eb80daace75c97f48bfea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 11:35:56 +0200 Subject: [PATCH 56/71] Better fix --- htdocs/supplier_proposal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 595be78d4df..8f7094ee486 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -302,7 +302,7 @@ $sql .= " p.rowid as project_id, p.ref as project_ref,"; if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " sc.fk_soc, sc.fk_user,"; } -$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as statut, u.admin, u.employee, u.email as uemail"; +$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as ustatus, u.admin, u.employee, u.email as uemail"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { From 9209c83054b909eeaaa4c8ce48ea868c3e907aa0 Mon Sep 17 00:00:00 2001 From: marc Date: Sun, 24 Jul 2022 14:49:57 +0200 Subject: [PATCH 57/71] Fix deleting logo/photo doesn't delete file from disk --- htdocs/societe/card.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index b6c483fc026..b20a00e0c4d 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -554,9 +554,7 @@ if (empty($reshook)) { } //var_dump($object->array_languages);exit; - if (GETPOST('deletephoto')) { - $object->logo = ''; - } elseif (!empty($_FILES['photo']['name'])) { + if (!empty($_FILES['photo']['name'])) { $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); } From d8dfe360ecfab25fef8e78b6db926964c5209cc0 Mon Sep 17 00:00:00 2001 From: marc Date: Sun, 24 Jul 2022 15:03:32 +0200 Subject: [PATCH 58/71] Fix #21518 delete old logo/photo from disk when load a new logo/photo --- htdocs/societe/card.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index b20a00e0c4d..0436a1160a7 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -555,6 +555,7 @@ if (empty($reshook)) { //var_dump($object->array_languages);exit; if (!empty($_FILES['photo']['name'])) { + $current_logo = $object->logo; $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); } @@ -784,6 +785,13 @@ if (empty($reshook)) { } if ($file_OK) { if (image_format_supported($_FILES['photo']['name']) > 0) { + if($current_logo != $object->logo) { + $fileimg = $dir.'/'.$current_logo; + $dirthumbs = $dir.'/thumbs'; + dol_delete_file($fileimg); + dol_delete_dir_recursive($dirthumbs); + } + dol_mkdir($dir); if (@is_dir($dir)) { From bd88c9e0cd0d0361ffd6aa91036d487fbbaa221a Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 24 Jul 2022 13:15:39 +0000 Subject: [PATCH 59/71] Fixing style errors. --- htdocs/societe/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 0436a1160a7..c8370452d4f 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -785,11 +785,11 @@ if (empty($reshook)) { } if ($file_OK) { if (image_format_supported($_FILES['photo']['name']) > 0) { - if($current_logo != $object->logo) { + if ($current_logo != $object->logo) { $fileimg = $dir.'/'.$current_logo; $dirthumbs = $dir.'/thumbs'; dol_delete_file($fileimg); - dol_delete_dir_recursive($dirthumbs); + dol_delete_dir_recursive($dirthumbs); } dol_mkdir($dir); From 266b0213a5286fdb8841283b22f835082c44b0f4 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 25 Jul 2022 13:18:03 +0200 Subject: [PATCH 60/71] fix: filter Status Not applicable into is not correctly manage on Agenda list --- htdocs/comm/action/index.php | 10 ++++++---- htdocs/comm/action/peruser.php | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 419d98dbef8..9b451a47659 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -109,7 +109,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m"); $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W"); $day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d"); $pid = GETPOST("search_projectid", "int", 3) ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3); -$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo' +$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1 $type = GETPOSTISSET("search_type", 'aZ09') ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09'); $maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW; $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') @@ -760,12 +760,14 @@ if ($type) { if ($status == '0') { $sql .= " AND a.percent = 0"; } -if ($status == '-1') { +if ($status == '-1' || $status == 'na') { + // Not applicable $sql .= " AND a.percent = -1"; -} // Not applicable +} if ($status == '50') { + // Running already started $sql .= " AND (a.percent > 0 AND a.percent < 100)"; -} // Running already started +} if ($status == 'done' || $status == '100') { $sql .= " AND (a.percent = 100)"; } diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 82c15392349..78fcfe657db 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -99,7 +99,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m"); $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W"); $day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d"); $pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3); -$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo' +$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1 $type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha'); $maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') @@ -626,12 +626,14 @@ if ($type) { if ($status == '0') { $sql .= " AND a.percent = 0"; } -if ($status == '-1') { +if ($status == '-1' || $status == 'na') { + // Not applicable $sql .= " AND a.percent = -1"; -} // Not applicable +} if ($status == '50') { + // Running already started $sql .= " AND (a.percent > 0 AND a.percent < 100)"; -} // Running already started +} if ($status == 'done' || $status == '100') { $sql .= " AND (a.percent = 100)"; } From a77eba021b9ed282a428e38fa49e1605478b24b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:08:48 +0200 Subject: [PATCH 61/71] Fix makepack --- build/README | 24 ++---------------------- build/makepack-dolibarr.pl | 16 ++++++++++++---- build/makepack-howto.txt | 31 +++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/build/README b/build/README index 626953f9376..19cf4ad1ec2 100644 --- a/build/README +++ b/build/README @@ -13,32 +13,12 @@ It is here only to build Dolibarr packages, and those generated packages will no There are several tools: +-------------------------------------------------------------------------------------------------- - To build full Dolibarr packages, launch the script > Launch command perl makepack-dolibarr.pl --------------------------------------------------------------------------------------------------- - - -Prerequisites to build tgz, debian and rpm packages: -> apt-get install tar dpkg dpatch p7zip-full rpm zip - - --------------------------------------------------------------------------------------------------- - -Prerequisites to build autoexe DoliWamp package: -> apt-get install wine q4wine -> Launch "wine cmd" to check a drive Z: pointing to / exists. -> Install InnoSetup - For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/ -> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB - For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com). - See file build/exe/doliwamp.iss to know the doliwamp version currently setup. -> Add path to ISCC into PATH windows var: - Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH -> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded), - open file build/exe/doliwamp.iss and click on button "Compile". - The .exe file will be build into directory build. +See makepack-howto.txt for prerequisites. -------------------------------------------------------------------------------------------------- diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 2cce46146c4..48e89713216 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -76,15 +76,23 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"}) { print "Error: Missing environment variables.\n"; print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n"; + print "$PROG.$Extension aborted.\n"; + print "\n"; + print "You can set them with\n"; + print "On Linux:\n"; + print "export DESTIBETARC='/tmp'; export DESTISTABLE='/tmp';\n"; + print "On Windows:\n"; + print "set DESTIBETARC=c:/tmp\n"; + print "set DESTISTABLE=c:/tmp;\n"; + print "\n"; print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n"; print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n"; - print "$PROG.$Extension aborted.\n"; sleep 2; exit 1; } if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"}) { - print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n"; + print "Error: Directory of environment variable DESTIBETARC ($ENV{'DESTIBETARC'}) or DESTISTABLE ($ENV{'DESTISTABLE'}) does not exist.\n"; print "$PROG.$Extension aborted.\n"; sleep 2; exit 1; @@ -94,7 +102,7 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"}) # -------------- if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; } elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; } -elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; } +elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i || "$^O" =~ /msys/i) { $OS='windows'; $CR="\r"; } if (! $OS) { print "Error: Can't detect your OS.\n"; print "Can't continue.\n"; @@ -390,7 +398,7 @@ if ($nboftargetok) { $olddir=getcwd(); chdir("$SOURCE"); - print "Clean $SOURCE/htdocs\n"; + print "Clean $SOURCE/htdocs/includes/autoload.php\n"; $ret=`rm -f $SOURCE/htdocs/includes/autoload.php`; $ret=`git ls-files . --exclude-standard --others`; diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index d4e37e32629..be88302cd1d 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -1,7 +1,34 @@ ----- Dolibarr Makepack How To ----- This documentation describe steps to build a BETA or RELEASE versions -of Dolibarr. There is a chapter for BETA version and a chapter for -RELEASE version. +of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE version. + + +***** Prerequisites For Linux ***** + +Prerequisites to build tgz, debian and rpm packages: +> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli + +Prerequisites to build autoexe DoliWamp package: +> apt-get install wine q4wine +> Launch "wine cmd" to check a drive Z: pointing to / exists. +> Install InnoSetup + For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/ +> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB + For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com). + See file build/exe/doliwamp.iss to know the doliwamp version currently setup. +> Add path to ISCC into PATH windows var: + Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH +> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded), + open file build/exe/doliwamp.iss and click on button "Compile". + The .exe file will be build into directory build. + + +***** Prerequisites For Windows ***** + +Install Perl +Install WampServer-3.2.*-64.exe +isetup-5.5.8.exe + ***** Actions to do a BETA ***** This files describe steps made by Dolibarr packaging team to make a From 783d7bfe20d4b7c8230d440b9d93d08c89d67b22 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:12:20 +0200 Subject: [PATCH 62/71] Fix makepack for windows --- build/makepack-dolibarr.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 48e89713216..966b9a16631 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -65,7 +65,7 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/; $SOURCE="$DIR/.."; $DESTI="$SOURCE/build"; -if ($SOURCE !~ /^\//) +if ($SOURCE !~ /^\// && $SOURCE !~ /^[a-z]:/i) { print "Error: Launch the script $PROG.$Extension with its full path from /.\n"; print "$PROG.$Extension aborted.\n"; From 00328a5221264c8d2aa9285f13b5a54d6eb2f601 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:19:38 +0200 Subject: [PATCH 63/71] Fix bad spec file --- build/rpm/dolibarr_generic.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index aeddd5526f8..de0f7128dd6 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -54,7 +54,7 @@ BuildRequires: desktop-file-utils Group: Applications/Productivity Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu Requires: mysql, mysql-client -%else%_datadir/dolibarr/htdocs/datapolicy +%else %if 0%{?suse_version} # Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros Group: Productivity/Office/Management @@ -125,7 +125,7 @@ cui hai bisogno ed essere facile da usare. %if 0%{?sles_version} %{__rm} -rf $RPM_BUILD_ROOT -%{__mkdir} $RPM_BUILD_ROOT%_datadir/dolibarr/htdocs/datapolicy +%{__mkdir} $RPM_BUILD_ROOT% %{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir} %{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name} %else From 3640e1b3a3c9f6de6cce2ab0110e3140306d4b2c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:24:30 +0200 Subject: [PATCH 64/71] Fix spec file --- build/rpm/dolibarr_generic.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index de0f7128dd6..d8c49176db1 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -67,7 +67,7 @@ Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring Requires: mysql-server, mysql Requires: php-mysqli >= 4.1.0 %endif -%endif%_datadir/dolibarr/htdocs/eventorganization +%endif %endif From 55e46e2f097bf3fe5afbc33d511480e56e54773f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:41:41 +0200 Subject: [PATCH 65/71] Prepare 15.0.3 --- ChangeLog | 75 ++++++++++++++++++++++++++++++++++++++ build/makepack-dolibarr.pl | 2 +- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b67cbabafb4..649851f526b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,81 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 15.0.3 compared to 15.0.2 ***** + +FIX: 15.0: modules cannot declare more than 1 cron job using the same method with different parameters +FIX: 15 fix graph ficheinter status +FIX: #18704 +FIX: #20444 +FIX: #20448 missing preg_replace for vat rate when adding a free line +FIX: #20476 migration postgresql 13.0.x to 14.0.x packaging type +FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_… +FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB +FIX: #20527 Accountancy - Unbalanced entry proposed when an employee are declared on a social contribution +FIX: #20527 Accountancy Unbalanced entry proposed when an employee are declared on social contribution +FIX: #20621 signature online with proposal with n page. +FIX: #20696 +FIX: #20828 +FIX: #20886 : manage durations in list_print_total.tpl.php +FIX: #20902 +FIX: #21051 +FIX: #21093 +FIX: #21138 +FIX: #21140 +FIX: #21174 +FIX: #21323 +FIX: #21472 On the bank transfer lists, a change of page switches to the lists of the direct debit module +FIX: #21495 +FIX: #21518 +FIX: Accountancy - Label of VAT account is empty +FIX: Accountancy - Model account list - Problem of CSRF +FIX: Accountancy - Partitioning of the entity on an automatic binding +FIX: add missing thead, th and id on table +FIX: backport commit 5b3fcc5e43979b1b0789bf81fb8f1b2b59c93056, chkbxlst cannot be emptied +FIX: Bank account not set when creating invoice from order +FIX: Bank transfer - Link on code supplier invoice was bad +FIX: Can convert a partially closed down payment when close for +FIX: class center linkedObjectblock order date +FIX: count elements in invoice list (Issue #21444) +FIX: Customer price non numeric warning when 0 vat. +FIX: errors in getLinesArray() +FIX: False alert of WAF when there is "set" into some URL action=update. +FIX: Intervention graph by status on ficheinter Index page +FIX: Intervention url link into Commerce index +FIX: Fix get origin from other than supplier proposal when add a new supplier proposal +FIX: Fix show errors in card +FIX: fourn/commande/card.php Added "$object" parameter to $formfile->showdocuments call +FIX: french traductions for payment methods +FIX: hook for dol_format_address +FIX: Index page for "Sales" give wrong URL link to Intervention +FIX: issue Dolibarr#21495 for v15 +FIX: label and get_substitutionarray_each_var_object on ODT generation +FIX: load product stock in inventory lines +FIX: missing morecss for multiselectarray +FIX: missins time spent list menu +FIX: new member subscription: bank account and payment mode might be hidden +FIX: ODT generation of BOM document +FIX: ODT tags for subobjects {object_subobject_yyy} was not working. +FIX: qty received label in Squille PDF model +FIX: rank duplicate on mass action invoice from multiple orders +FIX: regression + add $forceentity parameter +FIX: regression PR #20713 +FIX: security breach if we have same ref number in multiple entities +FIX: selection of type of invoice +FIX: Send remind to pay invoice only on validated invoices +FIX: Show sellist type of extrafield when none category selected +FIX: signature online with proposal with n page. +FIX: sql error when PRODUCT_USE_SUPPLIER_PACKAGING enabled. +FIX: sql order +FIX: trash icon on crontask list to do not work +FIX: v15 linked object block center order date +FIX: Warning on attribut +FIX: We must remove empty values of $features array in fetchByProductCombination2ValuePairs() because some products can use only several attributes in their variations and not necessarily all. In this case, fetch doesn't work without my correction +FIX: with callback function +FIX: xml file for company with special chars in name +FIX: Zatca QR code must use company name/vat + + ***** ChangeLog for 15.0.2 compared to 15.0.1 ***** FIX: #19777 #20281 diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 966b9a16631..fd1961e40e2 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -83,7 +83,7 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"}) print "export DESTIBETARC='/tmp'; export DESTISTABLE='/tmp';\n"; print "On Windows:\n"; print "set DESTIBETARC=c:/tmp\n"; - print "set DESTISTABLE=c:/tmp;\n"; + print "set DESTISTABLE=c:/tmp\n"; print "\n"; print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n"; print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n"; From a891239013a9e1b0690815504876649b7d7429ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:57:07 +0200 Subject: [PATCH 66/71] Remove need for cat and sed --- build/makepack-dolibarr.pl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index fd1961e40e2..da9ed430c72 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -1089,8 +1089,18 @@ if ($nboftargetok) { $SOURCEBACK=$SOURCE; $SOURCEBACK =~ s/\//\\/g; - print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n"; - $ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; + print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n"; + + #$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; + open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!; + open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!; + while() + { + $_ =~ s/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g; + print OUT $_; + } + close(IN); + close(OUT); print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n"; $cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; From f1d41a08078106660333c6611e0ef4bb47256feb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:58:08 +0200 Subject: [PATCH 67/71] Ignore --- build/exe/doliwamp/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/exe/doliwamp/.gitignore b/build/exe/doliwamp/.gitignore index ce74d54f78e..f9a2ea83b34 100644 --- a/build/exe/doliwamp/.gitignore +++ b/build/exe/doliwamp/.gitignore @@ -1 +1 @@ -/doliwamp.tmp.iss +/doliwamp.tmp.iss* From d212209b4b8e438bdaf5a64500c032bee63d401a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 01:24:04 +0200 Subject: [PATCH 68/71] Fix packaging for windows --- build/exe/doliwamp/doliwamp.iss | 5 ++--- build/makepack-dolibarr.pl | 28 +++++++++++++++++++++------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index dbf74a96f67..6a2b6861c1e 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -24,15 +24,14 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__ ;OutputManifestFile=build\doliwampbuild.log ; Define full path from which all relative path are defined ; You must modify this to put here your dolibarr root directory -;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx SourceDir=..\..\.. AppId=doliwamp AppPublisher=NLTechno -AppPublisherURL=https://www.nltechno.com +AppPublisherURL=https://www.dolicloud.com AppSupportURL=https://www.dolibarr.org AppUpdatesURL=https://www.dolibarr.org AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software. -AppCopyright=Copyright (C) 2008-2020 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre) +AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre) DefaultDirName=c:\dolibarr DefaultGroupName=Dolibarr ;LicenseFile=COPYING diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index da9ed430c72..0c319fada33 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -1084,8 +1084,12 @@ if ($nboftargetok) { print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n"; unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"; - print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n"; - + if ($OS eq 'windows') { + print "Check that ISCC.exe is in your PATH.\n"; + } else { + print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n"; + } + $SOURCEBACK=$SOURCE; $SOURCEBACK =~ s/\//\\/g; @@ -1102,20 +1106,30 @@ if ($nboftargetok) { close(IN); close(OUT); - print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n"; - $cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; + print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n"; + + if ($OS eq 'windows') { + $cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; + } else { + $cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; + } print "$cmd\n"; $ret= `$cmd`; - #print "$ret\n"; + print "ret=$ret\n"; # Move to final dir print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"); print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; - $ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`; + + use File::Copy; + + #$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`; + $ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"); print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n"; - $ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; + #$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; + $ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"); next; } From 577ccf69bf7350bf671067b45359dd5901da5388 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 01:37:49 +0200 Subject: [PATCH 69/71] Clean packager --- build/exe/doliwamp/doliwamp.iss | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 6a2b6861c1e..9aad65ecbe2 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -26,12 +26,12 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__ ; You must modify this to put here your dolibarr root directory SourceDir=..\..\.. AppId=doliwamp -AppPublisher=NLTechno +AppPublisher=DoliCloud AppPublisherURL=https://www.dolicloud.com AppSupportURL=https://www.dolibarr.org AppUpdatesURL=https://www.dolibarr.org AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software. -AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre) +AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (DoliCloud), Fabian Rodriguez (Le Goût du Libre) DefaultDirName=c:\dolibarr DefaultGroupName=Dolibarr ;LicenseFile=COPYING @@ -100,16 +100,11 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi ; PhpMyAdmin, Apache, Php, Mysql ; Put here path of Wampserver applications -; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 -; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 -; Value OK: apache 2.4.9, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe) ; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe) +; Value OK: apache 2.4.51, php 7.3.33, mariadb10.6.5 (wampserver3.2.6_x64.exe) Source: "C:\wamp64\apps\phpmyadmin4.9.2\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.2"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange" -;Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" Source: "C:\wamp64\bin\apache\apache2.4.41\*.*"; DestDir: "{app}\bin\apache\apache2.4.41"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" -;Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" Source: "C:\wamp64\bin\php\php7.3.12\*.*"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" -;Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe" Source: "C:\wamp64\bin\mariadb\mariadb10.4.10\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe" ; Mysql data files (does not overwrite if exists) @@ -127,11 +122,9 @@ Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ". Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion; Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion; Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion; -;Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion; Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.41\conf"; Flags: ignoreversion; Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion; Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion; -;Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion; Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion; Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion; Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion; @@ -239,13 +232,10 @@ procedure InitializeWizard(); begin //version des applis, a modifier pour chaque version de WampServer 2 - //apacheVersion := '2.4.9'; - //phpVersion := '5.5.12' ; apacheVersion := '2.4.41'; phpVersion := '7.3.12' ; - //mysqlVersion := '5.0.45'; mysqlVersion := '10.4.10'; - phpmyadminVersion := '4.1.14'; + phpmyadminVersion := '4.9.2'; smtpServer := 'localhost'; apachePort := '80'; From e50a5fd81c31ac6e12afa6fb92e818f5f7502416 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 02:31:55 +0200 Subject: [PATCH 70/71] Update doliwamp package script --- build/exe/doliwamp/doliwamp.iss | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 9aad65ecbe2..f2f65ee3abb 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -80,7 +80,7 @@ Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm: Name: "{app}\logs" Name: "{app}\tmp" Name: "{app}\dolibarr_documents" -Name: "{app}\bin\apache\apache2.4.41\logs" +Name: "{app}\bin\apache\apache2.4.51\logs" [Files] ; Stop/start @@ -102,10 +102,10 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi ; Put here path of Wampserver applications ; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe) ; Value OK: apache 2.4.51, php 7.3.33, mariadb10.6.5 (wampserver3.2.6_x64.exe) -Source: "C:\wamp64\apps\phpmyadmin4.9.2\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.2"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange" -Source: "C:\wamp64\bin\apache\apache2.4.41\*.*"; DestDir: "{app}\bin\apache\apache2.4.41"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" -Source: "C:\wamp64\bin\php\php7.3.12\*.*"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" -Source: "C:\wamp64\bin\mariadb\mariadb10.4.10\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe" +Source: "C:\wamp64\apps\phpmyadmin4.9.7\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.7"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange" +Source: "C:\wamp64\bin\apache\apache2.4.51\*.*"; DestDir: "{app}\bin\apache\apache2.4.51"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" +Source: "C:\wamp64\bin\php\php7.3.33\*.*"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" +Source: "C:\wamp64\bin\mariadb\mariadb10.6.5\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe" ; Mysql data files (does not overwrite if exists) ; We must copy them because the tool mysql_install_db.exe to generate them at first install does not return to prompt so make install hang @@ -122,10 +122,10 @@ Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ". Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion; Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion; Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion; -Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.41\conf"; Flags: ignoreversion; +Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.51\conf"; Flags: ignoreversion; Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion; -Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion; -Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion; +Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion; +Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion; Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion; Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion; Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion; @@ -232,10 +232,10 @@ procedure InitializeWizard(); begin //version des applis, a modifier pour chaque version de WampServer 2 - apacheVersion := '2.4.41'; - phpVersion := '7.3.12' ; - mysqlVersion := '10.4.10'; - phpmyadminVersion := '4.9.2'; + apacheVersion := '2.4.51'; + phpVersion := '7.3.33' ; + mysqlVersion := '10.6.5'; + phpmyadminVersion := '4.9.7'; smtpServer := 'localhost'; apachePort := '80'; @@ -369,9 +369,9 @@ begin // Migration of database -// datadir := pathWithSlashes+'/bin/mariadb/marradb10.4.10/data'; -// exedirold := pathWithSlashes+'/bin/mariadb/marradb10.4.10/'; -// exedirnew := pathWithSlashes+'/bin/mariadb/marradb10.4.10/'; +// datadir := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/data'; +// exedirold := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/'; +// exedirnew := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/'; // If we have a new database version, we should only copy old my.ini file into new directory // and change only all basedir= strings to use new version. Like this, data dir is still correct. @@ -1071,7 +1071,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec [UninstallDelete] Type: files; Name: "{app}\*.*" -Type: files; Name: "{app}\bin\mariadb\mariadb10.4.10\*.*" +Type: files; Name: "{app}\bin\mariadb\mariadb10.6.5\*.*" Type: filesandordirs; Name: "{app}\alias" Type: filesandordirs; Name: "{app}\apps" Type: filesandordirs; Name: "{app}\bin\apache" From a9c8c24e9b17f5b48af599345a5f633adecc7b0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 02:34:47 +0200 Subject: [PATCH 71/71] Disable building of doliwamp package on non windows --- build/makepack-dolibarr.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 0c319fada33..01240ae34d7 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -1111,7 +1111,7 @@ if ($nboftargetok) { if ($OS eq 'windows') { $cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; } else { - $cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; + #$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; } print "$cmd\n"; $ret= `$cmd`;