';
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('TotalTTCShort') . ' | ';
}
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;
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"];
if (! empty($conf->stock->enabled) && $conf->global->$constantforkey != "1")
{
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
$warehouse = new Entrepot($db);
$warehouse->fetch($conf->global->$constantforkey);
print '
'.$langs->trans("Warehouse").': '.$warehouse->ref;
}
print '
';
// Module Adherent
if (! empty($conf->adherent->enabled))
{
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$langs->load("members");
print '
';
print $langs->trans("Member").': ';
$adh=new Adherent($db);
$result=$adh->fetch('', '', $invoice->socid);
if ($result > 0)
{
$adh->ref=$adh->getFullName($langs);
print $adh->getFullName($langs);
print '
'.$langs->trans("Type").': '.$adh->type;
if ($adh->datefin)
{
print '
'.$langs->trans("SubscriptionEndDate").': '.dol_print_date($adh->datefin, 'day');
if ($adh->hasDelay()) {
print " ".img_warning($langs->trans("Late"));
}
}
else
{
print $langs->trans("SubscriptionNotReceived");
if ($adh->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
}
}
else
{
print ''.$langs->trans("ThirdpartyNotLinkedToMember").'';
}
print '
';
}
}
if ($action == "search")
{
print '
';
}
print ' ';