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

Conflicts:
	htdocs/core/class/html.form.class.php
	htdocs/core/lib/ecm.lib.php
This commit is contained in:
Laurent Destailleur 2014-12-22 03:14:22 +01:00
commit 2a3bb96c34
35 changed files with 7877 additions and 154 deletions

File diff suppressed because one or more lines are too long

View File

@ -193,6 +193,7 @@ export list="
--ignore-table=$base.llx_cabinetmed_societe
--ignore-table=$base.llx_fournisseur_ca
--ignore-table=$base.llx_google_maps
--ignore-table=$base.llx_notes
--ignore-table=$base.llx_pos_paiement_ticket
--ignore-table=$base.llx_pos_places
--ignore-table=$base.llx_pos_ticket
@ -200,6 +201,7 @@ export list="
--ignore-table=$base.llx_publi_c_dnd_list
--ignore-table=$base.llx_publi_c_method_list
--ignore-table=$base.llx_ultimatepdf
--ignore-table=$base.llx_ventilation_achat
"
echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile

View File

@ -141,7 +141,7 @@ $server->register(
* @param array $authentication Array of authentication information
* @param int $id Id of object
* @param string $ref Ref of object
* @param ref_ext $ref_ext Ref external of object
* @param string $ref_ext Ref external of object
* @return mixed
*/
function getSkeleton($authentication,$id,$ref='',$ref_ext='')

View File

@ -1045,7 +1045,7 @@ class Adherent extends CommonObject
* @param int $rowid Id of object to load
* @param string $ref To load member from its ref
* @param int $fk_soc To load member from its link to third party
* @param int $ref_ext External reference
* @param string $ref_ext External reference
* @return int >0 if OK, 0 if not found, <0 if KO
*/
function fetch($rowid,$ref='',$fk_soc='',$ref_ext='')

View File

@ -24,6 +24,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->load("admin");
$langs->load("install");
@ -51,6 +52,13 @@ print_fiche_titre($langs->trans("PerfDolibarr"),'','setup');
print $langs->trans("YouMayFindPerfAdviceHere",'http://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').' (<a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("Reload").'</a>)<br>';
// Recupere la version de PHP
$phpversion=version_php();
print "<br>PHP - ".$langs->trans("Version").": ".$phpversion."<br>\n";
// Recupere la version du serveur web
print "<br>Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";
// XDebug
print '<br>';
print '<strong>'.$langs->trans("XDebug").'</strong>: ';

View File

@ -54,7 +54,7 @@ print "\n";
$var=false;
// Recupere la version de l'OS
// Recupere la version de PHP
$phpversion=version_php();
print "<tr ".$bc[$var].'><td width="220px">'.$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";

View File

