Merge remote-tracking branch 'origin/3.3' into 3.4

Conflicts:
	ChangeLog
	htdocs/comm/propal.php
	htdocs/core/class/commonobject.class.php
	htdocs/core/tpl/freeproductline_create.tpl.php
	htdocs/core/tpl/predefinedproductline_create.tpl.php
This commit is contained in:
Laurent Destailleur 2013-05-20 17:37:08 +02:00
commit 71e14df62f
8 changed files with 90 additions and 85 deletions

View File

@ -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 ***** ***** ChangeLog for 3.3.2 compared to 3.3.1 *****
- Fix: Dutch (nl_NL) translation. - Fix: Dutch (nl_NL) translation
- Generalize fix: file with a specific mask not found, again. - Generalize fix: file with a specific mask not found, again
- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger. - Fix: translations and BILL_SUPPLIER_BUILDDOC trigger
- Fix: Can't reset payment due date. - Fix: Can't reset payment due date
- Fix: Orderstoinvoice didn't act as expected when no order was checked. - 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: Bad link to all proposals into Third party card if customer is prospect
- Fix: Some bugs on withdrawal rejects. - Fix: Some bugs on withdrawal rejects
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed. - 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 #787 ] Invoice supplier box incorrect tooltip when delay on payment
- Fix: [ bug #789 ] VAT not being calculated in POS. - Fix: [ bug #789 ] VAT not being calculated in POS
- Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated. - Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated
- Fix: [ bug #794 ] Lost filter on zipcode in prospect list. - Fix: [ bug #794 ] Lost filter on zipcode in prospect list
- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price. - Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price
- Fix: [ bug #810 ] Cannot update ODT template path. - Fix: [ bug #810 ] Cannot update ODT template path
- Fix: [ bug #816 ] Sales journal does not reflect localtaxes. - Fix: [ bug #816 ] Sales journal does not reflect localtaxes
- Fix: [ bug #817 ] Purchases 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 #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 #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 #855 ] Holiday approval email in French
- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email. - 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 #857 ] Invoice created from shipment does not have the order discount
- Fix: [ bug #861 ] Impossible to create a new event in agenda. - Fix: [ bug #861 ] Impossible to create a new event in agenda
- Fix: [ bug #827 ] AJAX search does not respect multiprice level. - Fix: [ bug #827 ] AJAX search does not respect multiprice level
- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work. - 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 #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: [ 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 ***** ***** ChangeLog for 3.3.1 compared to 3.3 *****

View File

@ -1,34 +1,34 @@
<?php <?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** /**
* \file htdocs/comm/propal.php * \file htdocs/comm/propal.php
* \ingroup propale * \ingroup propale
* \brief Page of commercial proposals card and list * \brief Page of commercial proposals card and list
*/ */
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';

View File

@ -2712,7 +2712,7 @@ abstract class CommonObject
*/ */
function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0) function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0)
{ {
global $conf,$langs,$hookmanager; global $conf,$langs,$user,$hookmanager;
print '<tr class="liste_titre nodrag nodrop">'; print '<tr class="liste_titre nodrag nodrop">';
@ -2735,7 +2735,8 @@ abstract class CommonObject
// Reduction short // Reduction short
print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>'; print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>';
if (! empty($conf->margin->enabled)) { if (! empty($conf->margin->enabled) && empty($user->societe_id))
{
if ($conf->global->MARGIN_TYPE == "1") if ($conf->global->MARGIN_TYPE == "1")
print '<td align="right" width="80">'.$langs->trans('BuyingPrice').'</td>'; print '<td align="right" width="80">'.$langs->trans('BuyingPrice').'</td>';
else 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) { function displayMarginInfos($force_price=false)
global $langs, $conf; {
global $langs, $conf, $user;
if (! empty($user->societe_id)) return;
$marginInfo = $this->getMarginInfos($force_price); $marginInfo = $this->getMarginInfos($force_price);
@ -3215,6 +3221,5 @@ abstract class CommonObject
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
} }
} }
?> ?>

View File

@ -80,7 +80,7 @@ class modMargin extends DolibarrModules
// New pages on tabs // New pages on tabs
$this->tabs = array( $this->tabs = array(
'product:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/productMargins.php?id=__ID__', '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__'
); );

View File

@ -119,7 +119,7 @@
<td>&nbsp;</td> <td>&nbsp;</td>
<?php } <?php }
if (! empty($conf->margin->enabled)) { if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
?> ?>
<td align="right" class="nowrap"><?php echo price($line->pa_ht); ?></td> <td align="right" class="nowrap"><?php echo price($line->pa_ht); ?></td>
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?> <?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?>

View File

@ -43,8 +43,8 @@ MargeBrute=Marge brute
MargeNette=Marge nette MargeNette=Marge nette
MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT<br/>Marge nette : Prix de vente HT - Coût de revient MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT<br/>Marge nette : Prix de vente HT - Coût de revient
CostPrice=Prix ​​d'achat BuyingPrice=Prix ​​d'achat
BuyingCost=Coût de revient CostPrice=Prix de revient
UnitCharges=Charge unitaire UnitCharges=Charge unitaire
Charges=Charges Charges=Charges