forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -1747,7 +1747,7 @@ else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showCategories($object->id, 'member', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ if ($rowid > 0)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showCategories($object->id, 'member', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ $subscription = GETPOST("subscription", "int");
|
||||
$duration_value = GETPOST('duration_value', 'int');
|
||||
$duration_unit = GETPOST('duration_unit', 'alpha');
|
||||
$vote = GETPOST("vote", "int");
|
||||
$comment = GETPOST("comment", 'alphanohtml');
|
||||
$comment = GETPOST("comment", 'none');
|
||||
$mail_valid = GETPOST("mail_valid", 'none');
|
||||
|
||||
// Security check
|
||||
@@ -363,7 +363,9 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3"></textarea></td></tr>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('comment', $object->note, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor->Create();
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
@@ -806,10 +808,12 @@ if ($rowid > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3">'.$object->note.'</textarea></td></tr>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('comment', $object->note, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
@@ -48,6 +48,11 @@ class Categories extends DolibarrApi
|
||||
3 => 'member',
|
||||
4 => 'contact',
|
||||
5 => 'account',
|
||||
//6 => 'project',
|
||||
//7 => 'user',
|
||||
//8 => 'bank_line',
|
||||
//9 => 'warehouse',
|
||||
//10 => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,6 +54,7 @@ class Categorie extends CommonObject
|
||||
const TYPE_ACCOUNT = 'bank_account';
|
||||
const TYPE_BANK_LINE = 'bank_line';
|
||||
const TYPE_WAREHOUSE = 'warehouse';
|
||||
const TYPE_ACTIONCOMM = 'actioncomm';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
@@ -77,6 +78,7 @@ class Categorie extends CommonObject
|
||||
'user' => 7,
|
||||
'bank_line' => 8,
|
||||
'warehouse' => 9,
|
||||
'actioncomm' => 10,
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -93,6 +95,7 @@ class Categorie extends CommonObject
|
||||
7 => 'user',
|
||||
8 => 'bank_line',
|
||||
9 => 'warehouse',
|
||||
10 => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -111,6 +114,7 @@ class Categorie extends CommonObject
|
||||
'bank_account' => 'account',
|
||||
'project' => 'project',
|
||||
'warehouse'=> 'warehouse',
|
||||
'actioncomm' => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -129,6 +133,7 @@ class Categorie extends CommonObject
|
||||
'bank_account'=> 'account',
|
||||
'project' => 'project',
|
||||
'warehouse'=> 'warehouse',
|
||||
'actioncomm' => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -147,6 +152,7 @@ class Categorie extends CommonObject
|
||||
'bank_account' => 'Account',
|
||||
'project' => 'Project',
|
||||
'warehouse'=> 'Entrepot',
|
||||
'actioncomm' => 'ActionComm',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -164,6 +170,7 @@ class Categorie extends CommonObject
|
||||
'account' => 'bank_account',
|
||||
'project' => 'projet',
|
||||
'warehouse'=> 'entrepot',
|
||||
'actioncomm' => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -214,6 +221,7 @@ class Categorie extends CommonObject
|
||||
* @see Categorie::TYPE_PROJECT
|
||||
* @see Categorie::TYPE_BANK_LINE
|
||||
* @see Categorie::TYPE_WAREHOUSE
|
||||
* @see Categorie::TYPE_ACTIONCOMM
|
||||
*/
|
||||
public $type;
|
||||
|
||||
|
||||
@@ -59,7 +59,13 @@ elseif ($type == Categorie::TYPE_ACCOUNT) { $title=$langs->trans("AccountsCate
|
||||
elseif ($type == Categorie::TYPE_PROJECT) { $title=$langs->trans("ProjectsCategoriesArea"); $typetext='project'; }
|
||||
elseif ($type == Categorie::TYPE_USER) { $title=$langs->trans("UsersCategoriesArea"); $typetext='user'; }
|
||||
elseif ($type == Categorie::TYPE_WAREHOUSE) { $title=$langs->trans("StocksCategoriesArea"); $typetext='warehouse'; }
|
||||
else { $title=$langs->trans("CategoriesArea"); $typetext='unknown'; }
|
||||
elseif ($type == Categorie::TYPE_ACTIONCOMM) {
|
||||
$title = $langs->trans("ActionCommCategoriesArea");
|
||||
$typetext = 'actioncomm';
|
||||
} else {
|
||||
$title = $langs->trans("CategoriesArea");
|
||||
$typetext = 'unknown';
|
||||
}
|
||||
|
||||
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||
|
||||
@@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies", "other", "commercial", "bills", "orders", "agenda"));
|
||||
@@ -374,6 +375,10 @@ if (empty($reshook) && $action == 'add')
|
||||
{
|
||||
if (!$object->error)
|
||||
{
|
||||
// Category association
|
||||
$categories = GETPOST('categories', 'array');
|
||||
$object->setCategories($categories);
|
||||
|
||||
unset($_SESSION['assignedtouser']);
|
||||
|
||||
$moreparam = '';
|
||||
@@ -595,6 +600,10 @@ if (empty($reshook) && $action == 'update')
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
// Category association
|
||||
$categories = GETPOST('categories', 'array');
|
||||
$object->setCategories($categories);
|
||||
|
||||
unset($_SESSION['assignedtouser']);
|
||||
|
||||
$db->commit();
|
||||
@@ -1000,6 +1009,14 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->categorie->enabled) {
|
||||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
|
||||
print $form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, '', 0, '100%');
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@@ -1411,6 +1428,19 @@ if ($id > 0)
|
||||
print $form->select_dolusers($object->userdoneid > 0 ? $object->userdoneid : -1, 'doneby', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Tags-Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
|
||||
$c = new Categorie($db);
|
||||
$cats = $c->containing($object->id, Categorie::TYPE_ACTIONCOMM);
|
||||
$arrayselected = array();
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -1717,6 +1747,12 @@ if ($id > 0)
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_ACTIONCOMM, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@@ -1510,6 +1510,50 @@ class ActionComm extends CommonObject
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets object to supplied categories.
|
||||
*
|
||||
* Deletes object from existing categories not supplied.
|
||||
* Adds it to non existing supplied categories.
|
||||
* Existing categories are left untouch.
|
||||
*
|
||||
* @param int[]|int $categories Category or categories IDs
|
||||
* @return void
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
// Handle single category
|
||||
if (! is_array($categories)) {
|
||||
$categories = array($categories);
|
||||
}
|
||||
|
||||
// Get current categories
|
||||
include_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$c = new Categorie($this->db);
|
||||
$existing = $c->containing($this->id, Categorie::TYPE_ACTIONCOMM, 'id');
|
||||
|
||||
// Diff
|
||||
if (is_array($existing)) {
|
||||
$to_del = array_diff($existing, $categories);
|
||||
$to_add = array_diff($categories, $existing);
|
||||
} else {
|
||||
$to_del = array(); // Nothing to delete
|
||||
$to_add = $categories;
|
||||
}
|
||||
|
||||
// Process
|
||||
foreach($to_del as $del) {
|
||||
if ($c->fetch($del) > 0) {
|
||||
$c->del_type($this, Categorie::TYPE_ACTIONCOMM);
|
||||
}
|
||||
}
|
||||
foreach ($to_add as $add) {
|
||||
if ($c->fetch($add) > 0) {
|
||||
$c->add_type($this, Categorie::TYPE_ACTIONCOMM);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
|
||||
@@ -491,7 +491,7 @@ if ($object->id > 0)
|
||||
$langs->load("categories");
|
||||
print '<tr><td>'.$langs->trans("CustomersCategoriesShort").'</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories($object->id, 'customer', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_CUSTOMER, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -690,7 +690,7 @@ else
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, 'bank_account', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_ACCOUNT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -1364,7 +1364,7 @@ else
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Categories").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showCategories($object->id, 'contact', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_CONTACT, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -1127,7 +1127,20 @@ class DolGraph
|
||||
$this->stringtoshow .= '</script>'."\n";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Output HTML string to total value
|
||||
*
|
||||
* @return string HTML string to total value
|
||||
*/
|
||||
public function total()
|
||||
{
|
||||
$value = 0;
|
||||
foreach($this->data as $valarray) // Loop on each x
|
||||
{
|
||||
$value += $valarray[1];
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output HTML string to show graph
|
||||
|
||||
@@ -219,165 +219,206 @@ class modAgenda extends DolibarrModules
|
||||
);
|
||||
$r++;
|
||||
|
||||
$this->menu[$r]=array('fk_menu'=>'r=0',
|
||||
'type'=>'left',
|
||||
'titre'=>'Actions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>100,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=0',
|
||||
'type'=>'left',
|
||||
'titre'=>'Actions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>100,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2,
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'NewAction',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create',
|
||||
'langs'=>'commercial',
|
||||
'position'=>101,
|
||||
'perms'=>'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'NewAction',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create',
|
||||
'langs'=>'commercial',
|
||||
'position'=>101,
|
||||
'perms'=>'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
// Calendar
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Calendar',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>140,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Calendar',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>140,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>141,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>141,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>142,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>142,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>143,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>143,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>144,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>144,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
|
||||
// List
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'List',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>110,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'List',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>110,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>111,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>111,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>112,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>112,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>113,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>113,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>114,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>114,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
// Reports
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Reportings',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>160,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Reportings',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>160,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
// Categories
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu' => 'r=1',
|
||||
'type' => 'left',
|
||||
'titre' => 'Categories',
|
||||
'mainmenu' => 'agenda',
|
||||
'url'=>'/categories/index.php?mainmenu=agenda&leftmenu=agenda&type=10',
|
||||
'langs' => 'agenda',
|
||||
'position' => 170,
|
||||
'perms' => '$user->rights->agenda->allactions->read',
|
||||
'enabled' => '$conf->categorie->enabled&&$conf->categorie->enabled',
|
||||
'target' => '',
|
||||
'user' => 2
|
||||
);
|
||||
$r++;
|
||||
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ if ($object->id > 0)
|
||||
$langs->load("categories");
|
||||
print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories($object->id, 'supplier', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ UPDATE llx_holiday SET ref = rowid WHERE ref IS NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_holiday ALTER COLUMN ref SET NOT NULL;
|
||||
|
||||
ALTER TABLE llx_c_email_senderprofile MODIFY COLUMN active tinyint DEFAULT 1 NOT NULL;
|
||||
|
||||
|
||||
insert into llx_c_type_container (code,label,module,active) values ('menu', 'Menu', 'system', 1);
|
||||
|
||||
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('HELP', '15', 'Request for functionnal help', 1, 0, NULL);
|
||||
@@ -532,22 +532,22 @@ ALTER TABLE llx_comment ADD COLUMN fk_user_modif integer DEFAULT NULL;
|
||||
|
||||
|
||||
CREATE TABLE llx_mrp_production(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_mo integer NOT NULL,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_mo integer NOT NULL,
|
||||
position integer NOT NULL DEFAULT 0,
|
||||
fk_product integer NOT NULL,
|
||||
fk_product integer NOT NULL,
|
||||
fk_warehouse integer,
|
||||
qty real NOT NULL DEFAULT 1,
|
||||
qty_frozen smallint DEFAULT 0,
|
||||
disable_stock_change smallint DEFAULT 0,
|
||||
disable_stock_change smallint DEFAULT 0,
|
||||
batch varchar(30),
|
||||
role varchar(10), -- 'toconsume' or 'toproduce' (initialized at MO creation), 'consumed' or 'produced' (added after MO validation)
|
||||
fk_mrp_production integer, -- if role = 'consumed', id of line with role 'toconsume', if role = 'produced' id of line with role 'toproduce'
|
||||
fk_stock_movement integer, -- id of stock movement when movements are validated
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
ALTER TABLE llx_mrp_production MODIFY COLUMN qty real NOT NULL DEFAULT 1;
|
||||
|
||||
@@ -59,6 +59,22 @@ create table llx_object_lang
|
||||
|
||||
ALTER TABLE llx_object_lang ADD UNIQUE INDEX uk_object_lang (fk_object, type_object, property, lang);
|
||||
|
||||
|
||||
CREATE TABLE llx_categorie_actioncomm
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_actioncomm integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_categorie_actioncomm ADD PRIMARY KEY pk_categorie_actioncomm (fk_categorie, fk_actioncomm);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD INDEX idx_categorie_actioncomm_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD INDEX idx_categorie_actioncomm_fk_actioncomm (fk_actioncomm);
|
||||
|
||||
ALTER TABLE llx_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES llx_actioncomm (id);
|
||||
|
||||
|
||||
ALTER TABLE llx_accounting_account ADD COLUMN labelshort varchar(255) DEFAULT NULL after label;
|
||||
|
||||
|
||||
|
||||
25
htdocs/install/mysql/tables/llx_categorie_actioncomm.key.sql
Normal file
25
htdocs/install/mysql/tables/llx_categorie_actioncomm.key.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
-- Copyright (C) 2016-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
--
|
||||
-- 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
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
ALTER TABLE llx_categorie_actioncomm ADD PRIMARY KEY pk_categorie_actioncomm (fk_categorie, fk_actioncomm);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD INDEX idx_categorie_actioncomm_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD INDEX idx_categorie_actioncomm_fk_actioncomm (fk_actioncomm);
|
||||
|
||||
ALTER TABLE llx_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES llx_actioncomm (id);
|
||||
26
htdocs/install/mysql/tables/llx_categorie_actioncomm.sql
Normal file
26
htdocs/install/mysql/tables/llx_categorie_actioncomm.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
-- Copyright (C) 2016-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
--
|
||||
-- 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
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- Table to link actioncomm tag/categories with actioncomms
|
||||
-- ===========================================================================
|
||||
|
||||
CREATE TABLE llx_categorie_actioncomm
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_actioncomm integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
@@ -90,4 +90,5 @@ ShowCategory=Show tag/category
|
||||
ByDefaultInList=By default in list
|
||||
ChooseCategory=Choose category
|
||||
StocksCategoriesArea=Warehouses Categories Area
|
||||
ActionCommCategoriesArea=Events Categories Area
|
||||
UseOrOperatorForCategories=Use or operator for categories
|
||||
|
||||
@@ -1992,7 +1992,7 @@ else
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
print $form->showCategories($object->id, 'product', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PRODUCT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -173,9 +173,12 @@ $arrayfields = array(
|
||||
'p.barcode'=>array('label'=>$langs->trans("Gencod"), 'checked'=>1, 'enabled'=>(!empty($conf->barcode->enabled))),
|
||||
'p.duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>($contextpage != 'productlist'), 'enabled'=>(!empty($conf->service->enabled) && (string) $type == '1')),
|
||||
'p.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled))),
|
||||
'p.length'=>array('label'=>$langs->trans("Length"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->global->PRODUCT_DISABLE_SIZE))),
|
||||
'p.surface'=>array('label'=>$langs->trans("Surface"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->global->PRODUCT_DISABLE_SURFACE))),
|
||||
'p.volume'=>array('label'=>$langs->trans("Volume"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->global->PRODUCT_DISABLE_VOLUME))),
|
||||
'p.length'=>array('label'=>$langs->trans("Length"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE))),
|
||||
'p.width'=>array('label'=>$langs->trans('Width'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE))),
|
||||
'p.height'=>array('label'=>$langs->trans('Height'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE))),
|
||||
'p.surface'=>array('label'=>$langs->trans("Surface"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SURFACE))),
|
||||
'p.volume'=>array('label'=>$langs->trans("Volume"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_VOLUME))),
|
||||
'cu.label'=>array('label'=>$langs->trans("DefaultUnitToShow"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->global->PRODUCT_USE_UNITS))),
|
||||
'p.sellprice'=>array('label'=>$langs->trans("SellingPrice"), 'checked'=>1, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES)),
|
||||
'p.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(!empty($user->rights->fournisseur->lire))),
|
||||
'p.numbuyprice'=>array('label'=>$langs->trans("BuyingPriceNumShort"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire))),
|
||||
@@ -288,7 +291,8 @@ $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p
|
||||
$sql .= ' p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,';
|
||||
$sql .= ' p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy,';
|
||||
$sql .= ' p.datec as date_creation, p.tms as date_update, p.pmp, p.stock,';
|
||||
$sql .= ' p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units,';
|
||||
$sql .= ' p.weight, p.weight_units, p.length, p.length_units, p.width, p.height, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units,';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ' p.fk_unit, cu.label as cu_label,';
|
||||
$sql .= ' MIN(pfp.unitprice) as minsellprice';
|
||||
if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && !$show_childproducts)) {
|
||||
$sql .= ', pac.rowid prod_comb_id';
|
||||
@@ -311,6 +315,7 @@ if (!empty($conf->global->MAIN_MULTILANGS)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX
|
||||
if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && !$show_childproducts)) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination pac ON pac.fk_product_child = p.rowid";
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_units cu ON cu.rowid = p.fk_unit";
|
||||
|
||||
|
||||
$sql .= ' WHERE p.entity IN ('.getEntity('product').')';
|
||||
@@ -375,7 +380,8 @@ $sql .= $hookmanager->resPrint;
|
||||
$sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type,";
|
||||
$sql .= " p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,";
|
||||
$sql .= ' p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp, p.stock,';
|
||||
$sql .= ' p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units';
|
||||
$sql .= ' p.weight, p.weight_units, p.length, p.length_units, p.width, p.height, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ', p.fk_unit, cu.label';
|
||||
|
||||
if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && !$show_childproducts)) {
|
||||
$sql .= ', pac.rowid';
|
||||
@@ -630,6 +636,18 @@ if ($resql)
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
// Width
|
||||
if (!empty($arrayfields['p.width']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
// Height
|
||||
if (!empty($arrayfields['p.height']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
// Surface
|
||||
if (!empty($arrayfields['p.surface']['checked']))
|
||||
{
|
||||
@@ -643,6 +661,13 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Unit
|
||||
if (!empty($arrayfields['cu.label']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Sell price
|
||||
if (!empty($arrayfields['p.sellprice']['checked']))
|
||||
{
|
||||
@@ -761,8 +786,11 @@ if ($resql)
|
||||
}
|
||||
if (!empty($arrayfields['p.weight']['checked'])) print_liste_field_titre($arrayfields['p.weight']['label'], $_SERVER["PHP_SELF"], "p.weight", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['p.length']['checked'])) print_liste_field_titre($arrayfields['p.length']['label'], $_SERVER["PHP_SELF"], "p.length", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['p.width']['checked'])) print_liste_field_titre($arrayfields['p.width']['label'], $_SERVER['PHP_SELF'], 'p.width', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['p.height']['checked'])) print_liste_field_titre($arrayfields['p.height']['label'], $_SERVER['PHP_SELF'], 'p.height', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['p.surface']['checked'])) print_liste_field_titre($arrayfields['p.surface']['label'], $_SERVER["PHP_SELF"], "p.surface", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['p.volume']['checked'])) print_liste_field_titre($arrayfields['p.volume']['label'], $_SERVER["PHP_SELF"], "p.volume", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['cu.label']['checked'])) print_liste_field_titre($arrayfields['cu.label']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['p.sellprice']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
}
|
||||
@@ -880,6 +908,9 @@ if ($resql)
|
||||
$product_static->volume_units = $obj->volume_units;
|
||||
$product_static->surface = $obj->surface;
|
||||
$product_static->surface_units = $obj->surface_units;
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
$product_static->fk_unit = $obj->fk_unit;
|
||||
}
|
||||
|
||||
// STOCK_DISABLE_OPTIM_LOAD can be set to force load_stock whatever is permissions on stock.
|
||||
if ((!empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) || !empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) // To optimize call of load_stock
|
||||
@@ -979,6 +1010,22 @@ if ($resql)
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Width
|
||||
if (!empty($arrayfields['p.width']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print $obj->width;
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Height
|
||||
if (!empty($arrayfields['p.height']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print $obj->height;
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Surface
|
||||
if (!empty($arrayfields['p.surface']['checked']))
|
||||
{
|
||||
@@ -995,6 +1042,16 @@ if ($resql)
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Unit
|
||||
if (!empty($arrayfields['cu.label']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
if (!empty($obj->cu_label)) {
|
||||
print $langs->trans($obj->cu_label);
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Sell price
|
||||
if (!empty($arrayfields['p.sellprice']['checked']))
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
*
|
||||
* 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
|
||||
@@ -351,6 +352,7 @@ if ($result || empty($id))
|
||||
$url = DOL_URL_ROOT.'/viewimage.php?modulepart='.$graphfiles[$key]['modulepart'].'&entity='.$object->entity.'&file='.urlencode($graphfiles[$key]['file']);
|
||||
$px->draw($dir."/".$graphfiles[$key]['file'], $url);
|
||||
|
||||
$graphfiles[$key]['total'] = $px->total();
|
||||
$graphfiles[$key]['output'] = $px->show();
|
||||
}
|
||||
else
|
||||
@@ -405,7 +407,7 @@ if ($result || empty($id))
|
||||
// Label
|
||||
print '<tr class="liste_titre"><td>';
|
||||
print $graphfiles[$key]['label'];
|
||||
print '</td>';
|
||||
print ' ('.$graphfiles[$key]['total'].')</td>';
|
||||
print '<td align="right">'.$linktoregenerate.'</td>';
|
||||
print '</tr>';
|
||||
// Image
|
||||
|
||||
@@ -454,7 +454,7 @@ else
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
print $form->showCategories($object->id, 'warehouse', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_WAREHOUSE, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
@@ -27,6 +27,7 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php';
|
||||
@@ -657,7 +658,8 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
// Description
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
print '<textarea name="description" wrap="soft" class="centpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST("description", 'none'), 0, 1).'</textarea>';
|
||||
$doleditor = new DolEditor('description', GETPOST("description", 'none'), '', 90, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
if ($conf->categorie->enabled) {
|
||||
@@ -927,7 +929,8 @@ elseif ($object->id > 0)
|
||||
// Description
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
print '<textarea name="description" wrap="soft" class="centpercent" rows="'.ROWS_3.'">'.$object->description.'</textarea>';
|
||||
$doleditor = new DolEditor('description', $object->description, '', 90, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
// Tags-Categories
|
||||
@@ -1083,7 +1086,7 @@ elseif ($object->id > 0)
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, 'project', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ print '</td></tr>';
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, 'project', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ if ($id > 0 || ! empty($ref))
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, 'project', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ print '</td></tr>';
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, 'project', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref))
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, 'project', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ if ($id > 0 || !empty($ref))
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, 'project', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -2561,7 +2561,7 @@ else
|
||||
if ($object->prospect || $object->client || (!$object->fournisseur && !empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||
print '<tr><td>'.$langs->trans("CustomersCategoriesShort").'</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories($object->id, 'customer', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_CUSTOMER, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
@@ -2569,7 +2569,7 @@ else
|
||||
if ($object->fournisseur) {
|
||||
print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories($object->id, 'supplier', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1772,7 +1772,7 @@ else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showCategories($object->id, 'user', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_USER, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -2633,7 +2633,7 @@ else
|
||||
{
|
||||
print $form->multiselectarray('usercats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
|
||||
} else {
|
||||
print $form->showCategories($object->id, 'user', 1);
|
||||
print $form->showCategories($object->id, Categorie::TYPE_USER, 1);
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user