mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 20:11:26 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
@@ -2409,6 +2409,8 @@ ResetSms
|
||||
ResourceNotAssignedToTheTask
|
||||
ResourcePageIndex
|
||||
ResourceTypeCode
|
||||
ResourceTypeID
|
||||
ResourceTypeLabel
|
||||
ResponsibleOfRecruitement
|
||||
Rest
|
||||
RestOfEurope
|
||||
@@ -3172,6 +3174,7 @@ descWORKFLOW_RECEPTION_CLASSIFY_BILLED_INVOICE
|
||||
descWORKFLOW_RECEPTION_CLASSIFY_CLOSED_INVOICE
|
||||
descWORKFLOW_SHIPPING_CLASSIFY_BILLED_INVOICE
|
||||
descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE
|
||||
descWORKFLOW_SUM_INVOICES_AMOUNT_CLASSIFY_BILLED_ORDER
|
||||
descWORKFLOW_TICKET_CLOSE_INTERVENTION
|
||||
descWORKFLOW_TICKET_CREATE_INTERVENTION
|
||||
descWORKFLOW_TICKET_LINK_CONTRACT
|
||||
|
||||
@@ -46,6 +46,7 @@ InstallChoiceRecommanded
|
||||
IsInPackage
|
||||
MailNoChangePossible
|
||||
MailSentBy
|
||||
MaxNbOfLinesForBoxes
|
||||
ModuleBuilderDesc2
|
||||
ModulesMarketPlaceDesc
|
||||
MoveField
|
||||
@@ -68,7 +69,9 @@ ThirdPartyCustomersWithIdProf12
|
||||
TicketPublicInfoCreateTicket
|
||||
TitreRequestCP
|
||||
UseAsciiDocFormat
|
||||
UsePassword
|
||||
ViewPageInNewTab
|
||||
WEBSITE_PAGE_EXAMPLE
|
||||
YourTicketSuccessfullySaved
|
||||
#
|
||||
# ██████╗ █████╗ ██████╗ ████████╗██████╗
|
||||
|
||||
@@ -138,7 +138,10 @@ abstract class CommonObjectLine extends CommonObject
|
||||
public $remise_percent;
|
||||
|
||||
/**
|
||||
* @var int info_bits
|
||||
* List of cumulative options:
|
||||
* Bit 0: 0 for common VAT - 1 if VAT french NPR
|
||||
* Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except)
|
||||
* @var int
|
||||
*/
|
||||
public $info_bits;
|
||||
|
||||
|
||||
@@ -2565,7 +2565,7 @@ class ExtraFields
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array with all possible types and label of extrafields
|
||||
* Return array with all possible types and labels of extrafields
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
@@ -2579,6 +2579,9 @@ class ExtraFields
|
||||
$type2label[$key] = $langs->transnoentitiesnoconv($val);
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('MAIN_USE_EXTRAFIELDS_ICON')) {
|
||||
unset($type2label['icon']);
|
||||
}
|
||||
if (!getDolGlobalString('MAIN_USE_GEOPHP')) {
|
||||
unset($type2label['point']);
|
||||
unset($type2label['multipts']);
|
||||
|
||||
@@ -120,14 +120,16 @@ if (!function_exists('str_contains')) {
|
||||
|
||||
|
||||
/**
|
||||
* Return the full path of the directory where a module (or an object of a module) stores its files. Path may depends on the entity if a multicompany module is enabled.
|
||||
* Return the full path of the directory where a module (or an object of a module) stores its files.
|
||||
* Path may depends on the entity if a multicompany module is enabled.
|
||||
*
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @param string $mode 'output' or 'temp' or 'version'
|
||||
* @return string|null The path of the relative directory of the module
|
||||
* @since Dolibarr V18
|
||||
*/
|
||||
function getMultidirOutput($object, $module = '')
|
||||
function getMultidirOutput($object, $module = '', $mode = 'output')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -137,17 +139,57 @@ function getMultidirOutput($object, $module = '')
|
||||
if (empty($module) && !empty($object->element)) {
|
||||
$module = $object->element;
|
||||
}
|
||||
|
||||
// Special case for backward compatibility
|
||||
if ($module == 'fichinter') {
|
||||
$module = 'ficheinter';
|
||||
}
|
||||
|
||||
// Get the relative path of directory
|
||||
if ($mode == 'output' || $mode == 'version') {
|
||||
if (isset($conf->$module) && property_exists($conf->$module, 'multidir_output')) {
|
||||
return $conf->$module->multidir_output[(empty($object->entity) ? $conf->entity : $object->entity)];
|
||||
} else {
|
||||
return 'error-diroutput-not-defined-for-this-object='.$module;
|
||||
}
|
||||
} elseif ($mode == 'temp') {
|
||||
if (isset($conf->$module) && property_exists($conf->$module, 'multidir_temp')) {
|
||||
return $conf->$module->multidir_temp[(empty($object->entity) ? $conf->entity : $object->entity)];
|
||||
} else {
|
||||
return 'error-dirtemp-not-defined-for-this-object='.$module;
|
||||
}
|
||||
} else {
|
||||
return 'error-bad-value-for-mode';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the full path of the directory where a module (or an object of a module) stores its temporary files.
|
||||
* Path may depends on the entity if a multicompany module is enabled.
|
||||
*
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @return string|null The path of the relative temp directory of the module
|
||||
*/
|
||||
function getMultidirTemp($object, $module = '')
|
||||
{
|
||||
return getMultiDirOutput($object, $module, 'temp');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the full path of the directory where a module (or an object of a module) stores its versioned files.
|
||||
* Path may depends on the entity if a multicompany module is enabled.
|
||||
*
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @return string|null The path of the relative version directory of the module
|
||||
*/
|
||||
function getMultidirVersion($object, $module = '')
|
||||
{
|
||||
return getMultiDirOutput($object, $module, 'version');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return dolibarr global constant string value
|
||||
*
|
||||
@@ -4911,7 +4953,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
|
||||
$fakey = 'fa-'.$pictowithouttext;
|
||||
}
|
||||
|
||||
if (in_array($pictowithouttext, array('dollyrevert', 'member', 'members', 'contract', 'group', 'resource', 'shipment'))) {
|
||||
if (in_array($pictowithouttext, array('dollyrevert', 'member', 'members', 'contract', 'group', 'resource', 'shipment', 'reception'))) {
|
||||
$morecss .= ' em092';
|
||||
}
|
||||
if (in_array($pictowithouttext, array('conferenceorbooth', 'collab', 'eventorganization', 'holiday', 'info', 'project', 'workstation'))) {
|
||||
@@ -4952,7 +4994,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
|
||||
'knowledgemanagement' => 'infobox-contrat rotate90', 'loan' => 'infobox-bank_account',
|
||||
'payment' => 'infobox-bank_account', 'payment_vat' => 'infobox-bank_account', 'poll' => 'infobox-adherent', 'pos' => 'infobox-bank_account', 'project' => 'infobox-project', 'projecttask' => 'infobox-project',
|
||||
'propal' => 'infobox-propal', 'proposal' => 'infobox-propal','private' => 'infobox-project',
|
||||
'reception' => 'flip', 'recruitmentjobposition' => 'infobox-adherent', 'recruitmentcandidature' => 'infobox-adherent',
|
||||
'reception' => 'flip infobox-order_supplier', 'recruitmentjobposition' => 'infobox-adherent', 'recruitmentcandidature' => 'infobox-adherent',
|
||||
'resource' => 'infobox-action',
|
||||
'salary' => 'infobox-bank_account', 'shapes' => 'infobox-adherent', 'shipment' => 'infobox-commande', 'supplier_invoice' => 'infobox-order_supplier', 'supplier_invoicea' => 'infobox-order_supplier', 'supplier_invoiced' => 'infobox-order_supplier',
|
||||
'supplier' => 'infobox-order_supplier', 'supplier_order' => 'infobox-order_supplier', 'supplier_proposal' => 'infobox-supplier_proposal',
|
||||
@@ -4975,7 +5017,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
|
||||
'lock' => '#ddd', 'lot' => '#a69944',
|
||||
'map-marker-alt' => '#aaa', 'mrp' => '#a69944', 'product' => '#a69944', 'service' => '#a69944', 'inventory' => '#a69944', 'stock' => '#a69944', 'movement' => '#a69944',
|
||||
'other' => '#ddd', 'world' => '#986c6a',
|
||||
'partnership' => '#6c6aa8', 'playdisabled' => '#ccc', 'printer' => '#444', 'projectpub' => '#986c6a', 'reception' => '#a69944', 'resize' => '#444', 'rss' => '#cba',
|
||||
'partnership' => '#6c6aa8', 'playdisabled' => '#ccc', 'printer' => '#444', 'projectpub' => '#986c6a', 'resize' => '#444', 'rss' => '#cba',
|
||||
//'shipment'=>'#a69944',
|
||||
'security' => '#999', 'square' => '#888', 'stop-circle' => '#888', 'stats' => '#444', 'switch_off' => '#999',
|
||||
'technic' => '#999', 'tick' => '#282', 'timespent' => '#555',
|
||||
@@ -7509,7 +7551,7 @@ function yn($yesno, $case = 1, $color = 0)
|
||||
* @param ?CommonObject $object Object to use to get ref to forge the path.
|
||||
* @param string $modulepart Type of object ('invoice_supplier, 'donation', 'invoice', ...'). Use '' for autodetect from $object.
|
||||
* @return string Dir to use ending. Example '' or '1/' or '1/2/'
|
||||
* @see getMultiDirOuput()
|
||||
* @see getMultidirOutput()
|
||||
*/
|
||||
function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = '')
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ function product_prepare_head($object)
|
||||
|| (isModEnabled('margin') && $user->hasRight("margin", "liretous"))
|
||||
) {
|
||||
if ($usercancreadprice) {
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/price_suppliers.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("BuyingPrices");
|
||||
$head[$h][2] = 'suppliers';
|
||||
$h++;
|
||||
|
||||
@@ -34,7 +34,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
||||
}
|
||||
$value = $datenotinstring;
|
||||
} else {
|
||||
$value = (!empty($obj->$tmpkey) ? $obj->$tmpkey : '');
|
||||
$value = (isset($obj->$tmpkey) ? $obj->$tmpkey : '');
|
||||
}
|
||||
// If field is a computed field, we make computation to get value
|
||||
if ($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]) {
|
||||
|
||||
@@ -1349,7 +1349,7 @@ class ProductFournisseur extends Product
|
||||
$label .= $this->displayPriceProductFournisseurLog($logPrices);
|
||||
}
|
||||
|
||||
$url = DOL_URL_ROOT.'/product/fournisseurs.php?id='.((int) $this->id).'&action=create_price&token='.newToken().'&socid='.((int) $this->fourn_id).'&rowid='.((int) $this->product_fourn_price_id);
|
||||
$url = DOL_URL_ROOT.'/product/price_suppliers.php?id='.((int) $this->id).'&action=create_price&token='.newToken().'&socid='.((int) $this->fourn_id).'&rowid='.((int) $this->product_fourn_price_id);
|
||||
|
||||
if ($option != 'nolink') {
|
||||
// Add param to save lastsearch_values or not
|
||||
|
||||
@@ -144,7 +144,7 @@ $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|DE:Modul_Terminplanung';
|
||||
if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/productnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
|
||||
$title = $object->name." - ".$title;
|
||||
}
|
||||
llxHeader('', $title, $help_url);
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-agenda');
|
||||
|
||||
if (isModEnabled('notification')) {
|
||||
$langs->load("mails");
|
||||
|
||||
@@ -1274,7 +1274,7 @@ if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
||||
}
|
||||
}
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-card');
|
||||
|
||||
// Load object modBarCodeProduct
|
||||
$res = 0;
|
||||
|
||||
@@ -5462,7 +5462,7 @@ class Product extends CommonObject
|
||||
}
|
||||
|
||||
if ($option == 'supplier' || $option == 'category') {
|
||||
$url = DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id;
|
||||
$url = DOL_URL_ROOT.'/product/price_suppliers.php?id='.$this->id;
|
||||
} elseif ($option == 'stock') {
|
||||
$url = DOL_URL_ROOT.'/product/stock/product.php?id='.$this->id;
|
||||
} elseif ($option == 'composition') {
|
||||
|
||||
@@ -208,7 +208,7 @@ if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
||||
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
||||
}
|
||||
|
||||
llxHeader('', $title, $helpurl);
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'mod-product page-document');
|
||||
|
||||
|
||||
if ($object->id) {
|
||||
|
||||
@@ -143,7 +143,7 @@ $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|DE:Modul_Terminplanung';
|
||||
if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/productnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
|
||||
$title = $object->name." - ".$title;
|
||||
}
|
||||
llxHeader('', $title, $help_url);
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-messaging');
|
||||
|
||||
if (isModEnabled('notification')) {
|
||||
$langs->load("mails");
|
||||
|
||||
@@ -106,7 +106,7 @@ if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
||||
$help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen';
|
||||
}
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-note');
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
/*
|
||||
|
||||
@@ -885,7 +885,7 @@ if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
||||
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
||||
}
|
||||
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs');
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs mod-product page-price');
|
||||
|
||||
$head = product_prepare_head($object);
|
||||
$titre = $langs->trans("CardProduct".$object->type);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/product/fournisseurs.php
|
||||
* \file htdocs/product/price_suppliers.php
|
||||
* \ingroup product
|
||||
* \brief Page of tab suppliers for products
|
||||
*/
|
||||
@@ -375,7 +375,7 @@ if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
||||
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Lesitungen';
|
||||
}
|
||||
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs');
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs mod-product page-price_supplier');
|
||||
|
||||
if ($id > 0 || $ref) {
|
||||
if ($result) {
|
||||
@@ -912,7 +912,7 @@ if ($id > 0 || $ref) {
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
if ($usercancreate) {
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.((int) $object->id).'&action=create_price&token='.newToken().'">';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/price_suppliers.php?id='.((int) $object->id).'&action=create_price&token='.newToken().'">';
|
||||
print $langs->trans("AddSupplierPrice").'</a>';
|
||||
}
|
||||
}
|
||||
@@ -178,7 +178,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
$nboflines = show_stats_for_company($product, $socid);
|
||||
|
||||
|
||||
@@ -556,7 +556,7 @@ if ($id > 0 || $ref) {
|
||||
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
||||
}
|
||||
|
||||
llxHeader('', $title, $helpurl);
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'mod-product page-card_stock');
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
?>
|
||||
|
||||
@@ -191,7 +191,7 @@ if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
|
||||
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
||||
}
|
||||
|
||||
llxHeader('', $title, $helpurl);
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'mod-product page-translation');
|
||||
|
||||
$form = new Form($db);
|
||||
$formadmin = new FormAdmin($db);
|
||||
|
||||
Reference in New Issue
Block a user