Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur 2022-01-26 13:51:25 +01:00
commit 38408f916b
55 changed files with 474 additions and 135 deletions

View File

@ -69,12 +69,3 @@ body:
attributes:
label: Attached files
description: Screenshots, screencasts, dolibarr.log, debugging informations
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@ -33,12 +33,3 @@ body:
attributes:
label: Suggested steps
description: List of tasks to achieve goal
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@ -3,7 +3,7 @@
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2022 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
@ -2408,6 +2408,31 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
$fieldValue = '0';
}
}
// Labels Length
$maxlength = '';
if (in_array($fieldlist[$field], array('libelle', 'label'))) {
switch ($tabname) {
case MAIN_DB_PREFIX . 'c_accounting_category':
case MAIN_DB_PREFIX . 'c_ecotaxe':
case MAIN_DB_PREFIX . 'c_email_senderprofile':
case MAIN_DB_PREFIX . 'c_forme_juridique':
case MAIN_DB_PREFIX . 'c_holiday_types':
case MAIN_DB_PREFIX . 'c_payment_term':
case MAIN_DB_PREFIX . 'c_transport_mode':
$maxlength = ' maxlength="255"';
break;
case MAIN_DB_PREFIX . 'c_email_templates':
$maxlength = ' maxlength="180"';
break;
case MAIN_DB_PREFIX . 'c_socialnetworks':
$maxlength = ' maxlength="150"';
break;
default:
$maxlength = ' maxlength="128"';
}
}
print '<td class="'.$classtd.'">';
$transfound = 0;
$transkey = '';
@ -2426,7 +2451,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
}
}
if (!$transfound) {
print '<input type="text" class="flat'.($class ? ' '.$class : '').'" value="'.dol_escape_htmltag($fieldValue).'" name="'.$fieldlist[$field].'">';
print '<input type="text" class="flat'.($class ? ' '.$class : '').'"'.($maxlength ? ' '.$maxlength : '').' value="'.dol_escape_htmltag($fieldValue).'" name="'.$fieldlist[$field].'">';
} else {
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$transkey.'">';
}

View File

