Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7
This commit is contained in:
commit
0da1c2e589
@ -100,9 +100,11 @@ For users:
|
||||
- Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action
|
||||
- Fix: [ bug #1506, #1507 ] ECM trigger error problem
|
||||
- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
|
||||
- Fix: [ bug #1533 ] Links triggers do not show trigger error message
|
||||
- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
|
||||
- Fix: [ bug #1535 ] Supplier invoice Extrafields are not shown
|
||||
- Fix: datepicker first day of week can be monday by setting into display setup
|
||||
- Fix: [ bug #575 ] GED doesn't works if there is "/" in a mask
|
||||
|
||||
For users, new experimental module (need to set feature level of instance to experimental to see them):
|
||||
- New: Module Accounting Expert to manage accountancy
|
||||
@ -149,6 +151,7 @@ For developers:
|
||||
- Qual: Renamed all files & links "fiche.php" into "card.php".
|
||||
- Qual: Replace all constants COMPTA_* by ACCOUNTING_*.
|
||||
- Qual: Replace all constants ACCOUNTINGEX_* by ACCOUNTING_* to simplify migration of the module
|
||||
- Fix: [ bug #1724 ] Can't add a submenu to projects
|
||||
|
||||
WARNING: Following changes may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
@ -181,6 +184,7 @@ Dolibarr better:
|
||||
- Fix: Show sender Country on PDF docs when sender Country <> receiver Country
|
||||
- Fix: [ bug #1624 ] Use lowest buying price for margin when selling with POS
|
||||
- Fix: [ bug #1749 ] Undefined $mailchimp
|
||||
- Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
|
||||
@ -189,8 +189,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->pr
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'propal'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
@ -499,9 +499,6 @@ else if ($action == 'add' && $user->rights->propal->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'propal'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
|
||||
@ -47,6 +47,11 @@ class Propal extends CommonObject
|
||||
public $fk_element='fk_propal';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $socid; // Id client
|
||||
|
||||
@ -922,8 +922,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->co
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'order'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
@ -971,8 +971,8 @@ else if ($action == 'confirm_modif' && $user->rights->commande->creer) {
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'order'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,6 +44,11 @@ class Commande extends CommonOrder
|
||||
public $fk_element = 'fk_commande';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $socid; // Id client
|
||||
|
||||
@ -417,8 +417,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'invoice'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -500,8 +500,8 @@ else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'invoice'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
@ -1328,8 +1328,8 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'invoice'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
|
||||
@ -50,6 +50,11 @@ class Facture extends CommonInvoice
|
||||
public $fk_element = 'fk_facture';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'facnumber';
|
||||
|
||||
var $id;
|
||||
//! Id client
|
||||
var $socid;
|
||||
@ -833,7 +838,6 @@ class Facture extends CommonInvoice
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get object and lines from database
|
||||
*
|
||||
|
||||
@ -34,6 +34,11 @@ class ChargeSociales extends CommonObject
|
||||
public $table='chargesociales';
|
||||
public $table_element='chargesociales';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $date_ech;
|
||||
|
||||
@ -44,6 +44,11 @@ class Contrat extends CommonObject
|
||||
public $fk_element='fk_contrat';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $ref_ext;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012-2014 Charles-François BENKE <charles.fr@benke.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
@ -45,7 +46,7 @@ class box_project extends ModeleBoxes
|
||||
$langs->load("boxes");
|
||||
$langs->load("projects");
|
||||
|
||||
$this->boxlabel="Projet";
|
||||
$this->boxlabel="Projects";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -63,13 +64,8 @@ class box_project extends ModeleBoxes
|
||||
$totalMnt = 0;
|
||||
$totalnb = 0;
|
||||
$totalnbTask=0;
|
||||
include_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/project.lib.php");
|
||||
$projectstatic=new Project($db);
|
||||
|
||||
|
||||
|
||||
$textHead = $langs->trans("Projet");
|
||||
$textHead = $langs->trans("Projects");
|
||||
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
|
||||
|
||||
// list the summary of the orders
|
||||
@ -91,14 +87,15 @@ class box_project extends ModeleBoxes
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"','logo' => 'object_projectpub');
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
$projectstatic->fetch($objp->rowid);
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => 'object_project',
|
||||
'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' =>$projectstatic->getNomUrl(1)
|
||||
);
|
||||
'text' => $objp->ref,
|
||||
'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="left"',
|
||||
'text' => $objp->title
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -54,6 +54,12 @@ abstract class CommonObject
|
||||
|
||||
// No constructor as it is an abstract class
|
||||
|
||||
/**
|
||||
* Column name of the ref field.
|
||||
* @var string
|
||||
*/
|
||||
protected $table_ref_field = '';
|
||||
|
||||
|
||||
/**
|
||||
* Check an object id/ref exists
|
||||
@ -631,6 +637,32 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Looks for an object with ref matching the wildcard provided
|
||||
* It does only work when $this->table_ref_field is set
|
||||
*
|
||||
* @param string $ref Wildcard
|
||||
* @return int >1 = OK, 0 = Not found or table_ref_field not defined, <0 = KO
|
||||
*/
|
||||
public function fetchOneLike($ref)
|
||||
{
|
||||
if (!$this->table_ref_field) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE '.$this->table_ref_field.' LIKE "'.$this->db->escape($ref).'" LIMIT 1';
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
if (!$this->db->num_rows($query)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$result = $this->db->fetch_object($query);
|
||||
|
||||
return $this->fetch($result->rowid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data for barcode into properties ->barcode_type*
|
||||
* Properties ->barcode_type that is id of barcode. Type is used to find other properties, but
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
@ -400,14 +400,26 @@ class Form
|
||||
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
|
||||
$s="";
|
||||
if (empty($notabs)) $s.='<table class="nobordernopadding" summary=""><tr>';
|
||||
if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
||||
if ($direction < 0) {
|
||||
$s.='<'.$tag.$paramfortooltipimg;
|
||||
if ($tag == 'td') {
|
||||
$s .= 'valign="top" ';
|
||||
}
|
||||
$s.= 'width="14">'.$img.'</'.$tag.'>';
|
||||
}
|
||||
// Use another method to help avoid having a space in value in order to use this value with jquery
|
||||
// TODO add this in css
|
||||
//if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').'</'.$tag.'>';
|
||||
$paramfortooltiptd.= (($direction < 0)?' style="padding-left: 3px !important;"':'');
|
||||
$paramfortooltiptd.= (($direction > 0)?' style="padding-right: 3px !important;"':'');
|
||||
if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.'</'.$tag.'>';
|
||||
if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
||||
if ($direction > 0) {
|
||||
$s.='<'.$tag.$paramfortooltipimg;
|
||||
if ($tag == 'td') {
|
||||
$s .= 'valign="top" ';
|
||||
}
|
||||
$s.= 'width="14">'.$img.'</'.$tag.'>';
|
||||
}
|
||||
if (empty($notabs)) $s.='</tr></table>';
|
||||
|
||||
return $s;
|
||||
|
||||
@ -997,7 +997,6 @@ class FormFile
|
||||
if ($modulepart == 'user') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');}
|
||||
|
||||
if (! $id && ! $ref) continue;
|
||||
|
||||
$found=0;
|
||||
if (! empty($this->cache_objects[$modulepart.'_'.$id.'_'.$ref]))
|
||||
{
|
||||
@ -1006,7 +1005,19 @@ class FormFile
|
||||
else
|
||||
{
|
||||
//print 'Fetch '.$id." - ".$ref.'<br>';
|
||||
$result=$object_instance->fetch($id,$ref);
|
||||
|
||||
if ($id) {
|
||||
$result = $object_instance->fetch($id);
|
||||
} else {
|
||||
//fetchOneLike looks for objects with wildcards in its reference.
|
||||
//It is useful for those masks who get underscores instead of their actual symbols
|
||||
//fetchOneLike requires some info in the object. If it doesn't have it, then 0 is returned
|
||||
//that's why we look only look fetchOneLike when fetch returns 0
|
||||
if (!$result = $object_instance->fetch('', $ref)) {
|
||||
$result = $object_instance->fetchOneLike($ref);
|
||||
}
|
||||
}
|
||||
|
||||
if ($result > 0) { $found=1; $this->cache_objects[$modulepart.'_'.$id.'_'.$ref]=dol_clone($object_instance); } // Save object into a cache
|
||||
if ($result == 0) { $found=1; $this->cache_objects[$modulepart.'_'.$id.'_'.$ref]='notfound'; unset($filearray[$key]); }
|
||||
}
|
||||
|
||||
@ -356,9 +356,18 @@ class FormOther
|
||||
global $conf,$langs;
|
||||
$langs->load('users');
|
||||
|
||||
$out = '';
|
||||
$nodatarole = '';
|
||||
// Enhance with select2
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$out.= ajax_combobox($htmlname);
|
||||
$nodatarole=' data-role="none"';
|
||||
}
|
||||
// Select each sales and print them in a select input
|
||||
$moreforfilter ='<select class="flat" name="'.$htmlname.'">';
|
||||
$moreforfilter.='<option value=""> </option>';
|
||||
$out.='<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
||||
$out.='<option value=""> </option>';
|
||||
|
||||
// Get list of users allowed to be viewed
|
||||
$sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login";
|
||||
@ -383,34 +392,35 @@ class FormOther
|
||||
{
|
||||
while ($obj_usr = $this->db->fetch_object($resql_usr))
|
||||
{
|
||||
$moreforfilter.='<option value="'.$obj_usr->rowid.'"';
|
||||
|
||||
if ($obj_usr->rowid == $selected) $moreforfilter.=' selected="selected"';
|
||||
$out.='<option value="'.$obj_usr->rowid.'"';
|
||||
|
||||
$moreforfilter.='>';
|
||||
$moreforfilter.=dolGetFirstLastname($obj_usr->firstname,$obj_usr->lastname);
|
||||
if ($obj_usr->rowid == $selected) $out.=' selected="selected"';
|
||||
|
||||
$out.='>';
|
||||
$out.=dolGetFirstLastname($obj_usr->firstname,$obj_usr->lastname);
|
||||
// Complete name with more info
|
||||
$moreinfo=0;
|
||||
if (! empty($conf->global->MAIN_SHOW_LOGIN))
|
||||
{
|
||||
$moreforfilter.=($moreinfo?' - ':' (').$obj_usr->login;
|
||||
$moreinfo++;
|
||||
$out.=($moreinfo?' - ':' (').$obj_usr->login;
|
||||
$moreinfo++;
|
||||
}
|
||||
if ($showstatus >= 0)
|
||||
{
|
||||
if ($obj_usr->statut == 1 && $showstatus == 1)
|
||||
{
|
||||
$moreforfilter.=($moreinfo?' - ':' (').$langs->trans('Enabled');
|
||||
$out.=($moreinfo?' - ':' (').$langs->trans('Enabled');
|
||||
$moreinfo++;
|
||||
}
|
||||
if ($obj_usr->statut == 0)
|
||||
{
|
||||
$moreforfilter.=($moreinfo?' - ':' (').$langs->trans('Disabled');
|
||||
$out.=($moreinfo?' - ':' (').$langs->trans('Disabled');
|
||||
$moreinfo++;
|
||||
}
|
||||
}
|
||||
$moreforfilter.=($moreinfo?')':'');
|
||||
$moreforfilter.='</option>';
|
||||
$out.=($moreinfo?')':'');
|
||||
$out.='</option>';
|
||||
}
|
||||
$this->db->free($resql_usr);
|
||||
}
|
||||
@ -418,9 +428,9 @@ class FormOther
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
$moreforfilter.='</select>';
|
||||
$out.='</select>';
|
||||
|
||||
return $moreforfilter;
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -187,7 +187,7 @@ class Link extends CommonObject
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINK_MODIFY',$user);
|
||||
if ($result < 0) $error++;
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
@ -197,6 +197,7 @@ class Link extends CommonObject
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
} else {
|
||||
setEventMessages('', $this->errors, 'errors');
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
if (! empty($conf->browser->phone)) print '</div>';
|
||||
else print '</td>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfright" valign="middle">';
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfright">';
|
||||
else print '<td align="center" valign="middle" class="nowrap">';
|
||||
|
||||
print '<table><tr><td align="center">';
|
||||
|
||||
@ -784,9 +784,10 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
$sql = "SELECT MAX(".$sqlstring.") as val";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$table;
|
||||
$sql.= " WHERE ".$field." LIKE '".$maskLike."'";
|
||||
$sql.= " AND ".$field." NOT LIKE '%PROV%'";
|
||||
$sql.= " AND ".$field." NOT LIKE '(PROV%)'";
|
||||
if ($bentityon) // only if entity enable
|
||||
$sql.= " AND entity IN (".getEntity($table, 1).")";
|
||||
|
||||
if ($where) $sql.=$where;
|
||||
if ($sqlwhere) $sql.=' AND '.$sqlwhere;
|
||||
|
||||
|
||||
@ -232,7 +232,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3602__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3610__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects&mode=mine', 'MyProjects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3610__+MAX_llx_menu__, 'project', 'myprojects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects&mode=mine', 'MyProjects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3611__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create&mode=mine', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3612__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
|
||||
|
||||
@ -1132,12 +1132,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("projects");
|
||||
|
||||
// Project affected to user
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'myprojects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects&mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
|
||||
// All project i have permission on
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
|
||||
|
||||
@ -72,11 +72,16 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
$link->id = $linkid;
|
||||
$link->fetch();
|
||||
$res = $link->delete($user);
|
||||
|
||||
$langs->load('link');
|
||||
if ($res) {
|
||||
if ($res > 0) {
|
||||
setEventMessage($langs->trans("LinkRemoved", $link->label));
|
||||
} else {
|
||||
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
|
||||
if (count($link->errors)) {
|
||||
setEventMessages('', $link->errors, 'errors');
|
||||
} else {
|
||||
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.(!empty($withproject)?'&withproject=1':''));
|
||||
|
||||
@ -409,7 +409,7 @@ if (! empty($conf->global->ECM_AUTO_TREE_ENABLED))
|
||||
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
|
||||
if (! empty($conf->tax->enabled)) { $langs->load("compta"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBySocialContributions")); }
|
||||
if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); }
|
||||
if (! empty($conf->ficheinter->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); }
|
||||
if (! empty($conf->ficheinter->enabled)) { $langs->load("interventions"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); }
|
||||
$rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsByUsers"));
|
||||
|
||||
}
|
||||
|
||||
@ -279,10 +279,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->exped
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'shipping'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -37,6 +37,11 @@ class Fichinter extends CommonObject
|
||||
public $fk_element='fk_fichinter';
|
||||
public $table_element_line='fichinterdet';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $socid; // Id client
|
||||
|
||||
@ -45,6 +45,11 @@ class CommandeFournisseur extends CommonOrder
|
||||
public $fk_element = 'fk_commande';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $ref; // TODO deprecated
|
||||
|
||||
@ -43,6 +43,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
public $fk_element='fk_facture_fourn';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $rowid;
|
||||
var $ref;
|
||||
var $product_ref;
|
||||
|
||||
@ -357,10 +357,8 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'order_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -462,10 +460,8 @@ else if ($action == 'update_line' && $user->rights->fournisseur->commande->creer
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'order_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -526,10 +522,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fourn
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'order_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -711,10 +711,8 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'invoice_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -793,10 +791,8 @@ elseif ($action == 'edit' && $user->rights->fournisseur->facture->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'invoice_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ ProjectsDesc=This view presents all projects (your user permissions grant you pe
|
||||
MyTasksDesc=This view is limited to projects or tasks you are a contact for (whatever is the type).
|
||||
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).
|
||||
Myprojects=My projects
|
||||
ProjectsArea=Projects area
|
||||
NewProject=New project
|
||||
AddProject=Create project
|
||||
|
||||
@ -135,10 +135,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->exped
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'delivery'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ llxHeader('',$langs->trans("PaypalSetup"));
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre(' - '.$langs->trans("ModuleSetup"),$linkback,'paypal_logo@paypal');
|
||||
print_fiche_titre($langs->trans("ModuleSetup").' PayPal',$linkback);
|
||||
print '<br>';
|
||||
|
||||
$head=paypaladmin_prepare_head();
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@ -46,6 +46,11 @@ class Product extends CommonObject
|
||||
protected $isnolinkedbythird = 1; // No field fk_soc
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $regeximgext='\.jpg|\.jpeg|\.bmp|\.gif|\.png|\.tiff';
|
||||
|
||||
//! Identifiant unique
|
||||
|
||||
@ -38,6 +38,11 @@ class Project extends CommonObject
|
||||
public $fk_element = 'fk_projet';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $description;
|
||||
@ -568,16 +573,9 @@ class Project extends CommonObject
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('PROJECT_DELETE',$user);
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
if (! empty($interface->errors))
|
||||
{
|
||||
foreach ($interface->errors as $errmsg ) {
|
||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||
$this->errors[] =$errmsg;
|
||||
}
|
||||
}
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user