@ -30,9 +30,7 @@
/**
* \class BankCateg
* \brief Class to manage bank categories
* \remarks Initialy built by build_class_from_table on 2009-01-02 15:26
* Class to manage bank categories
*/
class BankCateg // extends CommonObject
{
@ -300,7 +298,7 @@ class BankCateg // extends CommonObject
$error=0;
$object=new Bank_categ($this->db);
$object=new BankCateg($this->db);
$this->db->begin();

View File

@ -2479,7 +2479,7 @@ class Facture extends CommonInvoice
* Return next reference of customer invoice not already used (or last reference)
* according to numbering module defined into constant FACTURE_ADDON
*
* @param Society $soc object company
* @param Societe $soc object company
* @param string $mode 'next' for next value or 'last' for last value
* @return string free ref or last ref
*/

View File

@ -1634,7 +1634,7 @@ class BonPrelevement extends CommonObject
* @param int $nombre 0 or 1
* @param float $total Total
* @param string $CrLf End of line character
* @return SEPA
* @return string String with SEAP Sender
*/
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n')
{ // SEPA INITIALISATION

View File

@ -209,6 +209,8 @@ $maxyear=substr($maxyearmonth,0,4);
$nowyear=strftime("%Y",dol_now());
$nowyearmonth=strftime("%Y-%m",dol_now());
$maxyearmonth=max($maxyearmonth,$nowyearmonth);
$now=dol_now();
$casenow = dol_print_date($now,"%Y-%m");
// Loop on each month
$nb_mois_decalage = $conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START-1):0;
@ -220,22 +222,37 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
print "<tr ".$bc[$var].">";
print "<td>".dol_print_date(dol_mktime(12,0,0,$mois_modulo,1,2000),"%B")."</td>";
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
for ($annee = $year_start -1 ; $annee <= $year_end ; $annee++) // We start one year before to have data to be able to make delta
{
$now=dol_now();
$annee_decalage=$annee;
if ($mois>12) {$annee_decalage=$annee+1;}
$casenow = dol_print_date($now,"%Y-%m");
$case = dol_print_date(dol_mktime(1,1,1,$mois_modulo,1,$annee_decalage),"%Y-%m");
$caseprev = dol_print_date(dol_mktime(1,1,1,$mois_modulo,1,$annee_decalage-1),"%Y-%m");
if ($modecompta == 'CREANCES-DETTES') {
// Valeur CA du mois w/o VAT
if ($annee >= $year_start)
{
if ($modecompta == 'CREANCES-DETTES') {
// Valeur CA du mois w/o VAT
print '<td align="right">';
if ($cum_ht[$case])
{
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
print '<a href="casoc.php?year='.$annee_decalage.'&month='.$mois_modulo.($modecompta?'&modecompta='.$modecompta:'').'">'.price($cum_ht[$case],1).'</a>';
}
else
{
if ($minyearmonth < $case && $case <= max($maxyearmonth,$nowyearmonth)) { print '0'; }
else { print '&nbsp;'; }
}
print "</td>";
}
// Valeur CA du mois
print '<td align="right">';
if ($cum_ht[$case])
if ($cum[$case])
{
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
print '<a href="casoc.php?year='.$annee_decalage.'&month='.$mois_modulo.($modecompta?'&modecompta='.$modecompta:'').'">'.price($cum_ht[$case],1).'</a>';
print '<a href="casoc.php?year='.$annee_decalage.'&month='.$mois_modulo.($modecompta?'&modecompta='.$modecompta:'').'">'.price($cum[$case],1).'</a>';
}
else
{
@ -243,60 +260,46 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
else { print '&nbsp;'; }
}
print "</td>";
}
// Valeur CA du mois
print '<td align="right">';
if ($cum[$case])
{
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
print '<a href="casoc.php?year='.$annee_decalage.'&month='.$mois_modulo.($modecompta?'&modecompta='.$modecompta:'').'">'.price($cum[$case],1).'</a>';
}
else
{
if ($minyearmonth < $case && $case <= max($maxyearmonth,$nowyearmonth)) { print '0'; }
else { print '&nbsp;'; }
}
print "</td>";
// Pourcentage du mois
if ($annee_decalage > $minyear && $case <= $casenow)
{
if ($cum[$caseprev] && $cum[$case])
// Pourcentage du mois
if ($annee_decalage > $minyear && $case <= $casenow)
{
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100);
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
print '<td align="right" class="borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
if ($cum[$caseprev] && $cum[$case])
{
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100);
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
print '<td align="right" class="borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
}
if ($cum[$caseprev] && ! $cum[$case])
{
print '<td align="right" class="borderrightlight">-100%</td>';
}
if (! $cum[$caseprev] && $cum[$case])
{
//print '<td align="right">+Inf%</td>';
print '<td align="right" class="borderrightlight">-</td>';
}
if (isset($cum[$caseprev]) && ! $cum[$caseprev] && ! $cum[$case])
{
print '<td align="right" class="borderrightlight">+0%</td>';
}
if (! isset($cum[$caseprev]) && ! $cum[$case])
{
print '<td align="right" class="borderrightlight">-</td>';
}
}
if ($cum[$caseprev] && ! $cum[$case])
else
{
print '<td align="right" class="borderrightlight">-100%</td>';
print '<td align="right" class="borderrightlight">';
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
else { print '&nbsp;'; }
print '</td>';
}
if (! $cum[$caseprev] && $cum[$case])
{
//print '<td align="right">+Inf%</td>';
print '<td align="right" class="borderrightlight">-</td>';
}
if (isset($cum[$caseprev]) && ! $cum[$caseprev] && ! $cum[$case])
{
print '<td align="right" class="borderrightlight">+0%</td>';
}
if (! isset($cum[$caseprev]) && ! $cum[$case])
{
print '<td align="right" class="borderrightlight">-</td>';
}
}
else
{
print '<td align="right" class="borderrightlight">';
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
else { print '&nbsp;'; }
print '</td>';
if ($annee_decalage != $year_end) print '<td width="15">&nbsp;</td>';
}
$total_ht[$annee]+=!empty($cum_ht[$case]) ? $cum_ht[$case] : 0;;
$total[$annee]+=$cum[$case];
if ($annee_decalage != $year_end) print '<td width="15">&nbsp;</td>';
}
print '</tr>';
@ -406,7 +409,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
}
if (! $total[$annee-1] && $total[$annee])
{
print '<td align="right" class="borderrightlight">+Inf%</td>';
print '<td align="right" class="borderrightlight">+zzzz'.$total[$annee-1].$langs->trans('Inf').'%</td>';
}
if (! $total[$annee-1] && ! $total[$annee])
{

View File

@ -343,7 +343,7 @@ class Tva extends CommonObject
}
/**
* Total of the VAT from invoices emitted by the society.
* Total of the VAT from invoices emitted by the thirdparty.
*
* @param int $year Year
* @return double Amount

View File

@ -88,7 +88,7 @@ class Contrat extends CommonObject
/**
* Return next contract ref
*
* @param Societe $soc objet society
* @param Societe $soc Thirdparty object
* @return string free reference for contract
*/
function getNextNumRef($soc)

