Merge remote-tracking branch 'origin/3.7' into develop

Conflicts:
	htdocs/societe/class/societe.class.php
This commit is contained in:
Laurent Destailleur 2015-03-05 11:38:16 +01:00
commit d119397129
14 changed files with 54 additions and 45 deletions

View File

@ -231,6 +231,7 @@ Dolibarr better:
- Fix: [ bug #1825 ] External agenda: hide/show checkbox doesn't work
- Fix: [ bug #1790 ] Email form behaves in an unexpected way when pressing Enter key
- Fix: Bad SEPA xml file creation
- Fix: [ bug #1892 ] PHP Fatal error when using USER_UPDATE_SESSION trigger and adding a supplier invoice payment
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.

View File

@ -1174,7 +1174,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$numicals[dol_string_nospecial($event->icalname)]++;
}
$color=$event->icalcolor;
$cssclass=(! empty($event->icalname)?'family_'.dol_string_nospecial($event->icalname):'family_other unmovable');
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unmovable');
}
else if ($event->type_code == 'BIRTHDAY')
{

View File

@ -869,7 +869,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
}
$color=$event->icalcolor;
$cssclass=(! empty($event->icalname)?'family_'.dol_string_nospecial($event->icalname):'family_other unsortable');
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');
}
else if ($event->type_code == 'BIRTHDAY')
{

View File

@ -1120,7 +1120,7 @@ else
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV' && !empty($modCodeContract->code_auto))
{
$numref = $object->getNextNumRef($soc);
$numref = $object->getNextNumRef($object->thirdparty);
}
else
{

View File

@ -121,7 +121,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
return 0;
}
$numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc->code_client,$object->date);
$numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc,$object->date);
return $numFinal;
}

View File

@ -112,7 +112,7 @@ class mod_contract_magre extends ModelNumRefContracts
return 0;
}
$numFinal=get_next_value($db,$mask,'contrat','ref','',$objsoc->code_client,$contract->date_contrat);
$numFinal=get_next_value($db,$mask,'contrat','ref','',$objsoc,$contract->date_contrat);
return $numFinal;
}

View File

@ -120,7 +120,7 @@ class mod_arctic extends ModeleNumRefFicheinter
return 0;
}
$numFinal=get_next_value($db,$mask,'fichinter','ref','',$objsoc->code_client,$object->datec);
$numFinal=get_next_value($db,$mask,'fichinter','ref','',$objsoc,$object->datec);
return $numFinal;
}

View File

@ -120,7 +120,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
return 0;
}
$numFinal=get_next_value($db,$mask,'livraison','ref','',$objsoc->code_client,$object->date_livraison);
$numFinal=get_next_value($db,$mask,'livraison','ref','',$objsoc,$object->date_livraison);
return $numFinal;
}

View File

@ -123,7 +123,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
$date=$propal->datep;
$customercode=$objsoc->code_client;
$numFinal=get_next_value($db,$mask,'propal','ref','',$customercode,$date);
$numFinal=get_next_value($db,$mask,'propal','ref','',$objsoc,$date);
return $numFinal;
}

View File

@ -126,7 +126,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
}
//Supplier invoices take invoice date instead of creation date for the mask
$numFinal=get_next_value($db,$mask,'facture_fourn','ref','',$objsoc->code_fournisseur,$object->date);
$numFinal=get_next_value($db,$mask,'facture_fourn','ref','',$objsoc,$object->date);
return $numFinal;
}

View File

@ -121,7 +121,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
return 0;
}
$numFinal=get_next_value($db,$mask,'commande_fournisseur','ref','',$objsoc->code_fournisseur,$object->date_commande);
$numFinal=get_next_value($db,$mask,'commande_fournisseur','ref','',$objsoc,$object->date_commande);
return $numFinal;
}

View File

@ -32,9 +32,9 @@
*/
require '../../main.inc.php';
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
require DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
$langs->load('companies');
$langs->load('bills');

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2003 Brian Fraval <brian@fraval.org>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
@ -42,7 +42,7 @@ class Societe extends CommonObject
public $element='societe';
public $table_element = 'societe';
public $fk_element='fk_soc';
protected $childtables=array("askpricesupplier", "propal","commande","facture","contrat","facture_fourn","commande_fournisseur"); // To test if we can delete object
protected $childtables=array("askpricesupplier","propal","commande","facture","contrat","facture_fourn","commande_fournisseur","projet"); // To test if we can delete object
/**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
@ -352,7 +352,7 @@ class Societe extends CommonObject
var $array_options;
// Incoterms
// Incoterms
var $fk_incoterms;
var $location_incoterms;
var $libelle_incoterms; //Used into tooltip
@ -741,7 +741,7 @@ class Societe extends CommonObject
//Incoterms
$this->fk_incoterms = (int) $this->fk_incoterms;
$this->location_incoterms = trim($this->location_incoterms);
$this->db->begin();
// Check name is required and codes are ok or unique.
@ -1137,9 +1137,9 @@ class Societe extends CommonObject
//Incoterms
$this->fk_incoterms = $obj->fk_incoterms;
$this->location_incoterms = $obj->location_incoterms;
$this->location_incoterms = $obj->location_incoterms;
$this->libelle_incoterms = $obj->libelle_incoterms;
$result = 1;
// Retreive all extrafield for thirdparty
@ -2089,7 +2089,7 @@ class Societe extends CommonObject
$bac->fetch(0,$this->id);
return $bac->getRibLabel(true);
}
/**
* Return Array of RIB

View File

@ -8,7 +8,7 @@
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
* 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
@ -987,6 +987,15 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '<input size="8" type="text" name="weeklyhours" value="'.GETPOST('weeklyhours').'">';
print '</td>';
print "</tr>\n";
// Accountancy code
if ($conf->salaries->enabled)
{
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td>';
print '<input size="30" type="text" name="accountancy_code" value="'.GETPOST('accountancy_code').'">';
print '</td></tr>';
}
// User color
if (! empty($conf->agenda->enabled))
@ -1130,7 +1139,7 @@ else
*/
if ($action != 'edit')
{
$rowspan=17;
$rowspan=19;
print '<table class="border" width="100%">';
@ -1326,13 +1335,12 @@ else
print "</tr>\n";
// Accountancy code
if (! empty($conf->global->USER_ENABLE_ACCOUNTANCY_CODE)) // For the moment field is not used so must not appeared.
if ($conf->salaries->enabled)
{
$rowspan++;
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="2">'.$object->accountancy_code.'</td>';
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="2">'.$object->accountancy_code.'</td>';
}
// Color user
if (! empty($conf->agenda->enabled))
{
@ -1661,7 +1669,7 @@ else
*/
if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id)))
{
$rowspan=15;
$rowspan=16;
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $rowspan++;
if (! empty($conf->societe->enabled)) $rowspan++;
if (! empty($conf->adherent->enabled)) $rowspan++;
@ -2028,23 +2036,23 @@ else
print "</tr>\n";
// Accountancy code
if (! empty($conf->global->USER_ENABLE_ACCOUNTANCY_CODE)) // For the moment field is not used so must not appeared.
{
print "<tr>";
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td>';
if ($caneditfield)
{
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
}
else
{
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
print $object->accountancy_code;
}
print '</td>';
print "</tr>";
}
if ($conf->salaries->enabled)
{
print "<tr>";
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td>';
if ($caneditfield)
{
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
}
else
{
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
print $object->accountancy_code;
}
print '</td>';
print "</tr>";
}
// User color
if (! empty($conf->agenda->enabled))