@ -5,6 +5,7 @@
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -199,6 +200,13 @@ if ($action == 'update') {
} else {
dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
}
$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BTNACTION'), array()))));
if ($val == '') {
dolibarr_del_const($db, 'THEME_ELDY_BTNACTION', $conf->entity);
} else {
dolibarr_set_const($db, 'THEME_ELDY_BTNACTION', $val, 'chaine', 0, '', $conf->entity);
}
}
if ($mode == 'dashboard') {

View File

@ -1,7 +1,9 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2022 ATM Consulting <contact@atm-consulting.fr>
* Copyright (C) 2022 OpenDSI <support@open-dsi.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
@ -274,14 +276,17 @@ class Proposals extends DolibarrApi
/**
* Get lines of a commercial proposal
*
* @param int $id Id of commercial proposal
* @param int $id Id of commercial proposal
* @param string $sqlfilters Other criteria to filter answers separated by a comma. d is the alias for proposal lines table, p is the alias for product table. "Syntax example "(p.ref:like:'SO-%') and (d.date_start:<:'20220101')"
*
* @url GET {id}/lines
*
* @return int
*/
public function getLines($id)
public function getLines($id, $sqlfilters = '')
{
$filters = "";
if (!DolibarrApiAccess::$user->rights->propal->lire) {
throw new RestException(401);
}
@ -294,7 +299,16 @@ class Proposals extends DolibarrApi
if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
$this->propal->getLinesArray();
if (!empty($sqlfilters)) {
if (!DolibarrApi::_checkFilters($sqlfilters)) {
throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters);
}
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
$filters = " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
}
$this->propal->getLinesArray($filters);
$result = array();
foreach ($this->propal->lines as $line) {
array_push($result, $this->_cleanObjectDatas($line));
@ -308,7 +322,7 @@ class Proposals extends DolibarrApi
* @param int $id Id of commercial proposal to update
* @param array $request_data Commercial proposal line data
*
* @url POST {id}/lines
* @url POST {id}/line
*
* @return int
*/
@ -368,6 +382,84 @@ class Proposals extends DolibarrApi
}
}
/**
* Add lines to given commercial proposal
*
* @param int $id Id of commercial proposal to update
* @param array $request_data Commercial proposal line data
*
* @url POST {id}/lines
*
* @return int
*/
public function postLines($id, $request_data = null)
{
if (!DolibarrApiAccess::$user->rights->propal->creer) {
throw new RestException(401);
}
$result = $this->propal->fetch($id);
if (!$result) {
throw new RestException(404, 'Commercial Proposal not found');
}
if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
$errors = [];
$this->db->begin();
foreach ($request_data as $TData) {
if (empty($TData[0])) $TData = array($TData);
foreach ($TData as $lineData) {
$line = (object) $lineData;
$updateRes = $this->propal->addline(
$line->desc,
$line->subprice,
$line->qty,
$line->tva_tx,
$line->localtax1_tx,
$line->localtax2_tx,
$line->fk_product,
$line->remise_percent,
'HT',
0,
$line->info_bits,
$line->product_type,
$line->rang,
$line->special_code,
$line->fk_parent_line,
$line->fk_fournprice,
$line->pa_ht,
$line->label,
$line->date_start,
$line->date_end,
$line->array_options,
$line->fk_unit,
$line->origin,
$line->origin_id,
$line->multicurrency_subprice,
$line->fk_remise_except
);
if ($updateRes < 0) {
$errors['lineLabel'] = $line->label;
$errors['msg'] = $this->propal->errors;
}
}
}
if (empty($errors)) {
$this->db->commit();
return count($request_data);
} else {
$this->db->rollback();
throw new RestException(400, implode(", ", $errors));
}
}
/**
* Update a line of given commercial proposal
*

View File

@ -1,20 +1,22 @@
<?php
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2017 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2017 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2022 ATM Consulting <contact@atm-consulting.fr>
* Copyright (C) 2022 OpenDSI <support@open-dsi.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
@ -1714,12 +1716,13 @@ class Propal extends CommonObject
/**
* Load array lines
*
* @param int $only_product Return only physical products
* @param int $loadalsotranslation Return translation for products
* @param int $only_product Return only physical products
* @param int $loadalsotranslation Return translation for products
* @param string $filters Filter on other fields
*
* @return int <0 if KO, >0 if OK
* @return int <0 if KO, >0 if OK
*/
public function fetch_lines($only_product = 0, $loadalsotranslation = 0)
public function fetch_lines($only_product = 0, $loadalsotranslation = 0, $filters = '')
{
global $langs, $conf;
// phpcs:enable
@ -1738,6 +1741,9 @@ class Propal extends CommonObject
if ($only_product) {
$sql .= ' AND p.fk_product_type = 0';
}
if ($filters) {
$sql .= $filters;
}
$sql .= ' ORDER by d.rang';
dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG);
@ -3689,12 +3695,13 @@ class Propal extends CommonObject
/**
* Retrieve an array of proposal lines
* @param string $filters Filter on other fields
*
* @return int >0 if OK, <0 if KO
*/
public function getLinesArray()
public function getLinesArray($filters = '')
{
return $this->fetch_lines();
return $this->fetch_lines(0, 0, $filters);
}
/**

View File

@ -62,6 +62,9 @@ $label = GETPOST('label', 'alpha');
$actioncode = GETPOST('actioncode');
$fk_user = GETPOST('userid', 'int');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('taxcard', 'globalcard'));
// Initialize technical objects
$object = new ChargeSociales($db);
$extrafields = new ExtraFields($db);
@ -97,7 +100,7 @@ $result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges')
* Actions
*/
$parameters = array();
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -446,6 +449,8 @@ if ($id > 0) {
$object = new ChargeSociales($db);
$result = $object->fetch($id);
$formconfirm = '';
if ($result > 0) {
$head = tax_prepare_head($object);
@ -464,25 +469,36 @@ if ($id > 0) {
$formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100');
}
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneTax', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 280);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneTax', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 280);
}
if ($action == 'paid') {
$text = $langs->trans('ConfirmPaySocialContribution');
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PaySocialContribution'), $text, "confirm_paid", '', '', 2);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PaySocialContribution'), $text, "confirm_paid", '', '', 2);
}
// Confirmation of the removal of the Social Contribution
if ($action == 'delete') {
$text = $langs->trans('ConfirmDeleteSocialContribution');
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteSocialContribution'), $text, 'confirm_delete', '', '', 2);
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteSocialContribution'), $text, 'confirm_delete', '', '', 2);
}
if ($action == 'edit') {
print "<form name=\"charge\" action=\"".$_SERVER["PHP_SELF"]."?id=$object->id&amp;action=update\" method=\"post\">";
print '<input type="hidden" name="token" value="'.newToken().'">';
}
// Call Hook formConfirm
$parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
$formconfirm .= $hookmanager->resPrint;
} elseif ($reshook > 0) {
$formconfirm = $hookmanager->resPrint;
}
// Print form confirm
print $formconfirm;
print dol_get_fiche_head($head, 'card', $langs->trans("SocialContribution"), -1, 'bill');

View File

