Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
eab8af760d
@ -291,16 +291,16 @@ print $formadmin->select_paper_format($selected, 'MAIN_PDF_FORMAT');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_MARGIN_LEFT").'</td><td>';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.(empty($conf->global->MAIN_PDF_MARGIN_LEFT) ? 10 : $conf->global->MAIN_PDF_MARGIN_LEFT).'">';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_LEFT" value="'.getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10).'">';
|
||||
print '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_MARGIN_RIGHT").'</td><td>';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.(empty($conf->global->MAIN_PDF_MARGIN_RIGHT) ? 10 : $conf->global->MAIN_PDF_MARGIN_RIGHT).'">';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_RIGHT" value="'.getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10).'">';
|
||||
print '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_MARGIN_TOP").'</td><td>';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.(empty($conf->global->MAIN_PDF_MARGIN_TOP) ? 10 : $conf->global->MAIN_PDF_MARGIN_TOP).'">';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_TOP" value="'.getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10).'">';
|
||||
print '</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_MARGIN_BOTTOM").'</td><td>';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.(empty($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? 10 : $conf->global->MAIN_PDF_MARGIN_BOTTOM).'">';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -1369,16 +1369,14 @@ class BOM extends CommonObject
|
||||
$unit = measuringUnitString($line->fk_unit, '', '', 1);
|
||||
$qty = convertDurationtoHour($line->qty, $unit);
|
||||
|
||||
if ($conf->workstation->enabled) {
|
||||
if ($tmpproduct->fk_default_workstation) {
|
||||
$workstation = new Workstation($this->db);
|
||||
$res = $workstation->fetch($tmpproduct->fk_default_workstation);
|
||||
if ($conf->workstation->enabled && !empty($tmpproduct->fk_default_workstation)) {
|
||||
$workstation = new Workstation($this->db);
|
||||
$res = $workstation->fetch($tmpproduct->fk_default_workstation);
|
||||
|
||||
if ($res > 0) $line->total_cost = price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
|
||||
else {
|
||||
$this->error = $workstation->error;
|
||||
if ($res > 0) $line->total_cost = price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
|
||||
else {
|
||||
$this->error = $workstation->error;
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$line->total_cost = price2num($qty * $tmpproduct->cost_price, 'MT');
|
||||
|
||||
@ -286,8 +286,8 @@ if ($nb) {
|
||||
|
||||
if ($type != 'bank-transfer') {
|
||||
print '<select name="format">';
|
||||
print '<option value="FRST"'.(GETPOST('format', 'aZ09') == 'FRST' ? ' selected="selected"' : '').'>'.$langs->trans('SEPAFRST').'</option>';
|
||||
print '<option value="RCUR"'.(GETPOST('format', 'aZ09') == 'RCUR' ? ' selected="selected"' : '').'>'.$langs->trans('SEPARCUR').'</option>';
|
||||
print '<option value="FRST"'.($format == 'FRST' ? ' selected="selected"' : '').'>'.$langs->trans('SEPAFRST').'</option>';
|
||||
print '<option value="RCUR"'.($format == 'RCUR' ? ' selected="selected"' : '').'>'.$langs->trans('SEPARCUR').'</option>';
|
||||
print '</select>';
|
||||
}
|
||||
print '<input type="submit" class="butAction" value="'.$title.'"/>';
|
||||
|
||||
@ -851,6 +851,7 @@ class ExtraFields
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$count = 0;
|
||||
if ($this->db->num_rows($resql)) {
|
||||
while ($tab = $this->db->fetch_object($resql)) {
|
||||
if ($tab->entity != 0 && $tab->entity != $conf->entity) {
|
||||
@ -890,10 +891,12 @@ class ExtraFields
|
||||
$this->attributes[$tab->elementtype]['csslist'][$tab->name] = $tab->csslist;
|
||||
|
||||
$this->attributes[$tab->elementtype]['loaded'] = 1;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
if ($elementtype) {
|
||||
$this->attributes[$elementtype]['loaded'] = 1; // If nothing found, we also save tag 'loaded'
|
||||
$this->attributes[$elementtype]['count'] = $count;
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
@ -1688,8 +1691,8 @@ class ExtraFields
|
||||
if (!empty($obj->$field_toshow)) {
|
||||
$translabel = $langs->trans($obj->$field_toshow);
|
||||
}
|
||||
if ($translabel != $field_toshow) {
|
||||
$value .= dol_trunc($translabel, 18).' ';
|
||||
if ($translabel != $obj->$field_toshow) {
|
||||
$value .= dol_trunc($translabel, 24).' ';
|
||||
} else {
|
||||
$value .= $obj->$field_toshow.' ';
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 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
|
||||
@ -19,8 +20,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/agenda.lib.php
|
||||
* \brief Set of function for the agenda module
|
||||
* \file htdocs/core/lib/agenda.lib.php
|
||||
* \brief Set of function for the agenda module
|
||||
*/
|
||||
|
||||
|
||||
@ -313,7 +314,7 @@ function show_array_last_actions_done($max = 5)
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
$staticaction->type_code = $obj->code;
|
||||
$staticaction->libelle = $obj->label;
|
||||
$staticaction->label = $obj->label;
|
||||
$staticaction->id = $obj->id;
|
||||
print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
|
||||
|
||||
@ -362,7 +363,11 @@ function show_array_last_actions_done($max = 5)
|
||||
*/
|
||||
function agenda_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $conf, $user, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('actioncomm');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
@ -395,6 +400,10 @@ function agenda_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['actioncomm']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018-2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2022 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
|
||||
@ -28,7 +29,11 @@
|
||||
*/
|
||||
function assetAdminPrepareHead()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('asset');
|
||||
$extrafields->fetch_name_optionals_label('asset_model');
|
||||
|
||||
$langs->load("assets");
|
||||
|
||||
@ -52,11 +57,19 @@ function assetAdminPrepareHead()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/asset/admin/asset_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['asset']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'asset_extrafields';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/asset/admin/assetmodel_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsAssetModel");
|
||||
$nbExtrafields = $extrafields->attributes['asset_model']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'assetmodel_extrafields';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -108,7 +108,11 @@ function contract_prepare_head(Contrat $object)
|
||||
*/
|
||||
function contract_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('contrat');
|
||||
$extrafields->fetch_name_optionals_label('contratdet');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -126,11 +130,19 @@ function contract_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contrat/admin/contract_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['contrat']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contrat/admin/contractdet_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$nbExtrafields = $extrafields->attributes['contratdet']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributeslines';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -121,7 +121,9 @@ function getServerTimeZoneInt($refgmtdate = 'now')
|
||||
function dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth = 0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if ($duration_unit == 's') {
|
||||
return $time + ($duration_value);
|
||||
}
|
||||
if ($duration_value == 0) {
|
||||
return $time;
|
||||
}
|
||||
|
||||
@ -28,7 +28,10 @@
|
||||
*/
|
||||
function donation_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('don');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -46,6 +49,10 @@ function donation_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/don/admin/donation_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['don']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2022 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
|
||||
@ -17,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/ecm.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module ecm
|
||||
* \ingroup ecm
|
||||
* \file htdocs/core/lib/ecm.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module ecm
|
||||
* \ingroup ecm
|
||||
*/
|
||||
|
||||
|
||||
@ -160,7 +161,12 @@ function ecm_prepare_head_fm($object)
|
||||
*/
|
||||
function ecm_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('ecm_files');
|
||||
$extrafields->fetch_name_optionals_label('ecm_directories');
|
||||
|
||||
$langs->load("ecm");
|
||||
|
||||
$h = 0;
|
||||
@ -173,11 +179,19 @@ function ecm_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/ecm_files_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsEcmFiles");
|
||||
$nbExtrafields = $extrafields->attributes['ecm_files']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes_ecm_files';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/ecm_directories_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsEcmDirectories");
|
||||
$nbExtrafields = $extrafields->attributes['ecm_directories']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes_ecm_directories';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/product.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module produit et service
|
||||
* \ingroup product
|
||||
* \file htdocs/core/lib/product.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module produit et service
|
||||
* \ingroup product
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -279,7 +279,11 @@ function productlot_prepare_head($object)
|
||||
*/
|
||||
function product_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $conf, $user, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('product');
|
||||
$extrafields->fetch_name_optionals_label('product_fournisseur_price');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -306,11 +310,19 @@ function product_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/product/admin/product_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['product']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/product/admin/product_supplier_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ProductSupplierExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['product_fournisseur_price']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'supplierAttributes';
|
||||
$h++;
|
||||
|
||||
@ -322,9 +334,9 @@ function product_admin_prepare_head()
|
||||
|
||||
|
||||
/**
|
||||
* Return array head with list of tabs to view object informations.
|
||||
* Return array head with list of tabs to view object informations.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array head array with tabs
|
||||
*/
|
||||
function product_lot_admin_prepare_head()
|
||||
{
|
||||
@ -556,11 +568,11 @@ function show_stats_for_company($product, $socid)
|
||||
}
|
||||
|
||||
// MO
|
||||
if (!empty($conf->mrp->enabled) && $user->rights->mrp->read) {
|
||||
if (!empty($conf->mrp->enabled) && !empty($user->rights->mrp->read)) {
|
||||
$nblines++;
|
||||
$ret = $product->load_stats_mo($socid);
|
||||
if ($ret < 0) {
|
||||
setEventMessage($product->error, 'errors');
|
||||
setEventMessages($product->error, $product->errors, 'errors');
|
||||
}
|
||||
$langs->load("mrp");
|
||||
print '<tr><td>';
|
||||
@ -585,7 +597,9 @@ function show_stats_for_company($product, $socid)
|
||||
}
|
||||
$parameters = array('socid'=>$socid);
|
||||
$reshook = $hookmanager->executeHooks('addMoreProductStat', $parameters, $product, $nblines); // 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');
|
||||
}
|
||||
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/project.lib.php
|
||||
* \brief Functions used by project module
|
||||
* \ingroup project
|
||||
* \file htdocs/core/lib/project.lib.php
|
||||
* \brief Functions used by project module
|
||||
* \ingroup project
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
@ -487,11 +487,14 @@ function project_timesheet_prepare_head($mode, $fuser = null)
|
||||
*/
|
||||
function project_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
$h = 0;
|
||||
$head = array();
|
||||
global $langs, $conf, $user, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('projet');
|
||||
$extrafields->fetch_name_optionals_label('projet_task');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/projet/admin/project.php";
|
||||
$head[$h][1] = $langs->trans("Projects");
|
||||
@ -502,11 +505,19 @@ function project_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/projet/admin/project_extrafields.php";
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsProject");
|
||||
$nbExtrafields = $extrafields->attributes['projet']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/admin/project_task_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsProjectTask");
|
||||
$nbExtrafields = $extrafields->attributes['projet_task']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes_task';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/propal.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module propal
|
||||
* \ingroup propal
|
||||
* \file htdocs/core/lib/propal.lib.php
|
||||
* \brief Ensemble de fonctions de base pour le module propal
|
||||
* \ingroup propal
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -122,7 +122,11 @@ function propal_prepare_head($object)
|
||||
*/
|
||||
function propal_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $conf, $user, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('propal');
|
||||
$extrafields->fetch_name_optionals_label('propaldet');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -140,11 +144,19 @@ function propal_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/admin/propal_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['propal']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/admin/propaldet_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$nbExtrafields = $extrafields->attributes['propaldet']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributeslines';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/stock.lib.php
|
||||
* \brief Library file with function for stock module
|
||||
* \file htdocs/core/lib/stock.lib.php
|
||||
* \brief Library file with function for stock module
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -88,7 +88,12 @@ function stock_prepare_head($object)
|
||||
*/
|
||||
function stock_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $conf, $user, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('entrepot');
|
||||
$extrafields->fetch_name_optionals_label('stock_mouvement');
|
||||
$extrafields->fetch_name_optionals_label('inventory');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -106,16 +111,28 @@ function stock_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/product/admin/stock_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['entrepot']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/product/admin/stock_mouvement_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("StockMouvementExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['stock_mouvement']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'stockMouvementAttributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/product/admin/inventory_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("InventoryExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['inventory']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'inventoryAttributes';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file core/lib/ticket.lib.php
|
||||
* \ingroup ticket
|
||||
* \brief This file is a library for Ticket module
|
||||
* \file core/lib/ticket.lib.php
|
||||
* \ingroup ticket
|
||||
* \brief This file is a library for Ticket module
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,10 @@
|
||||
*/
|
||||
function ticketAdminPrepareHead()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('ticket');
|
||||
|
||||
$langs->load("ticket");
|
||||
|
||||
@ -44,6 +47,10 @@ function ticketAdminPrepareHead()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/ticket_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsTicket");
|
||||
$nbExtrafields = $extrafields->attributes['ticket']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -250,7 +250,11 @@ function group_prepare_head($object)
|
||||
*/
|
||||
function user_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $conf, $user, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('user');
|
||||
$extrafields->fetch_name_optionals_label('usergroup');
|
||||
|
||||
$langs->load("users");
|
||||
$h = 0;
|
||||
@ -268,11 +272,19 @@ function user_admin_prepare_head()
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Users").")";
|
||||
$nbExtrafields = $extrafields->attributes['user']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/admin/group_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Groups").")";
|
||||
$nbExtrafields = $extrafields->attributes['usergroup']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'attributes_group';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "members") ? 'class="tmenusel"' : 'class="tmenu"',
|
||||
'prefix' => img_picto('', 'member', 'class="fa-fw paddingright pictofixedwidth"'),
|
||||
'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "members") ? 0 : 1),
|
||||
'loadLangs' => array(),
|
||||
'loadLangs' => array("members"),
|
||||
'submenus' => array(),
|
||||
);
|
||||
|
||||
@ -170,7 +170,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "products") ? 'class="tmenusel"' : 'class="tmenu"',
|
||||
'prefix' => img_picto('', 'product', 'class="fa-fw paddingright pictofixedwidth"'),
|
||||
'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "products") ? 0 : 1),
|
||||
'loadLangs' => array("products"),
|
||||
'loadLangs' => array("products", "stocks"),
|
||||
'submenus' => array(),
|
||||
);
|
||||
|
||||
@ -379,7 +379,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "hrm") ? 'class="tmenusel"' : 'class="tmenu"',
|
||||
'prefix' => img_picto('', 'hrm', 'class="fa-fw paddingright pictofixedwidth"'),
|
||||
'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "hrm") ? 0 : 1),
|
||||
'loadLangs' => array("holiday"),
|
||||
'loadLangs' => array("hrm", "holiday"),
|
||||
'submenus' => array(),
|
||||
);
|
||||
|
||||
@ -410,7 +410,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
'classname' => $classname = (!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "ticket") ? 'class="tmenusel"' : 'class="tmenu"',
|
||||
'prefix' => img_picto('', 'ticket', 'class="fa-fw paddingright pictofixedwidth"'),
|
||||
'session' => ((!empty($_SESSION["mainmenu"]) && $_SESSION["mainmenu"] == "ticket") ? 0 : 1),
|
||||
'loadLangs' => array("other"),
|
||||
'loadLangs' => array("ticket", "knowledgemanagement"),
|
||||
'submenus' => array(),
|
||||
);
|
||||
|
||||
|
||||
@ -98,10 +98,10 @@ class CommActionRapport
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->title = $langs->transnoentitiesnoconv("ActionsReport").' '.$this->year."-".$this->month;
|
||||
$this->subject = $langs->transnoentitiesnoconv("ActionsReport").' '.$this->year."-".$this->month;
|
||||
|
||||
@ -156,10 +156,10 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
// Get source company
|
||||
$this->emetteur = $mysoc;
|
||||
|
||||
@ -67,10 +67,10 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -70,10 +70,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -63,10 +63,10 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
// Retrieves transmitter
|
||||
$this->emetteur = $mysoc;
|
||||
|
||||
@ -149,10 +149,10 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -154,10 +154,10 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -145,10 +145,10 @@ class pdf_strato extends ModelePDFContract
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -140,10 +140,10 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -139,10 +139,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -134,10 +134,10 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
@ -135,10 +135,10 @@ class pdf_merou extends ModelePdfExpedition
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = round($formatarray['height'] / 2);
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
|
||||
|
||||
@ -135,10 +135,10 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
@ -119,10 +119,10 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -155,10 +155,10 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -182,10 +182,10 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -137,10 +137,10 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2021 SuperAdmin
|
||||
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -63,8 +62,6 @@ class modStockTransfer extends DolibarrModules
|
||||
$this->description = $langs->trans("ModuleStockTransferDesc");
|
||||
// Used only if file README.md and README-LL.md not found.
|
||||
$this->descriptionlong = "StockTransfer description (Long)";
|
||||
$this->editor_name = 'Editor name';
|
||||
$this->editor_url = 'https://www.example.com';
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
|
||||
$this->version = 'development';
|
||||
// Url to the file with your last numberversion of this module
|
||||
@ -127,7 +124,7 @@ class modStockTransfer extends DolibarrModules
|
||||
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
|
||||
$this->langfiles = array("stocktransfer@stocktransfer");
|
||||
$this->phpmin = array(5, 5); // Minimum version of PHP required by module
|
||||
$this->phpmin = array(5, 6); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module
|
||||
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022 SuperAdmin <test@dolibarr.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
|
||||
@ -67,10 +66,6 @@ class modWebhook extends DolibarrModules
|
||||
// Used only if file README.md and README-LL.md not found.
|
||||
$this->descriptionlong = "WebhookDescription";
|
||||
|
||||
// Author
|
||||
$this->editor_name = 'Editor name';
|
||||
$this->editor_url = 'https://www.example.com';
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
|
||||
$this->version = 'development';
|
||||
// Url to the file with your last numberversion of this module
|
||||
|
||||
@ -116,10 +116,10 @@ class pdf_standard extends ModelePDFMovement
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_codestockservice = 0; // Display stock-service code
|
||||
|
||||
@ -144,10 +144,10 @@ class pdf_vinci extends ModelePDFMo
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_multilang = 1; //Available in several languages
|
||||
|
||||
@ -97,10 +97,10 @@ class pdf_standard extends ModelePDFProduct
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_multilang = 1; // Available in several languages
|
||||
|
||||
@ -139,10 +139,10 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -175,10 +175,10 @@ class pdf_beluga extends ModelePDFProjects
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
}
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -138,10 +138,10 @@ class pdf_timespent extends ModelePDFProjects
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -145,10 +145,10 @@ class pdf_azur extends ModelePDFPropales
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -148,10 +148,10 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -54,10 +54,10 @@ class pdf_paiement
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->tab_top = 30;
|
||||
|
||||
|
||||
@ -57,10 +57,10 @@ class pdf_squille extends ModelePdfReception
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
@ -111,10 +111,10 @@ class pdf_standard extends ModelePDFStock
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_codestockservice = 0; // Display product-service code
|
||||
|
||||
@ -131,10 +131,10 @@ class pdf_eagle extends ModelePdfStockTransfer
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
|
||||
|
||||
@ -145,10 +145,10 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -141,10 +141,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -143,10 +143,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -143,10 +143,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -114,10 +114,10 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_multilang = 1; // Available in several languages
|
||||
|
||||
@ -973,7 +973,7 @@ class Delivery extends CommonObject
|
||||
$sqlSourceLine .= ", p.ref, p.label";
|
||||
$sqlSourceLine .= " FROM ".MAIN_DB_PREFIX.$this->linkedObjectsIds[0]['type']."det as st";
|
||||
$sqlSourceLine .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON st.fk_product = p.rowid";
|
||||
$sqlSourceLine .= " WHERE fk_".$this->linked_object[0]['type']." = ".((int) $this->linked_object[0]['linkid']);
|
||||
$sqlSourceLine .= " WHERE fk_".$this->linked_objects[0]['type']." = ".((int) $this->linked_objects[0]['linkid']);
|
||||
|
||||
$resultSourceLine = $this->db->query($sqlSourceLine);
|
||||
if ($resultSourceLine) {
|
||||
@ -986,12 +986,12 @@ class Delivery extends CommonObject
|
||||
// Get lines of sources alread delivered
|
||||
$sql = "SELECT ld.fk_origin_line, sum(ld.qty) as qty";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."deliverydet as ld, ".MAIN_DB_PREFIX."delivery as l,";
|
||||
$sql .= " ".MAIN_DB_PREFIX.$this->linked_object[0]['type']." as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX.$this->linked_object[0]['type']."det as cd";
|
||||
$sql .= " ".MAIN_DB_PREFIX.$this->linked_objects[0]['type']." as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX.$this->linked_objects[0]['type']."det as cd";
|
||||
$sql .= " WHERE ld.fk_delivery = l.rowid";
|
||||
$sql .= " AND ld.fk_origin_line = cd.rowid";
|
||||
$sql .= " AND cd.fk_".$this->linked_object[0]['type']." = c.rowid";
|
||||
$sql .= " AND cd.fk_".$this->linked_object[0]['type']." = ".((int) $this->linked_object[0]['linkid']);
|
||||
$sql .= " AND cd.fk_".$this->linked_objects[0]['type']." = c.rowid";
|
||||
$sql .= " AND cd.fk_".$this->linked_objects[0]['type']." = ".((int) $this->linked_objects[0]['linkid']);
|
||||
$sql .= " AND ld.fk_origin_line = ".((int) $objSourceLine->rowid);
|
||||
$sql .= " GROUP BY ld.fk_origin_line";
|
||||
|
||||
|
||||
@ -16,37 +16,38 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file emailcollector/class/emailcollector.class.php
|
||||
* \ingroup emailcollector
|
||||
* \brief This file is a CRUD class file for EmailCollector (Create/Read/Update/Delete)
|
||||
* \file htdocs/emailcollector/class/emailcollector.class.php
|
||||
* \ingroup emailcollector
|
||||
* \brief This file is a CRUD class file for EmailCollector (Create/Read/Update/Delete)
|
||||
*/
|
||||
|
||||
// Put here all includes required by your class file
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT .'/emailcollector/lib/emailcollector.lib.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; // customer proposal
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; // customer order
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; // Shipment
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // supplier invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; // supplier order
|
||||
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; // supplier proposal
|
||||
require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; // reception
|
||||
include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php';
|
||||
//require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; // Holidays (leave request)
|
||||
//require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // expernse repor
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php'; // Customer Proposal
|
||||
require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; // Customer Order
|
||||
require_once DOL_DOCUMENT_ROOT .'/compta/facture/class/facture.class.php'; // Customer Invoice
|
||||
require_once DOL_DOCUMENT_ROOT .'/contact/class/contact.class.php'; // Contact / Address
|
||||
require_once DOL_DOCUMENT_ROOT .'/expedition/class/expedition.class.php'; // Shipping / Delivery
|
||||
require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.commande.class.php'; // Supplier Order
|
||||
require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.facture.class.php'; // Supplier Invoice
|
||||
require_once DOL_DOCUMENT_ROOT .'/projet/class/project.class.php'; // Project
|
||||
require_once DOL_DOCUMENT_ROOT .'/reception/class/reception.class.php'; // Reception
|
||||
require_once DOL_DOCUMENT_ROOT .'/recruitment/class/recruitmentcandidature.class.php'; // Recruiting
|
||||
require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; // Third-Party
|
||||
require_once DOL_DOCUMENT_ROOT .'/supplier_proposal/class/supplier_proposal.class.php'; // Supplier Proposal
|
||||
require_once DOL_DOCUMENT_ROOT .'/ticket/class/ticket.class.php'; // Ticket
|
||||
//require_once DOL_DOCUMENT_ROOT .'/expensereport/class/expensereport.class.php'; // Expense Report
|
||||
//require_once DOL_DOCUMENT_ROOT .'/holiday/class/holiday.class.php'; // Holidays (leave request)
|
||||
|
||||
|
||||
// use Webklex\PHPIMAP;
|
||||
require DOL_DOCUMENT_ROOT.'/includes/webklex/php-imap/vendor/autoload.php';
|
||||
use Webklex\PHPIMAP\ClientManager;
|
||||
require DOL_DOCUMENT_ROOT .'/includes/webklex/php-imap/vendor/autoload.php';
|
||||
|
||||
use Webklex\PHPIMAP\ClientManager;
|
||||
use Webklex\PHPIMAP\Exceptions\ConnectionFailedException;
|
||||
use Webklex\PHPIMAP\Exceptions\InvalidWhereQueryCriteriaException;
|
||||
use Webklex\PHPIMAP\Exceptions\GetMessagesFailedException;
|
||||
@ -64,14 +65,17 @@ class EmailCollector extends CommonObject
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
public $element = 'emailcollector';
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'emailcollector_emailcollector';
|
||||
|
||||
/**
|
||||
* @var int Does emailcollector support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does emailcollector support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
@ -91,6 +95,7 @@ class EmailCollector extends CommonObject
|
||||
* @var array List of child tables. To test if we can delete object.
|
||||
*/
|
||||
protected $childtables = array();
|
||||
|
||||
/**
|
||||
* @var array List of child tables. To know object to delete on cascade.
|
||||
*/
|
||||
@ -206,7 +211,6 @@ class EmailCollector extends CommonObject
|
||||
*/
|
||||
public $import_key;
|
||||
|
||||
|
||||
public $host;
|
||||
public $port;
|
||||
public $hostcharset;
|
||||
@ -1747,61 +1751,61 @@ class EmailCollector extends CommonObject
|
||||
|
||||
$objectid = $reg[2];
|
||||
// See also list into interface_50_modAgenda_ActionsAuto
|
||||
if ($reg[1] == 'thi') {
|
||||
if ($reg[1] == 'thi') { // Third-party
|
||||
$objectemail = new Societe($this->db);
|
||||
}
|
||||
if ($reg[1] == 'ctc') {
|
||||
if ($reg[1] == 'ctc') { // Contact
|
||||
$objectemail = new Contact($this->db);
|
||||
}
|
||||
if ($reg[1] == 'inv') { // customer invoices
|
||||
if ($reg[1] == 'inv') { // Customer Invoice
|
||||
$objectemail = new Facture($this->db);
|
||||
}
|
||||
if ($reg[1] == 'sinv') { // supplier invoices
|
||||
if ($reg[1] == 'sinv') { // Supplier Invoice
|
||||
$objectemail = new FactureFournisseur($this->db);
|
||||
}
|
||||
if ($reg[1] == 'pro') { // customer proposals
|
||||
if ($reg[1] == 'pro') { // Customer Proposal
|
||||
$objectemail = new Propal($this->db);
|
||||
}
|
||||
if ($reg[1] == 'ord') { // customer orders
|
||||
if ($reg[1] == 'ord') { // Customer Order
|
||||
$objectemail = new Commande($this->db);
|
||||
}
|
||||
if ($reg[1] == 'shi') { // shipments
|
||||
if ($reg[1] == 'shi') { // Shipment
|
||||
$objectemail = new Expedition($this->db);
|
||||
}
|
||||
if ($reg[1] == 'spro') { // supplier proposal
|
||||
if ($reg[1] == 'spro') { // Supplier Proposal
|
||||
$objectemail = new SupplierProposal($this->db);
|
||||
}
|
||||
if ($reg[1] == 'sord') { // supplier order
|
||||
if ($reg[1] == 'sord') { // Supplier Order
|
||||
$objectemail = new CommandeFournisseur($this->db);
|
||||
}
|
||||
if ($reg[1] == 'rec') { // Reception
|
||||
if ($reg[1] == 'rec') { // Reception
|
||||
$objectemail = new Reception($this->db);
|
||||
}
|
||||
if ($reg[1] == 'proj') {
|
||||
if ($reg[1] == 'proj') { // Project
|
||||
$objectemail = new Project($this->db);
|
||||
}
|
||||
if ($reg[1] == 'tas') {
|
||||
if ($reg[1] == 'tas') { // Task
|
||||
$objectemail = new Task($this->db);
|
||||
}
|
||||
if ($reg[1] == 'con') {
|
||||
if ($reg[1] == 'con') { // Contact
|
||||
$objectemail = new Contact($this->db);
|
||||
}
|
||||
if ($reg[1] == 'use') {
|
||||
if ($reg[1] == 'use') { // User
|
||||
$objectemail = new User($this->db);
|
||||
}
|
||||
if ($reg[1] == 'tic') {
|
||||
if ($reg[1] == 'tic') { // Ticket
|
||||
$objectemail = new Ticket($this->db);
|
||||
}
|
||||
if ($reg[1] == 'recruitmentcandidature') {
|
||||
if ($reg[1] == 'recruitmentcandidature') { // Recruiting Candidate
|
||||
$objectemail = new RecruitmentCandidature($this->db);
|
||||
}
|
||||
if ($reg[1] == 'mem') {
|
||||
if ($reg[1] == 'mem') { // Member
|
||||
$objectemail = new Adherent($this->db);
|
||||
}
|
||||
/*if ($reg[1] == 'leav') {
|
||||
/*if ($reg[1] == 'leav') { // Leave / Holiday
|
||||
$objectemail = new Holiday($db);
|
||||
}
|
||||
if ($reg[1] == 'exp') {
|
||||
if ($reg[1] == 'exp') { // ExpenseReport
|
||||
$objectemail = new ExpenseReport($db);
|
||||
}*/
|
||||
} elseif (preg_match('/<(.*@.*)>/', $reference, $reg)) {
|
||||
@ -2241,42 +2245,42 @@ class EmailCollector extends CommonObject
|
||||
}
|
||||
$arrayobject = array(
|
||||
'propale' => array('table' => 'propal',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'comm/propal/class/propal.class.php',
|
||||
'object' => 'Propal'),
|
||||
'fields' => array('ref'),
|
||||
'class' => 'comm/propal/class/propal.class.php',
|
||||
'object' => 'Propal'),
|
||||
'holiday' => array('table' => 'holiday',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'holiday/class/holiday.class.php',
|
||||
'object' => 'Holiday'),
|
||||
'fields' => array('ref'),
|
||||
'class' => 'holiday/class/holiday.class.php',
|
||||
'object' => 'Holiday'),
|
||||
'expensereport' => array('table' => 'expensereport',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'expensereport/class/expensereport.class.php',
|
||||
'object' => 'ExpenseReport'),
|
||||
'fields' => array('ref'),
|
||||
'class' => 'expensereport/class/expensereport.class.php',
|
||||
'object' => 'ExpenseReport'),
|
||||
'recruitment/recruitmentjobposition' => array('table' => 'recruitment_recruitmentjobposition',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'recruitment/class/recruitmentjobposition.class.php',
|
||||
'object' => 'RecruitmentJobPosition'),
|
||||
'fields' => array('ref'),
|
||||
'class' => 'recruitment/class/recruitmentjobposition.class.php',
|
||||
'object' => 'RecruitmentJobPosition'),
|
||||
'recruitment/recruitmentjobposition' => array('table' => 'recruitment_recruitmentcandidature',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'recruitment/class/recruitmentcandidature.class.php',
|
||||
'object' => ' RecruitmentCandidature'),
|
||||
'fields' => array('ref'),
|
||||
'class' => 'recruitment/class/recruitmentcandidature.class.php',
|
||||
'object' => ' RecruitmentCandidature'),
|
||||
'societe' => array('table' => 'societe',
|
||||
'fields' => array('code_client', 'code_fournisseur'),
|
||||
'class' => 'societe/class/societe.class.php',
|
||||
'object' => 'Societe'),
|
||||
'commande' => array('table' => 'commande',
|
||||
'commande' => array('table' => 'commande',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'commande/class/commande.class.php',
|
||||
'object' => 'Commande'),
|
||||
'expedition' => array('table' => 'expedition',
|
||||
'expedition' => array('table' => 'expedition',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'expedition/class/expedition.class.php',
|
||||
'object' => 'Expedition'),
|
||||
'contract' => array('table' => 'contrat',
|
||||
'contract' => array('table' => 'contrat',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'contrat/class/contrat.class.php',
|
||||
'object' => 'Contrat'),
|
||||
'fichinter' => array('table' => 'fichinter',
|
||||
'fichinter' => array('table' => 'fichinter',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'fichinter/class/fichinter.class.php',
|
||||
'object' => 'Fichinter'),
|
||||
@ -2284,51 +2288,51 @@ class EmailCollector extends CommonObject
|
||||
'fields' => array('ref'),
|
||||
'class' => 'ticket/class/ticket.class.php',
|
||||
'object' => ' Ticket'),
|
||||
'knowledgemanagement' => array('table' => 'knowledgemanagement_knowledgerecord',
|
||||
'knowledgemanagement' => array('table' => 'knowledgemanagement_knowledgerecord',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'knowledgemanagement/class/knowledgemanagement.class.php',
|
||||
'object' => 'KnowledgeRecord'),
|
||||
'supplier_proposal' => array('table' => 'supplier_proposal',
|
||||
'supplier_proposal' => array('table' => 'supplier_proposal',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'supplier_proposal/class/supplier_proposal.class.php',
|
||||
'object' => 'SupplierProposal'),
|
||||
'fournisseur/commande' => array('table' => 'commande_fournisseur',
|
||||
'fournisseur/commande' => array('table' => 'commande_fournisseur',
|
||||
'fields' => array('ref', 'ref_supplier'),
|
||||
'class' => 'fourn/class/fournisseur.commande.class.php',
|
||||
'object' => 'SupplierProposal'),
|
||||
'facture' => array('table' => 'facture',
|
||||
'facture' => array('table' => 'facture',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'compta/facture/class/facture.class.php',
|
||||
'object' => 'Facture'),
|
||||
'fournisseur/facture' => array('table' => 'facture_fourn',
|
||||
'fournisseur/facture' => array('table' => 'facture_fourn',
|
||||
'fields' => array('ref', ref_client),
|
||||
'class' => 'fourn/class/fournisseur.facture.class.php',
|
||||
'object' => 'FactureFournisseur'),
|
||||
'produit' => array('table' => 'product',
|
||||
'produit' => array('table' => 'product',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'product/class/product.class.php',
|
||||
'object' => 'Product'),
|
||||
'productlot' => array('table' => 'product_lot',
|
||||
'productlot' => array('table' => 'product_lot',
|
||||
'fields' => array('batch'),
|
||||
'class' => 'product/stock/class/productlot.class.php',
|
||||
'object' => 'Productlot'),
|
||||
'projet' => array('table' => 'projet',
|
||||
'projet' => array('table' => 'projet',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'projet/class/projet.class.php',
|
||||
'object' => 'Project'),
|
||||
'projet_task' => array('table' => 'projet_task',
|
||||
'projet_task' => array('table' => 'projet_task',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'projet/class/task.class.php',
|
||||
'object' => 'Task'),
|
||||
'ressource' => array('table' => 'resource',
|
||||
'ressource' => array('table' => 'resource',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'ressource/class/dolressource.class.php',
|
||||
'object' => 'Dolresource'),
|
||||
'bom' => array('table' => 'bom_bom',
|
||||
'bom' => array('table' => 'bom_bom',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'bom/class/bom.class.php',
|
||||
'object' => 'BOM'),
|
||||
'mrp' => array('table' => 'mrp_mo',
|
||||
'mrp' => array('table' => 'mrp_mo',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'mrp/class/mo.class.php',
|
||||
'object' => 'Mo'),
|
||||
@ -2932,6 +2936,7 @@ class EmailCollector extends CommonObject
|
||||
2.2.1 text/plain
|
||||
2.2.2 text/html
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sub function for getpart(). Only called by createPartArray() and itself.
|
||||
*
|
||||
@ -3050,10 +3055,10 @@ class EmailCollector extends CommonObject
|
||||
/**
|
||||
* Converts a string from one encoding to another.
|
||||
*
|
||||
* @param string $string String to convert
|
||||
* @param string $fromEncoding String encoding
|
||||
* @param string $toEncoding String return encoding
|
||||
* @return string Converted string if conversion was successful, or the original string if not
|
||||
* @param string $string String to convert
|
||||
* @param string $fromEncoding String encoding
|
||||
* @param string $toEncoding String return encoding
|
||||
* @return string Converted string if conversion was successful, or the original string if not
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function convertStringEncoding($string, $fromEncoding, $toEncoding = 'UTF-8')
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Yasser Carreón <yacasia@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Lenin Rivas <lenin@leninrivas.com>
|
||||
* Copyright (C) 2022 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
*
|
||||
@ -214,13 +214,13 @@ if (empty($reshook)) {
|
||||
$db->begin();
|
||||
|
||||
$object->note = GETPOST('note', 'alpha');
|
||||
$object->origin = $origin;
|
||||
$object->origin = $origin;
|
||||
$object->origin_id = $origin_id;
|
||||
$object->fk_project = GETPOST('projectid', 'int');
|
||||
$object->weight = GETPOST('weight', 'int') == '' ? "NULL" : GETPOST('weight', 'int');
|
||||
$object->sizeH = GETPOST('sizeH', 'int') == '' ? "NULL" : GETPOST('sizeH', 'int');
|
||||
$object->sizeW = GETPOST('sizeW', 'int') == '' ? "NULL" : GETPOST('sizeW', 'int');
|
||||
$object->sizeS = GETPOST('sizeS', 'int') == '' ? "NULL" : GETPOST('sizeS', 'int');
|
||||
$object->weight = GETPOST('weight', 'int') == '' ? "NULL" : GETPOST('weight', 'int');
|
||||
$object->sizeH = GETPOST('sizeH', 'int') == '' ? "NULL" : GETPOST('sizeH', 'int');
|
||||
$object->sizeW = GETPOST('sizeW', 'int') == '' ? "NULL" : GETPOST('sizeW', 'int');
|
||||
$object->sizeS = GETPOST('sizeS', 'int') == '' ? "NULL" : GETPOST('sizeS', 'int');
|
||||
$object->size_units = GETPOST('size_units', 'int');
|
||||
$object->weight_units = GETPOST('weight_units', 'int');
|
||||
|
||||
@ -233,8 +233,8 @@ if (empty($reshook)) {
|
||||
$object->ref_customer = GETPOST('ref_customer', 'alpha');
|
||||
$object->model_pdf = GETPOST('model');
|
||||
$object->date_delivery = $date_delivery; // Date delivery planed
|
||||
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
|
||||
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
|
||||
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
|
||||
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
|
||||
$object->tracking_number = GETPOST('tracking_number', 'alpha');
|
||||
$object->note_private = GETPOST('note_private', 'restricthtml');
|
||||
$object->note_public = GETPOST('note_public', 'restricthtml');
|
||||
@ -265,7 +265,7 @@ if (empty($reshook)) {
|
||||
$qty .= '_'.$j;
|
||||
while (GETPOSTISSET($batch)) {
|
||||
// save line of detail into sub_qty
|
||||
$sub_qty[$j]['q'] = GETPOST($qty, 'int'); // the qty we want to move for this stock record
|
||||
$sub_qty[$j]['q'] = price2num(GETPOST($qty, 'alpha'), 'MS'); // the qty we want to move for this stock record
|
||||
$sub_qty[$j]['id_batch'] = GETPOST($batch, 'int'); // the id into llx_product_batch of stock record to move
|
||||
$subtotalqty += $sub_qty[$j]['q'];
|
||||
|
||||
@ -481,7 +481,7 @@ if (empty($reshook)) {
|
||||
// setEventMessages($object->error, $object->errors, 'errors');
|
||||
// }
|
||||
//}
|
||||
} elseif ($action == 'setdate_livraison' && $user->rights->expedition->creer) {
|
||||
} elseif ($action == 'setdate_livraison' && !empty($user->rights->expedition->creer)) {
|
||||
$datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int'));
|
||||
|
||||
$object->fetch($id);
|
||||
|
||||
@ -120,13 +120,12 @@ class ExpenseReportIk extends CommonObject
|
||||
public function fetch($id, $ref = null)
|
||||
{
|
||||
$result = $this->fetchCommon($id, $ref);
|
||||
if ($result > 0 && !empty($this->table_element_line)) {
|
||||
$this->fetchLines();
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update object into database
|
||||
*
|
||||
|
||||
@ -171,6 +171,19 @@ class ExpenseReportRule extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load object lines in memory from the database
|
||||
*
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
public function fetchLines()
|
||||
{
|
||||
$this->lines = array();
|
||||
|
||||
$result = $this->fetchLinesCommon();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update object into database
|
||||
*
|
||||
|
||||
@ -20,25 +20,27 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file evaluation_note.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for notes on Evaluation
|
||||
* \file htdocs/hrm/evaluation_note.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for notes on Evaluation
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "companies"));
|
||||
$langs->loadLangs(array('hrm', 'companies'));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
@ -47,6 +49,7 @@ $object = new Evaluation($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('evaluationnote', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
@ -56,8 +59,9 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->hrm->evaluation->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoread = $user->rights->hrm->evaluation->read; // Used by the include of actions_addupdatedelete.inc.php
|
||||
// Permissions
|
||||
$permissionnote = $user->rights->hrm->evaluation->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoread = $user->rights->hrm->evaluation->read; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/hrm/index.php
|
||||
* \ingroup hrm
|
||||
* \brief Home page for HRM area.
|
||||
* \file htdocs/hrm/index.php
|
||||
* \ingroup hrm
|
||||
* \brief Home page for HRM area.
|
||||
*/
|
||||
|
||||
|
||||
@ -32,10 +32,10 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
|
||||
if (isModEnabled('deplacement')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file job_card.php
|
||||
* \file htdocs/hrm/job_card.php
|
||||
* \ingroup hrm
|
||||
* \brief Page to create/edit/view job
|
||||
*/
|
||||
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "other", 'products'));
|
||||
$langs->loadLangs(array('hrm', 'other', 'products')); // why products?
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
@ -76,9 +76,9 @@ if (empty($action) && empty($id) && empty($ref)) {
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
|
||||
|
||||
// Permissions
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->hrm->all->delete;
|
||||
$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/job';
|
||||
|
||||
|
||||
@ -20,22 +20,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file job_contact.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for contacts linked to Job
|
||||
* \file htdocs/hrm/job_contact.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for contacts linked to Job
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "companies", "other", "mails"));
|
||||
$langs->loadLangs(array('hrm', 'companies', 'other', 'mails'));
|
||||
|
||||
// Get Parameters
|
||||
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
@ -53,6 +54,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
// Permissions
|
||||
$permission = $user->rights->hrm->job->write;
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file job_document.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for documents linked to Job
|
||||
* \file htdocs/hrm/job_document.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for documents linked to Job
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
@ -36,15 +36,15 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "companies", "other", "mails"));
|
||||
|
||||
$langs->loadLangs(array('hrm', 'companies', 'other', 'mails'));
|
||||
|
||||
// Get parameters
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm');
|
||||
$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'));
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
|
||||
// Get parameters
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
@ -68,6 +68,7 @@ $object = new Job($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('jobdocument', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
@ -78,6 +79,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->hrm->multidir_output[$object->entity ? $object->entity : $conf->entity]."/job/".get_exdir(0, 0, 0, 1, $object);
|
||||
}
|
||||
|
||||
// Permissions
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file job_list.php
|
||||
* \ingroup hrm
|
||||
* \brief List page for job
|
||||
* \file htdocs/hrm/job_list.php
|
||||
* \ingroup hrm
|
||||
* \brief List page of jobs
|
||||
*/
|
||||
|
||||
|
||||
@ -40,8 +40,9 @@ require_once __DIR__.'/class/job.class.php';
|
||||
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "other"));
|
||||
$langs->loadLangs(array('hrm', 'other'));
|
||||
|
||||
// Get Parameters
|
||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
||||
@ -130,8 +131,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
// Permissions
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissiontoadd = $user->rights->hrm->all->write;
|
||||
$permissiontoadd = $user->rights->hrm->all->write;
|
||||
$permissiontodelete = $user->rights->hrm->all->delete;
|
||||
|
||||
// Security check
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file job_note.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for notes on Job
|
||||
* \file htdocs/hrm/job_note.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for notes on Job
|
||||
*/
|
||||
|
||||
|
||||
@ -33,12 +33,13 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "companies"));
|
||||
$langs->loadLangs(array('hrm', 'companies'));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
@ -47,6 +48,7 @@ $object = new Job($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('jobnote', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
@ -56,6 +58,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
// Permissions
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissionnote = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2022 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
|
||||
@ -21,7 +22,7 @@
|
||||
|
||||
/**
|
||||
* \file hrm/lib/hrm.lib.php
|
||||
* \ingroup hr
|
||||
* \ingroup hrm
|
||||
* \brief Library files with common functions for Workstation
|
||||
*/
|
||||
|
||||
@ -32,10 +33,15 @@
|
||||
*/
|
||||
function hrmAdminPrepareHead()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $db;
|
||||
|
||||
$langs->load("hrm");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('hrm_evaluation');
|
||||
$extrafields->fetch_name_optionals_label('hrm_job');
|
||||
$extrafields->fetch_name_optionals_label('hrm_skill');
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
$head[$h][0] = DOL_URL_ROOT . "/admin/hrm.php";
|
||||
@ -43,37 +49,37 @@ function hrmAdminPrepareHead()
|
||||
$head[$h][2] = 'settings';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php';
|
||||
$head[$h][1] = $langs->trans("Establishments");
|
||||
$head[$h][2] = 'establishments';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/evaluation_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("EvaluationsExtraFields");
|
||||
$head[$h][2] = 'evaluationsAttributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/job_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("JobsExtraFields");
|
||||
$head[$h][2] = 'jobsAttributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/skill_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("SkillsExtraFields");
|
||||
$head[$h][2] = 'skillsAttributes';
|
||||
$h++;
|
||||
|
||||
/*
|
||||
$head[$h][0] = dol_buildpath("/workstation/admin/myobject_extrafields.php", 1);
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$head[$h][2] = 'myobject_extrafields';
|
||||
$head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php';
|
||||
$head[$h][1] = $langs->trans("Establishments");
|
||||
$head[$h][2] = 'establishments';
|
||||
$h++;
|
||||
*/
|
||||
|
||||
/*$head[$h][0] = require_once "/admin/about.php";
|
||||
$head[$h][1] = $langs->trans("About");
|
||||
$head[$h][2] = 'about';
|
||||
$h++;*/
|
||||
$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/evaluation_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("EvaluationsExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['hrm_evaluation']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'evaluationsAttributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/job_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("JobsExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['hrm_job']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'jobsAttributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/skill_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("SkillsExtraFields");
|
||||
$nbExtrafields = $extrafields->attributes['hrm_skill']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'skillsAttributes';
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
@ -85,7 +91,7 @@ function hrmAdminPrepareHead()
|
||||
//); // to remove a tab
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin');
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin', 'remove');
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin', 'remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file position_agenda.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab of events on Position
|
||||
* \file htdocs/hrm/position_agenda.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab of events on Position
|
||||
*/
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "other"));
|
||||
$langs->loadLangs(array('hrm', 'other'));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
@ -79,6 +79,7 @@ $object = new Position($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('positionagenda', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
@ -88,6 +89,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
// Permissions
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file position_card.php
|
||||
* \ingroup hrm
|
||||
* \brief Page to create/edit/view position
|
||||
* \file htdocs/hrm/position_card.php
|
||||
* \ingroup hrm
|
||||
* \brief Page to create/edit/view job position
|
||||
*/
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php';
|
||||
//dol_include_once('/hrm/position.php');
|
||||
|
||||
// Get Parameters
|
||||
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
@ -50,6 +51,7 @@ if ($res < 0) {
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
|
||||
// Permissions
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
$permissiontodelete = $user->rights->hrm->all->delete;
|
||||
|
||||
@ -20,22 +20,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file position_contact.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for contacts linked to Position
|
||||
* \file htdocs/hrm/position_contact.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for contacts linked to Job Position
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "companies", "other", "mails"));
|
||||
|
||||
// Get Parameters
|
||||
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
@ -47,12 +48,14 @@ $object = new Position($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('positioncontact', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
// Permissions
|
||||
$permission = $user->rights->hrm->position->write;
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file position_list.php
|
||||
* \ingroup hrm
|
||||
* \brief List page for position
|
||||
* \file htdocs/hrm/position_list.php
|
||||
* \ingroup hrm
|
||||
* \brief List page for job positions
|
||||
*/
|
||||
|
||||
|
||||
@ -40,8 +40,9 @@ require_once __DIR__.'/class/position.class.php';
|
||||
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "other"));
|
||||
$langs->loadLangs(array('hrm', 'other'));
|
||||
|
||||
// Get Parameters
|
||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
||||
@ -130,8 +131,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissiontoadd = $user->rights->hrm->all->write;
|
||||
// Permissions
|
||||
$permissiontoread = $user->rights->hrm->all->read;
|
||||
$permissiontoadd = $user->rights->hrm->all->write;
|
||||
$permissiontodelete = $user->rights->hrm->all->delete;
|
||||
|
||||
// Security check
|
||||
|
||||
@ -20,26 +20,27 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file position_note.php
|
||||
* \ingroup hrm
|
||||
* \ingroup hrm
|
||||
* \brief Tab for notes on Position
|
||||
* \file htdocs/hrm/position_note.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for notes on Position
|
||||
*/
|
||||
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';;
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';;
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("hrm", "companies"));
|
||||
$langs->loadLangs(array('hrm', 'companies'));
|
||||
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
@ -58,7 +59,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id;
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->hrm->all->write;
|
||||
// Permissions
|
||||
$permissionnote = $user->rights->hrm->all->write;
|
||||
$permissiontoread = $user->rights->hrm->all->read; // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
|
||||
@ -198,15 +198,15 @@ if ($action=='downfield' || $action=='upfield')
|
||||
}
|
||||
}
|
||||
*/
|
||||
if ($action == 'builddoc') {
|
||||
// Build import file
|
||||
$result = $objimport->build_file($user, GETPOST('model', 'alpha'), $datatoimport, $array_match_file_to_database);
|
||||
if ($result < 0) {
|
||||
setEventMessages($objimport->error, $objimport->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
// if ($action == 'builddoc') {
|
||||
// // Build import file
|
||||
// $result = $objimport->build_file($user, GETPOST('model', 'alpha'), $datatoimport, $array_match_file_to_database);
|
||||
// if ($result < 0) {
|
||||
// setEventMessages($objimport->error, $objimport->errors, 'errors');
|
||||
// } else {
|
||||
// setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs');
|
||||
// }
|
||||
// }
|
||||
|
||||
if ($action == 'deleteprof') {
|
||||
if (GETPOST("id", 'int')) {
|
||||
|
||||
@ -689,3 +689,6 @@ ALTER TABLE llx_cronjob ADD UNIQUE INDEX uk_cronjob (label, entity);
|
||||
ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_loan_schedule ADD UNIQUE INDEX uk_loan_schedule_ref (fk_loan, datep);
|
||||
|
||||
-- We need when upgrade 15 to 16 with Dolibarr v17+ for upgrade2 function migrate_user_photospath2()
|
||||
ALTER TABLE llx_user CHANGE COLUMN note note_private text;
|
||||
|
||||
@ -175,5 +175,5 @@ create table llx_element_categorie
|
||||
|
||||
ALTER TABLE llx_element_categorie ADD UNIQUE INDEX idx_element_categorie_idx (fk_element, fk_categorie);
|
||||
|
||||
ALTER TABLE llx_element_categorie ADD CONSTRAINT fk_element_categorie_fk_categorie FOREIGN KEY (fk_categorie) REFERENCES llx_fk_categorie(rowid);
|
||||
ALTER TABLE llx_element_categorie ADD CONSTRAINT fk_element_categorie_fk_categorie FOREIGN KEY (fk_categorie) REFERENCES llx_categorie(rowid);
|
||||
|
||||
|
||||
@ -19,4 +19,4 @@
|
||||
|
||||
ALTER TABLE llx_element_categorie ADD UNIQUE INDEX idx_element_categorie_idx (fk_element, fk_categorie);
|
||||
|
||||
ALTER TABLE llx_element_categorie ADD CONSTRAINT fk_element_categorie_fk_categorie FOREIGN KEY (fk_categorie) REFERENCES llx_fk_categorie(rowid);
|
||||
ALTER TABLE llx_element_categorie ADD CONSTRAINT fk_element_categorie_fk_categorie FOREIGN KEY (fk_categorie) REFERENCES llx_categorie(rowid);
|
||||
|
||||
@ -75,8 +75,8 @@ create table llx_user
|
||||
idpers2 varchar(128),
|
||||
idpers3 varchar(128),
|
||||
|
||||
note_public text,
|
||||
note_private text DEFAULT NULL,
|
||||
note_public text,
|
||||
note_private text DEFAULT NULL,
|
||||
model_pdf varchar(255) DEFAULT NULL,
|
||||
datelastlogin datetime,
|
||||
datepreviouslogin datetime,
|
||||
|
||||
@ -82,7 +82,7 @@ ProductsToProduce=Produits à produire
|
||||
UnitCost=Coût unitaire
|
||||
TotalCost=Coût total
|
||||
BOMTotalCost=Le coût de production de cette nomenclature basé sur chaque quantité et produit à consommer (utilise le prix de revient si défini, sinon le PMP si défini, sinon le meilleur prix d'achat)
|
||||
BOMTotalCostService=Si le module "Poste de travail" est activé, alors le calcul est "quantité (convertie en heures) x thm du poste de travail", sinon "quantité (convertie en heures) x prix de revient du service"
|
||||
BOMTotalCostService=Si le module "Poste de travail" est activé et qu'un poste de travil est défini par défaut sur la ligne, alors le calcul est "quantité (convertie en heures) x thm du poste de travail", sinon "quantité (convertie en heures) x prix de revient du service"
|
||||
BOMProductsList=Liste des composants
|
||||
BOMServicesList=Liste des services
|
||||
GoOnTabProductionToProduceFirst=Vous devez avoir la production pour clôturer un Ordre de Fabrication (voir onglet '%s'). Mais vous pouvez l'annuler.
|
||||
|
||||
@ -121,10 +121,10 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
// Get source company
|
||||
$this->emetteur = $mysoc;
|
||||
|
||||
@ -30,6 +30,10 @@ function mymoduleAdminPrepareHead()
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
// global $db;
|
||||
// $extrafields = new ExtraFields($db);
|
||||
// $extrafields->fetch_name_optionals_label('myobject');
|
||||
|
||||
$langs->load("mymodule@mymodule");
|
||||
|
||||
$h = 0;
|
||||
@ -43,6 +47,10 @@ function mymoduleAdminPrepareHead()
|
||||
/*
|
||||
$head[$h][0] = dol_buildpath("/mymodule/admin/myobject_extrafields.php", 1);
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$nbExtrafields = is_countable($extrafields->attributes['myobject']['label']) ? count($extrafields->attributes['myobject']['label']) : 0;
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= ' <span class="badge">' . $nbExtrafields . '</span>';
|
||||
}
|
||||
$head[$h][2] = 'myobject_extrafields';
|
||||
$h++;
|
||||
*/
|
||||
|
||||
@ -1070,7 +1070,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print ' '.img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.((int) $line->id).', \''.dol_escape_js($type).'\', \'qtymissingconsume\')"');
|
||||
print '</td>';
|
||||
print '<td align="right" class="splitall">';
|
||||
if (($action == 'consumeorproduce' || $action == 'consumeandproduceall')) print img_picto($langs->trans('SplitAllQuantity'), 'split.png', 'class="splitbutton splitallbutton field-error-icon" data-max-qty="1" onClick="addDispatchLine('.$line->id.', \'batch\', \'allmissingconsume\')"');
|
||||
if (($action == 'consumeorproduce' || $action == 'consumeandproduceall') && $tmpproduct->status_batch == 2) print img_picto($langs->trans('SplitAllQuantity'), 'split.png', 'class="splitbutton splitallbutton field-error-icon" data-max-qty="1" onClick="addDispatchLine('.$line->id.', \'batch\', \'allmissingconsume\')"');
|
||||
print '</td>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@ -371,7 +371,9 @@ if (empty($reshook)) {
|
||||
foreach ($toselect as $toselectid) {
|
||||
$result = $product->fetch($toselectid);
|
||||
if ($result > 0 && $product->id > 0) {
|
||||
$product->setStatut($product->status ? 0 : 1, null, 'product', 'PRODUCT_MODIFY', 'tosell');
|
||||
if ($product->setStatut($product->status ? 0 : 1, null, 'product', 'PRODUCT_MODIFY', 'tosell') < 0) {
|
||||
setEventMessages($product->error, $product->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -380,7 +382,9 @@ if (empty($reshook)) {
|
||||
foreach ($toselect as $toselectid) {
|
||||
$result = $product->fetch($toselectid);
|
||||
if ($result > 0 && $product->id > 0) {
|
||||
$product->setStatut($product->status_buy ? 0 : 1, null, 'product', 'PRODUCT_MODIFY', 'tobuy');
|
||||
if ($product->setStatut($product->status_buy ? 0 : 1, null, 'product', 'PRODUCT_MODIFY', 'tobuy') < 0) {
|
||||
setEventMessages($product->error, $product->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -426,6 +426,7 @@ if ($action == "dosign" && empty($cancel)) {
|
||||
dataType: "text",
|
||||
data: {
|
||||
"action" : "importSignature",
|
||||
"token" : \''.newToken().'\',
|
||||
"signaturebase64" : signature,
|
||||
"ref" : \''.dol_escape_js($REF).'\',
|
||||
"securekey" : \''.dol_escape_js($SECUREKEY).'\',
|
||||
|
||||
@ -121,10 +121,10 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
||||
$this->page_largeur = $formatarray['width'];
|
||||
$this->page_hauteur = $formatarray['height'];
|
||||
$this->format = array($this->page_largeur, $this->page_hauteur);
|
||||
$this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
|
||||
$this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
|
||||
$this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
|
||||
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
|
||||
$this->marge_gauche = getDolGlobalInt('MAIN_PDF_MARGIN_LEFT', 10);
|
||||
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
|
||||
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
|
||||
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
|
||||
|
||||
$this->option_logo = 1; // Display logo
|
||||
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es.com>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2022 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
|
||||
@ -342,6 +342,7 @@ if (empty($reshook)) {
|
||||
if (!$error) {
|
||||
//We finally remove the old thirdparty
|
||||
if ($soc_origin->delete($soc_origin->id, $user) < 1) {
|
||||
setEventMessages($soc_origin->error, $soc_origin->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1724,9 +1724,10 @@ class Ticket extends CommonObject
|
||||
* @param array $filename_list List of files to attach (full path of filename on file system)
|
||||
* @param array $mimetype_list List of MIME type of attached files
|
||||
* @param array $mimefilename_list List of attached file name in message
|
||||
* @param boolean $send_email Whether the message is sent by email
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array())
|
||||
public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $send_email = false)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$error = 0;
|
||||
@ -1752,6 +1753,9 @@ class Ticket extends CommonObject
|
||||
if ($this->private) {
|
||||
$actioncomm->code = 'TICKET_MSG_PRIVATE';
|
||||
}
|
||||
if ($send_email) {
|
||||
$actioncomm->type_code = 'AC_EMAIL';
|
||||
}
|
||||
$actioncomm->socid = $this->socid;
|
||||
$actioncomm->label = $this->subject;
|
||||
$actioncomm->note_private = $this->message;
|
||||
@ -2536,7 +2540,7 @@ class Ticket extends CommonObject
|
||||
$listofnames = $resarray['listofnames'];
|
||||
$listofmimes = $resarray['listofmimes'];
|
||||
|
||||
$id = $object->createTicketMessage($user, 0, $listofpaths, $listofmimes, $listofnames);
|
||||
$id = $object->createTicketMessage($user, 0, $listofpaths, $listofmimes, $listofnames, $send_email);
|
||||
if ($id <= 0) {
|
||||
$error++;
|
||||
$this->error = $object->error;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user