From dcb7e39bd2141ed9ecab5124a32933eaa6d74d83 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Fri, 28 Jan 2022 02:27:09 +0100 Subject: [PATCH 01/17] Update llx_c_action_trigger.sql --- htdocs/install/mysql/data/llx_c_action_trigger.sql | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index 258b56f1471..2df33b47184 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -9,6 +9,7 @@ -- Copyright (C) 2013 Cedric Gross -- Copyright (C) 2014 Raphaël Doursenaud -- Copyright (C) 2015 Bahfir Abbes +-- Copyright (C) 2021-2022 Anthony Berton -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -155,3 +156,11 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',151); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_DELETE','Task deleted','Executed when a project task is deleted','project',152); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ACTION_CREATE','Action added','Executed when an action is added to the agenda','agenda',700); + +-- oliday +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_CREATE','Holiday created','Executed when a holiday is created','holiday',800); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_MODIFY','Holiday modified','Executed when a holiday is modified','holiday',801); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Holiday validated','Executed when a holiday is validated','holiday',802); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Holiday aprouved','Executed when a holiday is aprouved','holiday',803); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_CANCEL','Holiday canceled','Executed when a holiday is canceled','holiday',802); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_DELETE','Holiday deleted','Executed when a holiday is deleted','holiday',804); From 6fdbda93f858b2dc39836364cc2bb4fb82d0e926 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Fri, 28 Jan 2022 02:28:55 +0100 Subject: [PATCH 02/17] Update 14.0.0-15.0.0.sql --- htdocs/install/mysql/migration/14.0.0-15.0.0.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql index 476e63aab68..9af52c8700a 100644 --- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql +++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql @@ -494,3 +494,10 @@ INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) value INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_DELETE','User update','Executed when a user is deleted','user',303); INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_NEW_PASSWORD','User update','Executed when a user is change password','user',304); INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_ENABLEDISABLE','User update','Executed when a user is enable or disable','user',305); + +INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_CREATE','Holiday created','Executed when a holiday is created','holiday',800); +INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_MODIFY','Holiday modified','Executed when a holiday is modified','holiday',801); +INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Holiday validated','Executed when a holiday is validated','holiday',802); +INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Holiday aprouved','Executed when a holiday is aprouved','holiday',803); +INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_CANCEL','Holiday canceled','Executed when a holiday is canceled','holiday',802); +INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_DELETE','Holiday deleted','Executed when a holiday is deleted','holiday',804); From 7fb0a788355ec40084f772d12419d367445cc901 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Fri, 28 Jan 2022 02:30:04 +0100 Subject: [PATCH 03/17] Update card.php --- htdocs/holiday/card.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 1c357d8b759..1944969c6fa 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -784,6 +784,12 @@ if (empty($reshook)) { $result = $object->update($user); if ($result >= 0 && $oldstatus == Holiday::STATUS_APPROVED) { // holiday was already validated, status 3, so we must increase back the balance + // Call trigger + $result = $object->call_trigger('HOLIDAY_CANCEL', $user); + if ($result < 0) { + $error++; + } + // Calculcate number of days consummed $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); From 28e4cf55538f83e12998b9063fdb899bbbbffe2f Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Fri, 28 Jan 2022 02:30:49 +0100 Subject: [PATCH 04/17] Update card.php --- htdocs/holiday/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 1944969c6fa..02c845aa6d1 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -7,6 +7,7 @@ * Copyright (C) 2014-2017 Ferran Marcet * Copyright (C) 2018 Frédéric France * Copyright (C) 2020-2021 Udo Tamm + * Copyright (C) 2022 Anthony Berton * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 1214ffaf3dcd375e68f92a4915c096fb306baa97 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 28 Jan 2022 01:32:44 +0000 Subject: [PATCH 05/17] Fixing style errors. --- htdocs/holiday/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 02c845aa6d1..fb53811aeaf 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -790,7 +790,7 @@ if (empty($reshook)) { if ($result < 0) { $error++; } - + // Calculcate number of days consummed $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); From 8c38125e79d654367ede5699856a60b66ecb41fe Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Fri, 28 Jan 2022 10:30:41 +0100 Subject: [PATCH 06/17] Update vcard.php --- htdocs/user/vcard.php | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/htdocs/user/vcard.php b/htdocs/user/vcard.php index 57778c44259..ee33821ace7 100644 --- a/htdocs/user/vcard.php +++ b/htdocs/user/vcard.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2020 Tobias Sekan + * Copyright (C) 2021-2022 Anthony Berton * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -64,27 +65,27 @@ $v->setUid('DOLIBARR-USERID-'.$user2->id); $v->setName($user2->lastname, $user2->firstname, "", $user2->civility_code, ""); $v->setFormattedName($user2->getFullName($langs, 1)); -$v->setPhoneNumber($user2->phone_pro, "TYPE=WORK;VOICE"); -//$v->setPhoneNumber($user2->phone_perso,"TYPE=HOME;VOICE"); -$v->setPhoneNumber($user2->phone_mobile, "TYPE=CELL;VOICE"); -$v->setPhoneNumber($user2->fax, "TYPE=WORK;FAX"); +$v->setPhoneNumber($user2->office_phone, "TYPE=WORK;VOICE"); +$v->setPhoneNumber($user2->personal_mobile,"TYPE=HOME;VOICE"); +$v->setPhoneNumber($user2->user_mobile, "TYPE=CELL;VOICE"); +$v->setPhoneNumber($user2->office_fax, "TYPE=WORK;FAX"); $country = $user2->country_code ? $user2->country : ''; $v->setAddress("", "", $user2->address, $user2->town, $user2->state, $user2->zip, $country, "TYPE=WORK;POSTAL"); $v->setLabel("", "", $user2->address, $user2->town, $user2->state, $user2->zip, $country, "TYPE=WORK"); -$v->setEmail($user2->email); +$v->setEmail($user2->email, "TYPE=WORK"); $v->setNote($user2->note); $v->setTitle($user2->poste); // Data from linked company if ($company->id) { $v->setURL($company->url, "TYPE=WORK"); - if (!$user2->phone_pro) { + if (!$user2->office_phone) { $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); } - if (!$user2->fax) { + if (!$user2->office_fax) { $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); } if (!$user2->zip) { @@ -96,16 +97,16 @@ if ($company->id) { // was set before, don't set twice } elseif (empty(trim($user2->email))) { // when user e-mail is empty, use only company e-mail - $v->setEmail($company->email); + $v->setEmail($company->email, "TYPE=WORK"); } elseif (strtolower(end(explode("@", $user2->email))) == strtolower(end(explode("@", $company->email)))) { // when e-mail domain of user and company are the same, use user e-mail at first (and company e-mail at second) - $v->setEmail($user2->email); + $v->setEmail($user2->email, "TYPE=WORK"); // support by Microsoft Outlook (2019 and possible earlier) $v->setEmail($company->email, 'INTERNET'); } else { // when e-mail of user and company complete different use company e-mail at first (and user e-mail at second) - $v->setEmail($company->email); + $v->setEmail($company->email, "TYPE=WORK"); // support by Microsoft Outlook (2019 and possible earlier) $v->setEmail($user2->email, 'INTERNET'); @@ -118,7 +119,7 @@ if ($company->id) { } // Personal informations -$v->setPhoneNumber($user2->phone_perso, "TYPE=HOME;VOICE"); +$v->setPhoneNumber($user2->personal_mobile, "TYPE=HOME;VOICE"); if ($user2->birth) { $v->setBirthday($user2->birth); } From adac1d3dbb1cb2499274f765b82717998c1c998b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 28 Jan 2022 09:34:52 +0000 Subject: [PATCH 07/17] Fixing style errors. --- htdocs/user/vcard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/vcard.php b/htdocs/user/vcard.php index ee33821ace7..0f9085d0b52 100644 --- a/htdocs/user/vcard.php +++ b/htdocs/user/vcard.php @@ -66,7 +66,7 @@ $v->setName($user2->lastname, $user2->firstname, "", $user2->civility_code, ""); $v->setFormattedName($user2->getFullName($langs, 1)); $v->setPhoneNumber($user2->office_phone, "TYPE=WORK;VOICE"); -$v->setPhoneNumber($user2->personal_mobile,"TYPE=HOME;VOICE"); +$v->setPhoneNumber($user2->personal_mobile, "TYPE=HOME;VOICE"); $v->setPhoneNumber($user2->user_mobile, "TYPE=CELL;VOICE"); $v->setPhoneNumber($user2->office_fax, "TYPE=WORK;FAX"); From 7c9b97d035661d0c2b98dd3ec26009f428548581 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jan 2022 16:29:27 +0100 Subject: [PATCH 08/17] css --- htdocs/core/ajax/selectsearchbox.php | 48 ++++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 1814b476d06..ae4f7c41515 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -65,58 +65,58 @@ $arrayresult = array(); // Define $searchform if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire) { - $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_member', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_member').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_member', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_member', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire) { - $arrayresult['searchintothirdparty'] = array('position'=>10, 'shortcut'=>'T', 'img'=>'object_company', 'label'=>$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text'=>img_picto('', 'object_company').' '.$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/societe/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintothirdparty'] = array('position'=>10, 'shortcut'=>'T', 'img'=>'object_company', 'label'=>$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text'=>img_picto('', 'object_company', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/societe/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->societe->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTACT_DISABLED) && $user->rights->societe->lire) { - $arrayresult['searchintocontact'] = array('position'=>15, 'shortcut'=>'A', 'img'=>'object_contact', 'label'=>$langs->trans("SearchIntoContacts", $search_boxvalue), 'text'=>img_picto('', 'object_contact').' '.$langs->trans("SearchIntoContacts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contact/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintocontact'] = array('position'=>15, 'shortcut'=>'A', 'img'=>'object_contact', 'label'=>$langs->trans("SearchIntoContacts", $search_boxvalue), 'text'=>img_picto('', 'object_contact', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoContacts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contact/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (((!empty($conf->product->enabled) && $user->rights->produit->lire) || (!empty($conf->service->enabled) && $user->rights->service->lire)) && empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_DISABLED)) { - $arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); // search on lot/serial numbers if ( ! empty($conf->productbatch->enabled) ) { - $arrayresult['searchintobatch'] = array('position'=>32, 'shortcut'=>'B', 'img'=>'object_lot', 'label'=>$langs->trans("SearchIntoBatch", $search_boxvalue), 'text'=>img_picto('', 'object_lot').' '.$langs->trans("SearchIntoBatch", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/stock/productlot_list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintobatch'] = array('position'=>32, 'shortcut'=>'B', 'img'=>'object_lot', 'label'=>$langs->trans("SearchIntoBatch", $search_boxvalue), 'text'=>img_picto('', 'object_lot', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoBatch", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/stock/productlot_list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } } if (!empty($conf->mrp->enabled) && $user->rights->mrp->read && empty($conf->global->MAIN_SEARCHFORM_MRP_DISABLED)) { - $arrayresult['searchintomo'] = array('position'=>35, 'shortcut'=>'', 'img'=>'object_mrp', 'label'=>$langs->trans("SearchIntoMO", $search_boxvalue), 'text'=>img_picto('', 'object_mrp').' '.$langs->trans("SearchIntoMO", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/mrp/mo_list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintomo'] = array('position'=>35, 'shortcut'=>'', 'img'=>'object_mrp', 'label'=>$langs->trans("SearchIntoMO", $search_boxvalue), 'text'=>img_picto('', 'object_mrp', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoMO", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/mrp/mo_list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->projet->lire) { - $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_project', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_project', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire) { - $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_PROPAL_DISABLED) && $user->rights->propal->lire) { - $arrayresult['searchintopropal'] = array('position'=>60, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'text'=>img_picto('', 'object_propal').' '.$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/comm/propal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintopropal'] = array('position'=>60, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'text'=>img_picto('', 'object_propal', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/comm/propal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->commande->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_ORDER_DISABLED) && $user->rights->commande->lire) { - $arrayresult['searchintoorder'] = array('position'=>70, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'text'=>img_picto('', 'object_order').' '.$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/commande/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoorder'] = array('position'=>70, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'text'=>img_picto('', 'object_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/commande/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->expedition->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_SHIPMENT_DISABLED) && $user->rights->expedition->lire) { - $arrayresult['searchintoshipment'] = array('position'=>80, 'img'=>'object_shipment', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('', 'object_shipment').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoshipment'] = array('position'=>80, 'img'=>'object_shipment', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('', 'object_shipment', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INVOICE_DISABLED) && $user->rights->facture->lire) { - $arrayresult['searchintoinvoice'] = array('position'=>90, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill').' '.$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoinvoice'] = array('position'=>90, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire) { - $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_supplier_proposal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_supplier_proposal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) { - $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_supplier_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_supplier_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) { - $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_supplier_invoice', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_supplier_invoice', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } // Customer payments @@ -125,7 +125,7 @@ if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUST 'position'=>170, 'img'=>'object_payment', 'label'=>$langs->trans("SearchIntoCustomerPayments", $search_boxvalue), - 'text'=>img_picto('', 'object_payment').' '.$langs->trans("SearchIntoCustomerPayments", $search_boxvalue), + 'text'=>img_picto('', 'object_payment', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoCustomerPayments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/paiement/list.php?leftmenu=customers_bills_payment'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } @@ -135,7 +135,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S 'position'=>175, 'img'=>'object_payment', 'label'=>$langs->trans("SearchIntoVendorPayments", $search_boxvalue), - 'text'=>img_picto('', 'object_payment').' '.$langs->trans("SearchIntoVendorPayments", $search_boxvalue), + 'text'=>img_picto('', 'object_payment', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoVendorPayments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/paiement/list.php?leftmenu=suppliers_bills_payment'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } @@ -145,29 +145,29 @@ if (!empty($conf->banque->enabled) && empty($conf->global->MAIN_SEARCHFORM_MISC_ 'position'=>180, 'img'=>'object_payment', 'label'=>$langs->trans("SearchIntoMiscPayments", $search_boxvalue), - 'text'=>img_picto('', 'object_payment').' '.$langs->trans("SearchIntoMiscPayments", $search_boxvalue), + 'text'=>img_picto('', 'object_payment', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoMiscPayments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/bank/various_payment/list.php?leftmenu=tax_various'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) { - $arrayresult['searchintocontract'] = array('position'=>130, 'img'=>'object_contract', 'label'=>$langs->trans("SearchIntoContracts", $search_boxvalue), 'text'=>img_picto('', 'object_contract').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contrat/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintocontract'] = array('position'=>130, 'img'=>'object_contract', 'label'=>$langs->trans("SearchIntoContracts", $search_boxvalue), 'text'=>img_picto('', 'object_contract', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contrat/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_FICHINTER_DISABLED) && $user->rights->ficheinter->lire) { - $arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read) { - $arrayresult['searchintotickets'] = array('position'=>145, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintotickets'] = array('position'=>145, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } // HR if (!empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) { - $arrayresult['searchintouser'] = array('position'=>200, 'shortcut'=>'U', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('', 'object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintouser'] = array('position'=>200, 'shortcut'=>'U', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('', 'object_user', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire) { - $arrayresult['searchintoexpensereport'] = array('position'=>210, 'img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('', 'object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoexpensereport'] = array('position'=>210, 'img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('', 'object_trip', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read) { - $arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } // Execute hook addSearchEntry From 8d75f575e5693506679aa86f9c269e8e66dd961c Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Fri, 28 Jan 2022 16:35:14 +0100 Subject: [PATCH 09/17] Fix missing reception module description translation key. --- htdocs/core/modules/modReception.class.php | 2 +- htdocs/langs/en_US/receptions.lang | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index 4696f15019a..29c10ccb3e5 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -47,7 +47,7 @@ class modReception extends DolibarrModules $this->module_position = '40'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); - $this->description = "Gestion des réceptions fournisseurs"; + $this->description = "ReceptionDescription"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'dolibarr'; diff --git a/htdocs/langs/en_US/receptions.lang b/htdocs/langs/en_US/receptions.lang index d9e8bdeebb7..3d69873c5fc 100644 --- a/htdocs/langs/en_US/receptions.lang +++ b/htdocs/langs/en_US/receptions.lang @@ -1,5 +1,6 @@ # Dolibarr language file - Source file is en_US - receptions -ReceptionsSetup=Product Reception setup +ReceptionDescription=Vendor reception management (Create reception documents) +ReceptionsSetup=Vendor Reception setup RefReception=Ref. reception Reception=Reception Receptions=Receptions From 3ec2769a0558e4fd0c5b6608fee370bdd41535bb Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Fri, 28 Jan 2022 17:22:41 +0100 Subject: [PATCH 10/17] FIX pay value --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index ec2fd256cfe..3e4fbd89527 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -290,7 +290,7 @@ if ($action == 'valid' && $user->rights->facture->creer) { $payment->datepaye = $now; $payment->fk_account = $bankaccount; $payment->amounts[$invoice->id] = $amountofpayment; - if ($pay == 'cash') { + if ($pay == 'LIQ') { $payment->pos_change = price2num(GETPOST('excess', 'alpha')); } From 8c403655a77d664dd1e7f835e2fd1db5e7131b3a Mon Sep 17 00:00:00 2001 From: Jay Yeo Date: Fri, 17 Dec 2021 12:09:14 +0700 Subject: [PATCH 11/17] FIX supplier_proposal when line update price U.P change 0 modify --- htdocs/supplier_proposal/class/supplier_proposal.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index ea10b4d7137..b239b6cc3da 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -725,6 +725,7 @@ class SupplierProposal extends CommonObject $total_ttc = $tabprice[2]; $total_localtax1 = $tabprice[9]; $total_localtax2 = $tabprice[10]; + $pu = $pu_ht = $tabprice[3]; // MultiCurrency $multicurrency_total_ht = $tabprice[16]; From 05ef2c714e7f9540d149c667b03f4251cd6095b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jan 2022 18:52:50 +0100 Subject: [PATCH 12/17] Update supplier_proposal.class.php --- .../supplier_proposal/class/supplier_proposal.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index b239b6cc3da..7980e3fc2ba 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -725,7 +725,9 @@ class SupplierProposal extends CommonObject $total_ttc = $tabprice[2]; $total_localtax1 = $tabprice[9]; $total_localtax2 = $tabprice[10]; - $pu = $pu_ht = $tabprice[3]; + $pu_ht = $tabprice[3]; + $pu_tva = $tabprice[4]; + $pu_ttc = $tabprice[5]; // MultiCurrency $multicurrency_total_ht = $tabprice[16]; @@ -733,6 +735,11 @@ class SupplierProposal extends CommonObject $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; + $pu = $pu_ht; + if ($price_base_type == 'TTC') { + $pu = $pu_ttc; + } + //Fetch current line from the database and then clone the object and set it in $oldline property $line = new SupplierProposalLine($this->db); $line->fetch($rowid); From 2fa1b01e2162a5758273a2fb65780dd78c861625 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jan 2022 19:51:59 +0100 Subject: [PATCH 13/17] Fix dark theme --- htdocs/theme/eldy/global.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index deb7cdadf9e..291a152a7de 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -59,7 +59,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { print "@media (prefers-color-scheme: dark) {"; } print ":root { - --colorbackhmenu1: #1d1e20; + --colorbackhmenu1: #3d3e40; --colorbackvmenu1: #2b2c2e; --colorbacktitle1: #2b2d2f; --colorbacktabcard1: #1d1e20; /* Must be same than colorbackbody */ From 38e39cfa96cd7f1eac1befb7d3df22d760a8568c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jan 2022 19:28:37 +0100 Subject: [PATCH 14/17] CSS --- htdocs/admin/index.php | 17 +++++++++++++---- htdocs/theme/eldy/global.inc.php | 6 ++++++ htdocs/theme/md/style.css.php | 12 ++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index daf20ce5aa2..787a9d6d820 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -47,6 +47,7 @@ llxHeader('', $langs->trans("Setup"), $wikihelp); print load_fiche_titre($langs->trans("SetupArea"), '', 'tools'); + if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) { $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('//i', '
', $conf->global->MAIN_MOTD_SETUPPAGE); if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) { @@ -76,12 +77,15 @@ print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySet print "

"; print ''; -print '

'; +print '
'; // Show info setup company if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) { $setupcompanynotcomplete = 1; } + +print '
'; + print img_picto('', 'company', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit&token='.newToken()), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup")); print '

'; print $langs->trans("SetupDescription3b"); @@ -90,10 +94,13 @@ if (!empty($setupcompanynotcomplete)) { $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"'); print '
'; } + +print '
'; + print '
'; print '
'; -print '
'; -print '
'; + +print '
'; // Show info setup module print img_picto('', 'cog', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules")); @@ -103,7 +110,9 @@ if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FO $warnpicto = img_warning($langs->trans("WarningEnableYourModulesApplications"), 'style="padding-right: 6px;"'); print '
'; } -print '
'; + +print '
'; + print '
'; print '
'; print '
'; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 291a152a7de..bf1e9dc967e 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -255,6 +255,12 @@ input:invalid, select:invalid, input.--error , select.--error { border-color: #ea1212; } +section.setupsection { + padding: 20px; + background-color: var(--colorbacktitle1); + border-radius: 5px; +} + .field-error-icon { color: #ea1212; !important; } /* Focus definitions must be after standard definition */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 0790db17cfb..6c596ad2916 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -463,6 +463,18 @@ input.short { width: 40px; } +input:invalid, select:invalid, input.--error , select.--error { + border-color: #ea1212; +} + +section.setupsection { + padding: 20px; + background-color: var(--colorbacktitle1); + border-radius: 5px; +} + +.field-error-icon { color: #ea1212; !important; } + textarea { border-radius: 0; border-top:solid 1px var(--inputbordercolor); From 266fc808af63aa5e49f96343bb64047b1e4c03b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jan 2022 00:15:55 +0100 Subject: [PATCH 15/17] Fix trans --- htdocs/langs/en_US/mrp.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 3f1aac53340..74bed0d9186 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -27,7 +27,7 @@ ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of materials ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ? ManufacturingEfficiency=Manufacturing efficiency ConsumptionEfficiency=Consumption efficiency -ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the production +ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the manufacturing or the disassembly ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product DeleteBillOfMaterials=Delete Bill Of Materials DeleteMo=Delete Manufacturing Order From d75dd51bb72d2b3ca7f9f03147c1c31646b42a20 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jan 2022 00:39:20 +0100 Subject: [PATCH 16/17] Clean code to debug fulldayevent --- htdocs/comm/action/card.php | 8 ++++---- htdocs/comm/action/class/actioncomm.class.php | 6 +++++- htdocs/comm/action/document.php | 6 +++--- htdocs/core/modules/modFicheinter.class.php | 9 +-------- htdocs/resource/element_resource.php | 10 +++++----- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 52b93acdabb..627c2f0ce51 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -280,7 +280,7 @@ if (empty($reshook) && $action == 'add') { if (!$error) { // Initialisation objet actioncomm $object->priority = GETPOSTISSET("priority") ? GETPOST("priority", "int") : 0; - $object->fulldayevent = (!empty($fulldayevent) ? 1 : 0); + $object->fulldayevent = ($fulldayevent ? 1 : 0); $object->location = GETPOST("location", 'alphanohtml'); $object->label = GETPOST('label', 'alphanohtml'); @@ -1960,7 +1960,7 @@ if ($id > 0) { } // Full day event - print ''.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).''; + print ''.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent ? 1 : 0, 3).''; $rowspan = 4; if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { @@ -1969,7 +1969,7 @@ if ($id > 0) { // Date start print ''.$langs->trans("DateActionStart").''; - if (!$object->fulldayevent) { + if (empty($object->fulldayevent)) { print dol_print_date($object->datep, 'dayhour', 'tzuser'); } else { print dol_print_date($object->datep, 'day', 'tzuser'); @@ -1982,7 +1982,7 @@ if ($id > 0) { // Date end print ''.$langs->trans("DateActionEnd").''; - if (!$object->fulldayevent) { + if (empty($object->fulldayevent)) { print dol_print_date($object->datef, 'dayhour', 'tzuser'); } else { print dol_print_date($object->datef, 'day', 'tzuser'); diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index e2adf06425f..8dd0d9febbe 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -549,7 +549,11 @@ class ActionComm extends CommonObject $sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", "; $sql .= ($userownerid > 0 ? $userownerid : "null").", "; $sql .= ($userdoneid > 0 ? $userdoneid : "null").", "; - $sql .= "'".$this->db->escape($this->label)."','".$this->db->escape($this->percentage)."','".$this->db->escape($this->priority)."','".$this->db->escape($this->fulldayevent)."','".$this->db->escape($this->location)."', "; + $sql .= "'".$this->db->escape($this->label)."', "; + $sql .= "'".$this->db->escape($this->percentage)."', "; + $sql .= "'".$this->db->escape($this->priority)."', "; + $sql .= "'".$this->db->escape($this->fulldayevent)."', "; + $sql .= "'".$this->db->escape($this->location)."', "; $sql .= "'".$this->db->escape($this->transparency)."', "; $sql .= (!empty($this->fk_element) ? ((int) $this->fk_element) : "null").", "; $sql .= (!empty($this->elementtype) ? "'".$this->db->escape($this->elementtype)."'" : "null").", "; diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 59c101c390d..c69d396cf26 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -194,11 +194,11 @@ if ($object->id > 0) { } // Full day event - print ''.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).''; + print ''.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent ? 1 : 0, 3).''; // Date start print ''.$langs->trans("DateActionStart").''; - if (!$object->fulldayevent) { + if (empty($object->fulldayevent)) { print dol_print_date($object->datep, 'dayhour', 'tzuser'); } else { print dol_print_date($object->datep, 'day', 'tzuser'); @@ -211,7 +211,7 @@ if ($object->id > 0) { // Date end print ''.$langs->trans("DateActionEnd").''; - if (!$object->fulldayevent) { + if (empty($object->fulldayevent)) { print dol_print_date($object->datef, 'dayhour', 'tzuser'); } else { print dol_print_date($object->datef, 'day', 'tzuser'); diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index 356b9ca6f51..1e3bb99c070 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -179,18 +179,11 @@ class modFicheinter extends DolibarrModules 'fd.rowid'=>'InterLineId', 'fd.date'=>"InterLineDate", 'fd.duree'=>"InterLineDuration", 'fd.description'=>"InterLineDesc" ); - //$this->export_TypeFields_array[$r]=array( - // 's.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label', - // 's.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text', - // 's.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text", - // 'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text", - // 'fd.total_ht'=>"Numeric" - //); $this->export_TypeFields_array[$r] = array( 's.rowid'=>"Numeric", 's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 's.fk_pays'=>'List:c_country:label', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 'f.rowid'=>'Numeric', 'f.ref'=>"Text", 'f.datec'=>"Date", - 'f.duree'=>"Duree", 'f.fk_statut'=>'Numeric', 'f.description'=>"Text", 'f.datee'=>"Date", 'f.dateo'=>"Date", 'f.fulldayevent'=>"Boolean", + 'f.duree'=>"Duree", 'f.fk_statut'=>'Numeric', 'f.description'=>"Text", 'f.datee'=>"Date", 'f.dateo'=>"Date", 'f.fulldayevent'=>"Text", 'pj.ref'=>'Text', 'pj.title'=>'Text', 'fd.rowid'=>"Numeric", 'fd.date'=>"Date", 'fd.duree'=>"Duree", 'fd.description'=>"Text", 'fd.total_ht'=>"Numeric" ); diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 7e58c75d35f..d0ca6416390 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -119,7 +119,7 @@ if (empty($reshook)) { if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $objstat->element == 'action' && $resource_type == 'dolresource' && intval($busy) == 1) { $eventDateStart = $objstat->datep; $eventDateEnd = $objstat->datef; - $isFullDayEvent = intval($objstat->fulldayevent); + $isFullDayEvent = $objstat->fulldayevent; if (empty($eventDateEnd)) { if ($isFullDayEvent) { $eventDateStartArr = dol_getdate($eventDateStart); @@ -194,7 +194,7 @@ if (empty($reshook)) { if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $object->element_type == 'action' && $object->resource_type == 'dolresource' && intval($object->busy) == 1) { $eventDateStart = $object->objelement->datep; $eventDateEnd = $object->objelement->datef; - $isFullDayEvent = intval($objstat->fulldayevent); + $isFullDayEvent = $objstat->fulldayevent; if (empty($eventDateEnd)) { if ($isFullDayEvent) { $eventDateStartArr = dol_getdate($eventDateStart); @@ -376,11 +376,11 @@ if (!$ret) { } // Full day event - print ''.$langs->trans("EventOnFullDay").''.yn($act->fulldayevent, 3).''; + print ''.$langs->trans("EventOnFullDay").''.yn($act->fulldayevent ? 1 : 0, 3).''; // Date start print ''.$langs->trans("DateActionStart").''; - if (!$act->fulldayevent) { + if (empty($act->fulldayevent)) { print dol_print_date($act->datep, 'dayhour', 'tzuser'); } else { print dol_print_date($act->datep, 'day', 'tzuser'); @@ -393,7 +393,7 @@ if (!$ret) { // Date end print ''.$langs->trans("DateActionEnd").''; - if (!$act->fulldayevent) { + if (empty($act->fulldayevent)) { print dol_print_date($act->datef, 'dayhour', 'tzuser'); } else { print dol_print_date($act->datef, 'day', 'tzuser'); From 23eda44ba7fb9becefc8ccd5f8d1cb68ec970d4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jan 2022 16:42:15 +0100 Subject: [PATCH 17/17] Debug v15 --- htdocs/societe/consumption.php | 12 +++++++----- htdocs/theme/eldy/global.inc.php | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 596f9b6f3c6..fcb90df6c9b 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -79,8 +79,8 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $month = ''; } // Customer or supplier selected in drop box -$thirdTypeSelect = GETPOST("third_select_id"); -$type_element = GETPOST('type_element') ?GETPOST('type_element') : ''; +$thirdTypeSelect = GETPOST("third_select_id", 'az09'); +$type_element = GETPOST('type_element') ? GETPOST('type_element') : ''; // Load translation files required by the page $langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products")); @@ -441,9 +441,9 @@ if ($sql_select) { print ''; print ''; print ''; - print ''; // date + print ''; // date print $formother->select_month($month ? $month : -1, 'month', 1, 0, 'valignmiddle'); - $formother->select_year($year ? $year : -1, 'year', 1, 20, 1); + $formother->select_year($year ? $year : -1, 'year', 1, 20, 1, 0, 0, '', 'valignmiddle maxwidth75imp marginleftonly'); print ''; print ''; print ''; @@ -463,7 +463,7 @@ if ($sql_select) { // Titles with sort buttons print ''; print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left '); - print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'width="150"', $sortfield, $sortorder, 'center '); + print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left '); print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right '); @@ -500,6 +500,8 @@ if ($sql_select) { print $documentstaticline->getLibStatut(5); } elseif ($type_element == 'invoice') { print $documentstatic->getLibStatut(5, $objp->paid); + } elseif ($type_element == 'supplier_invoice') { + print $documentstatic->getLibStatut(5, $objp->paid); } else { print $documentstatic->getLibStatut(5); } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index bf1e9dc967e..8c315b7badf 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -154,8 +154,9 @@ table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td. max-width: 100px; text-overflow: ellipsis; } -.liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth], +/*.liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth], .liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month], +.liste_titre select[name=year], .liste_titre input[name=month_lim], .liste_titre input[name=month_start], .liste_titre input[name=month_end], .liste_titre input[name=month_create], .liste_titre input[name=search_month_lim], .liste_titre input[name=search_month_start], .liste_titre input[name=search_month_end], .liste_titre input[name=search_month_create], .liste_titre input[name=search_month_update], .liste_titre input[name=search_month_start], .liste_titre input[name=search_month_end], @@ -166,6 +167,7 @@ table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td. .liste_titre input[name=search_day_create], .liste_titre input[name=search_day_start], .liste_titre input[name=search_day_end], .liste_titre input[name=search_day_date_when], .liste_titre input[name=search_month_date_when], .liste_titre input[name=search_year_date_when], .liste_titre input[name=search_dtstartday], .liste_titre input[name=search_dtendday], .liste_titre input[name=search_dtstartmonth], .liste_titre input[name=search_dtendmonth], +*/ select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth, input, input.flat, form.flat select, select, select.flat, .dataTables_length label select { border: none;