View File

@ -1201,7 +1201,7 @@ class Form
if (is_array($exclude) && $excludeUsers) $sql.= " AND u.rowid NOT IN ('".$excludeUsers."')";
if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')";
if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND u.statut <> 0";
if (! empty($morefilter)) $sql.=$morefilter;
if (! empty($morefilter)) $sql.=" ".$morefilter;
$sql.= " ORDER BY u.lastname ASC";
dol_syslog(get_class($this)."::select_dolusers", LOG_DEBUG);
@ -3773,7 +3773,7 @@ class Form
* @param string $prefix Prefix for fields name
* @param int $h 1=Show also hours
* @param int $m 1=Show also minutes
* @param int $empty 0=Fields required, 1=Empty input is allowed
* @param int $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only
* @param string $form_name Not used
* @param int $d 1=Show days, month, years
* @param int $addnowbutton Add a button "Now"
@ -3792,9 +3792,13 @@ class Form
if($prefix=='') $prefix='re';
if($h == '') $h=0;
if($m == '') $m=0;
if($empty == '') $empty=0;
$emptydate=0;
$emptyhours=0;
if ($empty == 1) { $emptydate=1; $emptyhours=1; }
if ($empty == 2) { $emptydate=0; $emptyhours=1; }
$orig_set_time=$set_time;
if ($set_time === '' && $empty == 0)
if ($set_time === '' && $emptydate == 0)
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$set_time = dol_now('tzuser')-(getServerTimeZoneInt('now')*3600); // set_time must be relative to PHP server timezone
@ -3816,8 +3820,11 @@ class Form
$syear = dol_print_date($set_time, "%Y");
$smonth = dol_print_date($set_time, "%m");
$sday = dol_print_date($set_time, "%d");
$shour = dol_print_date($set_time, "%H");
$smin = dol_print_date($set_time, "%M");
if ($orig_set_time != '')
{
$shour = dol_print_date($set_time, "%H");
$smin = dol_print_date($set_time, "%M");
}
}
else
{
@ -3879,7 +3886,7 @@ class Form
// Day
$retstring.='<select'.($disabled?' disabled="disabled"':'').' class="flat" name="'.$prefix.'day">';
if ($empty || $set_time == -1)
if ($emptydate || $set_time == -1)
{
$retstring.='<option value="0" selected="selected">&nbsp;</option>';
}
@ -3892,7 +3899,7 @@ class Form
$retstring.="</select>";
$retstring.='<select'.($disabled?' disabled="disabled"':'').' class="flat" name="'.$prefix.'month">';
if ($empty || $set_time == -1)
if ($emptydate || $set_time == -1)
{
$retstring.='<option value="0" selected="selected">&nbsp;</option>';
}
@ -3907,7 +3914,7 @@ class Form
$retstring.="</select>";
// Year
if ($empty || $set_time == -1)
if ($emptydate || $set_time == -1)
{
$retstring.='<input'.($disabled?' disabled="disabled"':'').' placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" class="flat" type="text" size="3" maxlength="4" name="'.$prefix.'year" value="'.$syear.'">';
}
@ -3930,7 +3937,7 @@ class Form
{
// Show hour
$retstring.='<select'.($disabled?' disabled="disabled"':'').' class="flat '.($fullday?$fullday.'hour':'').'" name="'.$prefix.'hour">';
if ($empty) $retstring.='<option value="-1">&nbsp;</option>';
if ($emptyhours) $retstring.='<option value="-1">&nbsp;</option>';
for ($hour = 0; $hour < 24; $hour++)
{
if (strlen($hour) < 2) $hour = "0" . $hour;
@ -3944,7 +3951,7 @@ class Form
{
// Show minutes
$retstring.='<select'.($disabled?' disabled="disabled"':'').' class="flat '.($fullday?$fullday.'min':'').'" name="'.$prefix.'min">';
if ($empty) $retstring.='<option value="-1">&nbsp;</option>';
if ($emptyhours) $retstring.='<option value="-1">&nbsp;</option>';
for ($min = 0; $min < 60 ; $min++)
{
if (strlen($min) < 2) $min = "0" . $min;
@ -4003,18 +4010,22 @@ class Form
/**
* Function to show a form to select a duration on a page
*
* @param string $prefix Prefix
* @param string $prefix Prefix for input fields
* @param int $iSecond Default preselected duration (number of seconds)
* @param int $disabled Disable the combo box
* @param string $typehour If 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a combo
* @param string $minunderhours If 1, show minutes selection under the hours
* @param int $nooutput Do not output html string but return it
* @return void
*/
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0)
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
{
global $langs;
$retstring='';
$hourSelected=0; $minSelected=0;
if ($iSecond)
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@ -4025,36 +4036,51 @@ class Form
if ($typehour=='select')
{
print '<select class="flat" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').'>';
$retstring.='<select class="flat" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').'>';
for ($hour = 0; $hour < 25; $hour++) // For a duration, we allow 24 hours
{
print '<option value="'.$hour.'"';
$retstring.='<option value="'.$hour.'"';
if ($hourSelected == $hour)
{
print " selected=\"true\"";
$retstring.=" selected=\"true\"";
}
print ">".$hour."</option>";
$retstring.=">".$hour."</option>";
}
print "</select>";
$retstring.="</select>";
}
elseif ($typehour=='text')
{
print '<input type="text" size="3" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').' class="flat" value="'.((int) $hourSelected).'">';
$retstring.='<input type="text" size="2" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
}
print ' '.$langs->trans('HourShort');
else return 'BadValueForParameterTypeHour';
if ($minunderhours) print '<br>';
else print "&nbsp;";
$retstring.=' '.$langs->trans('HourShort');
print '<select class="flat" name="'.$prefix.'min"'.($disabled?' disabled="disabled"':'').'>';
for ($min = 0; $min <= 55; $min=$min+5)
if ($minunderhours) $retstring.='<br>';
else $retstring.="&nbsp;";
if ($typehour=='select')
{
print '<option value="'.$min.'"';
if ($minSelected == $min) print ' selected="selected"';
print '>'.$min.'</option>';
$retstring.='<select class="flat" name="'.$prefix.'min"'.($disabled?' disabled="disabled"':'').'>';
for ($min = 0; $min <= 55; $min=$min+5)
{
$retstring.='<option value="'.$min.'"';
if ($minSelected == $min) $retstring.=' selected="selected"';
$retstring.='>'.$min.'</option>';
}
$retstring.="</select>";
}
print "</select>";
print ' '.$langs->trans('MinuteShort'). "&nbsp;";
elseif ($typehour=='text')
{
$retstring.='<input type="text" size="2" name="'.$prefix.'min"'.($disabled?' disabled="disabled"':'').' class="flat" value="'.($minSelected?((int) $minSelected):'').'">';
}
$retstring.=' '.$langs->trans('MinuteShort');
$retstring.="&nbsp;";
if (! empty($nooutput)) return $retstring;
print $retstring;
return;
}

View File

@ -668,7 +668,7 @@ class DoliDBPgsql extends DoliDB
/**
* Renvoie le code erreur generique de l'operation precedente.
*
* @return error_num (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
*/
function errno()
{
@ -734,7 +734,7 @@ class DoliDBPgsql extends DoliDB
/**
* Renvoie le texte de l'erreur pgsql de l'operation precedente
*
* @return error_text
* @return string Error text
*/
function error()
{

View File

@ -535,7 +535,7 @@ class DoliDBSqlite extends DoliDB
/**
* Renvoie le code erreur generique de l'operation precedente.
*
* @return string $error_num (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
*/
function errno()
{
@ -597,7 +597,7 @@ class DoliDBSqlite extends DoliDB
/**
* Renvoie le texte de l'erreur mysql de l'operation precedente.
*
* @return string $error_text
* @return string Error text
*/
function error()
{

View File

@ -32,6 +32,8 @@
function ecm_prepare_dasboard_head($object)
{
global $langs, $conf, $user, $form;
global $helptext1, $helptext2;
$h = 0;
$head = array();
$helptext =$langs->trans("ECMAreaDesc").'<br>';

View File

@ -1273,7 +1273,7 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0)
*
* @param Object $object Object
* @param int $i Current line number
* @param Tranlate $outputlangs Object langs for output
* @param Translate $outputlangs Object langs for output
* @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines)
* @return void
*/

View File

@ -384,10 +384,13 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
else print '</a>';
print '</td>';
// Progress calculated
// Note: ->duration is in fact time spent i think
// Progress calculated (Note: ->duration is time spent)
print '<td align="right">';
if ($lines[$i]->planned_workload) print round(100 * $lines[$i]->duration / $lines[$i]->planned_workload,2).' %';
if ($lines[$i]->planned_workload || $lines[$i]->duration)
{
if ($lines[$i]->planned_workload) print round(100 * $lines[$i]->duration / $lines[$i]->planned_workload,2).' %';
else print $langs->trans('WorkloadNotDefined');
}
print '</td>';
// Tick to drag and drop
@ -430,7 +433,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print convertSecondToTime($total_projectlinesa_spent, 'allhourmin');
print '</td>';
print '<td align="right" class="nowrap liste_total">';
if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent_if_planned / $total_projectlinesa_planned,2).' %';
if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned,2).' %';
print '</td>';
if ($addordertick) print '<td class="hideonsmartphone"></td>';
print '</tr>';
@ -562,13 +565,16 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
$disabledtask=1;
}
print '<td class="nowrap">';
$s =$form->select_date('',$lines[$i]->id,'','','',"addtime",1,0,1,$disabledtask);
// Form to add new time
print '<td class="nowrap" align="right">';
$s='';
$s.=$form->select_date('',$lines[$i]->id,0,0,2,"addtime",1,0,1,$disabledtask);
$s.='&nbsp;&nbsp;&nbsp;';
$s.=$form->select_duration($lines[$i]->id,'',$disabledtask,'text');
$s.=$form->select_duration($lines[$i]->id,'',$disabledtask,'text',0,1);
$s.='&nbsp;<input type="submit" class="button"'.($disabledtask?' disabled="disabled"':'').' value="'.$langs->trans("Add").'">';
print $s;
print '</td>';
print '<td align="right">';
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));

