Merge branch 'develop' of github.com:OPEN-DSI/dolibarr into new-takepos-add-product-on-key-enter

This commit is contained in:
VESSILLER 2020-02-25 08:37:28 +01:00
commit 9cec0a254b
25 changed files with 1114 additions and 1218 deletions

View File

@ -9,7 +9,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: Dolibarr/stale@v1.1.0
- uses: Dolibarr/stale@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. Without comment, this issue will be closed automatically by stale bot in 15 days.'
@ -17,7 +17,7 @@ jobs:
exempt-issue-label: 'Priority High / Blocking'
days-before-stale: 365
days-before-close: 15
operations-per-run: 10
operations-per-run: 30
#stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 15 days.'
stale-pr-label: 'PR Stale (automatic label)'
stale-pr-message:

File diff suppressed because it is too large Load Diff

View File

@ -201,14 +201,14 @@ print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n";
print '<td>'.$langs->trans("Value").'</td>';
print '<td>'.$langs->trans("Comment").'</td>';
print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n";
print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
if (! empty($conf->multicompany->enabled) && !$user->entity)
{
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n";
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
}
print '<td class="center">'.$langs->trans("Action").'</td>';
print getTitleFieldOfList("Action", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
print "</tr>\n";

View File

@ -536,14 +536,16 @@ abstract class CommonDocGenerator
*
* @param Object $line Object line
* @param Translate $outputlangs Lang object to use for output
* @param int $linenumber The number of the line for the substitution of "object_line_pos"
* @return array Return a substitution array
*/
public function get_substitutionarray_lines($line, $outputlangs)
public function get_substitutionarray_lines($line, $outputlangs, $linenumber = 0)
{
// phpcs:enable
global $conf;
$resarray = array(
'line_pos' => $linenumber,
'line_fulldesc'=>doc_getlinedesc($line, $outputlangs),
'line_product_ref'=>$line->product_ref,
'line_product_ref_fourn'=>$line->ref_fourn, // for supplier doc lines

View File

@ -1145,15 +1145,16 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
* @param string $morehtmlright Add more html content on right of tabs title
* @param string $morecss More Css
* @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value.
* @return void
*/
function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '')
function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0)
{
print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss);
print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss, $limittoshow);
}
/**
* Show tab header of a card
* Show tabs of a record
*
* @param array $links Array of tabs
* @param string $active Active tab name
@ -1163,9 +1164,10 @@ function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
* @param string $morehtmlright Add more html content on right of tabs title
* @param string $morecss More Css
* @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value.
* @return string
*/
function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '')
function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0)
{
global $conf, $langs, $hookmanager;
@ -1202,11 +1204,13 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
if (count($keys)) $maxkey = max($keys);
}
if (!empty($conf->dol_optimize_smallscreen)) $conf->global->MAIN_MAXTABS_IN_CARD = 2;
// Show tabs
// if =0 we don't use the feature
$limittoshow = (empty($conf->global->MAIN_MAXTABS_IN_CARD) ? 99 : $conf->global->MAIN_MAXTABS_IN_CARD);
if (empty($limittoshow)) {
$limittoshow = (empty($conf->global->MAIN_MAXTABS_IN_CARD) ? 99 : $conf->global->MAIN_MAXTABS_IN_CARD);
}
if (!empty($conf->dol_optimize_smallscreen)) $limittoshow = 2;
$displaytab = 0;
$nbintab = 0;
$popuptab = 0;
@ -4082,11 +4086,22 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
$tmpfield = explode(',', $field);
$field1 = trim($tmpfield[0]); // If $field is 'd.datep,d.id', it becomes 'd.datep'
if (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE)) {
$prefix = 'wrapcolumntitle '.$prefix;
}
//var_dump('field='.$field.' field1='.$field1.' sortfield='.$sortfield.' sortfield1='.$sortfield1);
// If field is used as sort criteria we use a specific css class liste_titre_sel
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) $out .= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '.$moreattrib.'>';
else $out .= '<'.$tag.' class="'.$prefix.'liste_titre" '.$moreattrib.'>';
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) {
$out .= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '.$moreattrib;
$out .= (($field && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && preg_match('/^[a-zA-Z_0-9\s\.\-:]*$/', $name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
else {
$out .= '<'.$tag.' class="'.$prefix.'liste_titre" '.$moreattrib;
$out .= (($field && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && preg_match('/^[a-zA-Z_0-9\s\.\-:]*$/', $name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
if (empty($thead) && $field && empty($disablesortlink)) // If this is a sort field
{
@ -4119,7 +4134,9 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
}
}
$sortordertouseinlink = preg_replace('/,$/', '', $sortordertouseinlink);
$out .= '<a class="reposition" href="'.$file.'?sortfield='.$field.'&sortorder='.$sortordertouseinlink.'&begin='.$begin.$options.'">';
$out .= '<a class="reposition" href="'.$file.'?sortfield='.$field.'&sortorder='.$sortordertouseinlink.'&begin='.$begin.$options.'"';
//$out .= (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
if ($tooltip) $out .= $form->textwithpicto($langs->trans($name), $langs->trans($tooltip));
@ -4287,7 +4304,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
if ($picto && $titre) print '<td class="nobordernopadding widthpictotitle opacityhigh valignmiddle col-picto">'.img_picto('', $picto, 'class="valignmiddle pictotitle widthpictotitle"', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding valignmiddle col-title">';
print '<div class="titre inline-block">'.$titre;
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')';
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print '<span class="opacitymedium colorblack paddingleft">('.$totalnboflines.')</span>';
print '</div></td>';
// Center

View File

@ -2454,7 +2454,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide
*/
function getTaskProgressBadge($task, $label = '', $tooltip = '')
{
global $conf;
global $conf, $langs;
$out = '';
$badgeClass = '';
@ -2472,12 +2472,15 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '')
if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) {
$badgeClass .= 'badge-danger';
if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%';
}
elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10%
$badgeClass .= 'badge-warning';
if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%';
}
else {
$badgeClass .= 'badge-success';
if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("Expected").' '.$progressCalculated.'%';
}
}
}

View File

@ -411,9 +411,11 @@ class doc_generic_bom_odt extends ModelePDFBom
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -427,9 +427,11 @@ class doc_generic_order_odt extends ModelePDFCommandes
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -408,9 +408,11 @@ class doc_generic_contract_odt extends ModelePDFContract
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -435,9 +435,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -418,9 +418,11 @@ class doc_generic_mo_odt extends ModelePDFMo
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -456,9 +456,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -421,9 +421,11 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -445,9 +445,11 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

View File

@ -286,99 +286,100 @@ if (empty($reshook))
$lines = $srcobject->lines;
}
$fk_parent_line = 0;
$num = count($lines);
if (is_array($lines)) {
$num = count($lines);
for ($i = 0; $i < $num; $i++)
{
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : Product::TYPE_PRODUCT);
for ($i = 0; $i < $num; $i++)
{
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : Product::TYPE_PRODUCT);
if ($product_type == Product::TYPE_SERVICE || !empty($conf->global->FICHINTER_PRINT_PRODUCTS)) { //only services except if config includes products
$duration = 3600; // Default to one hour
if ($product_type == Product::TYPE_SERVICE || !empty($conf->global->FICHINTER_PRINT_PRODUCTS)) { //only services except if config includes products
$duration = 3600; // Default to one hour
// Predefined products & services
if ($lines[$i]->fk_product > 0)
{
$prod = new Product($db);
$prod->id = $lines[$i]->fk_product;
// Predefined products & services
if ($lines[$i]->fk_product > 0)
{
$prod = new Product($db);
$prod->id = $lines[$i]->fk_product;
// Define output language
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$prod->getMultiLangs();
// We show if duration is present on service (so we get it)
$prod->fetch($lines[$i]->fk_product);
$outputlangs = $langs;
$newlang = '';
if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
if (empty($newlang)) $newlang = $srcobject->thirdparty->default_lang;
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
// Define output language
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$prod->getMultiLangs();
// We show if duration is present on service (so we get it)
$prod->fetch($lines[$i]->fk_product);
$outputlangs = $langs;
$newlang = '';
if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
if (empty($newlang)) $newlang = $srcobject->thirdparty->default_lang;
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$label = (!empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
} else {
$prod->fetch($lines[$i]->fk_product);
$label = $lines[$i]->product_label;
}
$label = (!empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
} else {
$prod->fetch($lines[$i]->fk_product);
$label = $lines[$i]->product_label;
}
if ($prod->duration_value && $conf->global->FICHINTER_USE_SERVICE_DURATION) {
switch ($prod->duration_unit) {
default:
case 'h':
$mult = 3600;
break;
case 'd':
$mult = 3600 * 24;
break;
case 'w':
$mult = 3600 * 24 * 7;
break;
case 'm':
$mult = (int) 3600 * 24 * (365 / 12); // Average month duration
break;
case 'y':
$mult = 3600 * 24 * 365;
break;
if ($prod->duration_value && $conf->global->FICHINTER_USE_SERVICE_DURATION) {
switch ($prod->duration_unit) {
default:
case 'h':
$mult = 3600;
break;
case 'd':
$mult = 3600 * 24;
break;
case 'w':
$mult = 3600 * 24 * 7;
break;
case 'm':
$mult = (int) 3600 * 24 * (365 / 12); // Average month duration
break;
case 'y':
$mult = 3600 * 24 * 365;
break;
}
$duration = $prod->duration_value * $mult * $lines[$i]->qty;
}
$duration = $prod->duration_value * $mult * $lines[$i]->qty;
}
$desc = $lines[$i]->product_ref;
$desc .= ' - ';
$desc .= $label;
$desc = $lines[$i]->product_ref;
$desc .= ' - ';
$desc .= $label;
$desc .= '<br>';
}
// Common part (predefined or free line)
$desc .= dol_htmlentitiesbr($lines[$i]->desc);
$desc .= '<br>';
}
// Common part (predefined or free line)
$desc .= dol_htmlentitiesbr($lines[$i]->desc);
$desc .= '<br>';
$desc .= ' ('.$langs->trans('Quantity').': '.$lines[$i]->qty.')';
$desc .= ' ('.$langs->trans('Quantity').': '.$lines[$i]->qty.')';
$timearray = dol_getdate(dol_now());
$date_intervention = dol_mktime(0, 0, 0, $timearray['mon'], $timearray['mday'], $timearray['year']);
$timearray = dol_getdate(dol_now());
$date_intervention = dol_mktime(0, 0, 0, $timearray['mon'], $timearray['mday'], $timearray['year']);
if ($product_type == Product::TYPE_PRODUCT) {
$duration = 0;
}
if ($product_type == Product::TYPE_PRODUCT) {
$duration = 0;
}
$predef = '';
$predef = '';
// Extrafields
$extrafields->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef);
// Extrafields
$extrafields->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef);
$result = $object->addline(
$user,
$id,
$desc,
$date_intervention,
$duration,
$array_options
);
$result = $object->addline(
$user,
$id,
$desc,
$date_intervention,
$duration,
$array_options
);
if ($result < 0)
{
$error++;
break;
if ($result < 0)
{
$error++;
break;
}
}
}
}

View File

@ -1757,9 +1757,11 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
/**
* Build the tooltip on user login
*
* @return string HTML content
* @param int $hideloginname Hide login name. Show only the image.
* @param string $urllogout URL for logout
* @return string HTML content
*/
function top_menu_user()
function top_menu_user($hideloginname = 0, $urllogout = '')
{
global $langs, $conf, $db, $hookmanager, $user;
global $dolibarr_main_authentication, $dolibarr_main_demo;
@ -1830,9 +1832,10 @@ function top_menu_user()
}
}
$logoutLink = '<a accesskey="l" href="'.DOL_URL_ROOT.'/user/logout.php" class="button-top-menu-dropdown" ><i class="fa fa-sign-out-alt"></i> '.$langs->trans("Logout").'</a>';
if (empty($urllogout)) {
$urllogout = DOL_URL_ROOT.'/user/logout.php';
}
$logoutLink = '<a accesskey="l" href="'.$urllogout.'" class="button-top-menu-dropdown" ><i class="fa fa-sign-out-alt"></i> '.$langs->trans("Logout").'</a>';
$profilLink = '<a accesskey="l" href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="button-top-menu-dropdown" ><i class="fa fa-user"></i> '.$langs->trans("Card").'</a>';
@ -1857,9 +1860,12 @@ function top_menu_user()
$btnUser = '<!-- div for user link -->
<div id="topmenu-login-dropdown" class="userimg atoplogin dropdown user user-menu inline-block">
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="dropdown-toggle login-dropdown-a" data-toggle="dropdown">
'.$userImage.'
<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>
<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="dropdown-toggle login-dropdown-a" data-toggle="dropdown">';
$btnUser .= $userImage;
if (empty($hideloginname)) {
$btnUser .= '<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone paddingleft">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span>';
}
$btnUser .= '
</a>
<div class="dropdown-menu">
<!-- User image -->

View File

@ -1652,8 +1652,7 @@ $head[$h][1] = $langs->trans("DangerZone");
$head[$h][2] = 'deletemodule';
$h++;
dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic', 0, $infomodulesfound); // Modules
dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic', 0, $infomodulesfound, '', 8); // Modules
if ($module == 'initmodule')
{

View File

@ -422,9 +422,11 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
}
if ($foundtagforlines)
{
$linenumber = 0;
foreach ($object->lines as $line)
{
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

View File

@ -233,8 +233,10 @@ table.postablelines tr td {
padding-top: 3px;
padding-bottom: 3px;
}
.posinvoiceline td {
height: 40px !important;
background-color: var(--colorbacklineimpair1);
}
div.paymentbordline
@ -268,7 +270,7 @@ div.paymentbordline
.row1withhead{
margin: 0 auto;
width: 100%;
height: calc(50% - 35px);
height: calc(40% - 50px);
padding-top: 5px;
}
@ -281,7 +283,7 @@ div.paymentbordline
.row2withhead{
margin: 0 auto;
width: 100%;
height: 50%;
height: 60%;
}
.div1{
@ -401,26 +403,51 @@ div.description_content {
.header{
margin: 0 auto;
width: 100%;
height: 35px;
height: 50px;
background: rgb(60,70,100);
}
.topnav-left {
float: left;
}
.topnav-right {
}
.topnav div.login_block_other, .topnav div.login_block_user {
max-width: unset;
width: unset;
}
.topnav{
background: rgb(<?php echo $colorbackhmenu1 ?>);
background-image: linear-gradient(-45deg, <?php echo colorAdjustBrightness(colorArrayToHex(colorStringToArray($colorbackhmenu1)), '5'); ?>, rgb(<?php echo $colorbackhmenu1 ?>));
overflow: hidden;
height: 100%;
}
.topnav .tmenu {
display: block;
}
.topnav a{
float: left;
color: #f2f2f2;
padding: 6px 16px;
text-decoration: none;
}
.topnav .login_block_other a {
padding: 5px 10px;
margin-left: 4px;
font-size: 1.3em;
}
.topnav-right > a {
font-size: 17px;
}
.topnav a:hover{
.topnav-left a {
padding: 7px 4px 7px 4px;
margin: 8px;
margin-left: 4px;
}
.topnav-left a:hover, .topnav .login_block_other a:hover {
background-color: #ddd;
color: black;
}
@ -434,8 +461,10 @@ div.description_content {
color: #000;
float: left;
border-bottom: none !important;
margin-top: 4px;
margin-left: 6px;
font-size: 1.3em;
max-width: 250px;
border-radius: 5px;
}
@media screen and (min-width: 892px) {
@ -494,7 +523,23 @@ div.description_content {
/* For small screens */
@media screen and (max-width: 1024px) {
.topnav input[type="text"] {
max-width: 150px;
}
}
@media screen and (max-width: 767px) {
.header {
position: sticky;
top: 0;
z-index: 10;
}
.topnav input[type="text"] {
max-width: 100px;
}
.topnav-right {
float: unset;
}
@ -511,6 +556,11 @@ div.description_content {
width: 25%;
}
.row1withhead{
height: calc(40% - 100px);
}
div.div1 {
padding-bottom: 0;
margin-bottom: 10px;
@ -528,6 +578,7 @@ div.description_content {
}
div.div3 {
margin-top: 8px;
height: unset;
}

View File

@ -461,7 +461,7 @@ function Search2(keyCodeForEnter) {
$("#prodesc"+i).text(data[i]['label']);
$("#prodivdesc"+i).show();
$("#proimg"+i).attr("title", titlestring);
$("#proimg"+i).attr("src", "genimg/?query=pro&id="+data[i]['rowid']);
$("#proimg"+i).attr("src", "genimg/index.php?query=pro&id="+data[i]['rowid']);
$("#prodiv"+i).data("rowid", data[i]['rowid']);
$("#prodiv"+i).data("iscat", 0);
}
@ -665,20 +665,27 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
<div class="header">
<div class="topnav">
<div class="topnav-left">
<a onclick="TerminalsDialog();">
<a class="topnav-terminalhour" onclick="TerminalsDialog();">
<?php echo $langs->trans("Terminal")." ";
if ($_SESSION["takeposterminal"] == "") echo "1"; else echo $_SESSION["takeposterminal"];
echo " - ".dol_print_date(dol_now(), "dayhour");
if ($_SESSION["takeposterminal"] == "") echo "1";
else echo $_SESSION["takeposterminal"];
echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "dayhour").'</span>';
?>
</a>
<a onclick="Customer();"><?php echo $langs->trans("Customer"); ?></a>
</div>
<div class="topnav-right">
<div class="login_block_other">
<input type="text" id="search" name="search" onkeyup="Search2(<?php echo $keyCodeForEnter; ?>);" placeholder="<?php echo $langs->trans("Search"); ?>" autofocus>
<a onclick="ClearSearch();"><span class="fa fa-backspace"></span></a>
<a onclick="window.location.href='<?php echo DOL_URL_ROOT; ?>';"><span class="fas fa-sign-out-alt"></span></a>
<a onclick="window.location.href='<?php echo DOL_URL_ROOT; ?>/user/logout.php';"><span class="fas fa-user"></span></a>
<a onclick="window.location.href='<?php echo DOL_URL_ROOT; ?>';"><span class="fas fa-home"></span></a>
<a onclick="FullScreen();"><span class="fa fa-expand-arrows-alt"></span></a>
</div>
<div class="login_block_user">
<?php
print top_menu_user(1, DOL_URL_ROOT.'/user/logout.php');
?>
</div>
</div>
</div>
</div>
@ -809,8 +816,6 @@ if (!empty($reshook)) {
if ($r % 3 == 2) $menus[$r++] = array('title'=>'', 'style'=>'visibility: hidden;');
$menus[$r++] = array('title'=>'<span class="fa fa-home paddingrightonly"></span><div class="trunc">'.$langs->trans("BackOffice").'</div>', 'action'=>'window.open(\''.(DOL_URL_ROOT ? DOL_URL_ROOT : '/').'\', \'_backoffice\');');
if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
$menus[$r++] = array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"></span><div class="trunc">'.$langs->trans("Logout").'</div>', 'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';');
}

View File

@ -122,7 +122,7 @@ button.dropdown-item.global-search-item {
.tmenu .open.dropdown, .tmenu .open.dropdown {
background: rgba(0, 0, 0, 0.1);
}
.tmenu .dropdown-menu, .login_block .dropdown-menu {
.tmenu .dropdown-menu, .login_block .dropdown-menu, .topnav .dropdown-menu {
position: absolute;
right: 2px;
<?php echo $left; ?>: auto;
@ -135,20 +135,23 @@ button.dropdown-item.global-search-item {
.user-body {
color: #333;
}
.side-nav-vert .user-menu .dropdown-menu {
.side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu {
border-top-right-radius: 0;
border-top-left-radius: 0;
padding: 1px 0 0 0;
border-top-width: 0;
width: 300px;
}
.side-nav-vert .user-menu .dropdown-menu {
.topnav .user-menu .dropdown-menu {
top: 50px;
}
.side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.side-nav-vert .user-menu .dropdown-menu > .user-header {
.side-nav-vert .user-menu .dropdown-menu > .user-header, .topnav .user-menu .dropdown-menu > .user-header {
min-height: 100px;
padding: 10px;
text-align: center;
@ -333,7 +336,7 @@ a.top-menu-dropdown-link {
margin-right: 5px;
display: inline-block;
content: "\f0da";
color: rgba(0,0,0,0.3);
/* color: rgba(0,0,0,0.3); */
}
@ -348,22 +351,20 @@ a.top-menu-dropdown-link {
*/
.dropdown-search-input {
width: 100%;
width: 280px;
padding: 10px 35px 10px 20px;
background-color: transparent;
font-size: 14px;
line-height: 16px;
/*font-size: 14px;
line-height: 16px;*/
box-sizing: border-box;
color: #575756;
background-color: transparent;
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-size: 16px 16px;
background-position: 95% center;
border-radius: 50px;
border-radius: 10px;
border: 1px solid #c4c4c2 !important;
transition: all 250ms ease-in-out;
backface-visibility: hidden;

View File

@ -124,6 +124,12 @@ select.vmenusearchselectcombo {
background-color: unset;
}
th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) {
overflow: hidden;
white-space: nowrap;
max-width: 120px;
text-overflow: ellipsis;
}
.liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month],
.liste_titre input[name=month_lim], .liste_titre input[name=month_start], .liste_titre input[name=month_end], .liste_titre input[name=month_create],
@ -328,6 +334,13 @@ select.flat, form.flat select {
.opacitytransp {
opacity: 0;
}
.colorwhite {
color: #fff;
}
.colorblack {
color: #000;
}
select:invalid {
color: gray;
}
@ -362,6 +375,7 @@ input#onlinepaymenturl, input#directdownloadlink {
opacity: 0.7;
}
div#moretabsList, div#moretabsListaction {
z-index: 5;
}
@ -1983,13 +1997,7 @@ a.tmenuimage:hover{
$found = 0; $url = '';
foreach ($conf->file->dol_document_root as $dirroot)
{
if (file_exists($dirroot."/".$val."/img/".$val."_over.png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1);
$found = 1;
break;
}
elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité
if (file_exists($dirroot."/".$val."/img/".$val.".png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
$found = 1;
@ -2000,10 +2008,11 @@ a.tmenuimage:hover{
if (!$found)
{
if (!defined('DISABLE_FONT_AWSOME')) {
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one. */\n";
print "/* Overwrite this definition in your own css with a different content to use your own font awesome icon. */\n";
print 'div.mainmenu.'.$val.'::before {
content: "\f249";
}';
}'."\n";
}
else
{

View File

@ -279,6 +279,12 @@ textarea.cke_source:focus
box-shadow: none;
}
th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) {
overflow: hidden;
white-space: nowrap;
max-width: 120px;
text-overflow: ellipsis;
}
.liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month],
.liste_titre input[name=month_lim], .liste_titre input[name=month_start], .liste_titre input[name=month_end], .liste_titre input[name=month_create],
@ -465,6 +471,13 @@ select.flat, form.flat select {
.opacitytransp {
opacity: 0;
}
.colorwhite {
color: #fff;
}
.colorblack {
color: #000;
}
select:invalid {
color: gray;
}
@ -2051,13 +2064,7 @@ div.mainmenu.website {
$found = 0; $url = '';
foreach ($conf->file->dol_document_root as $dirroot)
{
if (file_exists($dirroot."/".$val."/img/".$val."_over.png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'_over.png', 1);
$found = 1;
break;
}
elseif (file_exists($dirroot."/".$val."/img/".$val.".png")) // Retro compatibilité
if (file_exists($dirroot."/".$val."/img/".$val.".png"))
{
$url = dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
$found = 1;
@ -2075,7 +2082,8 @@ div.mainmenu.website {
}
else
{
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n";
print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one. */\n";
print "/* Overwrite this definition in your own css with a different content to use your own font awesome icon. */\n";
$url = dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic, 4))."_over.png", 1);
print "div.mainmenu.".$val." {\n";
print " background-image: url(".$url.");\n";