TakePOS: Move all information of customer in the header
This commit is contained in:
parent
621c4ff4e7
commit
41ae8f6f68
@ -252,6 +252,7 @@ if ($action == "change") // Change customer for TakePOS
|
||||
$resql = $db->query($sql);
|
||||
?>
|
||||
<script>
|
||||
console.log("Reload page invoice.php");
|
||||
parent.$("#poslines").load("invoice.php?place="+<?php print $place; ?>, function() {
|
||||
//parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
|
||||
<?php if (!$resql) { ?>
|
||||
|
||||
@ -204,7 +204,7 @@ if (!empty($conf->stock->enabled))
|
||||
if (!$disabled)
|
||||
{
|
||||
print $formproduct->selectWarehouses($conf->global->{'CASHDESK_ID_WAREHOUSE'.$terminal}, 'CASHDESK_ID_WAREHOUSE'.$terminal, '', 1, $disabled);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">('.$langs->trans("Create").')</a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"]).'"><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -155,6 +155,8 @@ button.actionbutton {
|
||||
overflow: visible; /* removes extra width in IE */
|
||||
width:33%;
|
||||
height: calc(25% - 2px);
|
||||
margin: 1px;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
div[aria-describedby="dialog-info"] button:before {
|
||||
@ -226,7 +228,7 @@ div.description{
|
||||
text-align:center;
|
||||
|
||||
padding-top: 30px;
|
||||
background: -webkit-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,0.98), rgba(255,255,255,1));
|
||||
background: -webkit-linear-gradient(top, rgba(250,250,250,0), rgba(250,250,250,0.5), rgba(250,250,250,0.95), rgba(250,250,250,1));
|
||||
}
|
||||
|
||||
div.catwatermark{
|
||||
@ -284,7 +286,7 @@ div.paymentbordline
|
||||
.row1withhead{
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: calc(40% - 50px);
|
||||
height: calc(50% - 50px);
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
@ -297,7 +299,7 @@ div.paymentbordline
|
||||
.row2withhead{
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: 60%;
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.div1{
|
||||
@ -308,7 +310,7 @@ div.paymentbordline
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
/* background-color:white; */
|
||||
padding-top: 0;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 0;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
@ -481,6 +483,12 @@ div.description_content {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
div#moreinfo, div#infowarehouse {
|
||||
color: #aaa;
|
||||
padding: 0 4px 0 4px;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 892px) {
|
||||
.actionbutton{
|
||||
font-size: 13px;
|
||||
@ -553,7 +561,7 @@ div.description_content {
|
||||
}
|
||||
|
||||
.row1withhead{
|
||||
height: calc(40% - 100px);
|
||||
height: calc(50% - 100px);
|
||||
}
|
||||
|
||||
|
||||
@ -586,4 +594,9 @@ div.description_content {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
button.actionbutton {
|
||||
min-height: 60px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -673,11 +673,74 @@ function DolibarrTakeposPrinting(id) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
$("a#customer").text("<?php
|
||||
if ($invoice->socid != $conf->global->$constforcompanyid) print $soc->name;
|
||||
else print $langs->trans("Customer");
|
||||
?>");
|
||||
console.log("Set customer info in header");
|
||||
|
||||
<?php
|
||||
$s = $langs->trans("Customer");
|
||||
if ($invoice->socid != $conf->global->$constforcompanyid) {
|
||||
$s = $soc->name;
|
||||
}
|
||||
?>
|
||||
|
||||
$("a#customer").html('<?php print dol_escape_js($s); ?>');
|
||||
|
||||
<?php
|
||||
$s = '';
|
||||
|
||||
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"];
|
||||
if (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1")
|
||||
{
|
||||
$s = '<span class="small">';
|
||||
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
|
||||
$warehouse = new Entrepot($db);
|
||||
$warehouse->fetch($conf->global->$constantforkey);
|
||||
$s .= $langs->trans("Warehouse").'<br>'.$warehouse->ref;
|
||||
$s .= '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
$("#infowarehouse").html('<?php print dol_escape_js($s); ?>');
|
||||
|
||||
<?php
|
||||
// Module Adherent
|
||||
$s = '';
|
||||
if (!empty($conf->adherent->enabled) && $invoice->socid != $conf->global->$constforcompanyid)
|
||||
{
|
||||
$s = '<span class="small">';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$langs->load("members");
|
||||
$s .= $langs->trans("Member").': ';
|
||||
$adh = new Adherent($db);
|
||||
$result = $adh->fetch('', '', $invoice->socid);
|
||||
if ($result > 0)
|
||||
{
|
||||
$adh->ref = $adh->getFullName($langs);
|
||||
$s.= $adh->getFullName($langs);
|
||||
$s.= ' - '.$adh->type;
|
||||
if ($adh->datefin)
|
||||
{
|
||||
$s.= '<br>'.$langs->trans("SubscriptionEndDate").': '.dol_print_date($adh->datefin, 'day');
|
||||
if ($adh->hasDelay()) {
|
||||
$s.= " ".img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.= '<br>'.$langs->trans("SubscriptionNotReceived");
|
||||
if ($adh->statut > 0) $s.= " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.= '<br>'.$langs->trans("ThirdpartyNotLinkedToMember");
|
||||
}
|
||||
$s.= '</span>';
|
||||
}
|
||||
?>
|
||||
$("#moreinfo").html('<?php print dol_escape_js($s); ?>');
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -903,53 +966,6 @@ else { // No invoice generated yet
|
||||
print '</table>';
|
||||
|
||||
|
||||
if ($invoice->socid != $conf->global->$constforcompanyid)
|
||||
{
|
||||
print '<p class="right">';
|
||||
|
||||
$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 '<br>'.$langs->trans("Warehouse").': '.$warehouse->ref;
|
||||
}
|
||||
|
||||
// Module Adherent
|
||||
if (!empty($conf->adherent->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$langs->load("members");
|
||||
print '<br>'.$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 '<br>'.$langs->trans("Type").': '.$adh->type;
|
||||
if ($adh->datefin)
|
||||
{
|
||||
print '<br>'.$langs->trans("SubscriptionEndDate").': '.dol_print_date($adh->datefin, 'day');
|
||||
if ($adh->hasDelay()) {
|
||||
print " ".img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<br>'.$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 '<span class="opacitymedium">'.$langs->trans("ThirdpartyNotLinkedToMember").'</span>';
|
||||
}
|
||||
}
|
||||
print '</p>';
|
||||
}
|
||||
|
||||
if ($action == "search")
|
||||
{
|
||||
print '<center>
|
||||
|
||||
@ -690,14 +690,16 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
||||
<div class="header">
|
||||
<div class="topnav">
|
||||
<div class="topnav-left">
|
||||
<a class="topnav-terminalhour" onclick="TerminalsDialog();">
|
||||
<div class="inline-block valignmiddle"><a class="topnav-terminalhour" onclick="TerminalsDialog();">
|
||||
<?php echo $langs->trans("Terminal")." ";
|
||||
if ($_SESSION["takeposterminal"] == "") echo "1";
|
||||
else echo $_SESSION["takeposterminal"];
|
||||
echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "day").'</span>';
|
||||
?>
|
||||
</a>
|
||||
<a id="customer" onclick="Customer();"></a>
|
||||
</a></div>
|
||||
<div class="inline-block valignmiddle"><a class="valignmiddle" id="customer" onclick="Customer();"></a></div>
|
||||
<div class="inline-block valignmiddle" id="moreinfo"></div>
|
||||
<div class="inline-block valignmiddle" id="infowarehouse"></div>
|
||||
</div>
|
||||
<div class="topnav-right">
|
||||
<div class="login_block_other">
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
--colorboxstatsborder: #ddd;
|
||||
--dolgraphbg: rgba(255,255,255,0);
|
||||
--fieldrequiredcolor: #000055;
|
||||
--colortextbacktab: #<?php print $colortextbacktab; ?>) ;
|
||||
--colortextbacktab: #<?php print $colortextbacktab; ?>;
|
||||
--colorboxiconbg: #eee;
|
||||
--refidnocolor:#444;
|
||||
--tableforfieldcolor:#666;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user