@ -1666,7 +1666,11 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
$limittitle = 30;
$out .= '<a class="tabTitle">';
if ($picto) {
$out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
$noprefix = $pictoisfullpath;
if (strpos($picto, 'fontawesome_') !== false) {
$noprefix = 1;
}
$out .= img_picto($title, ($noprefix ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
}
$out .= '<span class="tabTitleText">'.dol_escape_htmltag(dol_trunc($title, $limittitle)).'</span>';
$out .= '</a>';
@ -2021,10 +2025,14 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$width = 14;
$cssclass = 'photorefcenter';
$picto = $object->picto;
$prefix = 'object_';
if ($object->element == 'project' && !$object->public) {
$picto = 'project'; // instead of projectpub
}
$nophoto = img_picto('No photo', 'object_'.$picto);
if (strpos($picto, 'fontawesome_') !== false) {
$prefix = '';
}
$nophoto = img_picto('No photo', $prefix.$picto);
}
$morehtmlleft .= '<!-- No photo to show -->';
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
@ -3609,6 +3617,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
* Example: fontawesome_envelope-open-text_fas_red_1em if you want to use fontaweseome icons: fontawesome_<icon-name>_<style>_<color>_<size> (only icon-name is mandatory)
* @param string $moreatt Add more attribute on img tag (For example 'class="pictofixedwidth"')
* @param boolean|int $pictoisfullpath If true or 1, image path is a full path
* @param int $srconly Return only content of the src attribute of img.
@ -3640,6 +3649,40 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
}
} else {
$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
if (strpos($pictowithouttext, 'fontawesome_') !== false) {
$pictowithouttext = explode('_', $pictowithouttext);
$marginleftonlyshort = 0;
$fakey = 'fa-'.$pictowithouttext[1];
$fa = $pictowithouttext[2] ? $pictowithouttext[2] : 'fa';
$facolor = $pictowithouttext[3] ? $pictowithouttext[3] : '';
$fasize = $pictowithouttext[4] ? $pictowithouttext[4] : '';
// This snippet only needed since function img_edit accepts only one additional parameter: no separate one for css only.
// class/style need to be extracted to avoid duplicate class/style validation errors when $moreatt is added to the end of the attributes.
$morestyle = '';
$reg = array();
if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) {
$morecss .= ($morecss ? ' ' : '').$reg[1];
$moreatt = str_replace('class="'.$reg[1].'"', '', $moreatt);
}
if (preg_match('/style="([^"]+)"/', $moreatt, $reg)) {
$morestyle = $reg[1];
$moreatt = str_replace('style="'.$reg[1].'"', '', $moreatt);
}
$moreatt = trim($moreatt);
$enabledisablehtml = '<span class="'.$fa.' '.$fakey.($marginleftonlyshort ? ($marginleftonlyshort == 1 ? ' marginleftonlyshort' : ' marginleftonly') : '');
$enabledisablehtml .= ($morecss ? ' '.$morecss : '').'" style="'.($fasize ? ('font-size: '.$fasize.';') : '').($facolor ? (' color: '.$facolor.';') : '').($morestyle ? ' '.$morestyle : '').'"'.(($notitle || empty($titlealt)) ? '' : ' title="'.dol_escape_htmltag($titlealt).'"').($moreatt ? ' '.$moreatt : '').'>';
/*if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
$enabledisablehtml .= $titlealt;
}*/
$enabledisablehtml .= '</span>';
return $enabledisablehtml;
}
$pictowithouttext = str_replace('object_', '', $pictowithouttext);
if (empty($srconly) && in_array($pictowithouttext, array(
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',

View File

@ -3,6 +3,7 @@
* Copyright (C) 2010-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -859,15 +860,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
// Use Checked
if ($foruserprofile) {
/* Must first change option to choose color of highlight instead of yes or no.
print '<tr class="oddeven">';
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
print '<td><input name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
print '<td class="nowrap left" width="20%"><input name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td><input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';
print '</tr>';
*/
print '<tr class="oddeven">';
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
print '<td><input name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
print '<td class="nowrap left" width="20%"><input name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td><input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';
print '</tr>';
*/
} else {
$default = (empty($colorbacklinepairchecked) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepairchecked)));
@ -905,6 +906,52 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</tr>';
}
// Btn action
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_BTNACTION:$langs->trans("Default")).'</td>';
print '<td class="nowrap left" width="20%"><input name="check_THEME_ELDY_BTNACTION" id="check_THEME_ELDY_BTNACTION" type="checkbox" '.(! empty($object->conf->THEME_ELDY_BTNACTION)?" checked":"");
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").'</td>';
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION,array()),''),'THEME_ELDY_BTNACTION','',1).' ';
}
else
{
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION,array()),'');
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print '';
}
if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';*/
} else {
$default = (empty($butactionbg) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($butactionbg)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BtnActionColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_BTNACTION) ? $conf->global->THEME_ELDY_BTNACTION : ''), array()), ''), 'THEME_ELDY_BTNACTION', '', 1, '', '', 'colorbtnaction').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION, array()), '');
if ($color) {
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
} else {
//print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$defaultcolor.'" value="'.$langs->trans("Default").'">';
//print '<span style="color: #000078">'.$langs->trans("Default").'</span>';
print $langs->trans("Default");
}
}
print ' &nbsp; <span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong><span style="color: #'.$default.'">'.$default.'</span></strong> ';
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
print '</td>';
print '</tr>';
}
// Use MAIN_OPTIMIZEFORTEXTBROWSER
if ($foruserprofile && !empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
//$default=yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);

View File

@ -235,19 +235,22 @@ class modStock extends DolibarrModules
'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", 'p.note'=>"Note",
'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration",
'p.datec'=>'DateCreation', 'p.tms'=>'DateModification', 'p.pmp'=>'PMPValue', 'p.cost_price'=>'CostPrice',
'p.seuil_stock_alerte'=>'StockLimit',
);
$this->export_TypeFields_array[$r] = array(
'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text',
'p.rowid'=>"List:product:label::product", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text",
'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree",
'p.datec'=>'Date', 'p.tms'=>'Date', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric',
'ps.reel'=>'Numeric'
'ps.reel'=>'Numeric',
'p.seuil_stock_alerte'=>'Numeric',
);
$this->export_entities_array[$r] = array(
'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product",
'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product",
'p.datec'=>'product', 'p.tms'=>'product', 'p.pmp'=>'product', 'p.cost_price'=>'product',
'ps.reel'=>'stock'
'ps.reel'=>'stock',
'p.seuil_stock_alerte'=>'product',
); // We define here only fields that use another icon that the one defined into export_icon
$this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet
$this->export_dependencies_array[$r] = array('stock'=>array('p.rowid', 'e.rowid')); // We must keep this until the aggregate_array is used. To have a unique key, if we ask a field of a child, to avoid the DISTINCT to discard them.

