Work on 6.0 features.
This commit is contained in:
parent
0838953ef7
commit
219bcb0d54
@ -471,12 +471,10 @@ if ($mode == 'common')
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
//print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
//print '</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -485,8 +483,6 @@ if ($mode == 'common')
|
||||
$moreforfilter='';
|
||||
|
||||
// Show list of modules
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" summary="list_of_modules" id="list_of_modules" >'."\n";
|
||||
|
||||
$oldfamily='';
|
||||
|
||||
@ -570,14 +566,15 @@ if ($mode == 'common')
|
||||
// Print a separator if we change family
|
||||
if ($familykey!=$oldfamily)
|
||||
{
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td colspan="5">';
|
||||
if ($oldfamily) print '</table></div><br>';
|
||||
|
||||
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||
print $familytext;
|
||||
print "</td>\n";
|
||||
print '<td colspan="2" align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
||||
print "</tr>\n";
|
||||
$atleastoneforfamily=0;
|
||||
print_fiche_titre($familytext, '', '');
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste" summary="list_of_modules">'."\n";
|
||||
|
||||
$atleastoneforfamily=0;
|
||||
}
|
||||
|
||||
$atleastoneforfamily++;
|
||||
@ -606,43 +603,38 @@ if ($mode == 'common')
|
||||
$imginfo="info_black";
|
||||
}
|
||||
|
||||
print '<tr '.$bc[$var].">\n";
|
||||
print '<tr>'."\n";
|
||||
|
||||
// Picto
|
||||
print ' <td valign="top" width="14" align="center">';
|
||||
// Picto + Name of module
|
||||
print ' <td width="200px">';
|
||||
$alttext='';
|
||||
//if (is_array($objMod->need_dolibarr_version)) $alttext.=($alttext?' - ':'').'Dolibarr >= '.join('.',$objMod->need_dolibarr_version);
|
||||
//if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin);
|
||||
if (! empty($objMod->picto))
|
||||
{
|
||||
if (preg_match('/^\//i',$objMod->picto)) print img_picto($alttext,$objMod->picto,' width="14px"',1);
|
||||
else print img_object($alttext,$objMod->picto,' width="14px"');
|
||||
else print img_object($alttext, $objMod->picto, 'class="valignmiddle" width="14px"');
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($alttext,'generic');
|
||||
print img_object($alttext, 'generic', 'class="valignmiddle"');
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Name
|
||||
print '<td class="tdtop">'.$objMod->getName();
|
||||
print ' <span class="valignmiddle">'.$objMod->getName().'</span>';
|
||||
print "</td>\n";
|
||||
|
||||
// Desc
|
||||
print '<td class="tdtop">';
|
||||
print '<td class="valignmiddle tdoverflowmax300">';
|
||||
print nl2br($objMod->getDesc());
|
||||
print "</td>\n";
|
||||
|
||||
// Help
|
||||
print '<td align="center" valign="top" class="nowrap" style="width: 82px;">';
|
||||
|
||||
print '<td class="center nowrap" style="width: 82px;">';
|
||||
//print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20', 0, 2, 1);
|
||||
print '<a href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.$objMod->numero.'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto($langs->trans("ClickToShowDescription"), $imginfo).'</a>';
|
||||
|
||||
print '</td>';
|
||||
|
||||
// Version
|
||||
print '<td align="center" valign="top" class="nowrap">';
|
||||
print '<td class="center nowrap" width="120px">';
|
||||
print $versiontrans;
|
||||
print "</td>\n";
|
||||
|
||||
@ -651,8 +643,12 @@ if ($mode == 'common')
|
||||
{
|
||||
$disableSetup = 0;
|
||||
|
||||
print '<td align="center" valign="middle">';
|
||||
if (! empty($objMod->disabled))
|
||||
print '<td class="center valignmiddle" width="80px">';
|
||||
if (! empty($arrayofwarnings[$modName]))
|
||||
{
|
||||
print '<!-- This module has a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
|
||||
}
|
||||
if (! empty($objMod->disabled))
|
||||
{
|
||||
print $langs->trans("Disabled");
|
||||
}
|
||||
@ -674,7 +670,7 @@ if ($mode == 'common')
|
||||
{
|
||||
if (is_array($objMod->config_page_url))
|
||||
{
|
||||
print '<td class="tdsetuppicto" align="right" valign="top">';
|
||||
print '<td class="tdsetuppicto right" width="40px"">';
|
||||
$i=0;
|
||||
foreach ($objMod->config_page_url as $page)
|
||||
{
|
||||
@ -700,22 +696,22 @@ if ($mode == 'common')
|
||||
}
|
||||
else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs))
|
||||
{
|
||||
print '<td class="tdsetuppicto" align="right" valign="middle"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td class="tdsetuppicto" align="right" valign="middle"><a href="'.$objMod->config_page_url.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px"><a href="'.$objMod->config_page_url.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td class="tdsetuppicto" align="right" valign="middle">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
}
|
||||
|
||||
}
|
||||
else // Module not yet activated
|
||||
{
|
||||
print '<td align="center" valign="middle">';
|
||||
print '<td class="center valignmiddle" width="80px">';
|
||||
if (! empty($objMod->always_enabled))
|
||||
{
|
||||
// Should never happened
|
||||
@ -754,17 +750,20 @@ if ($mode == 'common')
|
||||
}
|
||||
}
|
||||
print '<!-- Message to show: '.$warningmessage.' -->'."\n";
|
||||
print '<a class="reposition" href="modules.php?id='.$objMod->numero.'&module_position='.$module_position.'&action=set&value=' . $modName . '&mode=' . $mode . $param . '">';
|
||||
print '<a class="reposition" href="modules.php?id='.$objMod->numero.'&module_position='.$module_position.'&action=set&value=' . $modName . '&mode=' . $mode . $param . '"';
|
||||
if ($warningmessage) print ' onclick="return confirm(\''.dol_escape_js($warningmessage).'\');"';
|
||||
print '>';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print "</a>\n";
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td class="tdsetuppicto" align="right" valign="middle">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourcefore.net>
|
||||
*
|
||||
* 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
|
||||
@ -16,20 +16,19 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup blockchainlog Module BlockChainLog
|
||||
* \defgroup blockedlog Module BlockedLog
|
||||
* \brief Add a log into a block chain for some actions.
|
||||
* \file htdocs/core/modules/modBlockChainLog.class.php
|
||||
* \ingroup blockchainlog
|
||||
* \brief Description and activation file for module BlockChainLog
|
||||
* \file htdocs/core/modules/modBlockedLog.class.php
|
||||
* \ingroup blockedlog
|
||||
* \brief Description and activation file for module BlockedLog
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
/**
|
||||
* Class to describe a Cron module
|
||||
*/
|
||||
class modBlockChainLog extends DolibarrModules
|
||||
class modBlockedLog extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
@ -47,14 +46,14 @@ class modBlockChainLog extends DolibarrModules
|
||||
$this->family = "technic";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Enable a log of some business events into a non reversible block chain. This module may be mandatory for some countries.";
|
||||
$this->description = "Enable a log on some business events into a reserved log. This module may be mandatory for some countries.";
|
||||
$this->version = 'development'; // 'development', 'experimental' or 'dolibarr' or version
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
|
||||
$this->special = 1;
|
||||
// Name of image file used for this module.
|
||||
$this->picto='skype';
|
||||
$this->picto='technic';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
@ -64,11 +64,12 @@ class modFacture extends DolibarrModules
|
||||
$this->dirs = array("/facture/temp");
|
||||
|
||||
// Dependencies
|
||||
$this->depends = array('always'=>"modSociete", 'FR'=>'modBlockChainLog');
|
||||
$this->depends = array('always'=>"modSociete", 'FR'=>'modBlockedLog');
|
||||
$this->requiredby = array("modComptabilite","modAccounting");
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("bills","companies","compta","products");
|
||||
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='text')
|
||||
$this->warnings_activation = array('FR'=>'WarningNoteModuleInvoiceForFrenchLaw'); // Warning to show when we activate module. array('always'='text') or array('FR'='text')
|
||||
$this->warnings_activation = array();
|
||||
$this->warnings_activation_ext = array('FR'=>'WarningInstallationMayBecomeNotCompliantWithLaw'); // Warning to show when we activate an external module. array('always'='text') or array('FR'='text')
|
||||
|
||||
// Config pages
|
||||
|
||||
@ -1663,6 +1663,7 @@ ModuleEnabledAdminMustCheckRights=Module has been activated. Permissions for act
|
||||
UserHasNoPermissions=This user has no permission defined
|
||||
TypeCdr=Use "None" if the date of payment term is date of invoice plus a delta in days (delta is field "Nb of days")<br>Use "At end of month", if, after delta, the date must be increased to reach the end of month (+ an optional "Offset" in days)<br>Use "Current/Next" to have payment term date being the first Nth of the month (N is stored into field "Nb of days")
|
||||
BaseCurrency=Reference currency of the company (go into setup of company to change this)
|
||||
WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with french laws (Loi Finance 2016).
|
||||
WarningInstallationMayBecomeNotCompliantWithLaw=You try to install the module <strong>%s</strong> that is an external module. Activate an external module only if it does not alterate negatively the behavior required by your country laws (%s). If the module bring a non legal feature, you are the only responsible for the use of a non-compliant software.
|
||||
##### Resource ####
|
||||
ResourceSetup=Configuration du module Resource
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/product/admin/expression_globals.php
|
||||
* \file htdocs/product/admin/dynamic_prices.php
|
||||
* \ingroup product
|
||||
* \brief Page for configuring dynamic prices
|
||||
*/
|
||||
@ -161,16 +161,25 @@ if ($action != 'create_updater' && $action != 'edit_updater') {
|
||||
print '<td width="80"> </td>'; //Space for buttons
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
foreach ($price_globals->listGlobalVariables() as $i=>$entry) {
|
||||
$var = !$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$entry->code.'</td>';
|
||||
print '<td>'.$entry->description.'</td>';
|
||||
print '<td>'.price($entry->value).'</td>';
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit_variable&selection='.$entry->id.'">'.img_edit().'</a> ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete_variable&selection='.$entry->id.'">'.img_delete().'</a></td>';
|
||||
print '</tr>';
|
||||
$arrayglobalvars=$price_globals->listGlobalVariables();
|
||||
if (! empty($arrayglobalvars))
|
||||
{
|
||||
foreach ($arrayglobalvars as $i=>$entry) {
|
||||
$var = !$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$entry->code.'</td>';
|
||||
print '<td>'.$entry->description.'</td>';
|
||||
print '<td>'.price($entry->value).'</td>';
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit_variable&selection='.$entry->id.'">'.img_edit().'</a> ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete_variable&selection='.$entry->id.'">'.img_delete().'</a></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr colspan="7"><td class="opacitymedium">';
|
||||
print $langs->trans("None");
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
@ -218,16 +227,9 @@ if ($action == 'create_variable' || $action == 'edit_variable') {
|
||||
print '<input type="submit" class="button" name="cancel" id="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
} else if ($action != 'create_updater') {
|
||||
//Action Buttons
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create_variable">'.$langs->trans("Add").'</a>';
|
||||
print '</div>';
|
||||
//Separator is only need for updaters table is showed after buttons
|
||||
print '<br><br>';
|
||||
}
|
||||
|
||||
//Updaters table
|
||||
// Updaters table
|
||||
if ($action != 'create_variable' && $action != 'edit_variable') {
|
||||
print $langs->trans("GlobalVariableUpdaters");
|
||||
print '<table summary="listofattributes" class="noborder" width="100%">';
|
||||
@ -241,26 +243,34 @@ if ($action != 'create_variable' && $action != 'edit_variable') {
|
||||
print '<td width="80"> </td>'; //Space for buttons
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
foreach ($price_updaters->listUpdaters() as $i=>$entry) {
|
||||
$code = "";
|
||||
if ($entry->fk_variable > 0) {
|
||||
$res = $price_globals->fetch($entry->fk_variable);
|
||||
if ($res > 0) {
|
||||
$code = $price_globals->code;
|
||||
}
|
||||
}
|
||||
$var = !$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$code.'</td>';
|
||||
print '<td>'.$entry->description.'</td>';
|
||||
print '<td>'.$langs->trans("GlobalVariableUpdaterType".$entry->type).'</td>';
|
||||
print '<td style="max-width: 250px; word-wrap: break-word; white-space: pre-wrap;">'.$entry->parameters.'</td>';
|
||||
print '<td>'.$entry->update_interval.'</td>';
|
||||
print '<td>'.$entry->getLastUpdated().'</td>';
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit_updater&selection='.$entry->id.'">'.img_edit().'</a> ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete_updater&selection='.$entry->id.'">'.img_delete().'</a></td>';
|
||||
print '</tr>';
|
||||
$arraypriceupdaters = $price_updaters->listUpdaters();
|
||||
if (! empty($arraypriceupdaters))
|
||||
{
|
||||
foreach ($arraypriceupdaters as $i=>$entry) {
|
||||
$code = "";
|
||||
if ($entry->fk_variable > 0) {
|
||||
$res = $price_globals->fetch($entry->fk_variable);
|
||||
if ($res > 0) {
|
||||
$code = $price_globals->code;
|
||||
}
|
||||
}
|
||||
print '<tr>';
|
||||
print '<td>'.$code.'</td>';
|
||||
print '<td>'.$entry->description.'</td>';
|
||||
print '<td>'.$langs->trans("GlobalVariableUpdaterType".$entry->type).'</td>';
|
||||
print '<td style="max-width: 250px; word-wrap: break-word; white-space: pre-wrap;">'.$entry->parameters.'</td>';
|
||||
print '<td>'.$entry->update_interval.'</td>';
|
||||
print '<td>'.$entry->getLastUpdated().'</td>';
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit_updater&selection='.$entry->id.'">'.img_edit().'</a> ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete_updater&selection='.$entry->id.'">'.img_delete().'</a></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr colspan="7"><td class="opacitymedium">';
|
||||
print $langs->trans("None");
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/product/dynamic_price/editor.php
|
||||
* \file htdocs/product/dynamic_price/editor.php
|
||||
* \ingroup product
|
||||
* \brief Page for editing expression
|
||||
* \brief Page for editing expression
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -60,6 +60,7 @@ else if ($action != 'delete')
|
||||
$price_expression->fetch($eid);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -157,23 +158,28 @@ if ($action == 'delete')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
//Header
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
print load_fiche_titre($langs->trans("PriceExpressionEditor"));
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
print load_fiche_titre($langs->trans("PriceExpressionEditor"));
|
||||
|
||||
//Form/Table
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'&tab='.$tab.'&eid='.$eid.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value='.($eid == 0 ? 'add' : 'update').'>';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Price expression selector
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("PriceExpressionSelected").'</td><td>';
|
||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("PriceExpressionSelected").'</td><td>';
|
||||
$price_expression_list = array(0 => $langs->trans("New")); //Put the new as first option
|
||||
foreach ($price_expression->list_price_expression() as $entry) {
|
||||
$price_expression_list[$entry->id] = $entry->title;
|
||||
@ -204,6 +210,8 @@ $doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
//Buttons
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="butAction" value="'.$langs->trans("Save").'">';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
@ -418,7 +418,7 @@ $sql.= " e.label as stock, e.rowid as entrepot_id, e.lieu,";
|
||||
$sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,";
|
||||
$sql.= " m.batch,";
|
||||
$sql.= " pl.rowid as lotid, pl.eatby, pl.sellby,";
|
||||
$sql.= " u.login";
|
||||
$sql.= " u.login, u.photo, u.lastname, u.firstname";
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
@ -728,43 +728,8 @@ if ($resql)
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
if (! empty($arrayfields['m.rowid']['checked'])) print_liste_field_titre($arrayfields['m.rowid']['label'],$_SERVER["PHP_SELF"],'m.rowid','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.datem']['checked'])) print_liste_field_titre($arrayfields['m.datem']['label'],$_SERVER["PHP_SELF"],'m.datem','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'],$_SERVER["PHP_SELF"],'p.label','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.batch']['checked'])) print_liste_field_titre($arrayfields['m.batch']['label'],$_SERVER["PHP_SELF"],'m.batch','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['pl.eatby']['checked'])) print_liste_field_titre($arrayfields['pl.eatby']['label'],$_SERVER["PHP_SELF"],'pl.eatby','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['pl.sellby']['checked'])) print_liste_field_titre($arrayfields['pl.sellby']['label'],$_SERVER["PHP_SELF"],'pl.sellby','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['e.label']['checked'])) print_liste_field_titre($arrayfields['e.label']['label'],$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
||||
if (! empty($arrayfields['m.fk_user_author']['checked'])) print_liste_field_titre($arrayfields['m.fk_user_author']['label'],$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.inventorycode']['checked'])) print_liste_field_titre($arrayfields['m.inventorycode']['label'],$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'],$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['origin']['checked'])) print_liste_field_titre($arrayfields['origin']['label'],$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.value']['checked'])) print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||
{
|
||||
$align=$extrafields->getAlignFlag($key);
|
||||
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'],$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'],$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre_filter">';
|
||||
if (! empty($arrayfields['m.rowid']['checked']))
|
||||
{
|
||||
// Ref
|
||||
@ -901,9 +866,44 @@ if ($resql)
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['m.rowid']['checked'])) print_liste_field_titre($arrayfields['m.rowid']['label'],$_SERVER["PHP_SELF"],'m.rowid','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.datem']['checked'])) print_liste_field_titre($arrayfields['m.datem']['label'],$_SERVER["PHP_SELF"],'m.datem','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'],$_SERVER["PHP_SELF"],'p.label','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.batch']['checked'])) print_liste_field_titre($arrayfields['m.batch']['label'],$_SERVER["PHP_SELF"],'m.batch','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['pl.eatby']['checked'])) print_liste_field_titre($arrayfields['pl.eatby']['label'],$_SERVER["PHP_SELF"],'pl.eatby','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['pl.sellby']['checked'])) print_liste_field_titre($arrayfields['pl.sellby']['label'],$_SERVER["PHP_SELF"],'pl.sellby','',$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['e.label']['checked'])) print_liste_field_titre($arrayfields['e.label']['label'],$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
||||
if (! empty($arrayfields['m.fk_user_author']['checked'])) print_liste_field_titre($arrayfields['m.fk_user_author']['label'],$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.inventorycode']['checked'])) print_liste_field_titre($arrayfields['m.inventorycode']['label'],$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'],$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['origin']['checked'])) print_liste_field_titre($arrayfields['origin']['label'],$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.value']['checked'])) print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||
{
|
||||
$align=$extrafields->getAlignFlag($key);
|
||||
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'],$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'],$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$arrayofuniqueproduct=array();
|
||||
|
||||
$var=True;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
@ -913,6 +913,7 @@ if ($resql)
|
||||
$productstatic->label=$objp->produit;
|
||||
$productstatic->type=$objp->type;
|
||||
$productstatic->entity=$objp->entity;
|
||||
|
||||
$productlot->id = $objp->lotid;
|
||||
$productlot->batch= $objp->batch;
|
||||
$productlot->eatby= $objp->eatby;
|
||||
@ -929,8 +930,7 @@ if ($resql)
|
||||
$origin = '';
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<tr>";
|
||||
// Id movement
|
||||
if (! empty($arrayfields['m.rowid']['checked']))
|
||||
{
|
||||
@ -984,10 +984,13 @@ if ($resql)
|
||||
// Author
|
||||
if (! empty($arrayfields['m.fk_user_author']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax100">';
|
||||
$userstatic->id=$objp->fk_user_author;
|
||||
$userstatic->lastname=$objp->login;
|
||||
print $userstatic->getNomUrl(1);
|
||||
$userstatic->login=$objp->login;
|
||||
$userstatic->lastname=$objp->lastname;
|
||||
$userstatic->firstname=$objp->firstname;
|
||||
$userstatic->photo=$objp->photo;
|
||||
print $userstatic->getNomUrl(-1);
|
||||
print "</td>\n";
|
||||
}
|
||||
if (! empty($arrayfields['m.inventorycode']['checked']))
|
||||
@ -998,7 +1001,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['m.label']['checked']))
|
||||
{
|
||||
// Label of movement
|
||||
print '<td>'.$objp->label.'</td>';
|
||||
print '<td class="tdoverflowmax100aaa">'.$objp->label.'</td>';
|
||||
}
|
||||
if (! empty($arrayfields['origin']['checked']))
|
||||
{
|
||||
|
||||
@ -272,18 +272,19 @@ input.select2-input {
|
||||
.liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre input[name=month_lim] {
|
||||
margin-right: 4px;
|
||||
}
|
||||
input, input.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||
<?php if (empty($conf->global->THEME_ELDY_SHOW_BORDER_INPUT))
|
||||
print "border: none;"
|
||||
?>
|
||||
}
|
||||
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||
font-size: <?php print $fontsize ?>px;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
|
||||
<?php if(empty($conf->global->THEME_ELDY_SHOW_BORDER_INPUT))
|
||||
print "border: none;"
|
||||
?>
|
||||
|
||||
border-bottom: solid 1px rgba(0,0,0,.2);
|
||||
outline: none;
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-bottom: solid 1px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
input {
|
||||
line-height: 17px;
|
||||
padding: 4px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user