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 #1825 ] External agenda: hide/show checkbox doesn't work
- Fix: [ bug #1790 ] Email form behaves in an unexpected way when pressing Enter key - Fix: [ bug #1790 ] Email form behaves in an unexpected way when pressing Enter key
- Fix: Bad SEPA xml file creation - 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 ***** ***** ChangeLog for 3.6.2 compared to 3.6.1 *****
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice. - 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)]++; $numicals[dol_string_nospecial($event->icalname)]++;
} }
$color=$event->icalcolor; $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') 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; $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') else if ($event->type_code == 'BIRTHDAY')
{ {

View File

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

View File

@ -121,7 +121,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
return 0; 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; return $numFinal;
} }

View File

@ -112,7 +112,7 @@ class mod_contract_magre extends ModelNumRefContracts
return 0; 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; return $numFinal;
} }

View File

@ -120,7 +120,7 @@ class mod_arctic extends ModeleNumRefFicheinter
return 0; 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; return $numFinal;
} }

View File

@ -120,7 +120,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
return 0; 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; return $numFinal;
} }

View File

@ -123,7 +123,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
$date=$propal->datep; $date=$propal->datep;
$customercode=$objsoc->code_client; $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; 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 //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; return $numFinal;
} }

View File

@ -121,7 +121,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
return 0; 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; return $numFinal;
} }

View File

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

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* 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) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2003 Brian Fraval <brian@fraval.org> * Copyright (C) 2003 Brian Fraval <brian@fraval.org>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
@ -42,7 +42,7 @@ class Societe extends CommonObject
public $element='societe'; public $element='societe';
public $table_element = 'societe'; public $table_element = 'societe';
public $fk_element='fk_soc'; 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 * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

View File

@ -8,7 +8,7 @@
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com> * Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * 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 * 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
@ -988,6 +988,15 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '</td>'; print '</td>';
print "</tr>\n"; 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 // User color
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
{ {
@ -1130,7 +1139,7 @@ else
*/ */
if ($action != 'edit') if ($action != 'edit')
{ {
$rowspan=17; $rowspan=19;
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -1326,11 +1335,10 @@ else
print "</tr>\n"; print "</tr>\n";
// Accountancy code // 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 '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>'; print '<td colspan="2">'.$object->accountancy_code.'</td>';
print '<td colspan="2">'.$object->accountancy_code.'</td>';
} }
// Color user // Color user
@ -1661,7 +1669,7 @@ else
*/ */
if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id))) 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 (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->societe->enabled)) $rowspan++;
if (! empty($conf->adherent->enabled)) $rowspan++; if (! empty($conf->adherent->enabled)) $rowspan++;
@ -2028,23 +2036,23 @@ else
print "</tr>\n"; print "</tr>\n";
// Accountancy code // 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)
{ {
print "<tr>"; print "<tr>";
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>'; print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td>'; print '<td>';
if ($caneditfield) if ($caneditfield)
{ {
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">'; print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
} }
else else
{ {
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">'; print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
print $object->accountancy_code; print $object->accountancy_code;
} }
print '</td>'; print '</td>';
print "</tr>"; print "</tr>";
} }
// User color // User color
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))