Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c25872b182
@ -3,7 +3,10 @@ How to contribute to Dolibarr
|
|||||||
|
|
||||||
Bug reports and feature requests
|
Bug reports and feature requests
|
||||||
--------------------------------
|
--------------------------------
|
||||||
** NEW **
|
|
||||||
|
*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
|
||||||
|
|
||||||
|
**NEW**
|
||||||
|
|
||||||
Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
||||||
|
|
||||||
|
|||||||
@ -182,43 +182,27 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
|||||||
$res3=1;
|
$res3=1;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// TODO We add/delete permission until permission can have a condition on a global var
|
// TODO We add/delete permission here until permission can have a condition on a global var
|
||||||
$r_id = 1190;
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
||||||
$entity = $conf->entity;
|
$newmodule=new modFournisseur($db);
|
||||||
$r_desc=$langs->trans("Permission1190");
|
// clear default rights array
|
||||||
$r_modul='fournisseur';
|
$newmodule->rights=array();
|
||||||
$r_type='w';
|
// add new right
|
||||||
$r_perms='commande';
|
$r=0;
|
||||||
$r_subperms='approve2';
|
$newmodule->rights[$r][0] = 1190;
|
||||||
$r_def=0;
|
$newmodule->rights[$r][1] = $langs->trans("Permission1190");
|
||||||
|
$newmodule->rights[$r][2] = 'w';
|
||||||
|
$newmodule->rights[$r][3] = 0;
|
||||||
|
$newmodule->rights[$r][4] = 'commande';
|
||||||
|
$newmodule->rights[$r][5] = 'approve2';
|
||||||
|
|
||||||
if ($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL)
|
if ($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL)
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def";
|
$newmodule->insert_permissions(1);
|
||||||
$sql.= " (id, entity, libelle, module, type, bydefault, perms, subperms)";
|
|
||||||
$sql.= " VALUES ";
|
|
||||||
$sql.= "(".$r_id.",".$entity.",'".$db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."','".$r_subperms."')";
|
|
||||||
|
|
||||||
$resqlinsert=$db->query($sql,1);
|
|
||||||
if (! $resqlinsert)
|
|
||||||
{
|
|
||||||
if ($db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS")
|
|
||||||
{
|
|
||||||
setEventMessage($db->lasterror(),'errors');
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."rights_def";
|
$newmodule->delete_permissions();
|
||||||
$sql.= " WHERE id = ".$r_id;
|
|
||||||
$resqldelete=$db->query($sql,1);
|
|
||||||
if (! $resqldelete)
|
|
||||||
{
|
|
||||||
setEventMessage($db->lasterror(),'errors');
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -627,7 +627,7 @@ if ($id > 0)
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' <span class="badge">'.$num.'</span></a></td>';
|
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomerOrders",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' <span class="badge">'.$num.'</span></a></td>';
|
||||||
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
|
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
|
||||||
//if($num2 > 0) print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').'</a></td>';
|
//if($num2 > 0) print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').'</a></td>';
|
||||||
//else print '<td width="20px" align="right"><a href="#">'.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').'</a></td>';
|
//else print '<td width="20px" align="right"><a href="#">'.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').'</a></td>';
|
||||||
|
|||||||
@ -403,7 +403,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<input name="label" class="flat" type="text" size="24" value="'.GETPOST("label").'">';
|
print '<input name="label" class="flat" type="text" size="24" value="'.GETPOST("label").'">';
|
||||||
if ($nbcategories)
|
if ($nbcategories)
|
||||||
{
|
{
|
||||||
print '<br>'.$langs->trans("Category").': <select class="flat" name="cat1">'.$options.'</select>';
|
print '<br>'.$langs->trans("Rubrique").': <select class="flat" name="cat1">'.$options.'</select>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align=right><input name="debit" class="flat" type="text" size="4" value="'.GETPOST("debit").'"></td>';
|
print '<td align=right><input name="debit" class="flat" type="text" size="4" value="'.GETPOST("debit").'"></td>';
|
||||||
|
|||||||
@ -178,9 +178,10 @@ if ($resql)
|
|||||||
print '<form method="post" action="search.php" name="search_form">'."\n";
|
print '<form method="post" action="search.php" name="search_form">'."\n";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
||||||
|
|
||||||
$moreforfilter .= $langs->trans('Period') . ' ' . $langs->trans('StartDate') . ': ';
|
$moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' ';
|
||||||
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 1, 1);
|
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||||
$moreforfilter .= $langs->trans('EndDate') . ':' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 1, 1);
|
$moreforfilter .= ' - ';
|
||||||
|
$moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1);
|
||||||
|
|
||||||
|
|
||||||
if ($moreforfilter) {
|
if ($moreforfilter) {
|
||||||
|
|||||||
@ -329,8 +329,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
|||||||
// Solde actuel
|
// Solde actuel
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td align="left" colspan="5">'.$langs->trans("FutureBalance").'</td>';
|
print '<td align="left" colspan="5">'.$langs->trans("FutureBalance").' ('.$acct->currency_code.')</td>';
|
||||||
print '<td align="right" nowrap>'.price($solde).'</td>';
|
print '<td align="right" nowrap>'.price($solde, 0, $langs, 0, 0, -1, $acct->currency_code).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@ -79,7 +79,7 @@ if ($action == 'add')
|
|||||||
$accountto=new Account($db);
|
$accountto=new Account($db);
|
||||||
$accountto->fetch(GETPOST('account_to','int'));
|
$accountto->fetch(GETPOST('account_to','int'));
|
||||||
|
|
||||||
if ($accountto->id != $accountfrom->id)
|
if (($accountto->id != $accountfrom->id) && ($accountto->currency_code == $accountfrom->currency_code))
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
|
|||||||
@ -1887,10 +1887,11 @@ abstract class CommonObject
|
|||||||
* @param int $targetid Object target id
|
* @param int $targetid Object target id
|
||||||
* @param string $targettype Object target type
|
* @param string $targettype Object target type
|
||||||
* @param string $clause 'OR' or 'AND' clause used when both source id and target id are provided
|
* @param string $clause 'OR' or 'AND' clause used when both source id and target id are provided
|
||||||
|
* @param int $alsosametype 0=Return only links to different object than source. 1=Include also link to objects of same type.
|
||||||
* @return void
|
* @return void
|
||||||
* @see add_object_linked, updateObjectLinked, deleteObjectLinked
|
* @see add_object_linked, updateObjectLinked, deleteObjectLinked
|
||||||
*/
|
*/
|
||||||
function fetchObjectLinked($sourceid='',$sourcetype='',$targetid='',$targettype='',$clause='OR')
|
function fetchObjectLinked($sourceid='',$sourcetype='',$targetid='',$targettype='',$clause='OR',$alsosametype=1)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -1924,7 +1925,7 @@ abstract class CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Links beetween objects are stored in this table
|
// Links between objects are stored in table element_element
|
||||||
$sql = 'SELECT fk_source, sourcetype, fk_target, targettype';
|
$sql = 'SELECT fk_source, sourcetype, fk_target, targettype';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'element_element';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'element_element';
|
||||||
$sql.= " WHERE ";
|
$sql.= " WHERE ";
|
||||||
@ -1983,7 +1984,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$classpath = $element.'/class';
|
$classpath = $element.'/class';
|
||||||
|
|
||||||
// To work with non standard path
|
// To work with non standard classpath or module name
|
||||||
if ($objecttype == 'facture') {
|
if ($objecttype == 'facture') {
|
||||||
$classpath = 'compta/facture/class';
|
$classpath = 'compta/facture/class';
|
||||||
}
|
}
|
||||||
@ -2019,7 +2020,7 @@ abstract class CommonObject
|
|||||||
$classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur';
|
$classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->$module->enabled && $element != $this->element)
|
if ($conf->$module->enabled && (($element != $this->element) || $alsosametype))
|
||||||
{
|
{
|
||||||
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Events class
|
* Events class
|
||||||
* Initialy built by build_class_from_table on 2008-02-28 17:25
|
|
||||||
*/
|
*/
|
||||||
class Events // extends CommonObject
|
class Events // extends CommonObject
|
||||||
{
|
{
|
||||||
@ -41,6 +40,8 @@ class Events // extends CommonObject
|
|||||||
var $id;
|
var $id;
|
||||||
var $db;
|
var $db;
|
||||||
|
|
||||||
|
var $error;
|
||||||
|
|
||||||
var $tms;
|
var $tms;
|
||||||
var $type;
|
var $type;
|
||||||
var $entity;
|
var $entity;
|
||||||
|
|||||||
@ -203,11 +203,14 @@ abstract class Stats
|
|||||||
dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk.");
|
dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk.");
|
||||||
if (! dol_is_dir($conf->user->dir_temp)) dol_mkdir($conf->user->dir_temp);
|
if (! dol_is_dir($conf->user->dir_temp)) dol_mkdir($conf->user->dir_temp);
|
||||||
$fp = fopen($newpathofdestfile, 'w');
|
$fp = fopen($newpathofdestfile, 'w');
|
||||||
|
if ($fp)
|
||||||
|
{
|
||||||
fwrite($fp, json_encode($data));
|
fwrite($fp, json_encode($data));
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
||||||
@chmod($newpathofdestfile, octdec($newmask));
|
@chmod($newpathofdestfile, octdec($newmask));
|
||||||
|
}
|
||||||
|
else dol_syslog("Failed to write cache file", LOG_ERR);
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,11 +312,13 @@ abstract class Stats
|
|||||||
dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk.");
|
dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk.");
|
||||||
if (! dol_is_dir($conf->user->dir_temp)) dol_mkdir($conf->user->dir_temp);
|
if (! dol_is_dir($conf->user->dir_temp)) dol_mkdir($conf->user->dir_temp);
|
||||||
$fp = fopen($newpathofdestfile, 'w');
|
$fp = fopen($newpathofdestfile, 'w');
|
||||||
|
if ($fp)
|
||||||
|
{
|
||||||
fwrite($fp, json_encode($data));
|
fwrite($fp, json_encode($data));
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
||||||
@chmod($newpathofdestfile, octdec($newmask));
|
@chmod($newpathofdestfile, octdec($newmask));
|
||||||
|
}
|
||||||
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ function product_prepare_head($object)
|
|||||||
$head[$h][2] = 'referers';
|
$head[$h][2] = 'referers';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if($object->isproduct()) // Si produit stockable
|
if ($object->isproduct() || ($object->isservice() && ! empty($conf->global->STOCK_SUPPORTS_SERVICES))) // If physical product we can stock (or service with option)
|
||||||
{
|
{
|
||||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire)
|
if (! empty($conf->stock->enabled) && $user->rights->stock->lire)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -371,7 +371,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
$taskstatic->id=$lines[$i]->id;
|
$taskstatic->id=$lines[$i]->id;
|
||||||
$taskstatic->ref=$lines[$i]->ref;
|
$taskstatic->ref=$lines[$i]->ref;
|
||||||
$taskstatic->label=($taskrole[$lines[$i]->id]?$langs->trans("YourRole").': '.$taskrole[$lines[$i]->id]:'');
|
$taskstatic->label=($taskrole[$lines[$i]->id]?$langs->trans("YourRole").': '.$taskrole[$lines[$i]->id]:'');
|
||||||
print $taskstatic->getNomUrl(1,($showproject?'':'withproject'));
|
print $taskstatic->getNomUrl(1,'withproject');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -504,9 +504,10 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||||||
* @param string $tasksrole Array of roles user has on task
|
* @param string $tasksrole Array of roles user has on task
|
||||||
* @param string $mine Show only task lines I am assigned to
|
* @param string $mine Show only task lines I am assigned to
|
||||||
* @param int $restricteditformytask 0=No restriction, 1=Enable add time only if task is a task i am affected to
|
* @param int $restricteditformytask 0=No restriction, 1=Enable add time only if task is a task i am affected to
|
||||||
|
* @param int $preselectedday Preselected day
|
||||||
* @return $inc
|
* @return $inc
|
||||||
*/
|
*/
|
||||||
function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=0)
|
function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=0, $preselectedday='')
|
||||||
{
|
{
|
||||||
global $db, $user, $bc, $langs;
|
global $db, $user, $bc, $langs;
|
||||||
global $form, $formother, $projectstatic, $taskstatic;
|
global $form, $formother, $projectstatic, $taskstatic;
|
||||||
@ -527,6 +528,12 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
|
|||||||
{
|
{
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
$lastprojectid=$lines[$i]->fk_project;
|
$lastprojectid=$lines[$i]->fk_project;
|
||||||
|
|
||||||
|
if ($preselectedday)
|
||||||
|
{
|
||||||
|
$projectstatic->id = $lines[$i]->fk_project;
|
||||||
|
$projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent into this->weekWorkLoad and this->weekWorkLoadPerTaks for all day of a week
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we want all or we have a role on task, we show it
|
// If we want all or we have a role on task, we show it
|
||||||
@ -549,7 +556,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
|
|||||||
// Ref
|
// Ref
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$taskstatic->ref=($lines[$i]->ref?$lines[$i]->ref:$lines[$i]->id);
|
$taskstatic->ref=($lines[$i]->ref?$lines[$i]->ref:$lines[$i]->id);
|
||||||
print $taskstatic->getNomUrl(1);
|
print $taskstatic->getNomUrl(1,'withproject');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Label task
|
// Label task
|
||||||
@ -559,7 +566,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
|
|||||||
$taskstatic->ref=$lines[$i]->label;
|
$taskstatic->ref=$lines[$i]->label;
|
||||||
$taskstatic->date_start=$lines[$i]->date_start;
|
$taskstatic->date_start=$lines[$i]->date_start;
|
||||||
$taskstatic->date_end=$lines[$i]->date_end;
|
$taskstatic->date_end=$lines[$i]->date_end;
|
||||||
print $taskstatic->getNomUrl(0);
|
print $taskstatic->getNomUrl(0,'withproject');
|
||||||
//print "<br>";
|
//print "<br>";
|
||||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||||
@ -613,14 +620,21 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
|
|||||||
|
|
||||||
// Form to add new time
|
// Form to add new time
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap" align="center">';
|
||||||
$s='';
|
$tableCell=$form->select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask);
|
||||||
$s.=$form->select_date('',$lines[$i]->id,1,1,2,"addtime",1,0,1,$disabledtask);
|
print $tableCell;
|
||||||
print $s;
|
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
//$s.=' ';
|
|
||||||
$s=$form->select_duration($lines[$i]->id.'duration','',$disabledtask,'text',0,1);
|
$dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$preselectedday][$lines[$i]->id];
|
||||||
//$s.=' <input type="submit" class="button"'.($disabledtask?' disabled="disabled"':'').' value="'.$langs->trans("Add").'">';
|
$alreadyspent='';
|
||||||
print $s;
|
if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($dayWorkLoad,'allhourmin');
|
||||||
|
|
||||||
|
$tableCell='';
|
||||||
|
$tableCell.='<span class="timesheetalreadyrecorded"><input type="text" class="center" size="2" disabled="disabled" id="timespent['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="'.$alreadyspent.'"></span>';
|
||||||
|
$tableCell.=' + ';
|
||||||
|
//$tableCell.=' ';
|
||||||
|
$tableCell.=$form->select_duration($lines[$i]->id.'duration','',$disabledtask,'text',0,1);
|
||||||
|
//$tableCell.=' <input type="submit" class="button"'.($disabledtask?' disabled="disabled"':'').' value="'.$langs->trans("Add").'">';
|
||||||
|
print $tableCell;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
@ -633,7 +647,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
|
|||||||
|
|
||||||
$inc++;
|
$inc++;
|
||||||
$level++;
|
$level++;
|
||||||
if ($lines[$i]->id) projectLinesPerDay($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask);
|
if ($lines[$i]->id) projectLinesPerDay($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $preselectedday);
|
||||||
$level--;
|
$level--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -776,18 +790,30 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||||||
for ($idw = 0; $idw < 7; $idw++)
|
for ($idw = 0; $idw < 7; $idw++)
|
||||||
{
|
{
|
||||||
$tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
|
$tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
|
||||||
|
$tmparray=dol_getdate($tmpday);
|
||||||
$dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id];
|
$dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id];
|
||||||
$alreadyspent='';
|
$alreadyspent='';
|
||||||
if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($dayWorkLoad,'allhourmin');
|
if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($dayWorkLoad,'allhourmin');
|
||||||
$tableCell ='<td align="center">';
|
$tableCell ='<td align="center">';
|
||||||
$tableCell.='<span class="timesheetalreadyrecorded"><input type="text" class="center" size="2" disabled="disabled" id="timespent['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="'.$alreadyspent.'"></span>';
|
$tableCell.='<span class="timesheetalreadyrecorded"><input type="text" class="center" size="2" disabled="disabled" id="timespent['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="'.$alreadyspent.'"></span>';
|
||||||
|
//$placeholder=' placeholder="00:00"';
|
||||||
|
$placeholder='';
|
||||||
|
//if (! $disabledtask)
|
||||||
|
//{
|
||||||
$tableCell.='+';
|
$tableCell.='+';
|
||||||
$tableCell.='<input type="text" class="center" size="2" id="timeadded['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="" cols="2" maxlength="5"';
|
$tableCell.='<input type="text" alt="'.$langs->trans("AddHereTimeSpentForDay",$tmparray['day'],$tmparray['mon']).'" title="'.$langs->trans("AddHereTimeSpentForDay",$tmparray['day'],$tmparray['mon']).'" '.($disabledtask?'disabled="disabled"':$placeholder).' class="center" size="2" id="timeadded['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="" cols="2" maxlength="5"';
|
||||||
$tableCell.=' onkeypress="return regexEvent(this,event,\'timeChar\')"';
|
$tableCell.=' onkeypress="return regexEvent(this,event,\'timeChar\')"';
|
||||||
$tableCell.= 'onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />';
|
$tableCell.= 'onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />';
|
||||||
|
//}
|
||||||
$tableCell.='</td>';
|
$tableCell.='</td>';
|
||||||
print $tableCell;
|
print $tableCell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<td align="right">';
|
||||||
|
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
|
||||||
|
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -695,7 +695,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
if ((empty($leftmenu) || $leftmenu=="orders_suppliers") && empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->fournisseur->commande->lire);
|
if ((empty($leftmenu) || $leftmenu=="orders_suppliers") && empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->fournisseur->commande->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire);
|
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusOrderOnProcessShort"), 2, $user->rights->fournisseur->commande->lire);
|
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusOrderOnProcessShort"), 2, $user->rights->fournisseur->commande->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusOrderReceivedPartially"), 2, $user->rights->fournisseur->commande->lire);
|
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusOrderReceivedPartiallyShort"), 2, $user->rights->fournisseur->commande->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusOrderReceivedAll"), 2, $user->rights->fournisseur->commande->lire);
|
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusOrderReceivedAll"), 2, $user->rights->fournisseur->commande->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusOrderCanceled"), 2, $user->rights->fournisseur->commande->lire);
|
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusOrderCanceled"), 2, $user->rights->fournisseur->commande->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusOrderRefused"), 2, $user->rights->fournisseur->commande->lire);
|
if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusOrderRefused"), 2, $user->rights->fournisseur->commande->lire);
|
||||||
|
|||||||
@ -161,6 +161,14 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->rights[$r][4] = 'commande';
|
$this->rights[$r][4] = 'commande';
|
||||||
$this->rights[$r][5] = 'approuver';
|
$this->rights[$r][5] = 'approuver';
|
||||||
|
|
||||||
|
/*$r++;
|
||||||
|
$this->rights[$r][0] = 1191;
|
||||||
|
$this->rights[$r][1] = 'Approuver une commande fournisseur (si supérieur hiérarchique)';
|
||||||
|
$this->rights[$r][2] = 'w';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'commande';
|
||||||
|
$this->rights[$r][5] = 'approve_ifsupervisor_advance';*/
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 1186;
|
$this->rights[$r][0] = 1186;
|
||||||
$this->rights[$r][1] = 'Commander une commande fournisseur';
|
$this->rights[$r][1] = 'Commander une commande fournisseur';
|
||||||
@ -250,6 +258,18 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->rights[$r][4] = 'commande';
|
$this->rights[$r][4] = 'commande';
|
||||||
$this->rights[$r][5] = 'export';
|
$this->rights[$r][5] = 'export';
|
||||||
|
|
||||||
|
if ($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL)
|
||||||
|
{
|
||||||
|
$r++;
|
||||||
|
$this->rights[$r][0] = 1190;
|
||||||
|
$this->rights[$r][1] = 'Approve supplier order (second level)'; // $langs->trans("Permission1190");
|
||||||
|
$this->rights[$r][2] = 'w';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'commande';
|
||||||
|
$this->rights[$r][5] = 'approve2';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Exports
|
// Exports
|
||||||
//--------
|
//--------
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|||||||
@ -364,7 +364,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Last orders
|
* Last supplier orders
|
||||||
*/
|
*/
|
||||||
$orderstatic = new CommandeFournisseur($db);
|
$orderstatic = new CommandeFournisseur($db);
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).'</td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastSupplierOrders",($num<$MAXLIST?"":$MAXLIST)).'</td>';
|
||||||
print '<td align="right"><a href="commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' <span class="badge">'.$num.'</span></td>';
|
print '<td align="right"><a href="commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").' <span class="badge">'.$num.'</span></td>';
|
||||||
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
|
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
@ -455,7 +455,7 @@ if ($object->id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Last invoices
|
* Last supplier invoices
|
||||||
*/
|
*/
|
||||||
$MAXLIST=5;
|
$MAXLIST=5;
|
||||||
|
|
||||||
|
|||||||
@ -1392,13 +1392,19 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
function dispatchProduct($user, $product, $qty, $entrepot, $price=0, $comment='', $eatby='', $sellby='', $batch='', $fk_commandefourndet=0, $notrigger=0)
|
function dispatchProduct($user, $product, $qty, $entrepot, $price=0, $comment='', $eatby='', $sellby='', $batch='', $fk_commandefourndet=0, $notrigger=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
require_once DOL_DOCUMENT_ROOT .'/product/stock/class/mouvementstock.class.php';
|
require_once DOL_DOCUMENT_ROOT .'/product/stock/class/mouvementstock.class.php';
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters (if test are wrong here, there is bug into caller)
|
||||||
if ($entrepot <= 0 || $qty <= 0)
|
if ($entrepot <= 0)
|
||||||
{
|
{
|
||||||
$this->error='BadValueForParameterWarehouseOrQty';
|
$this->error='ErrorBadValueForParameterWarehouse';
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if ($qty <= 0)
|
||||||
|
{
|
||||||
|
$this->error='ErrorBadValueForParameterQty';
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1741,9 +1747,12 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
if ($type == 'nev') $statut = 7;
|
if ($type == 'nev') $statut = 7;
|
||||||
if ($type == 'can') $statut = 7;
|
if ($type == 'can') $statut = 7;
|
||||||
|
|
||||||
if (! $error && ! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) && ($type == 'tot'))
|
// Some checks to accept the record
|
||||||
|
if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS))
|
||||||
{
|
{
|
||||||
// If option SUPPLIER_ORDER_USE_DISPATCH_STATUS is on, we check all reception are approved to allow status "total/done"
|
// If option SUPPLIER_ORDER_USE_DISPATCH_STATUS is on, we check all reception are approved to allow status "total/done"
|
||||||
|
if (! $error && ($type == 'tot'))
|
||||||
|
{
|
||||||
$dispatchedlinearray=$this->getDispachedLines(0);
|
$dispatchedlinearray=$this->getDispachedLines(0);
|
||||||
if (count($dispatchedlinearray) > 0)
|
if (count($dispatchedlinearray) > 0)
|
||||||
{
|
{
|
||||||
@ -1752,7 +1761,23 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->errors[]='ErrorCantSetReceptionToTotalDoneWithReceptionToApprove';
|
$this->errors[]='ErrorCantSetReceptionToTotalDoneWithReceptionToApprove';
|
||||||
dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionToApprove', LOG_DEBUG);
|
dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionToApprove', LOG_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (! $error && ! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS_NEED_APPROVE) && ($type == 'tot')) // Accept to move to rception done, only if status of all line are ok (refuse denied)
|
||||||
|
{
|
||||||
|
$dispatcheddenied=$this->getDispachedLines(2);
|
||||||
|
if (count($dispatchedlinearray) > 0)
|
||||||
|
{
|
||||||
|
$result=-1;
|
||||||
|
$error++;
|
||||||
|
$this->errors[]='ErrorCantSetReceptionToTotalDoneWithReceptionDenied';
|
||||||
|
dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionDenied', LOG_DEBUG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO LDR01 Add option to accept only if ALL predefined products are received (same qty).
|
||||||
|
|
||||||
|
|
||||||
if (! $error && ! ($statut == 4 or $statut == 5 or $statut == 7))
|
if (! $error && ! ($statut == 4 or $statut == 5 or $statut == 7))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -495,16 +495,19 @@ class CommandeFournisseurDispatch extends CommonObject
|
|||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
|
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut8');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
if ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
||||||
|
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut8').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
if ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
if ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
|
if ($statut==2) return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$statut]).' </span>'.img_picto($langs->trans($this->statuts[$statut]),'statut8');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -154,7 +154,7 @@ class ProductFournisseur extends Product
|
|||||||
* @param float $remise_percent Discount regarding qty (percent)
|
* @param float $remise_percent Discount regarding qty (percent)
|
||||||
* @param float $remise Discount regarding qty (amount)
|
* @param float $remise Discount regarding qty (amount)
|
||||||
* @param int $newnpr Set NPR or not
|
* @param int $newnpr Set NPR or not
|
||||||
* @param int $delivery_time_days Delay in days for delivery (max)
|
* @param int $delivery_time_days Delay in days for delivery (max). May be '' if not defined.
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0)
|
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0)
|
||||||
@ -167,7 +167,7 @@ class ProductFournisseur extends Product
|
|||||||
if (empty($charges)) $charges=0;
|
if (empty($charges)) $charges=0;
|
||||||
if (empty($availability)) $availability=0;
|
if (empty($availability)) $availability=0;
|
||||||
if (empty($remise_percent)) $remise_percent=0;
|
if (empty($remise_percent)) $remise_percent=0;
|
||||||
if (empty($delivery_time_days)) $delivery_time_days=0;
|
if ($delivery_time_days != '' && ! is_numeric($delivery_time_days)) $delivery_time_days = '';
|
||||||
if ($price_base_type == 'TTC')
|
if ($price_base_type == 'TTC')
|
||||||
{
|
{
|
||||||
//$ttx = get_default_tva($fourn,$mysoc,$this->id); // We must use the VAT rate defined by user and not calculate it
|
//$ttx = get_default_tva($fourn,$mysoc,$this->id); // We must use the VAT rate defined by user and not calculate it
|
||||||
@ -202,7 +202,7 @@ class ProductFournisseur extends Product
|
|||||||
$sql.= " entity = ".$conf->entity.",";
|
$sql.= " entity = ".$conf->entity.",";
|
||||||
$sql.= " info_bits = ".$newnpr.",";
|
$sql.= " info_bits = ".$newnpr.",";
|
||||||
$sql.= " charges = ".$charges.",";
|
$sql.= " charges = ".$charges.",";
|
||||||
$sql.= " delivery_time_days = ".$delivery_time_days;
|
$sql.= " delivery_time_days = ".($delivery_time_days != '' ? $delivery_time_days : 'null');
|
||||||
$sql.= " WHERE rowid = ".$this->product_fourn_price_id;
|
$sql.= " WHERE rowid = ".$this->product_fourn_price_id;
|
||||||
// TODO Add price_base_type and price_ttc
|
// TODO Add price_base_type and price_ttc
|
||||||
|
|
||||||
@ -633,15 +633,17 @@ class ProductFournisseur extends Product
|
|||||||
*
|
*
|
||||||
* @param int $withpicto Add picto
|
* @param int $withpicto Add picto
|
||||||
* @param string $option Target of link ('', 'customer', 'prospect', 'supplier')
|
* @param string $option Target of link ('', 'customer', 'prospect', 'supplier')
|
||||||
|
* @param int $maxlen Max length of name
|
||||||
|
* @param integer $notooltip 1=Disable tooltip
|
||||||
* @return string String with supplier price
|
* @return string String with supplier price
|
||||||
* TODO Remove this method. Use getNomUrl directly.
|
* TODO Remove this method. Use getNomUrl directly.
|
||||||
*/
|
*/
|
||||||
function getSocNomUrl($withpicto=0,$option='supplier')
|
function getSocNomUrl($withpicto=0,$option='supplier',$maxlen=0,$notooltip=0)
|
||||||
{
|
{
|
||||||
$thirdparty = new Fournisseur($this->db);
|
$thirdparty = new Fournisseur($this->db);
|
||||||
$thirdparty->fetch($this->fourn_id);
|
$thirdparty->fetch($this->fourn_id);
|
||||||
|
|
||||||
return $thirdparty->getNomUrl($withpicto,$option);
|
return $thirdparty->getNomUrl($withpicto,$option,$maxlen,$notooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -649,13 +651,15 @@ class ProductFournisseur extends Product
|
|||||||
*
|
*
|
||||||
* @param int $showunitprice Show "Unit price" into output string
|
* @param int $showunitprice Show "Unit price" into output string
|
||||||
* @param int $showsuptitle Show "Supplier" into output string
|
* @param int $showsuptitle Show "Supplier" into output string
|
||||||
|
* @param int $maxlen Max length of name
|
||||||
|
* @param integer $notooltip 1=Disable tooltip
|
||||||
* @return string String with supplier price
|
* @return string String with supplier price
|
||||||
*/
|
*/
|
||||||
function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1)
|
function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1,$maxlen=0,$notooltip=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
$out=($showunitprice?price($this->fourn_unitprice).' '.$langs->trans("HT").' (':'').($showsuptitle?$langs->trans("Supplier").': ':'').$this->getSocNomUrl(1, 'supplier').' / '.$langs->trans("SupplierRef").': '.$this->fourn_ref.($showunitprice?')':'');
|
$out=($showunitprice?price($this->fourn_unitprice).' '.$langs->trans("HT").' (':'').($showsuptitle?$langs->trans("Supplier").': ':'').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / '.$langs->trans("SupplierRef").': '.$this->fourn_ref.($showunitprice?')':'');
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -190,12 +190,13 @@ if (empty($reshook))
|
|||||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver)
|
if ($action == 'reopen') // no test on permission here, permission to use will depends on status
|
||||||
{
|
{
|
||||||
if (in_array($object->statut, array(1, 2, 5, 6, 7, 9)))
|
if (in_array($object->statut, array(1, 2, 3, 5, 6, 7, 9)))
|
||||||
{
|
{
|
||||||
if ($object->statut == 1) $newstatus=0; // Validated->Draft
|
if ($object->statut == 1) $newstatus=0; // Validated->Draft
|
||||||
else if ($object->statut == 2) $newstatus=0; // Approved->Draft
|
else if ($object->statut == 2) $newstatus=0; // Approved->Draft
|
||||||
|
else if ($object->statut == 3) $newstatus=2; // Ordered->Approved
|
||||||
else if ($object->statut == 5) $newstatus=4; // Received->Received partially
|
else if ($object->statut == 5) $newstatus=4; // Received->Received partially
|
||||||
else if ($object->statut == 6) $newstatus=2; // Canceled->Approved
|
else if ($object->statut == 6) $newstatus=2; // Canceled->Approved
|
||||||
else if ($object->statut == 7) $newstatus=3; // Canceled->Process running
|
else if ($object->statut == 7) $newstatus=3; // Canceled->Process running
|
||||||
@ -950,40 +951,40 @@ if (empty($reshook))
|
|||||||
if (empty($lines[$i]->subprice) || $lines[$i]->qty <= 0)
|
if (empty($lines[$i]->subprice) || $lines[$i]->qty <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$label = (! empty($lines [$i]->label) ? $lines [$i]->label : '');
|
$label = (! empty($lines[$i]->label) ? $lines[$i]->label : '');
|
||||||
$desc = (! empty($lines [$i]->desc) ? $lines [$i]->desc : $lines [$i]->libelle);
|
$desc = (! empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->libelle);
|
||||||
$product_type = (! empty($lines [$i]->product_type) ? $lines [$i]->product_type : 0);
|
$product_type = (! empty($lines[$i]->product_type) ? $lines[$i]->product_type : 0);
|
||||||
|
|
||||||
// Reset fk_parent_line for no child products and special product
|
// Reset fk_parent_line for no child products and special product
|
||||||
if (($lines [$i]->product_type != 9 && empty($lines [$i]->fk_parent_line)) || $lines [$i]->product_type == 9) {
|
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
|
||||||
$fk_parent_line = 0;
|
$fk_parent_line = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines [$i], 'fetch_optionals')) // For avoid conflicts if
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if
|
||||||
// trigger used
|
// trigger used
|
||||||
{
|
{
|
||||||
$lines [$i]->fetch_optionals($lines [$i]->rowid);
|
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
||||||
$array_option = $lines [$i]->array_options;
|
$array_option = $lines[$i]->array_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
$idprod = $productsupplier->find_min_price_product_fournisseur($lines [$i]->fk_product, $lines [$i]->qty);
|
$idprod = $productsupplier->find_min_price_product_fournisseur($lines[$i]->fk_product, $lines[$i]->qty);
|
||||||
$res = $productsupplier->fetch($idProductFourn);
|
$res = $productsupplier->fetch($idProductFourn);
|
||||||
|
|
||||||
$result = $object->addline(
|
$result = $object->addline(
|
||||||
$desc,
|
$desc,
|
||||||
$lines [$i]->subprice,
|
$lines[$i]->subprice,
|
||||||
$lines [$i]->qty,
|
$lines[$i]->qty,
|
||||||
$lines [$i]->tva_tx,
|
$lines[$i]->tva_tx,
|
||||||
$lines [$i]->localtax1_tx,
|
$lines[$i]->localtax1_tx,
|
||||||
$lines [$i]->localtax2_tx,
|
$lines[$i]->localtax2_tx,
|
||||||
$lines [$i]->fk_product,
|
$lines[$i]->fk_product,
|
||||||
$productsupplier->product_fourn_price_id,
|
$productsupplier->product_fourn_price_id,
|
||||||
$productsupplier->ref_fourn,
|
$productsupplier->ref_fourn,
|
||||||
$lines [$i]->remise_percent,
|
$lines[$i]->remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$lines [$i]->product_type,
|
$lines[$i]->product_type,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
null,
|
null,
|
||||||
@ -996,7 +997,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Defined the new fk_parent_line
|
// Defined the new fk_parent_line
|
||||||
if ($result > 0 && $lines [$i]->product_type == 9) {
|
if ($result > 0 && $lines[$i]->product_type == 9) {
|
||||||
$fk_parent_line = $result;
|
$fk_parent_line = $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1911,7 +1912,7 @@ elseif (! empty($object->id))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
// Delai livraison jours
|
// Delivery delay (in days)
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('NbDaysToDelivery').' '.img_picto($langs->trans('DescNbDaysToDelivery'), 'info', 'style="cursor:help"').'</td>';
|
print '<td>'.$langs->trans('NbDaysToDelivery').' '.img_picto($langs->trans('DescNbDaysToDelivery'), 'info', 'style="cursor:help"').'</td>';
|
||||||
print '<td>'.$object->getMaxDeliveryTimeDay($langs).'</td>';
|
print '<td>'.$object->getMaxDeliveryTimeDay($langs).'</td>';
|
||||||
@ -2671,7 +2672,7 @@ elseif (! empty($object->id))
|
|||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("Disapprove").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("Disapprove").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (in_array($object->statut, array(5, 6, 7, 9)))
|
if (in_array($object->statut, array(3, 5, 6, 7, 9)))
|
||||||
{
|
{
|
||||||
if ($user->rights->fournisseur->commande->commander)
|
if ($user->rights->fournisseur->commande->commander)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -101,6 +101,23 @@ if ($action == 'uncheckdispatchline' &&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'denydispatchline' &&
|
||||||
|
! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner))
|
||||||
|
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
||||||
|
$result=$supplierorderdispatch->fetch($lineid);
|
||||||
|
if (! $result) dol_print_error($db);
|
||||||
|
$result=$supplierorderdispatch->setStatut(2);
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
|
||||||
|
$error++;
|
||||||
|
$action='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
|
if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
|
||||||
{
|
{
|
||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
@ -123,7 +140,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
|
|||||||
|
|
||||||
if (GETPOST($qty) > 0) // We ask to move a qty
|
if (GETPOST($qty) > 0) // We ask to move a qty
|
||||||
{
|
{
|
||||||
if (! GETPOST($ent,'int') > 0)
|
if (! (GETPOST($ent,'int') > 0))
|
||||||
{
|
{
|
||||||
dol_syslog('No dispatch for line '.$key.' as no warehouse choosed');
|
dol_syslog('No dispatch for line '.$key.' as no warehouse choosed');
|
||||||
$text = $langs->transnoentities('Warehouse').', '.$langs->transnoentities('Line').' ' .($numline);
|
$text = $langs->transnoentities('Warehouse').', '.$langs->transnoentities('Line').' ' .($numline);
|
||||||
@ -133,7 +150,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$result = $commande->DispatchProduct($user, GETPOST($prod,'int'),GETPOST($qty), GETPOST($ent,'int'), GETPOST($pu), GETPOST("comment"), '', '', '', GETPOST($fk_commandefourndet, 'int'), $notrigger);
|
$result = $commande->DispatchProduct($user, GETPOST($prod,'int'), GETPOST($qty), GETPOST($ent,'int'), GETPOST($pu), GETPOST("comment"), '', '', '', GETPOST($fk_commandefourndet, 'int'), $notrigger);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($commande->error, $commande->errors, 'errors');
|
setEventMessages($commande->error, $commande->errors, 'errors');
|
||||||
@ -643,11 +660,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
if (empty($objp->status))
|
if (empty($objp->status))
|
||||||
{
|
{
|
||||||
print '<a class="button buttonRefused" href="#">'.$langs->trans("Check").'</a>';
|
print '<a class="button buttonRefused" href="#">'.$langs->trans("Approve").'</a>';
|
||||||
|
print '<a class="button buttonRefused" href="#">'.$langs->trans("Deny").'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="button buttonRefused" href="#">'.$langs->trans("Uncheck").'</a>';
|
print '<a class="button buttonRefused" href="#">'.$langs->trans("Disapprove").'</a>';
|
||||||
|
print '<a class="button buttonRefused" href="#">'.$langs->trans("Deny").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -656,11 +675,18 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if ($commande->statut == 5) $disabled=1;
|
if ($commande->statut == 5) $disabled=1;
|
||||||
if (empty($objp->status))
|
if (empty($objp->status))
|
||||||
{
|
{
|
||||||
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=checkdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Check").'</a>';
|
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=checkdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Approve").'</a>';
|
||||||
|
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=denydispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Deny").'</a>';
|
||||||
}
|
}
|
||||||
else
|
if ($objp->status == 1)
|
||||||
{
|
{
|
||||||
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=uncheckdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Uncheck").'</a>';
|
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=uncheckdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Reinit").'</a>';
|
||||||
|
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=denydispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Deny").'</a>';
|
||||||
|
}
|
||||||
|
if ($objp->status == 2)
|
||||||
|
{
|
||||||
|
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=uncheckdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Reinit").'</a>';
|
||||||
|
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=checkdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Approve").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -50,9 +50,9 @@ create table llx_facture_rec
|
|||||||
note_private text,
|
note_private text,
|
||||||
note_public text,
|
note_public text,
|
||||||
|
|
||||||
usenewprice integer DEFAULT 0,
|
usenewprice integer DEFAULT 0, -- update invoice with current price of product instead of recorded price
|
||||||
frequency integer,
|
frequency integer, -- frequency (for example: 3 for every 3 month)
|
||||||
unit_frequency varchar(2) DEFAULT 'd',
|
unit_frequency varchar(2) DEFAULT 'm', -- 'm' for month (date_when must be a day <= 28), 'y' for year, ...
|
||||||
|
|
||||||
date_when datetime DEFAULT NULL, -- date for next gen (when an invoice is generated, this field must be updated with next date)
|
date_when datetime DEFAULT NULL, -- date for next gen (when an invoice is generated, this field must be updated with next date)
|
||||||
date_last_gen datetime DEFAULT NULL, -- date for last gen (date with last successfull generation of invoice)
|
date_last_gen datetime DEFAULT NULL, -- date for last gen (date with last successfull generation of invoice)
|
||||||
|
|||||||
@ -160,13 +160,16 @@ ErrorPriceExpressionInternal=Internal error '%s'
|
|||||||
ErrorPriceExpressionUnknown=Unknown error '%s'
|
ErrorPriceExpressionUnknown=Unknown error '%s'
|
||||||
ErrorSrcAndTargetWarehouseMustDiffers=Source and target warehouses must differs
|
ErrorSrcAndTargetWarehouseMustDiffers=Source and target warehouses must differs
|
||||||
ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without batch/serial information, on a product requiring batch/serial information
|
ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without batch/serial information, on a product requiring batch/serial information
|
||||||
ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified before being allowed to do this action
|
ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified (approved or denied) before being allowed to do this action
|
||||||
|
ErrorCantSetReceptionToTotalDoneWithReceptionDenied=All recorded receptions must first be verified (approved) before being allowed to do this action
|
||||||
ErrorGlobalVariableUpdater0=HTTP request failed with error '%s'
|
ErrorGlobalVariableUpdater0=HTTP request failed with error '%s'
|
||||||
ErrorGlobalVariableUpdater1=Invalid JSON format '%s'
|
ErrorGlobalVariableUpdater1=Invalid JSON format '%s'
|
||||||
ErrorGlobalVariableUpdater2=Missing parameter '%s'
|
ErrorGlobalVariableUpdater2=Missing parameter '%s'
|
||||||
ErrorGlobalVariableUpdater3=The requested data was not found in result
|
ErrorGlobalVariableUpdater3=The requested data was not found in result
|
||||||
ErrorGlobalVariableUpdater4=SOAP client failed with error '%s'
|
ErrorGlobalVariableUpdater4=SOAP client failed with error '%s'
|
||||||
ErrorGlobalVariableUpdater5=No global variable selected
|
ErrorGlobalVariableUpdater5=No global variable selected
|
||||||
|
ErrorFieldMustBeANumeric=Field <b>%s</b> must be a numeric value
|
||||||
|
ErrorFieldMustBeAnInteger=Field <b>%s</b> must be an integer
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
|
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
|
||||||
|
|||||||
@ -220,6 +220,7 @@ Next=Next
|
|||||||
Cards=Cards
|
Cards=Cards
|
||||||
Card=Card
|
Card=Card
|
||||||
Now=Now
|
Now=Now
|
||||||
|
HourStart=Start hour
|
||||||
Date=Date
|
Date=Date
|
||||||
DateAndHour=Date and hour
|
DateAndHour=Date and hour
|
||||||
DateStart=Date start
|
DateStart=Date start
|
||||||
@ -700,6 +701,7 @@ SelectElementAndClickRefresh=Select an element and click Refresh
|
|||||||
PrintFile=Print File %s
|
PrintFile=Print File %s
|
||||||
ShowTransaction=Show transaction
|
ShowTransaction=Show transaction
|
||||||
GoIntoSetupToChangeLogo=Go into Home - Setup - Company to change logo or go into Home - Setup - Display to hide.
|
GoIntoSetupToChangeLogo=Go into Home - Setup - Company to change logo or go into Home - Setup - Display to hide.
|
||||||
|
Denied=Denied
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Monday
|
Monday=Monday
|
||||||
Tuesday=Tuesday
|
Tuesday=Tuesday
|
||||||
|
|||||||
@ -79,7 +79,9 @@ NoOpenedOrders=No opened orders
|
|||||||
NoOtherOpenedOrders=No other opened orders
|
NoOtherOpenedOrders=No other opened orders
|
||||||
NoDraftOrders=No draft orders
|
NoDraftOrders=No draft orders
|
||||||
OtherOrders=Other orders
|
OtherOrders=Other orders
|
||||||
LastOrders=Last %s orders
|
LastOrders=Last %s customer orders
|
||||||
|
LastCustomerOrders=Last %s customer orders
|
||||||
|
LastSupplierOrders=Last %s supplier orders
|
||||||
LastModifiedOrders=Last %s modified orders
|
LastModifiedOrders=Last %s modified orders
|
||||||
LastClosedOrders=Last %s closed orders
|
LastClosedOrders=Last %s closed orders
|
||||||
AllOrders=All orders
|
AllOrders=All orders
|
||||||
|
|||||||
@ -7,6 +7,7 @@ ProductStatusNotOnBatchShort=No
|
|||||||
Batch=Batch/Serial
|
Batch=Batch/Serial
|
||||||
atleast1batchfield=Eat-by date or Sell-by date or Batch number
|
atleast1batchfield=Eat-by date or Sell-by date or Batch number
|
||||||
batch_number=Batch/Serial number
|
batch_number=Batch/Serial number
|
||||||
|
BatchNumberShort=Batch/Serial
|
||||||
l_eatby=Eat-by date
|
l_eatby=Eat-by date
|
||||||
l_sellby=Sell-by date
|
l_sellby=Sell-by date
|
||||||
DetailBatchNumber=Batch/Serial details
|
DetailBatchNumber=Batch/Serial details
|
||||||
|
|||||||
@ -14,6 +14,7 @@ MyTasksDesc=This view is limited to projects or tasks you are a contact for (wha
|
|||||||
OnlyOpenedProject=Only opened projects are visible (projects with draft or closed status are not visible).
|
OnlyOpenedProject=Only opened projects are visible (projects with draft or closed status are not visible).
|
||||||
TasksPublicDesc=This view presents all projects and tasks you are allowed to read.
|
TasksPublicDesc=This view presents all projects and tasks you are allowed to read.
|
||||||
TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything).
|
TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything).
|
||||||
|
AllTaskVisibleButEditIfYouAreAssigned=All tasks for such project are visible, but you can enter time only for task you are assigned on.
|
||||||
ProjectsArea=Projects area
|
ProjectsArea=Projects area
|
||||||
NewProject=New project
|
NewProject=New project
|
||||||
AddProject=Create project
|
AddProject=Create project
|
||||||
|
|||||||
@ -132,3 +132,4 @@ ShowWarehouse=Show warehouse
|
|||||||
MovementCorrectStock=Stock content correction for product %s
|
MovementCorrectStock=Stock content correction for product %s
|
||||||
MovementTransferStock=Stock transfer of product %s into another warehouse
|
MovementTransferStock=Stock transfer of product %s into another warehouse
|
||||||
WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when batch module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
|
WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when batch module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
|
||||||
|
InventoryCodeShort=Inv./Mov. code
|
||||||
@ -1606,7 +1606,7 @@ SalariesSetup=Configuration du module salariés
|
|||||||
SortOrder=Ordre de tri
|
SortOrder=Ordre de tri
|
||||||
Format=Format
|
Format=Format
|
||||||
TypePaymentDesc=0:Type de paiement client, 1:Type de paiement fournisseur, 2:Paiement de type client et fournisseur
|
TypePaymentDesc=0:Type de paiement client, 1:Type de paiement fournisseur, 2:Paiement de type client et fournisseur
|
||||||
IncludePath=Chemin Include (définir dans la variable %s)
|
IncludePath=Chemin Include (défini dans la variable %s)
|
||||||
ExpenseReportsSetup=Configuration du module Notes de frais
|
ExpenseReportsSetup=Configuration du module Notes de frais
|
||||||
TemplatePDFExpenseReports=Modèles de documents pour générer les document de Notes de frais
|
TemplatePDFExpenseReports=Modèles de documents pour générer les document de Notes de frais
|
||||||
NoModueToManageStockDecrease=Aucun module capable d'assurer la réduction de stock en automatique a été activé. La réduction de stock se fera donc uniquement sur mise à jour manuelle.
|
NoModueToManageStockDecrease=Aucun module capable d'assurer la réduction de stock en automatique a été activé. La réduction de stock se fera donc uniquement sur mise à jour manuelle.
|
||||||
|
|||||||
@ -190,7 +190,7 @@ AlreadyPaid=Déjà réglé
|
|||||||
AlreadyPaidBack=Déjà remboursé
|
AlreadyPaidBack=Déjà remboursé
|
||||||
AlreadyPaidNoCreditNotesNoDeposits=Déjà réglé (hors avoirs et acomptes)
|
AlreadyPaidNoCreditNotesNoDeposits=Déjà réglé (hors avoirs et acomptes)
|
||||||
Abandoned=Abandonné
|
Abandoned=Abandonné
|
||||||
RemainderToPay=Restant impayé
|
RemainderToPay=Reste à payer
|
||||||
RemainderToTake=Montant restant à percevoir
|
RemainderToTake=Montant restant à percevoir
|
||||||
RemainderToPayBack=Montant à rembourser
|
RemainderToPayBack=Montant à rembourser
|
||||||
Rest=Créance
|
Rest=Créance
|
||||||
@ -294,8 +294,8 @@ TotalOfTwoDiscountMustEqualsOriginal=La somme du montant des 2 nouvelles réduct
|
|||||||
ConfirmRemoveDiscount=Êtes-vous sûr de vouloir supprimer cette réduction ?
|
ConfirmRemoveDiscount=Êtes-vous sûr de vouloir supprimer cette réduction ?
|
||||||
RelatedBill=Facture associée
|
RelatedBill=Facture associée
|
||||||
RelatedBills=Factures associées
|
RelatedBills=Factures associées
|
||||||
RelatedCustomerInvoices=Related customer invoices
|
RelatedCustomerInvoices=Factures clients liées
|
||||||
RelatedSupplierInvoices=Related supplier invoices
|
RelatedSupplierInvoices=Factures fournisseurs liées
|
||||||
LatestRelatedBill=Dernière facture en rapport
|
LatestRelatedBill=Dernière facture en rapport
|
||||||
WarningBillExist=Attention, une ou plusieurs factures existent déjà
|
WarningBillExist=Attention, une ou plusieurs factures existent déjà
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
# Dolibarr language file - Source file is en_US - categories
|
# Dolibarr language file - Source file is en_US - categories
|
||||||
Rubrique=Tag/Category
|
Rubrique=Label/Catégorie
|
||||||
Rubriques=Tags/Categories
|
Rubriques=Labels/Catégories
|
||||||
categories=tags/categories
|
categories=labels/catégories
|
||||||
TheCategorie=The tag/category
|
TheCategorie=Le label/Catégorie
|
||||||
NoCategoryYet=No tag/category of this type created
|
NoCategoryYet=Aucun label/catégorie de ce type n'a été créé
|
||||||
In=Dans
|
In=Dans
|
||||||
AddIn=Ajouter dans
|
AddIn=Ajouter dans
|
||||||
modify=modifier
|
modify=modifier
|
||||||
@ -18,8 +18,8 @@ ContactsCategoriesArea=Contacts tags/categories area
|
|||||||
MainCats=Main tags/categories
|
MainCats=Main tags/categories
|
||||||
SubCats=Sous-catégories
|
SubCats=Sous-catégories
|
||||||
CatStatistics=Statistiques
|
CatStatistics=Statistiques
|
||||||
CatList=List of tags/categories
|
CatList=Liste des labels/catégories
|
||||||
AllCats=All tags/categories
|
AllCats=Tous les labels/catégories
|
||||||
ViewCat=View tag/category
|
ViewCat=View tag/category
|
||||||
NewCat=Add tag/category
|
NewCat=Add tag/category
|
||||||
NewCategory=New tag/category
|
NewCategory=New tag/category
|
||||||
|
|||||||
@ -18,7 +18,7 @@ CronExplainHowToRunUnix=Sur un environnement Unix vous pouvez utiliser l'entrée
|
|||||||
CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utiliser le planificateur de tache pour lancer cette commande toute les 5 minutes.
|
CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utiliser le planificateur de tache pour lancer cette commande toute les 5 minutes.
|
||||||
# Menu
|
# Menu
|
||||||
CronJobs=Travaux programmés
|
CronJobs=Travaux programmés
|
||||||
CronListActive=Liste des travaux actifs/programmés
|
CronListActive=Liste des travaux
|
||||||
CronListInactive=Liste des travaux inactifs
|
CronListInactive=Liste des travaux inactifs
|
||||||
# Page list
|
# Page list
|
||||||
CronDateLastRun=Dernier lancement
|
CronDateLastRun=Dernier lancement
|
||||||
|
|||||||
@ -6,8 +6,8 @@ Donor=Donateur
|
|||||||
Donors=Donateurs
|
Donors=Donateurs
|
||||||
AddDonation=Créer un don
|
AddDonation=Créer un don
|
||||||
NewDonation=Nouveau don
|
NewDonation=Nouveau don
|
||||||
DeleteADonation=Delete a donation
|
DeleteADonation=Effacer le don
|
||||||
ConfirmDeleteADonation=Are you sure you want to delete this donation ?
|
ConfirmDeleteADonation=Êtes-vous sûr de vouloir supprimer ce don ?
|
||||||
ShowDonation=Montrer don
|
ShowDonation=Montrer don
|
||||||
DonationPromise=Promesse de don
|
DonationPromise=Promesse de don
|
||||||
PromisesNotValid=Promesses non validées
|
PromisesNotValid=Promesses non validées
|
||||||
@ -23,8 +23,8 @@ DonationStatusPaid=Don payé
|
|||||||
DonationStatusPromiseNotValidatedShort=Non validée
|
DonationStatusPromiseNotValidatedShort=Non validée
|
||||||
DonationStatusPromiseValidatedShort=Validée
|
DonationStatusPromiseValidatedShort=Validée
|
||||||
DonationStatusPaidShort=Payé
|
DonationStatusPaidShort=Payé
|
||||||
DonationTitle=Donation receipt
|
DonationTitle=Reçu de dons
|
||||||
DonationDatePayment=Payment date
|
DonationDatePayment=Date paiement
|
||||||
ValidPromess=Valider promesse
|
ValidPromess=Valider promesse
|
||||||
DonationReceipt=Reçu de dons
|
DonationReceipt=Reçu de dons
|
||||||
BuildDonationReceipt=Créer reçu
|
BuildDonationReceipt=Créer reçu
|
||||||
@ -40,4 +40,4 @@ FrenchOptions=Options propres à la france
|
|||||||
DONATION_ART200=Afficher article 200 du CGI si vous êtes concernés
|
DONATION_ART200=Afficher article 200 du CGI si vous êtes concernés
|
||||||
DONATION_ART238=Afficher article 238 du CGI si vous êtes concernés
|
DONATION_ART238=Afficher article 238 du CGI si vous êtes concernés
|
||||||
DONATION_ART885=Afficher article 885 du CGI si vous êtes concernés
|
DONATION_ART885=Afficher article 885 du CGI si vous êtes concernés
|
||||||
DonationPayment=Donation payment
|
DonationPayment=Paiement du don
|
||||||
|
|||||||
@ -25,7 +25,7 @@ ErrorFromToAccountsMustDiffers=Les comptes source et destination doivent être d
|
|||||||
ErrorBadThirdPartyName=Nom de tiers incorrect
|
ErrorBadThirdPartyName=Nom de tiers incorrect
|
||||||
ErrorProdIdIsMandatory=Le %s est obligatoire
|
ErrorProdIdIsMandatory=Le %s est obligatoire
|
||||||
ErrorBadCustomerCodeSyntax=La syntaxe du code client est incorrecte
|
ErrorBadCustomerCodeSyntax=La syntaxe du code client est incorrecte
|
||||||
ErrorBadBarCodeSyntax=Bad syntax for bar code. May be you set a bad barcode type or you defined a barcode mask for numbering that does not match value scanned.
|
ErrorBadBarCodeSyntax=Mauvaise syntaxe pour le code barre. Peut être que vous avez défini un mauvais type de code-barres ou que vous avez défini un masque de code à barres pour la numérotation qui ne correspond pas à la valeur scannée.
|
||||||
ErrorCustomerCodeRequired=Code client obligatoire
|
ErrorCustomerCodeRequired=Code client obligatoire
|
||||||
ErrorBarCodeRequired=Code-barre requis
|
ErrorBarCodeRequired=Code-barre requis
|
||||||
ErrorCustomerCodeAlreadyUsed=Code client déjà utilisé
|
ErrorCustomerCodeAlreadyUsed=Code client déjà utilisé
|
||||||
@ -160,13 +160,13 @@ ErrorPriceExpressionInternal=Erreur interne '%s'
|
|||||||
ErrorPriceExpressionUnknown=Erreur inconnue '%s'
|
ErrorPriceExpressionUnknown=Erreur inconnue '%s'
|
||||||
ErrorSrcAndTargetWarehouseMustDiffers=Les entrepôts source et destination doivent être différents
|
ErrorSrcAndTargetWarehouseMustDiffers=Les entrepôts source et destination doivent être différents
|
||||||
ErrorTryToMakeMoveOnProductRequiringBatchData=Erreur, vous essayez de faire un mouvement sans lot/numéro de série, sur un produit qui exige un lot/numéro de série.
|
ErrorTryToMakeMoveOnProductRequiringBatchData=Erreur, vous essayez de faire un mouvement sans lot/numéro de série, sur un produit qui exige un lot/numéro de série.
|
||||||
ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified before being allowed to do this action
|
ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=Toutes les réceptions enregistrées doivent d'abord être vérifiées avant d'être autorisés à faire cette action
|
||||||
ErrorGlobalVariableUpdater0=HTTP request failed with error '%s'
|
ErrorGlobalVariableUpdater0=La requête HTTP a échoué avec l'erreur '%s'
|
||||||
ErrorGlobalVariableUpdater1=Invalid JSON format '%s'
|
ErrorGlobalVariableUpdater1=Format JSON invalide '%s'
|
||||||
ErrorGlobalVariableUpdater2=Missing parameter '%s'
|
ErrorGlobalVariableUpdater2=Paramètre manquant '%s'
|
||||||
ErrorGlobalVariableUpdater3=The requested data was not found in result
|
ErrorGlobalVariableUpdater3=La donnée recherché n'a pas été trouvée
|
||||||
ErrorGlobalVariableUpdater4=SOAP client failed with error '%s'
|
ErrorGlobalVariableUpdater4=Le client SOAP a échoué avec l'erreur '%s'
|
||||||
ErrorGlobalVariableUpdater5=No global variable selected
|
ErrorGlobalVariableUpdater5=Pas de variable globale
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées
|
WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées
|
||||||
|
|||||||
@ -141,7 +141,7 @@ Cancel=Annuler
|
|||||||
Modify=Modifier
|
Modify=Modifier
|
||||||
Edit=Éditer
|
Edit=Éditer
|
||||||
Validate=Valider
|
Validate=Valider
|
||||||
ValidateAndApprove=Validate and Approve
|
ValidateAndApprove=Valider et Approuver
|
||||||
ToValidate=À valider
|
ToValidate=À valider
|
||||||
Save=Enregistrer
|
Save=Enregistrer
|
||||||
SaveAs=Enregistrer sous
|
SaveAs=Enregistrer sous
|
||||||
@ -159,7 +159,7 @@ Search=Rechercher
|
|||||||
SearchOf=Recherche de
|
SearchOf=Recherche de
|
||||||
Valid=Valider
|
Valid=Valider
|
||||||
Approve=Approuver
|
Approve=Approuver
|
||||||
Disapprove=Disapprove
|
Disapprove=Désapprouver
|
||||||
ReOpen=Réouvrir
|
ReOpen=Réouvrir
|
||||||
Upload=Envoyer fichier
|
Upload=Envoyer fichier
|
||||||
ToLink=Lier
|
ToLink=Lier
|
||||||
@ -221,7 +221,7 @@ Cards=Fiches
|
|||||||
Card=Fiche
|
Card=Fiche
|
||||||
Now=Maintenant
|
Now=Maintenant
|
||||||
Date=Date
|
Date=Date
|
||||||
DateAndHour=Date and hour
|
DateAndHour=Date et heure
|
||||||
DateStart=Date début
|
DateStart=Date début
|
||||||
DateEnd=Date fin
|
DateEnd=Date fin
|
||||||
DateCreation=Date création
|
DateCreation=Date création
|
||||||
@ -395,8 +395,8 @@ Available=Disponible
|
|||||||
NotYetAvailable=Pas encore disponible
|
NotYetAvailable=Pas encore disponible
|
||||||
NotAvailable=Non disponible
|
NotAvailable=Non disponible
|
||||||
Popularity=Popularité
|
Popularity=Popularité
|
||||||
Categories=Tags/categories
|
Categories=Tags/catégories
|
||||||
Category=Tag/category
|
Category=Tag/catégorie
|
||||||
By=Par
|
By=Par
|
||||||
From=Du
|
From=Du
|
||||||
to=au
|
to=au
|
||||||
|
|||||||
@ -3689,7 +3689,7 @@ class Product extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function isproduct()
|
function isproduct()
|
||||||
{
|
{
|
||||||
return ($this->type != Product::TYPE_PRODUCT ? true : false);
|
return ($this->type == Product::TYPE_PRODUCT ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -43,6 +43,7 @@ $id = GETPOST('id', 'int');
|
|||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$rowid=GETPOST('rowid','int');
|
$rowid=GETPOST('rowid','int');
|
||||||
$action=GETPOST('action', 'alpha');
|
$action=GETPOST('action', 'alpha');
|
||||||
|
$cancel=GETPOST('cancel', 'alpha');
|
||||||
$socid=GETPOST('socid', 'int');
|
$socid=GETPOST('socid', 'int');
|
||||||
$backtopage=GETPOST('backtopage','alpha');
|
$backtopage=GETPOST('backtopage','alpha');
|
||||||
$error=0;
|
$error=0;
|
||||||
@ -77,6 +78,8 @@ if (! $sortorder) $sortorder="ASC";
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($cancel) $action='';
|
||||||
|
|
||||||
$parameters=array('socid'=>$socid, 'id_prod'=>$id);
|
$parameters=array('socid'=>$socid, 'id_prod'=>$id);
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
@ -97,8 +100,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
if ($action == 'updateprice')
|
||||||
{
|
{
|
||||||
$id_fourn=GETPOST("id_fourn");
|
$id_fourn=GETPOST("id_fourn");
|
||||||
if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn");
|
if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn");
|
||||||
$ref_fourn=GETPOST("ref_fourn");
|
$ref_fourn=GETPOST("ref_fourn");
|
||||||
@ -114,21 +117,31 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
|||||||
if ($tva_tx == '')
|
if ($tva_tx == '')
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")), 'errors');
|
||||||
}
|
}
|
||||||
|
if (! is_numeric($tva_tx))
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
|
setEventMessage($langs->trans("ErrorFieldMustBeANumeric",'eeee'), 'errors');
|
||||||
|
}
|
||||||
if (empty($quantity))
|
if (empty($quantity))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")), 'errors');
|
||||||
}
|
}
|
||||||
if (empty($ref_fourn))
|
if (empty($ref_fourn))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")), 'errors');
|
||||||
}
|
}
|
||||||
if ($id_fourn <= 0)
|
if ($id_fourn <= 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")), 'errors');
|
||||||
}
|
}
|
||||||
if ($_POST["price"] < 0 || $_POST["price"] == '')
|
if ($_POST["price"] < 0 || $_POST["price"] == '')
|
||||||
@ -136,6 +149,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
|||||||
if ($price_expression === '') // Return error of missing price only if price_expression not set
|
if ($price_expression === '') // Return error of missing price only if price_expression not set
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")), 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -149,7 +163,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
|||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($product->error, 'errors');
|
setEventMessages($product->error, $product->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -187,7 +201,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
|||||||
{
|
{
|
||||||
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessage($product->error, 'errors');
|
setEventMessage($product->error, $product->errors, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -222,13 +236,10 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
|
||||||
if (GETPOST('cancel') == $langs->trans("Cancel"))
|
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = 'add_price';
|
||||||
header("Location: fournisseurs.php?id=".$_GET["id"]);
|
}
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,10 +264,6 @@ if ($id || $ref)
|
|||||||
{
|
{
|
||||||
if ($action <> 'edit' && $action <> 're-edit')
|
if ($action <> 'edit' && $action <> 're-edit')
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* En mode visu
|
|
||||||
*/
|
|
||||||
|
|
||||||
$head=product_prepare_head($product);
|
$head=product_prepare_head($product);
|
||||||
$titre=$langs->trans("CardProduct".$product->type);
|
$titre=$langs->trans("CardProduct".$product->type);
|
||||||
$picto=($product->type== Product::TYPE_SERVICE?'service':'product');
|
$picto=($product->type== Product::TYPE_SERVICE?'service':'product');
|
||||||
@ -325,6 +332,8 @@ if ($id || $ref)
|
|||||||
print '<input type="hidden" name="id_fourn" value="'.$socid.'">';
|
print '<input type="hidden" name="id_fourn" value="'.$socid.'">';
|
||||||
print '<input type="hidden" name="ref_fourn" value="'.$product->fourn_ref.'">';
|
print '<input type="hidden" name="ref_fourn" value="'.$product->fourn_ref.'">';
|
||||||
print '<input type="hidden" name="ref_fourn_price_id" value="'.$rowid.'">';
|
print '<input type="hidden" name="ref_fourn_price_id" value="'.$rowid.'">';
|
||||||
|
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||||
|
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -487,11 +496,7 @@ if ($id || $ref)
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************** */
|
// Actions buttons
|
||||||
/* */
|
|
||||||
/* Barre d'action */
|
|
||||||
/* */
|
|
||||||
/* ************************************************************************** */
|
|
||||||
|
|
||||||
print "\n<div class=\"tabsAction\">\n";
|
print "\n<div class=\"tabsAction\">\n";
|
||||||
|
|
||||||
@ -523,13 +528,9 @@ if ($id || $ref)
|
|||||||
print_liste_field_titre($langs->trans("QtyMin"),$_SERVER["PHP_SELF"],"pfp.quantity","",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("QtyMin"),$_SERVER["PHP_SELF"],"pfp.quantity","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre" align="right">'.$langs->trans("VATRate").'</td>';
|
print '<td class="liste_titre" align="right">'.$langs->trans("VATRate").'</td>';
|
||||||
print '<td class="liste_titre" align="right">'.$langs->trans("PriceQtyMinHT").'</td>';
|
print '<td class="liste_titre" align="right">'.$langs->trans("PriceQtyMinHT").'</td>';
|
||||||
// Charges ????
|
|
||||||
if ($conf->global->PRODUCT_CHARGES)
|
|
||||||
{
|
|
||||||
if (! empty($conf->margin->enabled)) print '<td align="right">'.$langs->trans("Charges").'</td>';
|
|
||||||
}
|
|
||||||
print_liste_field_titre($langs->trans("UnitPriceHT"),$_SERVER["PHP_SELF"],"pfp.unitprice","",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("UnitPriceHT"),$_SERVER["PHP_SELF"],"pfp.unitprice","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre" align="right">'.$langs->trans("DiscountQtyMin").'</td>';
|
print '<td class="liste_titre" align="right">'.$langs->trans("DiscountQtyMin").'</td>';
|
||||||
|
print_liste_field_titre($langs->trans("NbDaysToDelivery"),$_SERVER["PHP_SELF"],"pfp.delivery_time_days","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
// Charges ????
|
// Charges ????
|
||||||
if ($conf->global->PRODUCT_CHARGES)
|
if ($conf->global->PRODUCT_CHARGES)
|
||||||
{
|
{
|
||||||
@ -601,6 +602,11 @@ if ($id || $ref)
|
|||||||
print price2num($productfourn->fourn_remise_percent).'%';
|
print price2num($productfourn->fourn_remise_percent).'%';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Delivery delay
|
||||||
|
print '<td align="right">';
|
||||||
|
print $productfourn->delivery_time_days;
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
// Charges ????
|
// Charges ????
|
||||||
if ($conf->global->PRODUCT_CHARGES)
|
if ($conf->global->PRODUCT_CHARGES)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -476,8 +476,11 @@ else
|
|||||||
{
|
{
|
||||||
if ($product_fourn->product_fourn_price_id > 0)
|
if ($product_fourn->product_fourn_price_id > 0)
|
||||||
{
|
{
|
||||||
$htmltext=$product_fourn->display_price_product_fournisseur();
|
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire)
|
||||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) print $form->textwithpicto(price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"),$htmltext);
|
{
|
||||||
|
$htmltext=$product_fourn->display_price_product_fournisseur(1, 1, 0, 1);
|
||||||
|
print $form->textwithpicto(price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"),$htmltext);
|
||||||
|
}
|
||||||
else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
|
else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -440,13 +440,13 @@ if ($resql)
|
|||||||
if (! empty($conf->productbatch->enabled))
|
if (! empty($conf->productbatch->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("productbatch");
|
$langs->load("productbatch");
|
||||||
print '<td align="right" width="10%">'.$langs->trans("batch_number").'</td>';
|
print '<td align="right" width="10%">'.$langs->trans("BatchNumberShort").'</td>';
|
||||||
print '<td align="center" width="10%">'.$langs->trans("l_eatby").'</td>';
|
print '<td align="center" width="10%">'.$langs->trans("l_eatby").'</td>';
|
||||||
print '<td align="center" width="10%">'.$langs->trans("l_sellby").'</td>';
|
print '<td align="center" width="10%">'.$langs->trans("l_sellby").'</td>';
|
||||||
}
|
}
|
||||||
print_liste_field_titre($langs->trans("Warehouse"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
print_liste_field_titre($langs->trans("Warehouse"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
||||||
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("InventoryCode"),$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("InventoryCodeShort"),$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("LabelMovement"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("LabelMovement"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Units"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Units"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
|
|||||||
@ -821,8 +821,9 @@ if (empty($action) && $product->id)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stock detail
|
* Stock detail (by warehouse). Do not go down into batch.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<br><table class="noborder" width="100%">';
|
print '<br><table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="40%" colspan="4">'.$langs->trans("Warehouse").'</td>';
|
print '<tr class="liste_titre"><td width="40%" colspan="4">'.$langs->trans("Warehouse").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("NumberOfUnit").'</td>';
|
print '<td align="right">'.$langs->trans("NumberOfUnit").'</td>';
|
||||||
@ -870,9 +871,9 @@ if ($resql)
|
|||||||
print '<td colspan="4">'.$entrepotstatic->getNomUrl(1).'</td>';
|
print '<td colspan="4">'.$entrepotstatic->getNomUrl(1).'</td>';
|
||||||
print '<td align="right">'.$obj->reel.($obj->reel<0?' '.img_warning():'').'</td>';
|
print '<td align="right">'.$obj->reel.($obj->reel<0?' '.img_warning():'').'</td>';
|
||||||
// PMP
|
// PMP
|
||||||
print '<td align="right">'.(price2num($product->pmp)?price2num($product->pmp,'MU'):'').'</td>'; // Ditto : Show PMP from movement or from product
|
print '<td align="right">'.(price2num($product->pmp)?price2num($product->pmp,'MU'):'').'</td>';
|
||||||
// Value purchase
|
// Value purchase
|
||||||
print '<td align="right">'.(price2num($product->pmp)?price(price2num($product->pmp*$obj->reel,'MT')):'').'</td>'; // Ditto : Show PMP from movement or from product
|
print '<td align="right">'.(price2num($product->pmp)?price(price2num($product->pmp*$obj->reel,'MT')):'').'</td>';
|
||||||
// Sell price
|
// Sell price
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1);
|
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1);
|
||||||
@ -880,13 +881,13 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
// Value sell
|
// Value sell
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'</td>'; // Ditto : Show PMP from movement or from product
|
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'</td>';
|
||||||
else print $langs->trans("Variable");
|
else print $langs->trans("Variable");
|
||||||
print '</tr>'; ;
|
print '</tr>'; ;
|
||||||
$total += $obj->reel;
|
$total += $obj->reel;
|
||||||
if (price2num($product->pmp)) $totalwithpmp += $obj->reel;
|
if (price2num($product->pmp)) $totalwithpmp += $obj->reel;
|
||||||
$totalvalue = $totalvalue + ($product->pmp*$obj->reel); // Ditto : Show PMP from movement or from product
|
$totalvalue = $totalvalue + ($product->pmp*$obj->reel);
|
||||||
$totalvaluesell = $totalvaluesell + ($product->price*$obj->reel); // Ditto : Show PMP from movement or from product
|
$totalvaluesell = $totalvaluesell + ($product->price*$obj->reel);
|
||||||
//Batch Detail
|
//Batch Detail
|
||||||
if ((! empty($conf->productbatch->enabled)) && $product->hasbatch())
|
if ((! empty($conf->productbatch->enabled)) && $product->hasbatch())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -48,11 +48,33 @@ $socid=0;
|
|||||||
if ($user->societe_id > 0) $socid=$user->societe_id;
|
if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'projet', $projectid);
|
$result = restrictedArea($user, 'projet', $projectid);
|
||||||
|
|
||||||
|
$now=dol_now();
|
||||||
|
$nowtmp=dol_getdate($now);
|
||||||
|
$nowday=$nowtmp['mday'];
|
||||||
|
$nowmonth=$nowtmp['mon'];
|
||||||
|
$nowyear=$nowtmp['year'];
|
||||||
|
|
||||||
|
$year=GETPOST('reyear')?GETPOST('reyear'):(GETPOST("year","int")?GETPOST("year","int"):date("Y"));
|
||||||
|
$month=GETPOST('remonth')?GETPOST('remonth'):(GETPOST("month","int")?GETPOST("month","int"):date("m"));
|
||||||
|
$day=GETPOST('reday')?GETPOST('reday'):(GETPOST("day","int")?GETPOST("day","int"):date("d"));
|
||||||
|
$day = (int) $day;
|
||||||
|
$week=GETPOST("week","int")?GETPOST("week","int"):date("W");
|
||||||
|
|
||||||
|
$daytoparse = $now;
|
||||||
|
if ($year && $month && $day) $daytoparse=dol_mktime(0, 0, 0, $month, $day, $year);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('submitdateselect'))
|
||||||
|
{
|
||||||
|
$daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||||
|
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'addtime' && $user->rights->projet->creer)
|
if ($action == 'addtime' && $user->rights->projet->creer)
|
||||||
{
|
{
|
||||||
$task = new Task($db);
|
$task = new Task($db);
|
||||||
@ -133,6 +155,16 @@ $projectstatic=new Project($db);
|
|||||||
$project = new Project($db);
|
$project = new Project($db);
|
||||||
$taskstatic = new Task($db);
|
$taskstatic = new Task($db);
|
||||||
|
|
||||||
|
$prev = dol_getdate($daytoparse - (24 * 3600));
|
||||||
|
$prev_year = $prev['year'];
|
||||||
|
$prev_month = $prev['mon'];
|
||||||
|
$prev_day = $prev['mday'];
|
||||||
|
|
||||||
|
$next = dol_getdate($daytoparse + (24 * 3600));
|
||||||
|
$next_year = $next['year'];
|
||||||
|
$next_month = $next['mon'];
|
||||||
|
$next_day = $next['mday'];
|
||||||
|
|
||||||
$title=$langs->trans("TimeSpent");
|
$title=$langs->trans("TimeSpent");
|
||||||
if ($mine) $title=$langs->trans("MyTimeSpent");
|
if ($mine) $title=$langs->trans("MyTimeSpent");
|
||||||
|
|
||||||
@ -160,7 +192,18 @@ llxHeader("",$title,"");
|
|||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
||||||
|
|
||||||
|
|
||||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">';
|
// Show navigation bar
|
||||||
|
$nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_day.$param."\">".img_previous($langs->trans("Previous"))."</a>\n";
|
||||||
|
$nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$month,$day,$year),"day")." </span>\n";
|
||||||
|
$nav.="<a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\">".img_next($langs->trans("Next"))."</a>\n";
|
||||||
|
$nav.=" (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||||
|
$nav.='<br>'.$form->select_date(-1,'',0,0,2,"addtime",1,0,1).' ';
|
||||||
|
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||||
|
|
||||||
|
$picto='calendarweek';
|
||||||
|
|
||||||
|
|
||||||
|
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].($project->id > 0 ? '?id='.$project->id : '').'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="addtime">';
|
print '<input type="hidden" name="action" value="addtime">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
@ -169,13 +212,15 @@ $head=project_timesheet_prepare_head($mode);
|
|||||||
dol_fiche_head($head, 'inputperday', '', 0, 'task');
|
dol_fiche_head($head, 'inputperday', '', 0, 'task');
|
||||||
|
|
||||||
// Show description of content
|
// Show description of content
|
||||||
if ($mine) print $langs->trans("MyTasksDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br><br>';
|
if ($mine) print $langs->trans("MyTasksDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br><br>';
|
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||||
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopened?' '.$langs->trans("AlsoOnlyOpenedProject"):'').'<br><br>';
|
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopened?' '.$langs->trans("AlsoOnlyOpenedProject"):'').'<br>';
|
||||||
}
|
}
|
||||||
|
print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'<br>';
|
||||||
|
print '<br>';
|
||||||
|
print "\n";
|
||||||
|
|
||||||
// Filter on user
|
// Filter on user
|
||||||
/* dol_fiche_head('');
|
/* dol_fiche_head('');
|
||||||
@ -197,6 +242,10 @@ else
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
print '<div align="right">'.$nav.'</div>';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Project").'</td>';
|
print '<td>'.$langs->trans("Project").'</td>';
|
||||||
@ -207,7 +256,7 @@ print '<td align="right">'.$langs->trans("ProgressDeclared").'</td>';
|
|||||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
||||||
if ($usertoprocess->id == $user->id) print '<td align="right">'.$langs->trans("TimeSpentByYou").'</td>';
|
if ($usertoprocess->id == $user->id) print '<td align="right">'.$langs->trans("TimeSpentByYou").'</td>';
|
||||||
else print '<td align="right">'.$langs->trans("TimeSpentByUser").'</td>';
|
else print '<td align="right">'.$langs->trans("TimeSpentByUser").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("DateAndHour").'</td>';
|
print '<td align="center">'.$langs->trans("HourStart").'</td>';
|
||||||
print '<td align="center" colspan="2">'.$langs->trans("Duration").'</td>';
|
print '<td align="center" colspan="2">'.$langs->trans("Duration").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -217,7 +266,7 @@ $restricteditformytask=(empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJEC
|
|||||||
if (count($tasksarray) > 0)
|
if (count($tasksarray) > 0)
|
||||||
{
|
{
|
||||||
$j=0;
|
$j=0;
|
||||||
projectLinesPerDay($j, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask);
|
projectLinesPerDay($j, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $daytoparse);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -234,6 +283,13 @@ print '</div>';
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<script type="text/javascript">';
|
||||||
|
print "jQuery(document).ready(function () {\n";
|
||||||
|
print ' jQuery(".timesheetalreadyrecorded").tipTip({ maxWidth: "600px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50, content: \''.dol_escape_js($langs->trans("TimeAlreadyRecorded", $user->getFullName($langs))).'\'});';
|
||||||
|
print "});";
|
||||||
|
print '</script>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -49,12 +49,15 @@ if ($user->societe_id > 0) $socid=$user->societe_id;
|
|||||||
$result = restrictedArea($user, 'projet', $projectid);
|
$result = restrictedArea($user, 'projet', $projectid);
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
$nowtmp=dol_getdate($now);
|
||||||
$year=GETPOST("year","int")?GETPOST("year","int"):date("Y");
|
$nowday=$nowtmp['mday'];
|
||||||
$month=GETPOST("month","int")?GETPOST("month","int"):date("m");
|
$nowmonth=$nowtmp['mon'];
|
||||||
$week=GETPOST("week","int")?GETPOST("week","int"):date("W");
|
$nowyear=$nowtmp['year'];
|
||||||
$day=GETPOST("day","int")?GETPOST("day","int"):date("d");
|
$year=GETPOST('reyear')?GETPOST('reyear'):(GETPOST("year","int")?GETPOST("year","int"):date("Y"));
|
||||||
|
$month=GETPOST('remonth')?GETPOST('remonth'):(GETPOST("month","int")?GETPOST("month","int"):date("m"));
|
||||||
|
$day=GETPOST('reday')?GETPOST('reday'):(GETPOST("day","int")?GETPOST("day","int"):date("d"));
|
||||||
$day = (int) $day;
|
$day = (int) $day;
|
||||||
|
$week=GETPOST("week","int")?GETPOST("week","int"):date("W");
|
||||||
|
|
||||||
$startdayarray=dol_get_first_day_week($day, $month, $year);
|
$startdayarray=dol_get_first_day_week($day, $month, $year);
|
||||||
|
|
||||||
@ -83,6 +86,13 @@ $usertoprocess=$user;
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('submitdateselect'))
|
||||||
|
{
|
||||||
|
$daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||||
|
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'addtime' && $user->rights->projet->creer)
|
if ($action == 'addtime' && $user->rights->projet->creer)
|
||||||
{
|
{
|
||||||
$task = new Task($db);
|
$task = new Task($db);
|
||||||
@ -176,16 +186,15 @@ llxHeader("",$title,"",'','','',array('/core/js/timesheet.js'));
|
|||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
||||||
|
|
||||||
|
|
||||||
$tmpday = $first_day;
|
|
||||||
|
|
||||||
// Show navigation bar
|
// Show navigation bar
|
||||||
$nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_day.$param."\">".img_previous($langs->trans("Previous"))."</a>\n";
|
$nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_day.$param."\">".img_previous($langs->trans("Previous"))."</a>\n";
|
||||||
$nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week;
|
$nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week." </span>\n";
|
||||||
$nav.=" </span>\n";
|
|
||||||
$nav.="<a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\">".img_next($langs->trans("Next"))."</a>\n";
|
$nav.="<a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\">".img_next($langs->trans("Next"))."</a>\n";
|
||||||
$nav.=" (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
$nav.=" (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||||
$picto='calendarweek';
|
$nav.='<br>'.$form->select_date(-1,'',0,0,2,"addtime",1,0,1).' ';
|
||||||
|
$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||||
|
|
||||||
|
$picto='calendarweek';
|
||||||
|
|
||||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -199,12 +208,14 @@ $head=project_timesheet_prepare_head($mode);
|
|||||||
dol_fiche_head($head, 'inputperweek', '', 0, 'task');
|
dol_fiche_head($head, 'inputperweek', '', 0, 'task');
|
||||||
|
|
||||||
// Show description of content
|
// Show description of content
|
||||||
if ($mine) print $langs->trans("MyTasksDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br><br>';
|
if ($mine) print $langs->trans("MyTasksDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br><br>';
|
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").($onlyopened?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||||
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopened?' '.$langs->trans("AlsoOnlyOpenedProject"):'').'<br><br>';
|
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopened?' '.$langs->trans("AlsoOnlyOpenedProject"):'').'<br>';
|
||||||
}
|
}
|
||||||
|
print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'<br>';
|
||||||
|
print '<br>';
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
// Filter on user
|
// Filter on user
|
||||||
@ -248,6 +259,7 @@ for($i=0;$i<7;$i++)
|
|||||||
{
|
{
|
||||||
print '<td width="7%" align="center">'.dol_print_date($startday + ($i * 3600 * 24), '%a').'<br>'.dol_print_date($startday + ($i * 3600 * 24), 'day').'</td>';
|
print '<td width="7%" align="center">'.dol_print_date($startday + ($i * 3600 * 24), '%a').'<br>'.dol_print_date($startday + ($i * 3600 * 24), 'day').'</td>';
|
||||||
}
|
}
|
||||||
|
print '<td class="liste_total"></td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -268,11 +280,12 @@ if (count($tasksarray) > 0)
|
|||||||
<td class="liste_total" width="7%" align="center"><div id="totalDay[4]"> </div></td>
|
<td class="liste_total" width="7%" align="center"><div id="totalDay[4]"> </div></td>
|
||||||
<td class="liste_total" width="7%" align="center"><div id="totalDay[5]"> </div></td>
|
<td class="liste_total" width="7%" align="center"><div id="totalDay[5]"> </div></td>
|
||||||
<td class="liste_total" width="7%" align="center"><div id="totalDay[6]"> </div></td>
|
<td class="liste_total" width="7%" align="center"><div id="totalDay[6]"> </div></td>
|
||||||
|
<td class="liste_total"></td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="10">'.$langs->trans("NoTasks").'</td></tr>';
|
print '<tr><td colspan="11">'.$langs->trans("NoTasks").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
@ -287,6 +300,7 @@ print '</div>';
|
|||||||
|
|
||||||
print '</form>'."\n\n";
|
print '</form>'."\n\n";
|
||||||
|
|
||||||
|
|
||||||
$modeinput='hours';
|
$modeinput='hours';
|
||||||
|
|
||||||
print '<script type="text/javascript">';
|
print '<script type="text/javascript">';
|
||||||
|
|||||||
@ -413,7 +413,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<table id="tablelines" class="noborder" width="100%">';
|
print '<table id="tablelines" class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre nodrag nodrop">';
|
||||||
// print '<td>'.$langs->trans("Project").'</td>';
|
// print '<td>'.$langs->trans("Project").'</td>';
|
||||||
print '<td width="100">'.$langs->trans("RefTask").'</td>';
|
print '<td width="100">'.$langs->trans("RefTask").'</td>';
|
||||||
print '<td>'.$langs->trans("LabelTask").'</td>';
|
print '<td>'.$langs->trans("LabelTask").'</td>';
|
||||||
|
|||||||
@ -1727,7 +1727,7 @@ class Societe extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $withpicto Add picto into link (0=No picto, 1=Include picto with link, 2=Picto only)
|
* @param int $withpicto Add picto into link (0=No picto, 1=Include picto with link, 2=Picto only)
|
||||||
* @param string $option Target of link ('', 'customer', 'prospect', 'supplier')
|
* @param string $option Target of link ('', 'customer', 'prospect', 'supplier')
|
||||||
* @param int $maxlen Max length of text
|
* @param int $maxlen Max length of name
|
||||||
* @param integer $notooltip 1=Disable tooltip
|
* @param integer $notooltip 1=Disable tooltip
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user