';
print '
';
print '';
print '';
print '';
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
{
$sql="SELECT floor, label FROM ".MAIN_DB_PREFIX."takepos_floor_tables where rowid=".((int) $place);
$resql = $db->query($sql);
$obj = $db->fetch_object($resql);
if ($obj)
{
$label = $obj->label;
$floor = $obj->floor;
}
print $langs->trans('Place')." ".$label." - ";
print $langs->trans('Floor')." ".$floor." - ";
}
print $langs->trans('TotalTTC');
print ' : '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'';
print ' '.$sectionwithinvoicelink;
print ' | ';
if ($_SESSION["basiclayout"]!=1)
{
print '' . $langs->trans('ReductionShort') . ' | ';
print '' . $langs->trans('Qty') . ' | ';
print '' . $langs->trans('TotalHTShort') . ' | ';
}
print "
\n";
if ($_SESSION["basiclayout"]==1)
{
if ($mobilepage=="cats")
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$categorie = new Categorie($db);
$categories = $categorie->get_full_arbo('product');
$htmlforlines = '';
foreach ($categories as $row){
$htmlforlines.= '';
$htmlforlines.= '| ';
$htmlforlines.= $row['label'];
$htmlforlines.= ' | ';
$htmlforlines.= '
'."\n";
}
$htmlforlines.= '
';
$htmlforlines.= '
';
print $htmlforlines;
}
if ($mobilepage=="products")
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$object = new Categorie($db);
$catid = GETPOST('catid', 'int');
$result=$object->fetch($catid);
$prods = $object->getObjectsInCateg("product");
$htmlforlines = '';
foreach ($prods as $row) {
$htmlforlines.= '
';
$htmlforlines.= '| ';
$htmlforlines.= $row->label;
$htmlforlines.= ' | ';
$htmlforlines.= '
'."\n";
}
$htmlforlines.= '';
$htmlforlines.= '
';
print $htmlforlines;
}
if ($mobilepage=="places")
{
$sql="SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables";
$resql = $db->query($sql);
$rows = array();
$htmlforlines = '';
while($row = $db->fetch_array($resql)){
$rows[] = $row;
$htmlforlines.= '
';
$htmlforlines.= '| ';
$htmlforlines.= $row['label'];
$htmlforlines.= ' | ';
$htmlforlines.= '
'."\n";
}
$htmlforlines.= '';
$htmlforlines.= '
';
print $htmlforlines;
}
}
if ($placeid > 0)
{
if ($_SESSION["basiclayout"]==1 && $mobilepage!="invoice") return;
if (is_array($invoice->lines) && count($invoice->lines))
{
$tmplines = array_reverse($invoice->lines);
foreach($tmplines as $line)
{
$htmlforlines = '';
$htmlforlines.= '
';
$htmlforlines.= '';
//if ($line->product_label) $htmlforlines.= ''.$line->product_label.'';
if (isset($line->product_type))
{
if (empty($line->product_type)) $htmlforlines.=img_object('', 'product').' ';
else $htmlforlines.=img_object('', 'service').' ';
}
if ($line->product_label) $htmlforlines.= $line->product_label;
if ($line->product_label && $line->desc) $htmlforlines.= ' ';
if ($line->product_label != $line->desc)
{
$firstline = dolGetFirstLineOfText($line->desc);
if ($firstline != $line->desc)
{
$htmlforlines.= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc);
}
else
{
$htmlforlines.= $line->desc;
}
}
if (!empty($line->array_options['options_order_notes'])) $htmlforlines.= " (".$line->array_options['options_order_notes'].")";
if ($_SESSION["basiclayout"]!=1)
{
$htmlforlines.= ' | ';
$htmlforlines.= '' . vatrate($line->remise_percent, true) . ' | ';
$htmlforlines.= '' . $line->qty . ' | ';
$htmlforlines.= '' . price($line->total_ttc) . ' | ';
}
$htmlforlines.= '
'."\n";
print $htmlforlines;
}
}
else
{
print '
| '.$langs->trans("Empty").' | | | |
';
}
}
else { // No invoice generated yet
print '
| '.$langs->trans("Empty").' | | | |
';
}
print '';
if ($_SESSION["basiclayout"]==1 && $mobilepage=="invoice")
{
print '
';
}
if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]})
{
$soc = new Societe($db);
if ($invoice->socid > 0) $soc->fetch($invoice->socid);
else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]});
print '
';
print $langs->trans("Customer").': '.$soc->name;
print '
';
}
if ($action == "search")
{
print '
';
}
print ' ';