View File

@ -44,7 +44,7 @@ interface LogHandlerInterface
/**
* Return if logger active
*
* @return boolen True if active
* @return boolean True if active
*/
public function isActive();

View File

@ -113,7 +113,7 @@ class Expedition extends CommonObject
/**
* Return next contract ref
*
* @param Societe $soc Objet society
* @param Societe $soc Thirdparty object
* @return string Free reference for contract
*/
function getNextNumRef($soc)
@ -604,9 +604,11 @@ class Expedition extends CommonObject
if (! empty($conf->productbatch->enabled)) {
$details=ExpeditionLigneBatch::FetchAll($this->db,$obj->rowid);
foreach ($details as $dbatch) {
$result=$mouvS->livraison_batch($dbatch->fk_origin_stock,$dbatch->dluo_qty);
if ($result < 0) { $error++; $this->errors[]=$mouvS->$error; break 2; }
if (! empty($details)) {
foreach ($details as $dbatch) {
$result=$mouvS->livraison_batch($dbatch->fk_origin_stock,$dbatch->dluo_qty);
if ($result < 0) { $error++; $this->errors[]=$mouvS->$error; break 2; }
}
}
}
}

View File

@ -561,7 +561,7 @@ class Fichinter extends CommonObject
* Returns the next non used reference of intervention
* depending on the module numbering assets within FICHEINTER_ADDON
*
* @param Societe $soc Object society
* @param Societe $soc Thirdparty object
* @return string Free reference for intervention
*/
function getNextNumRef($soc)

