';
// In phone version only show when it is invoice page
if ($mobilepage == "invoice" || $mobilepage == "") {
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;
}
// In phone version only show when is invoice page
if ($mobilepage == "invoice" || $mobilepage == "") {
print ''.$langs->trans('Place')."".$label." ";
print ''.$langs->trans('Floor')."".$floor."";
}
elseif (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) print $mysoc->name;
elseif ($mobilepage == "cats") print $langs->trans('Category');
elseif ($mobilepage == "products") print $langs->trans('Label');
} else {
print $langs->trans("Products");
}
print '
';
if ($_SESSION["basiclayout"] != 1)
{
print '
'.$langs->trans('ReductionShort').'
';
print '
'.$langs->trans('Qty').'
';
print '
';
print ''.$langs->trans('TotalTTCShort').' ';
// In phone version only show when it is invoice page
if ($mobilepage == "invoice" || $mobilepage == "") {
print ''.price($invoice->total_ttc, 1, '', 1, -1, -1, $conf->currency).'';
if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
//Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency
include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
$multicurrency = new MultiCurrency($db);
$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
print ' ('.price($invoice->total_ttc * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')';
}
print '
';
if (!empty($conf->stock->enabled) && !empty($user->rights->stock->mouvement->lire))
{
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
$sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp";
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
$sql .= " ".MAIN_DB_PREFIX."product_stock as ps";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product";
$sql .= " WHERE ps.reel != 0";
$sql .= " AND ps.fk_entrepot = ".$conf->global->$constantforkey;
$sql .= " AND e.entity IN (".getEntity('stock').")";
$sql .= " AND ps.fk_product = ".$line->fk_product;
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
$stock_real = price2num($obj->reel, 'MS');
$htmlforlines .= $line->qty;
if ($line->qty && $line->qty > $stock_real) $htmlforlines .= '';
$htmlforlines .= ' ('.$langs->trans("Stock").' '.$stock_real.')';
if ($line->qty && $line->qty > $stock_real) $htmlforlines .= "";
}
}
else $htmlforlines .= $line->qty;
$htmlforlines .= '
';
$htmlforlines .= '
';
$htmlforlines .= price($line->total_ttc, 1, '', 1, -1, -1, $conf->currency);
if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
//Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency
include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
$multicurrency = new MultiCurrency($db);
$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
$htmlforlines .= ' ('.price($line->total_ttc * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')';
}
$htmlforlines .= '