mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Standardize code
This commit is contained in:
parent
e168240ab0
commit
82a8513aed
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/assets/admin/assets_extrafields.php
|
||||
* \ingroup assets
|
||||
* \file htdocs/asset/admin/asset_extrafields.php
|
||||
* \ingroup asset
|
||||
* \brief Page to setup extra fields of assets
|
||||
*/
|
||||
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/**
|
||||
/**
|
||||
* \file htdocs/assets/admin/assets_type_extrafields.php
|
||||
* \ingroup assets
|
||||
* \file htdocs/asset/admin/assets_type_extrafields.php
|
||||
* \ingroup asset
|
||||
* \brief Page to setup extra fields type of assets
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
|
@ -18,18 +18,18 @@
|
|||
|
||||
/**
|
||||
* \file card.php
|
||||
* \ingroup assets
|
||||
* \brief Page to create/edit/view assets
|
||||
* \ingroup asset
|
||||
* \brief Page to create/edit/view asset
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/assets/class/assets.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("assets"));
|
||||
$langs->loadLangs(array("asset"));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
|
|
@ -39,12 +39,12 @@ $cancel = GETPOST('cancel', 'aZ09');
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
// Initialize technical objects
|
||||
$object=new Assets($db);
|
||||
$object=new Asset($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction=$conf->assets->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('assetscard')); // Note that conf->hooks_modules contains array
|
||||
$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('assets');
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('asset');
|
||||
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
||||
|
||||
// Initialize array of search criterias
|
||||
|
|
@ -60,7 +60,7 @@ if (empty($action) && empty($id) && empty($ref)) $action='view';
|
|||
// Security check - Protection if external user
|
||||
//if ($user->societe_id > 0) access_forbidden();
|
||||
//if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
//$result = restrictedArea($user, 'assets', $id);
|
||||
//$result = restrictedArea($user, 'asset', $id);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
|
@ -84,9 +84,9 @@ if (empty($reshook))
|
|||
{
|
||||
$error=0;
|
||||
|
||||
$permissiontoadd = $user->rights->assets->create;
|
||||
$permissiontodelete = $user->rights->assets->delete;
|
||||
$backurlforlist = dol_buildpath('/assets/list.php',1);
|
||||
$permissiontoadd = $user->rights->asset->create;
|
||||
$permissiontodelete = $user->rights->asset->delete;
|
||||
$backurlforlist = dol_buildpath('/asset/list.php',1);
|
||||
|
||||
// Actions cancel, add, update or delete
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
||||
|
|
@ -97,7 +97,7 @@ if (empty($reshook))
|
|||
// Actions to send emails
|
||||
$trigger_name='MYOBJECT_SENTBYMAIL';
|
||||
$autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO';
|
||||
$trackid='assets'.$object->id;
|
||||
$trackid='asset'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||
}
|
||||
|
||||
|
|
@ -241,13 +241,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="' .dol_buildpath('/assets/list.php',1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' .dol_buildpath('/asset/list.php',1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
/*
|
||||
// Ref bis
|
||||
$morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->assets->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->assets->creer, 'string', '', null, null, '', 1);
|
||||
$morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->asset->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->asset->creer, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||
*/
|
||||
|
|
@ -289,7 +289,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
// Send
|
||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
|
||||
|
||||
if ($user->rights->assets->write)
|
||||
if ($user->rights->asset->write)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
|
||||
}
|
||||
|
|
@ -298,7 +298,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n";
|
||||
}
|
||||
|
||||
if ($user->rights->assets->delete)
|
||||
if ($user->rights->asset->delete)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>'."\n";
|
||||
}
|
||||
|
|
@ -324,15 +324,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
// Documents
|
||||
/*$objref = dol_sanitizeFileName($object->ref);
|
||||
$relativepath = $comref . '/' . $comref . '.pdf';
|
||||
$filedir = $conf->assets->dir_output . '/' . $objref;
|
||||
$filedir = $conf->asset->dir_output . '/' . $objref;
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->assets->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->assets->create; // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('assets', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
$genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->asset->create; // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
*/
|
||||
|
||||
// Show links to link elements
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('assets'));
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('asset'));
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
|
||||
|
|
@ -340,14 +340,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
|
||||
$MAXEVENT = 10;
|
||||
|
||||
$morehtmlright = '<a href="'.dol_buildpath('/assets/assets_info.php', 1).'?id='.$object->id.'">';
|
||||
$morehtmlright = '<a href="'.dol_buildpath('/asset/asset_info.php', 1).'?id='.$object->id.'">';
|
||||
$morehtmlright.= $langs->trans("SeeAll");
|
||||
$morehtmlright.= '</a>';
|
||||
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, 'assets', $socid, 1, '', $MAXEVENT, '', $morehtmlright);
|
||||
$somethingshown = $formactions->showactions($object, 'asset', $socid, 1, '', $MAXEVENT, '', $morehtmlright);
|
||||
|
||||
print '</div></div></div>';
|
||||
}
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file assets/class/assets.class.php
|
||||
* \ingroup assets
|
||||
* \brief This file is a CRUD class file for assets (Create/Read/Update/Delete)
|
||||
* \file asset/class/asset.class.php
|
||||
* \ingroup asset
|
||||
* \brief This file is a CRUD class file for asset (Create/Read/Update/Delete)
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
||||
|
|
@ -27,30 +27,30 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
|||
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
/**
|
||||
* Class for Assets
|
||||
* Class for Asset
|
||||
*/
|
||||
class Assets extends CommonObject
|
||||
class Asset extends CommonObject
|
||||
{
|
||||
/**
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
public $element = 'assets';
|
||||
public $element = 'asset';
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'assets';
|
||||
public $table_element = 'asset';
|
||||
/**
|
||||
* @var int Does assets support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
* @var int Does module support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
/**
|
||||
* @var int Does assets support extrafields ? 0=No, 1=Yes
|
||||
* @var int Does asset support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 1;
|
||||
/**
|
||||
* @var string String with name of icon for assets. Must be the part after the 'object_' into object_assets.png
|
||||
* @var string String with name of icon for asset. Must be the part after the 'object_' into object_asset.png
|
||||
*/
|
||||
public $picto = 'assets';
|
||||
public $picto = 'asset';
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -111,21 +111,21 @@ class Assets extends CommonObject
|
|||
/**
|
||||
* @var int Name of subtable line
|
||||
*/
|
||||
//public $table_element_line = 'assetsdet';
|
||||
//public $table_element_line = 'assetdet';
|
||||
/**
|
||||
* @var int Field with ID of parent key if this field has a parent
|
||||
*/
|
||||
//public $fk_element = 'fk_assets';
|
||||
//public $fk_element = 'fk_asset';
|
||||
/**
|
||||
* @var int Name of subtable class that manage subtable lines
|
||||
*/
|
||||
//public $class_element_line = 'Assetsline';
|
||||
//public $class_element_line = 'Assetline';
|
||||
/**
|
||||
* @var array Array of child tables (child tables to delete before deleting a record)
|
||||
*/
|
||||
//protected $childtables=array('assetsdet');
|
||||
//protected $childtables=array('assetdet');
|
||||
/**
|
||||
* @var AssetsLine[] Array of subtable lines
|
||||
* @var AssetLine[] Array of subtable lines
|
||||
*/
|
||||
//public $lines = array();
|
||||
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/assets/class/asset_type.class.php
|
||||
* \ingroup assets
|
||||
* \file htdocs/asset/class/asset_type.class.php
|
||||
* \ingroup asset
|
||||
* \brief File of class to manage asset types
|
||||
*/
|
||||
|
||||
|
|
@ -375,7 +375,7 @@ class AssetType extends CommonObject
|
|||
$result='';
|
||||
$label=$langs->trans("ShowTypeCard",$this->label);
|
||||
|
||||
$linkstart = '<a href="'.DOL_URL_ROOT.'/assets/type.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkstart = '<a href="'.DOL_URL_ROOT.'/asset/type.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
$result .= $linkstart;
|
||||
|
|
@ -18,13 +18,13 @@
|
|||
|
||||
/**
|
||||
* \file document.php
|
||||
* \ingroup assets
|
||||
* \ingroup asset
|
||||
* \brief Tab for documents linked to Assets
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/assets/class/assets.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
|
|
@ -42,7 +42,7 @@ $ref = GETPOST('ref', 'alpha');
|
|||
// Security check - Protection if external user
|
||||
//if ($user->societe_id > 0) access_forbidden();
|
||||
//if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
//$result = restrictedArea($user, 'assets', $id);
|
||||
//$result = restrictedArea($user, 'asset', $id);
|
||||
|
||||
// Get parameters
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
|
|
@ -56,12 +56,12 @@ if (! $sortorder) $sortorder="ASC";
|
|||
if (! $sortfield) $sortfield="name";
|
||||
|
||||
// Initialize technical objects
|
||||
$object=new Assets($db);
|
||||
$object=new Asset($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction=$conf->assets->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('assetsdocument')); // Note that conf->hooks_modules contains array
|
||||
$hookmanager->initHooks(array('assetdocument')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('assets');
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('asset');
|
||||
|
||||
// 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
|
||||
|
|
@ -110,7 +110,7 @@ if ($object->id)
|
|||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="' .dol_buildpath('/assets/list.php',1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' .dol_buildpath('/asset/list.php',1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
|
|
@ -131,15 +131,15 @@ if ($object->id)
|
|||
|
||||
dol_fiche_end();
|
||||
|
||||
$modulepart = 'assets';
|
||||
//$permission = $user->rights->assets->create;
|
||||
$modulepart = 'asset';
|
||||
//$permission = $user->rights->asset->create;
|
||||
$permission = 1;
|
||||
//$permtoedit = $user->rights->assets->create;
|
||||
//$permtoedit = $user->rights->asset->create;
|
||||
$permtoedit = 1;
|
||||
$param = '&id=' . $object->id;
|
||||
|
||||
//$relativepathwithnofile='assets/' . dol_sanitizeFileName($object->id).'/';
|
||||
$relativepathwithnofile='assets/' . dol_sanitizeFileName($object->ref).'/';
|
||||
//$relativepathwithnofile='asset/' . dol_sanitizeFileName($object->id).'/';
|
||||
$relativepathwithnofile='asset/' . dol_sanitizeFileName($object->ref).'/';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||
}
|
||||
|
|
@ -17,16 +17,16 @@
|
|||
|
||||
/**
|
||||
* \file info.php
|
||||
* \ingroup assets
|
||||
* \ingroup asset
|
||||
* \brief Page to show an asset information
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/assets/class/assets.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
|
||||
|
||||
$langs->loadLangs(array("assets"));
|
||||
$langs->loadLangs(array("asset"));
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$ref=GETPOST('ref','alpha');
|
||||
|
|
@ -34,9 +34,9 @@ $action=GETPOST('action','alpha');
|
|||
|
||||
// Security check
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'assets', $id, '');
|
||||
$result = restrictedArea($user, 'asset', $id, '');
|
||||
|
||||
$object = new Assets($db);
|
||||
$object = new Asset($db);
|
||||
$object->fetch($id);
|
||||
|
||||
/*
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
/**
|
||||
* \file list.php
|
||||
* \ingroup assets
|
||||
* \brief List page for assets
|
||||
* \ingroup asset
|
||||
* \brief List page for asset
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
|
@ -28,7 +28,7 @@ require '../main.inc.php';
|
|||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/assets/class/assets.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("assets"));
|
||||
|
|
@ -56,12 +56,12 @@ $pageprev = $page - 1;
|
|||
$pagenext = $page + 1;
|
||||
|
||||
// Initialize technical objects
|
||||
$object=new Assets($db);
|
||||
$object=new Asset($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction=$conf->assets->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('assetslist')); // Note that conf->hooks_modules contains array
|
||||
$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('assetlist')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('assets');
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('asset');
|
||||
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
||||
|
||||
// Default sort order (if not yet defined by previous GETPOST)
|
||||
|
|
@ -75,7 +75,7 @@ if ($user->societe_id > 0)
|
|||
//$socid = $user->societe_id;
|
||||
accessforbidden();
|
||||
}
|
||||
//$result = restrictedArea($user, 'assets', $id,'');
|
||||
//$result = restrictedArea($user, 'asset', $id,'');
|
||||
|
||||
// Initialize array of search criterias
|
||||
$search_all=trim(GETPOST("search_all",'alpha'));
|
||||
|
|
@ -147,11 +147,11 @@ if (empty($reshook))
|
|||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass='Assets';
|
||||
$objectlabel='Assets';
|
||||
$permtoread = $user->rights->assets->read;
|
||||
$permtodelete = $user->rights->assets->delete;
|
||||
$uploaddir = $conf->assets->dir_output;
|
||||
$objectclass='Asset';
|
||||
$objectlabel='Asset';
|
||||
$permtoread = $user->rights->asset->read;
|
||||
$permtodelete = $user->rights->asset->delete;
|
||||
$uploaddir = $conf->asset->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ $form=new Form($db);
|
|||
|
||||
$now=dol_now();
|
||||
|
||||
//$help_url="EN:Module_Assets|FR:Module_Assets_FR|ES:Módulo_Assets";
|
||||
//$help_url="EN:Module_Asset|FR:Module_Asset_FR|ES:Módulo_Asset";
|
||||
$help_url='';
|
||||
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Assets"));
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ $arrayofmassactions = array(
|
|||
//'presend'=>$langs->trans("SendByMail"),
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->assets->delete) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
if ($user->rights->asset->delete) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
|
|
@ -309,8 +309,8 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sort
|
|||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail="SendAssetsRef";
|
||||
$modelmail="assets";
|
||||
$objecttmp=new Assets($db);
|
||||
$modelmail="asset";
|
||||
$objecttmp=new Asset($db);
|
||||
$trackid='xxxx'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
|
|
@ -515,10 +515,10 @@ if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nb
|
|||
$urlsource.=str_replace('&','&',$param);
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->assets->read;
|
||||
$delallowed=$user->rights->assets->create;
|
||||
$genallowed=$user->rights->asset->read;
|
||||
$delallowed=$user->rights->asset->create;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_assets','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
print $formfile->showdocuments('massfilesarea_asset','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -18,16 +18,16 @@
|
|||
|
||||
/**
|
||||
* \file note.php
|
||||
* \ingroup assets
|
||||
* \brief Card with notes on Assets
|
||||
* \ingroup asset
|
||||
* \brief Card with notes on Asset
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/assets/class/assets.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("assets","companies"));
|
||||
$langs->loadLangs(array("asset","companies"));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
|
|
@ -37,24 +37,24 @@ $cancel = GETPOST('cancel', 'aZ09');
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
// Initialize technical objects
|
||||
$object=new Assets($db);
|
||||
$object=new Asset($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction=$conf->assets->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('assetsnote')); // Note that conf->hooks_modules contains array
|
||||
$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('assetnote')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('assets');
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('asset');
|
||||
|
||||
// Security check - Protection if external user
|
||||
//if ($user->societe_id > 0) access_forbidden();
|
||||
//if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
//$result = restrictedArea($user, 'assets', $id);
|
||||
//$result = restrictedArea($user, 'asset', $id);
|
||||
|
||||
// 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
|
||||
if ($id > 0 || ! empty($ref)) $upload_dir = $conf->assets->multidir_output[$object->entity] . "/" . $object->id;
|
||||
if ($id > 0 || ! empty($ref)) $upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id;
|
||||
|
||||
$permissionnote=1;
|
||||
//$permissionnote=$user->rights->assets->creer; // Used by the include of actions_setnotes.inc.php
|
||||
//$permissionnote=$user->rights->asset->creer; // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref))
|
|||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="' .dol_buildpath('/assets/list.php',1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
$linkback = '<a href="' .dol_buildpath('/asset/list.php',1) . '?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
/*
|
||||
|
|
@ -98,7 +98,7 @@ if ($id > 0 || ! empty($ref))
|
|||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
if ($user->rights->assets->creer)
|
||||
if ($user->rights->asset->creer)
|
||||
{
|
||||
if ($action != 'classify')
|
||||
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||
|
|
@ -16,15 +16,15 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/assets/type.php
|
||||
* \ingroup assets
|
||||
* \file htdocs/asset/type.php
|
||||
* \ingroup asset
|
||||
* \brief Asset's type setup
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/assets/class/asset.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/assets/class/asset_type.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset_type.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
$langs->load("assets");
|
||||
|
|
@ -51,7 +51,7 @@ $label=GETPOST("label","alpha");
|
|||
$comment=GETPOST("comment");
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'assets',$rowid,'asset_type');
|
||||
$result=restrictedArea($user,'asset',$rowid,'asset_type');
|
||||
|
||||
$object = new AssetType($db);
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ if ($cancel) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'add' && $user->rights->assets->write)
|
||||
if ($action == 'add' && $user->rights->asset->write)
|
||||
{
|
||||
$object->label = trim($label);
|
||||
$object->accountancy_code_asset = trim($accountancy_code_asset);
|
||||
|
|
@ -135,7 +135,7 @@ if ($action == 'add' && $user->rights->assets->write)
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'update' && $user->rights->assets->write)
|
||||
if ($action == 'update' && $user->rights->asset->write)
|
||||
{
|
||||
$object->fetch($rowid);
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ if ($action == 'update' && $user->rights->assets->write)
|
|||
exit;
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete' && $user->rights->assets->write)
|
||||
if ($action == 'confirm_delete' && $user->rights->asset->write)
|
||||
{
|
||||
$object->fetch($rowid);
|
||||
$res=$object->delete();
|
||||
|
|
@ -255,7 +255,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||
print '<td>'.dol_escape_htmltag($objp->label).'</td>';
|
||||
print '<td align="center">'.yn($objp->subscription).'</td>';
|
||||
print '<td align="center">'.yn($objp->vote).'</td>';
|
||||
if ($user->rights->adherent->configurer)
|
||||
if ($user->rights->asset->configurer)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
||||
else
|
||||
print '<td align="right"> </td>';
|
||||
|
|
@ -281,7 +281,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||
/* ************************************************************************** */
|
||||
if ($action == 'create')
|
||||
{
|
||||
$object = new AdherentType($db);
|
||||
$object = new AssetType($db);
|
||||
|
||||
print load_fiche_titre($langs->trans("NewMemberType"));
|
||||
|
||||
|
|
@ -344,7 +344,7 @@ if ($rowid > 0)
|
|||
{
|
||||
if ($action != 'edit')
|
||||
{
|
||||
$object = new AdherentType($db);
|
||||
$object = new AssetType($db);
|
||||
$object->fetch($rowid);
|
||||
$object->fetch_optionals();
|
||||
|
||||
|
|
@ -360,7 +360,7 @@ if ($rowid > 0)
|
|||
|
||||
dol_fiche_head($head, 'card', $langs->trans("MemberType"), -1, 'group');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/asset/type.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'rowid', $linkback);
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ if ($rowid > 0)
|
|||
print '<div class="tabsAction">';
|
||||
|
||||
// Edit
|
||||
if ($user->rights->adherent->configurer)
|
||||
if ($user->rights->asset->configurer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&rowid='.$object->id.'">'.$langs->trans("Modify").'</a></div>';
|
||||
}
|
||||
|
|
@ -407,7 +407,7 @@ if ($rowid > 0)
|
|||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>';
|
||||
|
||||
// Delete
|
||||
if ($user->rights->adherent->configurer)
|
||||
if ($user->rights->asset->configurer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&rowid='.$object->id.'">'.$langs->trans("DeleteType").'</a></div>';
|
||||
}
|
||||
|
|
@ -575,7 +575,7 @@ if ($rowid > 0)
|
|||
|
||||
$datefin=$db->jdate($objp->datefin);
|
||||
|
||||
$adh=new Adherent($db);
|
||||
$adh=new Asset($db);
|
||||
$adh->lastname=$objp->lastname;
|
||||
$adh->firstname=$objp->firstname;
|
||||
|
||||
|
|
@ -643,12 +643,12 @@ if ($rowid > 0)
|
|||
|
||||
// Actions
|
||||
print '<td align="center">';
|
||||
if ($user->rights->adherent->creer)
|
||||
if ($user->rights->asset->creer)
|
||||
{
|
||||
print '<a href="card.php?rowid='.$objp->rowid.'&action=edit&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||
}
|
||||
print ' ';
|
||||
if ($user->rights->adherent->supprimer)
|
||||
if ($user->rights->asset->supprimer)
|
||||
{
|
||||
print '<a href="card.php?rowid='.$objp->rowid.'&action=resign">'.img_picto($langs->trans("Resiliate"),'disable.png').'</a>';
|
||||
}
|
||||
|
|
@ -682,7 +682,7 @@ if ($rowid > 0)
|
|||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$object = new AdherentType($db);
|
||||
$object = new AssetType($db);
|
||||
$object->fetch($rowid);
|
||||
$object->fetch_optionals();
|
||||
|
||||
|
|
@ -487,25 +487,25 @@ if ($resql)
|
|||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.$search_ref.'">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.ref_client']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['pr.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refproject" value="'.$search_refproject.'">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refproject" value="'.dol_escape_htmltag($search_refproject).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="10" name="search_societe" value="'.$search_societe.'">';
|
||||
print '<input class="flat" type="text" size="10" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>';
|
||||
|
|
@ -529,15 +529,16 @@ if ($resql)
|
|||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
print ajax_combobox('search_type_thirdparty');
|
||||
print '</td>';
|
||||
}
|
||||
// Date
|
||||
if (! empty($arrayfields['p.date']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
//print $langs->trans('Month').': ';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25" type="text" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_month" value="'.dol_escape_htmltag($search_month).'">';
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$formother->select_year($search_year,'search_year',1, 20, 5);
|
||||
print '</td>';
|
||||
|
|
@ -551,28 +552,28 @@ if ($resql)
|
|||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.$search_montant_ht.'">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.total_vat']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.$search_montant_vat.'">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.total_ttc']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.$search_montant_ttc.'">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.login']['checked']))
|
||||
{
|
||||
// Author
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<input class="flat" size="4" type="text" name="search_login" value="'.$search_login.'">';
|
||||
print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
|
|
|
|||
|
|
@ -612,17 +612,17 @@ if ($resql)
|
|||
// Date order
|
||||
if (! empty($arrayfields['c.date_commande']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
|
||||
$formother->select_year($search_orderyear?$search_orderyear:-1,'search_orderyear',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['c.date_delivery']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
|
||||
$formother->select_year($search_deliveryyear?$search_deliveryyear:-1,'search_deliveryyear',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,21 +235,21 @@ if ($resql)
|
|||
// Lines for filters fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="4" name="search_ref" value="'.$search_ref.'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">';
|
||||
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="6" name="search_company" value="'.$search_company.'">';
|
||||
print '<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
$form->select_types_paiements($search_paymenttype,'search_paymenttype','',2,1,1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="4" name="search_payment_num" value="'.$search_payment_num.'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_payment_num" value="'.dol_escape_htmltag($search_payment_num).'">';
|
||||
print '</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
|
|
@ -258,7 +258,7 @@ if ($resql)
|
|||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="4" name="search_amount" value="'.$search_amount.'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ if ($result)
|
|||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" colspan="1" align="center">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">';
|
||||
$syear = $year;
|
||||
$formother->select_year($syear?$syear:-1,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -519,11 +519,11 @@ if (! empty($arrayfields['c.date_contrat']['checked']))
|
|||
// Date contract
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
//print $langs->trans('Month').': ';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.$month.'">';
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$syear = $year;
|
||||
print $formother->selectyear($syear,'year',1, 20, 5, 0, 0, '', 'widthauto');
|
||||
print $formother->selectyear($syear,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ class FormOther
|
|||
* @param string $morecss More CSS
|
||||
* @return string
|
||||
*/
|
||||
function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='')
|
||||
function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto')
|
||||
{
|
||||
print $this->selectyear($selected,$htmlname,$useempty,$min_year,$max_year,$offset,$invert,$option,$morecss);
|
||||
}
|
||||
|
|
@ -886,7 +886,7 @@ class FormOther
|
|||
* @param string $morecss More css
|
||||
* @return string
|
||||
*/
|
||||
function selectyear($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='')
|
||||
function selectyear($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto')
|
||||
{
|
||||
$out='';
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
/**
|
||||
* \file core/lib/assets.lib.php
|
||||
* \ingroup assets
|
||||
* \ingroup asset
|
||||
* \brief Library files with common functions for Assets
|
||||
*/
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ function AssetsAdminPrepareHead()
|
|||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/assets/admin/setup.php';
|
||||
$head[$h][0] = DOL_URL_ROOT . '/asset/admin/setup.php';
|
||||
$head[$h][1] = $langs->trans("Settings");
|
||||
$head[$h][2] = 'settings';
|
||||
$h++;
|
||||
|
|
@ -43,19 +43,19 @@ function AssetsAdminPrepareHead()
|
|||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
//$this->tabs = array(
|
||||
// 'entity:+tabname:Title:@assets:/assets/mypage.php?id=__ID__'
|
||||
// 'entity:+tabname:Title:@assets:/asset/mypage.php?id=__ID__'
|
||||
//); // to add new tab
|
||||
//$this->tabs = array(
|
||||
// 'entity:-tabname:Title:@assets:/assets/mypage.php?id=__ID__'
|
||||
// 'entity:-tabname:Title:@assets:/asset/mypage.php?id=__ID__'
|
||||
//); // to remove a tab
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets_admin');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/assets/admin/assets_extrafields.php';
|
||||
$head[$h][0] = DOL_URL_ROOT . '/asset/admin/assets_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/assets/admin/assets_type_extrafields.php';
|
||||
$head[$h][0] = DOL_URL_ROOT . '/asset/admin/assets_type_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsAssetsType");
|
||||
$head[$h][2] = 'attributes_type';
|
||||
$h++;
|
||||
|
|
@ -74,7 +74,7 @@ function AssetsPrepareHead()
|
|||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/assets/card.php';
|
||||
$head[$h][0] = DOL_URL_ROOT . '/asset/card.php';
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
|
@ -94,7 +94,7 @@ function AssetsPrepareHead()
|
|||
$upload_dir = $conf->assets->dir_output . '/' . get_exdir($filename,2,0,1,$object,'assets'). '/'. dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$'));
|
||||
$nbLinks=Link::count($db, $object->element, $object->id);
|
||||
$head[$h][0] = DOL_URL_ROOT.'/assets/document.php?id='.$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Documents');
|
||||
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>';
|
||||
$head[$h][2] = 'documents';
|
||||
|
|
@ -103,18 +103,18 @@ function AssetsPrepareHead()
|
|||
$nbNote = 0;
|
||||
if(!empty($object->note_private)) $nbNote++;
|
||||
if(!empty($object->note_public)) $nbNote++;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/assets/note.php?id='.$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Notes");
|
||||
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||
$head[$h][2] = 'note';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/assets/info.php?id=' . $object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT . '/asset/info.php?id=' . $object->id;
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets', 'remove');
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'asset', 'remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
|
@ -188,10 +188,10 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
|||
$menuqualified=0;
|
||||
if (! empty($conf->comptabilite->enabled)) $menuqualified++;
|
||||
if (! empty($conf->accounting->enabled)) $menuqualified++;
|
||||
if (! empty($conf->assets->enabled)) $menuqualified++;
|
||||
if (! empty($conf->asset->enabled)) $menuqualified++;
|
||||
$tmpentry=array(
|
||||
'enabled'=>$menuqualified,
|
||||
'perms'=>(! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->mouvements->lire) || ! empty($user->rights->assets->read)),
|
||||
'perms'=>(! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->mouvements->lire) || ! empty($user->rights->asset->read)),
|
||||
'module'=>'comptabilite|accounting');
|
||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||
if ($showmode)
|
||||
|
|
@ -1138,15 +1138,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
}
|
||||
|
||||
// Assets
|
||||
if (! empty($conf->assets->enabled))
|
||||
if (! empty($conf->asset->enabled))
|
||||
{
|
||||
$langs->load("assets");
|
||||
$newmenu->add("/assets/list.php?leftmenu=assets&mainmenu=accountancy",$langs->trans("MenuAssets"), 0, $user->rights->assets->read, '', $mainmenu, 'assets');
|
||||
$newmenu->add("/assets/card.php?leftmenu=assets&action=create",$langs->trans("MenuNewAsset"), 1, $user->rights->assets->write);
|
||||
$newmenu->add("/assets/type.php?leftmenu=assets",$langs->trans("MenuTypeAssets"), 1, $user->rights->assets->read, '', $mainmenu, 'assets_type');
|
||||
$newmenu->add("/assets/type.php?leftmenu=assets_type&action=create",$langs->trans("MenuNewTypeAssets"), 1, $user->rights->assets->write);
|
||||
$newmenu->add("/assets/type.php?leftmenu=assets_type",$langs->trans("MenuListTypeAssets"), 1, $user->rights->assets->read);
|
||||
$newmenu->add("/assets/list.php?leftmenu=assets",$langs->trans("MenuListAssets"), 1, $user->rights->assets->read);
|
||||
$newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy",$langs->trans("MenuAssets"), 0, $user->rights->asset->read, '', $mainmenu, 'asset');
|
||||
$newmenu->add("/asset/card.php?leftmenu=asset&action=create",$langs->trans("MenuNewAsset"), 1, $user->rights->asset->write);
|
||||
$newmenu->add("/asset/type.php?leftmenu=asset",$langs->trans("MenuTypeAssets"), 1, $user->rights->asset->read, '', $mainmenu, 'asset_type');
|
||||
$newmenu->add("/asset/type.php?leftmenu=asset_type&action=create",$langs->trans("MenuNewTypeAssets"), 1, $user->rights->asset->write);
|
||||
$newmenu->add("/asset/type.php?leftmenu=asset_type",$langs->trans("MenuListTypeAssets"), 1, $user->rights->asset->read);
|
||||
$newmenu->add("/asset/list.php?leftmenu=asset",$langs->trans("MenuListAssets"), 1, $user->rights->asset->read);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \defgroup assets Module Assets
|
||||
* \brief Assets module descriptor.
|
||||
* \defgroup asset Module Assets
|
||||
* \brief Asset module descriptor.
|
||||
*
|
||||
* \file htdocs/core/modules/modAssets.class.php
|
||||
* \ingroup assets
|
||||
* \file htdocs/core/modules/modAsset.class.php
|
||||
* \ingroup asset
|
||||
* \brief Description and activation file for module Assets
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
|
@ -33,7 +33,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
|||
/**
|
||||
* Description and activation class for module FixedAssets
|
||||
*/
|
||||
class modAssets extends DolibarrModules
|
||||
class modAsset extends DolibarrModules
|
||||
{
|
||||
// @codingStandardsIgnoreEnd
|
||||
/**
|
||||
|
|
@ -51,7 +51,7 @@ class modAssets extends DolibarrModules
|
|||
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
|
||||
$this->numero = 51000; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module
|
||||
// Key text used to identify module (for permissions, menus, etc...)
|
||||
$this->rights_class = 'assets';
|
||||
$this->rights_class = 'asset';
|
||||
|
||||
// Family can be 'crm','financial','hr','projects','products','ecm','technic','interface','other'
|
||||
// It is used to group modules by family in module setup page
|
||||
|
|
@ -78,17 +78,17 @@ class modAssets extends DolibarrModules
|
|||
$this->picto='generic';
|
||||
|
||||
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
||||
// for default path (eg: /assets/core/xxxxx) (0=disable, 1=enable)
|
||||
// for specific path of parts (eg: /assets/core/modules/barcode)
|
||||
// for specific css file (eg: /assets/css/assets.css.php)
|
||||
// for default path (eg: /asset/core/xxxxx) (0=disable, 1=enable)
|
||||
// for specific path of parts (eg: /asset/core/modules/barcode)
|
||||
// for specific css file (eg: /asset/css/assets.css.php)
|
||||
$this->module_parts = array();
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
// Example: this->dirs = array("/assets/temp","/assets/subdir");
|
||||
// Example: this->dirs = array("/asset/temp","/asset/subdir");
|
||||
$this->dirs = array();
|
||||
|
||||
// Config pages. Put here list of php page, stored into assets/admin directory, to use to setup module.
|
||||
$this->config_page_url = array("setup.php@assets");
|
||||
$this->config_page_url = array("setup.php@asset");
|
||||
|
||||
// Dependencies
|
||||
$this->hidden = false; // A condition to hide module
|
||||
|
|
@ -109,14 +109,14 @@ class modAssets extends DolibarrModules
|
|||
// 1=>array('ASSETS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||
// );
|
||||
$this->const = array(
|
||||
1=>array('ASSETS_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1)
|
||||
1=>array('ASSET_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1)
|
||||
);
|
||||
|
||||
|
||||
if (! isset($conf->assets) || ! isset($conf->assets->enabled))
|
||||
if (! isset($conf->asset) || ! isset($conf->asset->enabled))
|
||||
{
|
||||
$conf->assets=new stdClass();
|
||||
$conf->assets->enabled=0;
|
||||
$conf->asset=new stdClass();
|
||||
$conf->asset->enabled=0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -170,16 +170,16 @@ class modAssets extends DolibarrModules
|
|||
// Boxes/Widgets
|
||||
// Add here list of php file(s) stored in assets/core/boxes that contains class to show a widget.
|
||||
$this->boxes = array(
|
||||
//0=>array('file'=>'assetswidget1.php@assets','note'=>'Widget provided by Assets','enabledbydefaulton'=>'Home'),
|
||||
//1=>array('file'=>'assetswidget2.php@assets','note'=>'Widget provided by Assets'),
|
||||
//2=>array('file'=>'assetswidget3.php@assets','note'=>'Widget provided by Assets')
|
||||
//0=>array('file'=>'assetswidget1.php@asset','note'=>'Widget provided by Assets','enabledbydefaulton'=>'Home'),
|
||||
//1=>array('file'=>'assetswidget2.php@asset','note'=>'Widget provided by Assets'),
|
||||
//2=>array('file'=>'assetswidget3.php@asset','note'=>'Widget provided by Assets')
|
||||
);
|
||||
|
||||
|
||||
// Cronjobs (List of cron jobs entries to add when module is enabled)
|
||||
// unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week
|
||||
$this->cronjobs = array(
|
||||
0=>array('label'=>'MyJob label', 'jobtype'=>'method', 'class'=>'/assets/class/assets.class.php', 'objectname'=>'Assets', 'method'=>'doScheduledJob', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>true)
|
||||
0=>array('label'=>'MyJob label', 'jobtype'=>'method', 'class'=>'/asset/class/asset.class.php', 'objectname'=>'Asset', 'method'=>'doScheduledJob', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>true)
|
||||
);
|
||||
// Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>true),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>true)
|
||||
|
|
@ -193,22 +193,22 @@ class modAssets extends DolibarrModules
|
|||
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Read assets'; // Permission label
|
||||
$this->rights[$r][3] = 1; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->assets->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->assets->level1->level2)
|
||||
$this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Create/Update assets'; // Permission label
|
||||
$this->rights[$r][3] = 1; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->assets->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->assets->level1->level2)
|
||||
$this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Delete assets'; // Permission label
|
||||
$this->rights[$r][3] = 1; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->assets->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->assets->level1->level2)
|
||||
$this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
|
||||
|
||||
// Main menu entries
|
||||
|
|
@ -24,10 +24,9 @@
|
|||
/**
|
||||
* \file htdocs/fourn/commande/list.php
|
||||
* \ingroup fournisseur
|
||||
* \brief List of suppliers orders
|
||||
* \brief List of vendor orders
|
||||
*/
|
||||
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
|
|
@ -40,13 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load("orders");
|
||||
$langs->load("sendings");
|
||||
$langs->load('deliveries');
|
||||
$langs->load('companies');
|
||||
$langs->load('compta');
|
||||
$langs->load('bills');
|
||||
$langs->load('projects');
|
||||
$langs->loadLangs(array("orders","sendings",'deliveries','companies','compta','bills','projects','suppliers'));
|
||||
|
||||
$action=GETPOST('action','aZ09');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
|
|
@ -825,19 +818,19 @@ if ($resql)
|
|||
// Date order
|
||||
if (! empty($arrayfields['cf.date_commande']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
|
||||
$formother->select_year($search_orderyear?$search_orderyear:-1,'search_orderyear',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
// Date delivery
|
||||
if (! empty($arrayfields['cf.date_delivery']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
|
||||
$formother->select_year($search_deliveryyear?$search_deliveryyear:-1,'search_deliveryyear',1, 20, 5);
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
|
||||
$formother->select_year($search_deliveryyear?$search_deliveryyear:-1, 'search_deliveryyear', 1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['cf.total_ht']['checked']))
|
||||
|
|
|
|||
|
|
@ -643,18 +643,18 @@ if ($resql)
|
|||
// Date invoice
|
||||
if (! empty($arrayfields['f.datef']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
// Date due
|
||||
if (! empty($arrayfields['f.date_lim_reglement']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day_lim" value="'.dol_escape_htmltag($day_lim).'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month_lim" value="'.$month_lim.'">';
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day_lim" value="'.dol_escape_htmltag($day_lim).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month_lim" value="'.$month_lim.'">';
|
||||
$formother->select_year($year_lim?$year_lim:-1,'year_lim',1, 20, 5);
|
||||
print '<br><input type="checkbox" name="option" value="late"'.($option == 'late'?' checked':'').'> '.$langs->trans("Late");
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -851,8 +851,8 @@ if (empty($action))
|
|||
print '<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">';
|
||||
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
|
|
|
|||
|
|
@ -437,3 +437,5 @@ ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_account_pare
|
|||
|
||||
ALTER TABLE llx_extrafields MODIFY COLUMN list VARCHAR(128);
|
||||
|
||||
UPDATE llx_rights_def set module = 'asset' where module = 'assets';
|
||||
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ SearchIntoTasks=Tasks
|
|||
SearchIntoCustomerInvoices=Customer invoices
|
||||
SearchIntoSupplierInvoices=Vendor invoices
|
||||
SearchIntoCustomerOrders=Customer orders
|
||||
SearchIntoSupplierOrders=Vendor orders
|
||||
SearchIntoSupplierOrders=Purchase orders
|
||||
SearchIntoCustomerProposals=Customer proposals
|
||||
SearchIntoSupplierProposals=Vendor proposals
|
||||
SearchIntoInterventions=Interventions
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ FirstApprovalAlreadyDone=First approval already done
|
|||
SecondApprovalAlreadyDone=Second approval already done
|
||||
SupplierOrderReceivedInDolibarr=Purchase Order %s received %s
|
||||
SupplierOrderSubmitedInDolibarr=Purchase Order %s submited
|
||||
SupplierOrderClassifiedBilled=Vendor order %s set billed
|
||||
SupplierOrderClassifiedBilled=Purchase Order %s set billed
|
||||
OtherOrders=Other orders
|
||||
##### Types de contacts #####
|
||||
TypeContact_commande_internal_SALESREPFOLL=Representative following-up customer order
|
||||
|
|
@ -125,7 +125,7 @@ TypeContact_commande_internal_SHIPPING=Representative following-up shipping
|
|||
TypeContact_commande_external_BILLING=Customer invoice contact
|
||||
TypeContact_commande_external_SHIPPING=Customer shipping contact
|
||||
TypeContact_commande_external_CUSTOMER=Customer contact following-up order
|
||||
TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up vendor order
|
||||
TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order
|
||||
TypeContact_order_supplier_internal_SHIPPING=Representative following-up shipping
|
||||
TypeContact_order_supplier_external_BILLING=Vendor invoice contact
|
||||
TypeContact_order_supplier_external_SHIPPING=Vendor shipping contact
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source custome
|
|||
descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders)
|
||||
descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update)
|
||||
# Autoclassify supplier order
|
||||
descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when supplier invoice is validated (and if amount of the invoice is same than total amount of linked proposals)
|
||||
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source vendor order(s) to billed when supplier invoice is validated (and if amount of the invoice is same than total amount of linked orders)
|
||||
descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals)
|
||||
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders)
|
||||
AutomaticCreation=Automatic creation
|
||||
AutomaticClassification=Automatic classification
|
||||
|
|
@ -477,13 +477,13 @@ if ($resql)
|
|||
if (! empty($arrayfields['sp.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.$search_ref.'">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="12" name="search_societe" value="'.$search_societe.'">';
|
||||
print '<input class="flat" type="text" size="12" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>';
|
||||
|
|
@ -514,7 +514,7 @@ if ($resql)
|
|||
{
|
||||
print '<td class="liste_titre" colspan="1" align="center">';
|
||||
//print $langs->trans('Month').': ';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="monthvalid" value="'.$monthvalid.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="monthvalid" value="'.dol_escape_htmltag($monthvalid).'">';
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$syearvalid = $yearvalid;
|
||||
$formother->select_year($syearvalid,'yearvalid',1, 20, 5);
|
||||
|
|
@ -525,7 +525,7 @@ if ($resql)
|
|||
{
|
||||
print '<td class="liste_titre" colspan="1" align="center">';
|
||||
//print $langs->trans('Month').': ';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">';
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$syear = $year;
|
||||
$formother->select_year($syear,'year',1, 20, 5);
|
||||
|
|
@ -536,28 +536,28 @@ if ($resql)
|
|||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.$search_montant_ht.'">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['sp.total_vat']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.$search_montant_vat.'">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['sp.total_ttc']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.$search_montant_ttc.'">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['u.login']['checked']))
|
||||
{
|
||||
// Author
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<input class="flat" size="4" type="text" name="search_login" value="'.$search_author.'">';
|
||||
print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_author).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
|
|
|
|||
|
|
@ -1011,7 +1011,7 @@ select.selectarrowonleft option {
|
|||
|
||||
select {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 5px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
input, input[type=text], input[type=password], select, textarea {
|
||||
min-width: 20px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user