View File

@ -1493,7 +1493,7 @@ class FactureFournisseur extends CommonInvoice
* Return next reference of supplier invoice not already used (or last reference)
* according to numbering module defined into constant INVOICE_SUPPLIER_ADDON_NUMBER
*
* @param Society $soc object company
* @param Societe $soc Thirdparty object
* @param string $mode 'next' for next value or 'last' for last value
* @return string free ref or last ref
*/

View File

@ -46,7 +46,7 @@ llxHeader(array(),$langs->trans('CPTitreMenu'));
print_fiche_titre($langs->trans('MenuConfCP'));
$congespayes = new Holidays($db);
$congespayes = new Holiday($db);
$listUsers = $congespayes->fetchUsers(false, true);
// Si il y a une action de mise à jour

View File

@ -181,7 +181,7 @@ print '<td align="center">'.$langs->trans("DateEnd").'</td>';
print '<td align="right">'.$langs->trans("PlannedWorkload").'</td>';
print '<td align="right">'.$langs->trans("ProgressDeclared").'</td>';
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
print '<td colspan="2">'.$langs->trans("AddDuration").'</td>';
print '<td colspan="2" align="right">'.$langs->trans("NewTimeSpent").'</td>';
print "</tr>\n";
// By default, we can edit only tasks we are assigned to

