Fix travis
This commit is contained in:
parent
b93a3ceb29
commit
1674048c81
@ -107,47 +107,47 @@ elseif ($action=="editline"){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
?>
|
?>
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
<?php
|
<?php
|
||||||
$categorie = new Categorie($db);
|
$categorie = new Categorie($db);
|
||||||
$categories = $categorie->get_full_arbo('product', (($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) ? $conf->global->TAKEPOS_ROOT_CATEGORY_ID : 0), 1);
|
$categories = $categorie->get_full_arbo('product', (($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) ? $conf->global->TAKEPOS_ROOT_CATEGORY_ID : 0), 1);
|
||||||
|
|
||||||
// Search root category to know its level
|
// Search root category to know its level
|
||||||
//$conf->global->TAKEPOS_ROOT_CATEGORY_ID=0;
|
//$conf->global->TAKEPOS_ROOT_CATEGORY_ID=0;
|
||||||
$levelofrootcategory = 0;
|
$levelofrootcategory = 0;
|
||||||
if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0)
|
if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0)
|
||||||
{
|
{
|
||||||
foreach ($categories as $key => $categorycursor)
|
foreach ($categories as $key => $categorycursor)
|
||||||
{
|
{
|
||||||
if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID)
|
if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID)
|
||||||
{
|
{
|
||||||
$levelofrootcategory = $categorycursor['level'];
|
$levelofrootcategory = $categorycursor['level'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$levelofmaincategories = $levelofrootcategory + 1;
|
$levelofmaincategories = $levelofrootcategory + 1;
|
||||||
|
|
||||||
$maincategories = array();
|
$maincategories = array();
|
||||||
$subcategories = array();
|
$subcategories = array();
|
||||||
foreach ($categories as $key => $categorycursor)
|
foreach ($categories as $key => $categorycursor)
|
||||||
{
|
{
|
||||||
if ($categorycursor['level'] == $levelofmaincategories)
|
if ($categorycursor['level'] == $levelofmaincategories)
|
||||||
{
|
{
|
||||||
$maincategories[$key] = $categorycursor;
|
$maincategories[$key] = $categorycursor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$subcategories[$key] = $categorycursor;
|
$subcategories[$key] = $categorycursor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sort($maincategories);
|
sort($maincategories);
|
||||||
sort($subcategories);
|
sort($subcategories);
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
var categories = <?php echo json_encode($maincategories); ?>;
|
var categories = <?php echo json_encode($maincategories); ?>;
|
||||||
var subcategories = <?php echo json_encode($subcategories); ?>;
|
var subcategories = <?php echo json_encode($subcategories); ?>;
|
||||||
@ -289,9 +289,9 @@ function CheckPlease(){
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body style="overflow: hidden; background-color:#D1D1D1;">
|
<body style="overflow: hidden; background-color:#D1D1D1;">
|
||||||
<?php
|
<?php
|
||||||
if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print '<div class="dialog-info-takepos-terminal" id="dialog-info" title="TakePOS">'.$langs->trans('TerminalSelect').'</div>';
|
if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print '<div class="dialog-info-takepos-terminal" id="dialog-info" title="TakePOS">'.$langs->trans('TerminalSelect').'</div>';
|
||||||
?>
|
?>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="phonebuttonsrow">
|
<div class="phonebuttonsrow">
|
||||||
<?php
|
<?php
|
||||||
@ -316,7 +316,7 @@ if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"]
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user