From 2be2423dee0136679c95641f2db4a0fa9805dbaf Mon Sep 17 00:00:00 2001 From: JR-Polyline <91737050+JR-Polyline@users.noreply.github.com> Date: Fri, 1 Oct 2021 21:30:25 +0800 Subject: [PATCH 1/6] Fix dynamic prices not updating When Dynamic price module active and an a math expression is used to compute buy price on supplier product card, the calculated price does not update on the card when saved. Changing line 849 appears to solve this without any ill effect. --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 3eaed8d27b8..230c794b038 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -846,7 +846,7 @@ class ProductFournisseur extends Product $this->fourn_qty = $record["quantity"]; $this->fourn_remise_percent = $record["remise_percent"]; $this->fourn_remise = $record["remise"]; - $this->fourn_unitprice = $record["unitprice"]; + $this->fourn_unitprice = $fourn_unitprice; $this->fourn_charges = $record["charges"]; // deprecated $this->fourn_tva_tx = $record["tva_tx"]; $this->fourn_id = $record["fourn_id"]; From fd7d1374c2f54dd17e63774680dbca6baa93b94e Mon Sep 17 00:00:00 2001 From: lvessiller Date: Fri, 1 Oct 2021 16:37:54 +0200 Subject: [PATCH 2/6] FIX Product accountancy affectation with product_perentity activated (PR #18620) --- htdocs/accountancy/admin/productaccount.php | 27 +++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index e29653a3e40..58ffa9bd150 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -186,18 +186,35 @@ if ($action == 'update') { $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'
'.$sql.'
'; $ko++; } else { - $db->begin(); - + $sql = ''; if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_perentity (fk_product, entity, '".$db->escape($accountancy_field_name)."')"; - $sql .= " VALUES (".((int) $productid).", ".((int) $conf->entity).", '".$db->escape($accounting->account_number)."')"; - $sql .= " ON DUPLICATE KEY UPDATE ".$accountancy_field_name." = '".$db->escape($accounting->account_number)."'"; + $sql_exists = "SELECT rowid FROM " . MAIN_DB_PREFIX . "product_perentity"; + $sql_exists .= " WHERE fk_product = " . ((int) $productid) . " AND entity = " . ((int) $conf->entity); + $resql_exists = $db->query($sql_exists); + if (!$resql_exists) { + $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'
'.$resql_exists.'
'; + $ko++; + } else { + $nb_exists = $db->num_rows($resql_exists); + if ($nb_exists <= 0) { + // insert + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, '" . $db->escape($accountancy_field_name) . "')"; + $sql .= " VALUES (" . ((int) $productid) . ", " . ((int) $conf->entity) . ", '" . $db->escape($accounting->account_number) . "')"; + } else { + $obj_exists = $db->fetch_object($resql_exists); + // update + $sql = "UPDATE " . MAIN_DB_PREFIX . "product_perentity"; + $sql .= " SET " . $accountancy_field_name . " = '" . $db->escape($accounting->account_number) . "'"; + $sql .= " WHERE rowid = " . ((int) $obj_exists->rowid); + } + } } else { $sql = " UPDATE ".MAIN_DB_PREFIX."product"; $sql .= " SET ".$accountancy_field_name." = '".$db->escape($accounting->account_number)."'"; $sql .= " WHERE rowid = ".((int) $productid); } + $db->begin(); dol_syslog("/accountancy/admin/productaccount.php sql=".$sql, LOG_DEBUG); if ($db->query($sql)) { $ok++; From d6e1a6be93f3323b5ffff5478f4936d0443d2296 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Oct 2021 18:20:01 +0200 Subject: [PATCH 3/6] Look and feel v14 --- htdocs/core/class/html.form.class.php | 14 +++++++------- htdocs/core/tpl/contacts.tpl.php | 10 +++++----- .../eventorganization/conferenceorbooth_list.php | 1 + .../conferenceorboothattendee_list.php | 1 + htdocs/projet/tasks/time.php | 1 + 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 221e641ad8d..39d53e9dbc7 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1675,11 +1675,6 @@ class Form if ($resql) { $num = $this->db->num_rows($resql); - if ($conf->use_javascript_ajax && !$forcecombo && !$options_only) { - include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; - $out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); - } - if ($htmlname != 'none' && !$options_only) { $out .= ''; } + if ($conf->use_javascript_ajax && !$forcecombo && !$options_only) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); + } + $this->num = $num; return $out; } else { @@ -8529,8 +8529,8 @@ class Form public function showFilterButtons() { $out = '
'; - $out .= ''; - $out .= ''; + $out .= ''; + $out .= ''; $out .= '
'; return $out; diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 1257d473ced..4ec84283345 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -135,19 +135,19 @@ if ($permission) { + '; } ?> -
+
socid) ? 0 : $object->socid); $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
- -
+
selectcontacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp'); + print img_object('', 'contact', 'class="pictofixedwidth"').$form->selectcontacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp widthcentpercentminusxx maxwidth400'); $nbofcontacts = $form->num; $newcardbutton = ''; @@ -157,7 +157,7 @@ if ($permission) { print $newcardbutton; ?>
-
+
element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) { diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 9c086528120..a002aa2844c 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -643,6 +643,7 @@ print ''; print ''; print ''; print ''; +print ''; $title = $langs->trans("ListOfConferencesOrBooths"); diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index 801ecb1d69f..849513710f7 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -697,6 +697,7 @@ print ''; print ''; print ''; print ''; +print ''; $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 8e5877c7d0d..9e27f026c9d 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -992,6 +992,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { print ''; print ''; print ''; + print ''; // Form to convert time spent into invoice if ($massaction == 'generateinvoice') { From 2c32c6c5c9b7d9b454068d37c85653c8bf87c58d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Oct 2021 19:17:23 +0200 Subject: [PATCH 4/6] Fix contextpage for list of tickets --- htdocs/theme/eldy/global.inc.php | 21 ++++++++++++++++++--- htdocs/ticket/list.php | 5 ++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 79977faac6a..9ddaab40e65 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1732,6 +1732,20 @@ td.showDragHandle { display: inline-block; } +/* +.classforhorizontalscrolloftabs .fiche .div-table-responsive +{ + transform:rotateX(180deg); + -ms-transform:rotateX(180deg); + -webkit-transform:rotateX(180deg); +} +.classforhorizontalscrolloftabs .fiche .div-table-responsive-inside +{ + transform:rotateX(180deg); + -ms-transform:rotateX(180deg); + -webkit-transform:rotateX(180deg); +} +*/ global->THEME_DISABLE_STICKY_TOPMENU)) { ?> @@ -1842,10 +1856,11 @@ div.vmenu, td.vmenu { display: none; } - /* if no side-nav, we don't need to have width forced */ + /* if no side-nav, we don't need to have width forced to calc(100% - 210px); */ .classforhorizontalscrolloftabs #id-right { - width: unset; - display: unset; + width: 100%; + /* width: unset; */ + /* display: unset; */ } body.sidebar-collapse .login_block { diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index c79a75e851c..6991516ede8 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -45,7 +45,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'tickep#selectedfieldstlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'ticketlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') @@ -698,6 +698,7 @@ print ''; print ''; print ''; print ''; + if ($socid) { print ''; } @@ -759,6 +760,7 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print '
'; print ''."\n"; @@ -1088,6 +1090,7 @@ print $hookmanager->resPrint; print '
'."\n"; print '
'."\n"; +print '
'."\n"; print ''."\n"; From e46d064d5e4f5bb19757b649f4badb980483476f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Oct 2021 20:36:03 +0200 Subject: [PATCH 5/6] Clean text --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7878f6270a7..5116c7b21ce 100644 --- a/README.md +++ b/README.md @@ -154,18 +154,18 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) ### Other application/modules -- Electronic Document Management (EDM) +- Electronic Document Management (EDM) - Bookmarks management - Reporting - Data export/import -- Barcodes +- Barcodes - Margin calculations - LDAP connectivity - ClickToDial integration - Mass emailing - RSS integration - Skype integration -- Social platforms linking +- Social platforms linking - Payment platforms integration (PayPal, Stripe, Paybox...) - Email-Collector @@ -179,14 +179,11 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Multi-Users and groups with finely grained rights - Multi-Currency - Multi-Company (by adding of an external module) - - Very user friendly and easy to use - customizable Dashboard - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) - - APIs (REST, SOAP) - Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture) - - Support a lot of country specific features: - Spanish Tax RE and ISPF - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) @@ -197,7 +194,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Compatible with European GDPR rules - ... - Flexible PDF & ODT generation for invoices, proposals, orders... -- … +- ... ### System Environment / Requirements From 91ee704dc3a28a32988ec65162aba9a301518429 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Oct 2021 12:16:50 +0200 Subject: [PATCH 6/6] Move trans from admin to main --- htdocs/langs/en_US/admin.lang | 1 - htdocs/langs/en_US/main.lang | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5f71e77eb71..58b21ca3554 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -131,7 +131,6 @@ IdModule=Module ID IdPermissions=Permissions ID LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localization parameters -ClientTZ=Client Time Zone (user) ClientHour=Client time (user) OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index ddd60a9b68e..9fba774e7a5 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1138,4 +1138,5 @@ InformationOnLinkToContract=This amount is only the total of all the lines of th ConfirmCancel=Are you sure you want to cancel EmailMsgID=Email MsgID Forthcoming=Forthcoming -Currently=Currently \ No newline at end of file +Currently=Currently +ClientTZ=Client Time Zone (user)