View File

@ -215,8 +215,6 @@ if ($id > 0 || ! empty($ref))
print '</table>';
dol_fiche_end();
print '<br>';
}
// To verify role of users

View File

@ -179,8 +179,6 @@ if ($object->id > 0)
print '</table>';
dol_fiche_end();
print '<br>';
}
$head = task_prepare_head($object);

View File

@ -161,8 +161,6 @@ if ($object->id > 0)
print '</table>';
dol_fiche_end();
print '<br>';
}
$head = task_prepare_head($object);

View File

@ -262,8 +262,6 @@ if ($id > 0 || ! empty($ref))
print '</table>';
dol_fiche_end();
print '<br>';
}
/*

View File

@ -259,8 +259,6 @@ if ($id > 0 || ! empty($ref))
print '</table>';
dol_fiche_end();
print '<br>';
}
$head=task_prepare_head($object);
@ -362,8 +360,7 @@ if ($id > 0 || ! empty($ref))
print '<td>'.$langs->trans("By").'</td>';
print '<td>'.$langs->trans("Note").'</td>';
print '<td>'.$langs->trans("ProgressDeclared").'</td>';
print '<td align="right">'.$langs->trans("Duration").'</td>';
print '<td width="80">&nbsp;</td>';
print '<td align="right" colspan="2">'.$langs->trans("NewTimeSpent").'</td>';
print "</tr>\n";
print '<tr '.$bc[false].'>';
@ -396,7 +393,7 @@ if ($id > 0 || ! empty($ref))
print $formother->select_percent(GETPOST('progress')?GETPOST('progress'):$object->progress,'progress');
print '</td>';
// Duration
// Duration - Time spent
print '<td class="nowrap" align="right">';
print $form->select_duration('timespent_duration', ($_POST['timespent_duration']?$_POST['timespent_duration']:''), 0, 'text');
print '</td>';
@ -452,7 +449,7 @@ if ($id > 0 || ! empty($ref))
print '<td width="100">'.$langs->trans("Date").'</td>';
print '<td>'.$langs->trans("By").'</td>';
print '<td align="left">'.$langs->trans("Note").'</td>';
print '<td align="right">'.$langs->trans("Duration").'</td>';
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
print '<td>&nbsp;</td>';
print "</tr>\n";

View File

@ -2382,7 +2382,7 @@ class Societe extends CommonObject
*
* @param int $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm)
* @param string $value Value of profid
* @param int $socid Id of society if update
* @param int $socid Id of thirdparty if update
* @return boolean true if exists, false if not
*/
function id_prof_exists($idprof,$value,$socid=0)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

