Prototype with datatables works now also ith jmobile.
Add field fifo and lifo into product table.
This commit is contained in:
parent
9b4ab63c7d
commit
7a0ec2d831
@ -3,7 +3,7 @@
|
||||
This is a quick tutorial:
|
||||
|
||||
* Install ansible:
|
||||
> apt-get install
|
||||
> apt-get install ansible
|
||||
|
||||
* Add ip of server to manage into
|
||||
/etc/ansible/hosts
|
||||
|
||||
@ -4701,15 +4701,15 @@ class Form
|
||||
* To add a particular filter on select, you must set $object->next_prev_filter to SQL criteria.
|
||||
*
|
||||
* @param object $object Object to show
|
||||
* @param string $paramid Name of parameter to use to name the id into the URL link
|
||||
* @param string $morehtml More html content to output just before the nav bar
|
||||
* @param string $paramid Name of parameter to use to name the id into the URL link
|
||||
* @param string $morehtml More html content to output just before the nav bar
|
||||
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
||||
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous
|
||||
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
|
||||
* @param string $morehtmlref Code html supplementaire a afficher apres ref
|
||||
* @param string $moreparam More param to add in nav link url.
|
||||
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous
|
||||
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
|
||||
* @param string $morehtmlref Code html supplementaire a afficher apres ref
|
||||
* @param string $moreparam More param to add in nav link url.
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||
* @return string Portion HTML avec ref + boutons nav
|
||||
* @return string Portion HTML avec ref + boutons nav
|
||||
*/
|
||||
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0)
|
||||
{
|
||||
|
||||
@ -740,7 +740,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
||||
else
|
||||
$isactive=false;
|
||||
|
||||
if ($i <=$limittoshow || $isactive )
|
||||
if ($i <= $limittoshow || $isactive )
|
||||
{
|
||||
$out.='<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((! $isactive && ! empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT))?' hideonprint':'').'"><!-- id tab = '.(empty($links[$i][2])?'':$links[$i][2]).' -->';
|
||||
if (isset($links[$i][2]) && $links[$i][2] == 'image')
|
||||
@ -774,13 +774,13 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
||||
if (isset($links[$i][2]) && $links[$i][2] == 'image')
|
||||
{
|
||||
if (!empty($links[$i][0]))
|
||||
$outmore.='<a class="tabimage" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
|
||||
$outmore.='<a class="tabimage" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
|
||||
else
|
||||
$outmore.='<span class="tabspan">'.$links[$i][1].'</span>'."\n";
|
||||
$outmore.='<span class="tabspan">'.$links[$i][1].'</span>'."\n";
|
||||
|
||||
}
|
||||
else if (! empty($links[$i][1]))
|
||||
$outmore.='<a "'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="inline-block" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
|
||||
$outmore.='<a'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="inline-block" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
|
||||
|
||||
$outmore.='</div>';
|
||||
}
|
||||
@ -789,7 +789,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
||||
|
||||
if ($displaytab > $limittoshow)
|
||||
{
|
||||
$tabsname=str_replace ("@", "", $picto);
|
||||
$tabsname=str_replace("@", "", $picto);
|
||||
$out.='<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||
$out.='<a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">'.$langs->trans("More").'...</a>';
|
||||
$out.='<div id="moretabsList'.$tabsname.'" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
|
||||
@ -2822,34 +2822,34 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
|
||||
if ($cpt>=1)
|
||||
{
|
||||
$pagelist.= '<li class="pagination"><a href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>';
|
||||
if ($cpt >= 2) $pagelist.='<li><span class="inactive">...</span></li>';
|
||||
}
|
||||
do
|
||||
{
|
||||
if ($cpt==$page)
|
||||
{
|
||||
$pagelist.= '<li class="pagination"><span class="active">'.($page+1).'</span></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><span '.(empty($conf->dol_use_jmobile)?'class="active"':'data-role="button"').'>'.($page+1).'</span></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagelist.= '<li class="pagination"><a href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>';
|
||||
}
|
||||
$cpt++;
|
||||
}
|
||||
while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage);
|
||||
if ($cpt<$nbpages)
|
||||
{
|
||||
if ($cpt<$nbpages-1) $pagelist.= '<li class="pagination"><span class="inactive">...</span></li>';
|
||||
$pagelist.= '<li class="pagination"><a href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>';
|
||||
if ($cpt<$nbpages-1) $pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><span '.(empty($conf->dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...</span></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagelist.= '<li class="pagination"><span class="active">'.($page+1)."</li>";
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><span '.(empty($conf->dol_use_jmobile)?'class="active"':'data-role="button"').'>'.($page+1)."</li>";
|
||||
}
|
||||
}
|
||||
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist,$morehtml);
|
||||
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist,$morehtml); // output the div and ul for previous/last completed with page numbers into $pagelist
|
||||
print '</td>';
|
||||
|
||||
print '</tr></table>'."\n";
|
||||
|
||||
@ -123,7 +123,10 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_supplier_price_expressio
|
||||
ALTER TABLE llx_product ADD COLUMN fk_price_expression integer DEFAULT NULL;
|
||||
ALTER TABLE llx_product_price ADD COLUMN fk_price_expression integer DEFAULT NULL;
|
||||
|
||||
ALTER TABLE llx_product ADD COLUMN fifo double(24,8) after pmp;
|
||||
ALTER TABLE llx_product ADD COLUMN lifo double(24,8) after fifo;
|
||||
|
||||
|
||||
--create table for user conf of printing driver
|
||||
CREATE TABLE llx_printing
|
||||
(
|
||||
|
||||
@ -71,7 +71,9 @@ create table llx_product
|
||||
volume float DEFAULT NULL,
|
||||
volume_units tinyint DEFAULT NULL,
|
||||
stock integer, -- Current physical stock (dernormalized field)
|
||||
pmp double(24,8) DEFAULT 0 NOT NULL,
|
||||
pmp double(24,8) DEFAULT 0 NOT NULL, -- To store valuation of stock calculated using average price method, for this product
|
||||
fifo double(24,8), -- To store valuation of stock calculated using fifo method, for this product
|
||||
lifo double(24,8), -- To store valuation of stock calculated using lifo method, for this product
|
||||
canvas varchar(32) DEFAULT NULL,
|
||||
finished tinyint DEFAULT NULL,
|
||||
hidden tinyint DEFAULT 0, -- Not used. Deprecated.
|
||||
|
||||
@ -3232,6 +3232,15 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
div.dataTables_length {
|
||||
float: right !important;
|
||||
padding-left: 8px;
|
||||
}
|
||||
div.dataTables_length select {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Select2 */
|
||||
/* ============================================================================== */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user