From 6dfeaabad5f77d77b83c6d34b6747b2c71e76ce2 Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Thu, 1 Dec 2016 22:28:29 +0100 Subject: [PATCH 01/11] FIX: #6062 --- htdocs/product/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 88eceda8aa9..e93687fb65d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1267,7 +1267,7 @@ else print ''.$langs->trans("Description").''; // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 80); + $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 80); $doleditor->Create(); print ""; From 79d6fa334b811edbdfa637895d6d3270b044b005 Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Thu, 8 Dec 2016 13:12:10 +0100 Subject: [PATCH 02/11] FIX: Consistent description for add or edit product --- htdocs/product/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index e93687fb65d..359ba7416d5 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -963,7 +963,7 @@ else // Description (used in invoice, propal...) print ''.$langs->trans("Description").''; - $doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, '80%'); + $doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, '80%'); $doleditor->Create(); print ""; @@ -1267,7 +1267,7 @@ else print ''.$langs->trans("Description").''; // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 80); + $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 80); $doleditor->Create(); print ""; From 7a8ac224ed3716f7fef80abfdc36c879aab5a0aa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Dec 2016 00:18:27 +0100 Subject: [PATCH 03/11] FIX A draft can be deleted by a user with create permission. --- htdocs/supplier_proposal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index ac98de73c47..b0792defc8f 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1791,7 +1791,7 @@ if ($action == 'create') } // Delete - if ($user->rights->supplier_proposal->supprimer) { + if (($object->statut == 0 && $user->rights->supplier_proposal->creer) || $user->rights->supplier_proposal->supprimer) { print ''; } From 239e42faa0fbf3a3e8e1e281b1fdeb14505e0b25 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 9 Dec 2016 13:04:05 +0100 Subject: [PATCH 04/11] Fix: contract use "total_vat" instead "total_tva" --- htdocs/core/class/commondocgenerator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 3ed34cfd801..6a6a32c15f9 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -366,13 +366,13 @@ abstract class CommonDocGenerator $array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code)!='PaymentCondition'.$object->cond_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code):$object->cond_reglement), $array_key.'_total_ht_locale'=>price($object->total_ht, 0, $outputlangs), - $array_key.'_total_vat_locale'=>price($object->total_tva, 0, $outputlangs), + $array_key.'_total_vat_locale'=>(! empty($object->total_vat)?price($object->total_vat, 0, $outputlangs):price($object->total_tva, 0, $outputlangs)), $array_key.'_total_localtax1_locale'=>price($object->total_localtax1, 0, $outputlangs), $array_key.'_total_localtax2_locale'=>price($object->total_localtax2, 0, $outputlangs), $array_key.'_total_ttc_locale'=>price($object->total_ttc, 0, $outputlangs), $array_key.'_total_discount_ht_locale' => price($object->getTotalDiscount(), 0, $outputlangs), $array_key.'_total_ht'=>price2num($object->total_ht), - $array_key.'_total_vat'=>price2num($object->total_tva), + $array_key.'_total_vat'=>(! empty($object->total_vat)?price2num($object->total_vat):price2num($object->total_tva)), $array_key.'_total_localtax1'=>price2num($object->total_localtax1), $array_key.'_total_localtax2'=>price2num($object->total_localtax2), $array_key.'_total_ttc'=>price2num($object->total_ttc), From a45915e4a006bcd8eea7dec175d67650fa72dcdb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Dec 2016 12:04:13 +0100 Subject: [PATCH 05/11] Better message after report on #5933 --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 85e3b313ccc..c602d3a2a3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -115,7 +115,7 @@ NEW: Add hidden option to hide column qty ordered on shipments. NEW: Add view of virtual stock into product list (when appropriate) NEW: Add warning on tasks when they are late (add also the warning tolerance parameter) NEW: Add weight/volume for one product into shipment export -NEW: Add width and height on product card +NEW: Add width and height on product table NEW: allow a document to be linked to project from another customer on config NEW: allow project to be shared across entities (for multicompany module) NEW: All variant of ckeditor config can be tested into the setup page of module. From 8589f077c018ecabea0be249dc9b84e8baed577e Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 10 Dec 2016 22:54:13 +0100 Subject: [PATCH 06/11] Bad return on linkback --- htdocs/product/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 122e80b2e69..2118716b286 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1454,8 +1454,9 @@ else $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'card', $titre, 0, $picto); - $linkback = ''.$langs->trans("BackToList").''; - + $linkback = ''.$langs->trans("BackToList").''; + $object->next_prev_filter=" fk_product_type = ".$object->type; + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); From 35107f1dbf169c4df285e61ed4c079e9f2688e70 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 10 Dec 2016 23:29:43 +0100 Subject: [PATCH 07/11] bad number rights on badge tabs --- htdocs/user/document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/document.php b/htdocs/user/document.php index d1922371909..a9162767bea 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -87,7 +87,7 @@ $object = new User($db); if ($id > 0 || ! empty($ref)) { $result = $object->fetch($id, $ref); - + $object->getrights(); $entitytouseforuserdir = $object->entity; if (empty($entitytouseforuserdir)) $entitytouseforuserdir=1; $upload_dir = $conf->user->multidir_output[$entitytouseforuserdir] . "/" . $object->id ; From 5bc3107c5d8c4a9d794c77b12a9a329142ec2ccf Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 10 Dec 2016 23:30:31 +0100 Subject: [PATCH 08/11] Update note.php --- htdocs/user/note.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/user/note.php b/htdocs/user/note.php index e2feb378f3c..38aef489b87 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -37,6 +37,7 @@ $langs->load("users"); $object = new User($db); $object->fetch($id); +$object->getrights(); // If user is not user read and no permission to read other users, we stop if (($object->id != $user->id) && (! $user->rights->user->user->lire)) accessforbidden(); From f2eb73a101ba81629d93e81d4458d20bac280f6c Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 10 Dec 2016 23:32:01 +0100 Subject: [PATCH 09/11] Update info.php --- htdocs/user/info.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/user/info.php b/htdocs/user/info.php index e27fcf56266..5ea7200a0f7 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -35,6 +35,7 @@ $object = new User($db); if ($id > 0 || ! empty($ref)) { $result = $object->fetch($id, $ref); + $object->getrights(); } // Security check From 3befe1b83f904bb86c67fb9db2382f9ac0ae9a33 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 10 Dec 2016 23:34:32 +0100 Subject: [PATCH 10/11] Fix product photo in tooltip --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 3df1393628a..bf87a32f3c9 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3230,7 +3230,7 @@ class Product extends CommonObject $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; } - $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"'; $linkclose.=' class="classfortooltip"'; if (! is_object($hookmanager)) From b645a5074242e69fa0e780b8d1a16f033288d98a Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 10 Dec 2016 23:49:09 +0100 Subject: [PATCH 11/11] Add translation tabs --- htdocs/core/lib/company.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index b9619c278bd..85de900725e 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -135,6 +135,7 @@ function societe_prepare_head(Societe $object) // Bank accounrs if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT)) { + $langs->load('banks'); $nbBankAccount=0; $head[$h][0] = DOL_URL_ROOT .'/societe/rib.php?socid='.$object->id; $head[$h][1] = $langs->trans("BankAccounts");