After

Width:  |  Height:  |  Size: 528 B

View File

@ -138,7 +138,7 @@ class User extends CommonObject
*
* @param int $id Si defini, id a utiliser pour recherche
* @param string $login Si defini, login a utiliser pour recherche
* @param strinf $sid Si defini, sid a utiliser pour recherche
* @param string $sid Si defini, sid a utiliser pour recherche
* @param int $loadpersonalconf Also load personal conf of user (in $user->conf->xxx)
* @return int <0 if KO, 0 not found, >0 if OK
*/

View File

@ -234,7 +234,7 @@ $server->register(
* @param array $authentication Array of authentication information
* @param int $id Id of object
* @param string $ref Ref of object
* @param ref_ext $ref_ext Ref external of object
* @param string $ref_ext Ref external of object
* @return mixed
*/
function getContact($authentication,$id,$ref='',$ref_ext='')

View File

@ -327,7 +327,7 @@ $server->register(
* @param array $authentication Array of authentication information
* @param int $id Id of object
* @param string $ref Ref of object
* @param ref_ext $ref_ext Ref external of object
* @param string $ref_ext Ref external of object
* @param string $lang Lang to force
* @return mixed
*/

View File

@ -299,7 +299,7 @@ $server->register(
* @param array $authentication Array of authentication information
* @param int $id Id of object
* @param string $ref Ref of object
* @param ref_ext $ref_ext Ref external of object
* @param string $ref_ext Ref external of object
* @return mixed
*/
function getUser($authentication,$id,$ref='',$ref_ext='')