View File

@ -32,6 +32,40 @@
-- Missing in v15 or lower
ALTER TABLE llx_c_availability MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_civility MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_country MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_currencies MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_effectif MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_exp_tax_cat MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_hrm_department MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_hrm_function MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_input_reason MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_lead_status MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_paper_format MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_partnership_type MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_product_nature MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_productbatch_qcstatus MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_propalst MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_prospectcontactlevel MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_prospectlevel MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_recruitment_origin MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_shipment_package_type MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_type_container MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_type_fees MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_type_resource MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_units MODIFY COLUMN label varchar(128);
ALTER TABLE llx_c_actioncomm MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_barcode_type MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_chargesociales MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_input_method MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_paiement MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_shipment_mode MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_stcomm MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_stcommcontact MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_type_contact MODIFY COLUMN libelle varchar(128);
ALTER TABLE llx_c_typent MODIFY COLUMN libelle varchar(128);
UPDATE llx_rights_def SET perms = 'writeall' WHERE perms = 'writeall_advance' AND module = 'holiday';

View File

@ -2,6 +2,7 @@
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -23,7 +24,7 @@ create table llx_c_actioncomm
id integer PRIMARY KEY,
code varchar(50) NOT NULL,
type varchar(50) DEFAULT 'system' NOT NULL,
libelle varchar(48) NOT NULL,
libelle varchar(128) NOT NULL,
module varchar(50) DEFAULT NULL,
active tinyint DEFAULT 1 NOT NULL,
todo tinyint, -- deprecated

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2011 Philippe GRAND <philippe.grand@atoo-net.com>
-- Copyright (C) 2020 Alexandre SPANGARO <aspangaro@open-dsi.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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 @@ create table llx_c_availability
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(30) NOT NULL,
label varchar(60) NOT NULL,
label varchar(128) NOT NULL,
active tinyint DEFAULT 1 NOT NULL,
position integer NOT NULL DEFAULT 0
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2007-2009 Regis Houssin <regis.houssin@inodbox.com>
-- Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -22,7 +23,7 @@ create table llx_c_barcode_type
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(16) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
libelle varchar(50) NOT NULL,
libelle varchar(128) NOT NULL,
coder varchar(16) NOT NULL,
example varchar(16) NOT NULL

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -20,7 +21,7 @@
create table llx_c_chargesociales
(
id integer AUTO_INCREMENT PRIMARY KEY,
libelle varchar(80),
libelle varchar(128),
deductible smallint DEFAULT 0 NOT NULL,
active tinyint DEFAULT 1 NOT NULL,
code varchar(12) NOT NULL,

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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 @@ create table llx_c_civility
(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
code varchar(6) NOT NULL,
label varchar(50),
label varchar(128),
active tinyint DEFAULT 1 NOT NULL,
module varchar(32) NULL
)ENGINE=innodb;

View File

@ -2,6 +2,7 @@
-- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -23,7 +24,7 @@ create table llx_c_country
rowid integer PRIMARY KEY,
code varchar(2) NOT NULL,
code_iso varchar(3) ,
label varchar(50) NOT NULL,
label varchar(128) NOT NULL,
eec integer ,
active tinyint DEFAULT 1 NOT NULL,
favorite tinyint DEFAULT 0 NOT NULL

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -20,7 +21,7 @@
create table llx_c_currencies
(
code_iso varchar(3) PRIMARY KEY,
label varchar(64) NOT NULL,
label varchar(128) NOT NULL,
unicode varchar(32) DEFAULT NULL,
active tinyint DEFAULT 1 NOT NULL

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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 @@ create table llx_c_effectif
(
id integer PRIMARY KEY,
code varchar(12) NOT NULL,
libelle varchar(30),
libelle varchar(128),
active tinyint DEFAULT 1 NOT NULL,
module varchar(32) NULL
)ENGINE=innodb;

View File

@ -2,6 +2,7 @@
-- Copyright (C) 2012 Mikael Carlavan <mcarlavan@qis-network.com>
-- Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
-- Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -20,7 +21,7 @@
CREATE TABLE IF NOT EXISTS llx_c_exp_tax_cat (
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(48) NOT NULL,
label varchar(128) NOT NULL,
entity integer DEFAULT 1 NOT NULL,
active integer DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
--
-- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -20,7 +21,7 @@ create table llx_c_hrm_department
rowid integer PRIMARY KEY,
pos tinyint DEFAULT 0 NOT NULL,
code varchar(16) NOT NULL,
label varchar(50),
label varchar(128),
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
--
-- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -20,7 +21,7 @@ create table llx_c_hrm_function
rowid integer PRIMARY KEY,
pos tinyint DEFAULT 0 NOT NULL,
code varchar(16) NOT NULL,
label varchar(50),
label varchar(128),
c_level tinyint DEFAULT 0 NOT NULL,
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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 @@ create table llx_c_input_method
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(30),
libelle varchar(60),
libelle varchar(128),
active tinyint default 1 NOT NULL,
module varchar(32) NULL
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -23,7 +24,7 @@ create table llx_c_input_reason
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(30),
label varchar(60),
label varchar(128),
active tinyint default 1 NOT NULL,
module varchar(32) NULL
)ENGINE=innodb;

View File

@ -1,5 +1,6 @@
-- Manage Lead
-- Copyright (C) 2014 Florian HENRY <florian.henry@open-concept.pro>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -18,7 +19,7 @@ create table llx_c_lead_status
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(10),
label varchar(50),
label varchar(128),
position integer,
percent double(5,2),
active tinyint DEFAULT 1 NOT NULL

View File

@ -3,6 +3,7 @@
-- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
-- Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -24,7 +25,7 @@ create table llx_c_paiement
id integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- multi company id
code varchar(6) NOT NULL,
libelle varchar(62),
libelle varchar(128),
type smallint, -- 0: input money, 1: output money, 2: input and output, 3: other
active tinyint DEFAULT 1 NOT NULL,
accountancy_code varchar(32) NULL,

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2007 Regis Houssin <regis.houssin@inodbox.com>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -20,7 +21,7 @@ create table llx_c_paper_format
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(16) NOT NULL,
label varchar(50) NOT NULL,
label varchar(128) NOT NULL,
width float(6,2) DEFAULT 0, -- Largeur du papier
height float(6,2) DEFAULT 0, -- Hauteur du papier
unit varchar(5) NOT NULL, -- Mesure unit

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2021 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -29,7 +30,7 @@ create table llx_c_partnership_type
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
code varchar(32) NOT NULL,
label varchar(64) NOT NULL,
label varchar(128) NOT NULL,
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,5 +1,7 @@
-- ========================================================================
-- Copyright (C) 2020 Florian HENRY <florian.henry@scopen.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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,6 +21,6 @@
CREATE TABLE llx_c_product_nature (
rowid integer AUTO_INCREMENT PRIMARY KEY,
code tinyint NOT NULL,
label varchar(100),
label varchar(128),
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2012-2017 Noé Cendrier <noe.cendrier@altairis.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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,6 +22,6 @@ CREATE TABLE llx_c_productbatch_qcstatus
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer NOT NULL DEFAULT 1,
code varchar(16) NOT NULL,
label varchar(50) NOT NULL,
label varchar(128) NOT NULL,
active integer DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
-- ===================================================================
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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 @@ create table llx_c_propalst
(
id smallint PRIMARY KEY,
code varchar(12) NOT NULL,
label varchar(30),
label varchar(128),
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,5 +1,6 @@
-- ===================================================================
-- Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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,7 +20,7 @@
create table llx_c_prospectcontactlevel
(
code varchar(12) PRIMARY KEY,
label varchar(30),
label varchar(128),
sortorder smallint,
active smallint DEFAULT 1 NOT NULL,
module varchar(32) NULL

View File

@ -1,5 +1,6 @@
-- ===================================================================
-- Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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,7 +20,7 @@
create table llx_c_prospectlevel
(
code varchar(12) PRIMARY KEY,
label varchar(30),
label varchar(128),
sortorder smallint,
active smallint DEFAULT 1 NOT NULL,
module varchar(32) NULL

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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,6 +29,6 @@ create table llx_c_recruitment_origin
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(32) NOT NULL,
label varchar(64) NOT NULL,
label varchar(128) NOT NULL,
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,5 +1,6 @@
-- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -22,7 +23,7 @@ create table llx_c_shipment_mode
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
code varchar(30) NOT NULL,
libelle varchar(50) NOT NULL,
libelle varchar(128) NOT NULL,
description text,
tracking varchar(255) NULL,
active tinyint DEFAULT 0,

View File

@ -2,7 +2,7 @@
create table llx_c_shipment_package_type
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(50) NOT NULL, -- Short name
label varchar(128) NOT NULL, -- Short name
description varchar(255), -- Description
active integer DEFAULT 1 NOT NULL, -- Active or not
entity integer DEFAULT 1 NOT NULL -- Multi company id

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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 @@ create table llx_c_stcomm
(
id integer PRIMARY KEY,
code varchar(12) NOT NULL,
libelle varchar(30),
libelle varchar(128),
picto varchar(128),
active tinyint default 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -20,7 +21,7 @@ create table llx_c_stcommcontact
(
id integer PRIMARY KEY,
code varchar(12) NOT NULL,
libelle varchar(30),
libelle varchar(128),
picto varchar(128),
active tinyint default 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2005 Patrick Rouillon <patrick.rouillon.net>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -32,7 +33,7 @@ create table llx_c_type_contact
element varchar(30) NOT NULL,
source varchar(8) DEFAULT 'external' NOT NULL,
code varchar(32) NOT NULL,
libelle varchar(64) NOT NULL,
libelle varchar(128) NOT NULL,
active tinyint DEFAULT 1 NOT NULL,
module varchar(32) NULL,
position integer NOT NULL DEFAULT 0

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
--
-- This program is free software; you can redistribute it and/or modify
@ -30,7 +31,7 @@ create table llx_c_type_container
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(32) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
label varchar(64) NOT NULL,
label varchar(128) NOT NULL,
module varchar(32) NULL,
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -2,6 +2,7 @@
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -23,7 +24,7 @@ create table llx_c_type_fees
(
id integer AUTO_INCREMENT PRIMARY KEY,
code varchar(12) NOT NULL,
label varchar(30),
label varchar(128),
type integer DEFAULT 0, -- 0=type product, 1=type service
accountancy_code varchar(32) NULL,
active tinyint DEFAULT 1 NOT NULL,

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2014 Jean-François Ferry <jfefe@aternatik.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
--
-- This program is free software; you can redistribute it and/or modify
@ -29,6 +30,6 @@ create table llx_c_type_resource
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(32) NOT NULL,
label varchar(64) NOT NULL,
label varchar(128) NOT NULL,
active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb;

View File

@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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 @@ create table llx_c_typent
(
id integer PRIMARY KEY,
code varchar(12) NOT NULL,
libelle varchar(64),
libelle varchar(128),
fk_country integer NULL, -- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B)
active tinyint DEFAULT 1 NOT NULL,
module varchar(32) NULL,

View File

@ -2,6 +2,7 @@
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
-- Copyright (C) 2022 Juanjo Menent <jmenent@2byte.es>
--
-- 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
@ -23,7 +24,7 @@ create table llx_c_units(
code varchar(3),
sortorder smallint,
scale integer,
label varchar(50),
label varchar(128),
short_label varchar(5),
unit_type varchar(10),
active tinyint DEFAULT 1 NOT NULL

View File

@ -1917,6 +1917,7 @@ ConfFileMustContainCustom=Installing or building an external module from applica
HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over
HighlightLinesColor=Highlight color of the line when the mouse passes over (use 'ffffff' for no highlight)
HighlightLinesChecked=Highlight color of the line when it is checked (use 'ffffff' for no highlight)
BtnActionColor=Color of the action button
TextTitleColor=Text color of Page title
LinkColor=Color of links
PressF5AfterChangingThis=Press CTRL+F5 on keyboard or clear your browser cache after changing this value to have it effective

View File

@ -70,10 +70,18 @@ function addDispatchLine(index, type, mode)
mode = mode || 'qtymissing'
console.log("fourn/js/lib_dispatch.js.php Split line type="+type+" index="+index+" mode="+mode);
if(mode == 'qtymissingconsume') {
var inputId = 'qtytoconsume';
var warehouseId = 'idwarehouse';
}
else {
var inputId = 'qtytoproduce';
var warehouseId = 'idwarehousetoproduce';
}
var nbrTrs = $("tr[name^='"+type+"_"+index+"']").length; // position of line for batch
var $row = $("tr[name='"+type+'_'+index+"_1']").clone(true); // clone last batch line to jQuery object
var qtyOrdered = parseFloat($("#qty_ordered_"+index).val()); // Qty ordered is same for all rows
var qty = parseFloat($("#qtytoproduce-"+index+"-"+nbrTrs).val());
var qty = parseFloat($("#"+inputId+"-"+index+"-"+nbrTrs).val());
var qtyDispatched;
if (mode === 'lessone')
@ -83,7 +91,7 @@ function addDispatchLine(index, type, mode)
else
{
qtyDispatched = parseFloat($("#qty_dispatched_"+index).val()) + qty;
console.log(qty);
console.log($("#qty_dispatched_"+index).val());
// If user did not reduced the qty to dispatch on old line, we keep only 1 on old line and the rest on new line
if (qtyDispatched == qtyOrdered && qtyDispatched > 1) {
qtyDispatched = parseFloat($("#qty_dispatched_"+index).val()) + 1;
@ -103,11 +111,11 @@ function addDispatchLine(index, type, mode)
$row.html($row.html().replace(re1, '_'+index+'_'+(nbrTrs+1)));
$row.html($row.html().replace(re2, '-'+index+'-'+(nbrTrs+1)));
//create new select2 to avoid duplicate id of cloned one
$row.find("select[name='"+'idwarehousetoproduce-'+index+'-'+(nbrTrs+1)+"']").select2();
$row.find("select[name='"+warehouseId+'-'+index+'-'+(nbrTrs+1)+"']").select2();
// TODO find solution to copy selected option to new select
// TODO find solution to keep new tr's after page refresh
//clear value
$row.find("input[name^='qtytoproduce']").val('');
$row.find("input[id^='"+inputId+"']").val('');
//change name of new row
$row.attr('name',type+'_'+index+'_'+(nbrTrs+1));
//insert new row before last row
@ -118,20 +126,20 @@ function addDispatchLine(index, type, mode)
$(".csswarehouse_"+index+"_"+(nbrTrs+1)+":first-child").parent("span.selection").parent(".select2").detach();
/* Suffix of lines are: index _ trs.length */
$("#qtytoproduce-"+index+"-"+(nbrTrs+1)).focus();
if ($("#qtytoproduce-"+index+"-"+(nbrTrs)).val() == 0) {
$("#qtytoproduce-"+index+"-"+(nbrTrs)).val(1);
$("#"+inputId+"-"+index+"-"+(nbrTrs+1)).focus();
if ($("#"+inputId+"-"+index+"-"+(nbrTrs)).val() == 0) {
$("#"+inputId+"-"+index+"-"+(nbrTrs)).val(1);
}
var totalonallines = 0;
for (let i = 1; i <= nbrTrs; i++) {
console.log(i+" = "+parseFloat($("#qtytoproduce-"+index+"-"+i).val()));
totalonallines = totalonallines + parseFloat($("#qtytoproduce-"+index+"-"+i).val());
console.log(i+" = "+parseFloat($("#"+inputId+"-"+index+"-"+i).val()));
totalonallines = totalonallines + parseFloat($("#"+inputId+"-"+index+"-"+i).val());
}
console.log("totalonallines="+totalonallines);
if (totalonallines == qtyOrdered && qtyOrdered > 1) {
var prevouslineqty = $("#qtytoproduce-"+index+"-"+nbrTrs).val();
$("#qtytoproduce-"+index+"-"+(nbrTrs)).val(1);
$("#qtytoproduce-"+index+"-"+(nbrTrs+1)).val(prevouslineqty - 1);
var prevouslineqty = $("#"+inputId+"-"+index+"-"+nbrTrs).val();
$("#"+inputId+"-"+index+"-"+(nbrTrs)).val(1);
$("#"+inputId+"-"+index+"-"+(nbrTrs+1)).val(prevouslineqty - 1);
}
$("#qty_dispatched_"+index).val(qtyDispatched);
@ -145,9 +153,9 @@ function addDispatchLine(index, type, mode)
$("#qty_"+(nbrTrs-1)+"_"+index).val(qty);
}
// Store arbitrary data for dispatch qty input field change event
$("#qtytoproduce-"+index+(nbrTrs)).data('qty', qty);
$("#qtytoproduce-"+index+(nbrTrs)).data('type', type);
$("#qtytoproduce-"+index+(nbrTrs)).data('index', index);
$("#"+inputId+"-"+index+(nbrTrs)).data('qty', qty);
$("#"+inputId+"-"+index+(nbrTrs)).data('type', type);
$("#"+inputId+"-"+index+(nbrTrs)).data('index', index);
}
}

View File

@ -838,6 +838,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$alreadyconsumed += $line2['qty'];
}
$suffix = '_'.$line->id;
print '<!-- Line to dispatch '.$suffix.' -->'."\n";
// hidden fields for js function
print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$line->qty.'">';
print '<input id="qty_dispatched'.$suffix.'" type="hidden" value="'.$alreadyconsumed.'">';
print '<tr>';
// Product
print '<td>'.$tmpproduct->getNomUrl(1);
@ -976,7 +982,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
$i = 1;
print '<!-- Enter line to consume -->'."\n";
print '<tr>';
print '<tr name="batch_'.$line->id.'_'.$i.'">';
print '<td><span class="opacitymedium">'.$langs->trans("ToConsume").'</span></td>';
$preselected = (GETPOSTISSET('qty-'.$line->id.'-'.$i) ? GETPOST('qty-'.$line->id.'-'.$i) : max(0, $line->qty - $alreadyconsumed));
if ($action == 'consumeorproduce' && !GETPOSTISSET('qty-'.$line->id.'-'.$i)) {
@ -989,7 +995,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Qty
print '<td class="right"><input type="text" class="width50 right" name="qty-'.$line->id.'-'.$i.'" value="'.$preselected.'" '.$disable.' ></td>';
print '<td class="right"><input type="text" class="width50 right" id="qtytoconsume-'.$line->id.'-'.$i.'" name="qty-'.$line->id.'-'.$i.'" value="'.$preselected.'" '.$disable.'></td>';
// Cost
if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) {
@ -1004,7 +1010,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
if (empty($line->disable_stock_change)) {
$preselected = (GETPOSTISSET('idwarehouse-'.$line->id.'-'.$i) ? GETPOST('idwarehouse-'.$line->id.'-'.$i) : ($tmpproduct->fk_default_warehouse > 0 ? $tmpproduct->fk_default_warehouse : 'ifone'));
print $formproduct->selectWarehouses($preselected, 'idwarehouse-'.$line->id.'-'.$i, '', 1, 0, $line->fk_product, '', 1, 0, null, 'maxwidth200');
print $formproduct->selectWarehouses($preselected, 'idwarehouse-'.$line->id.'-'.$i, '', 1, 0, $line->fk_product, '', 1, 0, null, 'maxwidth200 csswarehouse_'.$line->id.'_'.$i);
} else {
print '<span class="opacitymedium">'.$langs->trans("DisableStockChange").'</span>';
}
@ -1027,6 +1033,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $formproduct->selectLotDataList('batch-'.$line->id.'-'.$i, 0, $line->fk_product, '', '');
}
print '</td>';
print '<td>';
if ($tmpproduct->status_batch) {
$type = 'batch';
print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$line->id.', \''.$type.'\', \'qtymissingconsume\')"');
}
print '</td>';
}
// Action delete line

View File

@ -77,6 +77,9 @@ if (isset($_SESSION['email_customer'])) {
$object = new Ticket($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('ticketpubliclist', 'globalcard'));
if (empty($conf->ticket->enabled)) {
accessforbidden('', 0, 0, 1);
}
@ -407,6 +410,11 @@ if ($action == "view_ticketlist") {
$varpage = empty($contextpage) ? $url_page_current : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
// allow to display information before list
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
// Filter bar

View File

@ -692,6 +692,7 @@ if ($action == 'create') {
if ($id) {
$head = salaries_prepare_head($object);
$formconfirm = '';
if ($action === 'clone') {
$formquestion = array(
@ -702,17 +703,17 @@ if ($id) {
$formquestion[] = array('type' => 'date', 'name' => 'clone_date_start', 'label' => $langs->trans("DateStart"), 'value' => -1);
$formquestion[] = array('type' => 'date', 'name' => 'clone_date_end', 'label' => $langs->trans("DateEnd"), 'value' => -1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 240);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 240);
}
if ($action == 'paid') {
$text = $langs->trans('ConfirmPaySalary');
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PaySalary'), $text, "confirm_paid", '', '', 2);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PaySalary'), $text, "confirm_paid", '', '', 2);
}
if ($action == 'delete') {
$text = $langs->trans('ConfirmDeleteSalary');
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteSalary'), $text, 'confirm_delete', '', '', 2);
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteSalary'), $text, 'confirm_delete', '', '', 2);
}
if ($action == 'edit') {
@ -720,6 +721,19 @@ if ($id) {
print '<input type="hidden" name="token" value="'.newToken().'">';
}
// Call Hook formConfirm
$parameters = array('formConfirm' => $formconfirm);
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
$formconfirm .= $hookmanager->resPrint;
} elseif ($reshook > 0) {
$formconfirm = $hookmanager->resPrint;
}
// Print form confirm
print $formconfirm;
print dol_get_fiche_head($head, 'card', $langs->trans("SalaryPayment"), -1, 'salary');
$linkback = '<a href="'.DOL_URL_ROOT.'/salaries/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';

View File

@ -5,17 +5,12 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
/* <style type="text/css" > */
:root {
--btncolortext:rgb(<?php print $colortextlink; ?>);
--btncolortext: rgb(<?php print $colortextlink; ?>);
--btncolorbg: #fbfbfb;
--btncolorborderhover: none;
--btncolorborder: #FFF;
/* --butactionbg:rgba(150, 110, 162, 0.95); */
--butactionbg:rgb(118, 145, 225);
--butactionbg:rgba(150, 110, 162, 0.95);
--butactiondeletebg: rgb(234,228,225);
/* tertiary color */
/* --butactionbg:rgb(218, 235, 225); */
/* --butactionbg:rgb(228, 218, 235); */
--butactionbg: rgb(<?php print $butactionbg; ?>);
}
<?php
@ -31,8 +26,8 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
--btncolorbg: rgb(26,27,27);
--btncolorborderhover: #ffffff;
--btncolorborder: #2b2c2e;
--butactionbg: rgb(173,140,79);
--butactiondeletebg: rgb(252,84,91);
--butactionbg: rgb(173,140,79);
}\n";
if ($conf->global->THEME_DARKMODEENABLED != 2) {

View File

@ -5,6 +5,7 @@
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -150,7 +151,9 @@ if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) {
if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
$conf->global->THEME_ELDY_TEXTLINK = $colortextlink;
}
if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
$conf->global->THEME_ELDY_BTNACTION = $butactionbg;
}
// Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on
if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) {
$conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255'; // card
@ -178,6 +181,7 @@ $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp
$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
$fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE2) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE2) : (empty($user->conf->THEME_ELDY_FONT_SIZE2) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE2);

View File

@ -5,6 +5,7 @@
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -73,6 +74,7 @@ $fontsizesmaller = '0.75em';
$topMenuFontSize = '1.1em';
$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
$toolTipFontColor = '#333';
$butactionbg = '150, 110, 162, 0.95';
// text color
$textSuccess = '#28a745';

View File

@ -10,10 +10,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
--btncolorborderhover: none;
--btncolorborder: #FFF;
--butactiondeletebg: rgb(234,228,225);
/* tertiary color */
/* --butactionbg:rgb(218, 235, 225); */
/* --butactionbg:rgb(228, 218, 235); */
--butactionbg:rgb(118, 145, 225);
--butactionbg: rgb(<?php print $butactionbg; ?>);
}
<?php
@ -29,8 +26,8 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
--btncolorbg: rgb(26,27,27);
--btncolorborderhover: #ffffff;
--btncolorborder: #2b2c2e;
--butactionbg:rgb(173,140,79);
--butactiondeletebg: rgb(252,84,91);
--butactionbg: rgb(173,140,79);
}\n";
if ($conf->global->THEME_DARKMODEENABLED != 2) {

View File

@ -6,6 +6,7 @@
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -148,6 +149,9 @@ if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) {
if (!isset($conf->global->THEME_ELDY_TEXTLINK)) {
$conf->global->THEME_ELDY_TEXTLINK = $colortextlink;
}
if (!isset($conf->global->THEME_ELDY_BTNACTION)) {
$conf->global->THEME_ELDY_BTNACTION = $butactionbg;
}
// Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on
if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) {
@ -177,6 +181,7 @@ $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp
$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BTNACTION) ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
$fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE2) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE2) : (empty($user->conf->THEME_ELDY_FONT_SIZE2) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE2);
@ -338,6 +343,7 @@ print '*/'."\n";
--productlinestockod: #002200;
--productlinestocktoolow: #884400;
--infoboxmoduleenabledbgcolor : linear-gradient(0.4turn, #fff, #fff, #fff, #e4efe8);
--butactionbg : #<?php print $butactionbg; ?>;
}
body {
@ -439,7 +445,7 @@ input, select {
margin-top:1px;
}
#mainbody input.button:not(.buttongen):not(.bordertransp), #mainbody a.button:not(.buttongen):not(.bordertransp) {
background: var(--butactionbg);
background: var(--butactionbg);;
color: #FFF !important;
border-radius: 3px;
border-collapse: collapse;

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -68,6 +69,7 @@ $fontsizesmaller = '11';
$topMenuFontSize = '1.1em';
$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
$toolTipFontColor = '#333';
$butactionbg = '150, 110, 162, 0.95';
// text color
$textSuccess = '#28a745';