diff --git a/ChangeLog b/ChangeLog index dd34664a02d..091b00508be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -92,33 +92,33 @@ WARNING: If you used external modules, some of them may need to be upgraded due ***** ChangeLog for 3.3.2 compared to 3.3.1 ***** -- Fix: Dutch (nl_NL) translation. -- Generalize fix: file with a specific mask not found, again. -- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger. -- Fix: Can't reset payment due date. -- Fix: Orderstoinvoice didn't act as expected when no order was checked. -- Fix: Bad link to all proposals into Third party card if customer is prospect. -- Fix: Some bugs on withdrawal rejects. -- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed. -- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment. -- Fix: [ bug #789 ] VAT not being calculated in POS. -- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated. -- Fix: [ bug #794 ] Lost filter on zipcode in prospect list. -- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price. -- Fix: [ bug #810 ] Cannot update ODT template path. -- Fix: [ bug #816 ] Sales journal does not reflect localtaxes. -- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes. -- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary. -- Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres). -- Fix: [ bug #855 ] Holiday approval email in French. -- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email. -- Fix: [ bug #857 ] Invoice created from shipment does not have the order discount. -- Fix: [ bug #861 ] Impossible to create a new event in agenda. -- Fix: [ bug #827 ] AJAX search does not respect multiprice level. -- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work. -- Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay. -- Fix: [ bug #788 ] Date of linked interventions are not shown. - +- Fix: Dutch (nl_NL) translation +- Generalize fix: file with a specific mask not found, again +- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger +- Fix: Can't reset payment due date +- Fix: Orderstoinvoice didn't act as expected when no order was checked +- Fix: Bad link to all proposals into Third party card if customer is prospect +- Fix: Some bugs on withdrawal rejects +- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed +- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment +- Fix: [ bug #789 ] VAT not being calculated in POS +- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated +- Fix: [ bug #794 ] Lost filter on zipcode in prospect list +- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price +- Fix: [ bug #810 ] Cannot update ODT template path +- Fix: [ bug #816 ] Sales journal does not reflect localtaxes +- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes +- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary +- Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres) +- Fix: [ bug #855 ] Holiday approval email in French +- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email +- Fix: [ bug #857 ] Invoice created from shipment does not have the order discount +- Fix: [ bug #861 ] Impossible to create a new event in agenda +- Fix: [ bug #827 ] AJAX search does not respect multiprice level +- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work +- Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay +- Fix: [ bug #788 ] Date of linked interventions are not shown +- Fix: external users should not see costprice and margin infos ***** ChangeLog for 3.3.1 compared to 3.3 ***** diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 973c37d91af..13b39ae7872 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1,34 +1,34 @@ * Copyright (C) 2004-2013 Laurent Destailleur -* Copyright (C) 2004 Eric Seigne -* Copyright (C) 2005 Marc Barilley / Ocebo -* Copyright (C) 2005-2012 Regis Houssin -* Copyright (C) 2006 Andre Cianfarani -* Copyright (C) 2010-2013 Juanjo Menent -* Copyright (C) 2010-2011 Philippe Grand -* Copyright (C) 2012 Christophe Battarel -* Copyright (C) 2013 Florian Henry -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2010-2011 Philippe Grand + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2013 Florian Henry + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/comm/propal.php -* \ingroup propale -* \brief Page of commercial proposals card and list -*/ + * \ingroup propale + * \brief Page of commercial proposals card and list + */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -2283,4 +2283,4 @@ else // End of page llxFooter(); $db->close(); -?> +?> \ No newline at end of file diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index dcbd404a3e0..a325d7aa2d6 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -44,7 +44,7 @@ abstract class CommonObject public $civility_id; public $array_options=array(); - + public $linkedObjectsIds; public $linkedObjects; @@ -2027,7 +2027,7 @@ abstract class CommonObject $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); } - + // Request to get complementary values if (count($optionsArray) > 0) { @@ -2057,7 +2057,7 @@ abstract class CommonObject } } } - + $this->db->free($resql); } else @@ -2712,7 +2712,7 @@ abstract class CommonObject */ function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0) { - global $conf,$langs,$hookmanager; + global $conf,$langs,$user,$hookmanager; print ''; @@ -2735,7 +2735,8 @@ abstract class CommonObject // Reduction short print ''.$langs->trans('ReductionShort').''; - if (! empty($conf->margin->enabled)) { + if (! empty($conf->margin->enabled) && empty($user->societe_id)) + { if ($conf->global->MARGIN_TYPE == "1") print ''.$langs->trans('BuyingPrice').''; else @@ -3159,11 +3160,16 @@ abstract class CommonObject } /** + * displayMarginInfos * - * @param string $force_price + * @param string $force_price Force price + * @return void */ - function displayMarginInfos($force_price=false) { - global $langs, $conf; + function displayMarginInfos($force_price=false) + { + global $langs, $conf, $user; + + if (! empty($user->societe_id)) return; $marginInfo = $this->getMarginInfos($force_price); @@ -3215,6 +3221,5 @@ abstract class CommonObject print ''; print ''; } - } ?> diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index e6235572c1a..47ae79bf7df 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -80,7 +80,7 @@ class modMargin extends DolibarrModules // New pages on tabs $this->tabs = array( 'product:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/productMargins.php?id=__ID__', - 'thirdparty:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/thirdpartyMargins.php?socid=__ID__' + 'thirdparty:+margin:Margins:margins:$conf->margin->enabled && empty($user->societe_id):/margin/tabs/thirdpartyMargins.php?socid=__ID__' ); diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index 328b8d9a69b..1ee1a63ea78 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -26,7 +26,7 @@ $usemargins=0; if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1; - + ?> @@ -118,13 +118,13 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob -service->enabled) && $dateSelector) +service->enabled) && $dateSelector) { if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10; else $colspan = 9; - - if (! empty($usemargins)) + + if (! empty($usemargins)) { $colspan++; // For the buying price if($conf->global->DISPLAY_MARGIN_RATES) $colspan++; @@ -142,7 +142,7 @@ if (! empty($conf->service->enabled) && $dateSelector) $form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl"); } else - { + { echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; echo $form->select_date('','date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct"); echo ' '.$langs->trans('to').' '; @@ -151,9 +151,9 @@ if (! empty($conf->service->enabled) && $dateSelector) ?> - - \ No newline at end of file + diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 4fd05e4679c..b2e777660f7 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -119,7 +119,7 @@   margin->enabled)) { + if (! empty($conf->margin->enabled) && empty($user->societe_id)) { ?> pa_ht); ?> global->DISPLAY_MARGIN_RATES)) {?> diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index b435d40be64..32d3366f8ad 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -60,7 +60,7 @@ jQuery(document).ready(function() { trans('ReductionShort'); ?> global->DISPLAY_MARGIN_RATES)) $colspan++; if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++; @@ -74,7 +74,7 @@ if (! empty($usemargins)) ?>   @@ -110,7 +110,7 @@ if (! empty($usemargins)) % global->DISPLAY_MARGIN_RATES)) $colspan++; if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++; @@ -127,8 +127,8 @@ if (! empty($usemargins)) -service->enabled) && $dateSelector) +service->enabled) && $dateSelector) { if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10; else $colspan = 9; @@ -148,7 +148,7 @@ if (! empty($conf->service->enabled) && $dateSelector) print $langs->trans("DateStartPlanned").' '; $form->select_date('',"date_start",$usehm,$usehm,1,"addline"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end",$usehm,$usehm,1,"addline"); + $form->select_date('',"date_end",$usehm,$usehm,1,"addline"); } else { @@ -161,13 +161,13 @@ if (! empty($conf->service->enabled) && $dateSelector) - \ No newline at end of file + diff --git a/htdocs/langs/fr_FR/margins.lang b/htdocs/langs/fr_FR/margins.lang index 19910d90291..dcfe51d6786 100644 --- a/htdocs/langs/fr_FR/margins.lang +++ b/htdocs/langs/fr_FR/margins.lang @@ -43,10 +43,10 @@ MargeBrute=Marge brute MargeNette=Marge nette MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT
Marge nette : Prix de vente HT - Coût de revient -CostPrice=Prix ​​d'achat -BuyingCost=Coût de revient +BuyingPrice=Prix ​​d'achat +CostPrice=Prix de revient UnitCharges=Charge unitaire Charges=Charges AgentContactType=Type de contact commissionné -AgentContactTypeDetails=Permet de définir le type de contact associé aux factures qui sera associé aux agents commerciaux \ No newline at end of file +AgentContactTypeDetails=Permet de définir le type de contact associé aux factures qui sera associé aux agents commerciaux