From 89d1389e2d2c7c79bfd517df05a96b10b2d3b9b2 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Mon, 27 Jun 2022 12:46:39 +0200 Subject: [PATCH 01/16] 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/16] 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/16] 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/16] 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 bf98c77d73c97f2a42a803b6d904589d76b415d0 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Thu, 30 Jun 2022 10:24:47 +0200 Subject: [PATCH 05/16] 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 06/16] 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 07/16] 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 2e065e1702ef94217ef79e6a6a8cc9a95db0c5cd Mon Sep 17 00:00:00 2001 From: Quentin VIAL-GOUTEYRON Date: Tue, 5 Jul 2022 13:11:36 +0200 Subject: [PATCH 08/16] 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 09/16] 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 10/16] 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 11/16] 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 12/16] 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 13/16] 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 b2e4b6ab5decbb9c8a2e811ce65b5a56e99278fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Jul 2022 19:10:46 +0200 Subject: [PATCH 14/16] 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 15/16] 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 16/16] 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);
'.$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").'