diff --git a/ChangeLog b/ChangeLog index f596ae1bb88..947a42c832a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -258,12 +258,12 @@ NEW: Add the admin info on combo of type of contact NEW: Add the event BILL_PAYED to the list of supported events for module notification. NEW: Add total weight and volume on PDF. 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: allow a document to be linked to project of another customer by config setup. -NEW: allow project to be shared across entities (for multicompany module). +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 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. NEW: Can change dynamically number of records visible into lists. NEW: Can change type of extrafields (for some combinations only). 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), 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"); diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 122e80b2e69..ade5916792d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -954,7 +954,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, ROWS_4, '90%'); + $doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); $doleditor->Create(); print ""; @@ -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'); 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)) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 8717e64fe38..443e402674f 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1775,7 +1775,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 '
' . $langs->trans('Delete') . '
'; } 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 ; 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 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();