Merge pull request #13305 from andreubisquerra/master

Move customer name to TakePOS headbar
This commit is contained in:
Laurent Destailleur 2020-03-11 16:42:32 +01:00 committed by GitHub
commit 27e32fc353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -670,6 +670,14 @@ function DolibarrTakeposPrinting(id) {
url: "<?php print dol_buildpath('/takepos/ajax/ajax.php', 1).'?action=printinvoiceticket&term='.$_SESSION["takeposterminal"].'&id='; ?>" + id,
});
}
$( document ).ready(function() {
$("a#customer").text("<?php
if ($invoice->socid != $conf->global->$constforcompanyid) print $soc->name;
else print $langs->trans("Customer");
?>");
});
</script>
<?php
@ -887,9 +895,7 @@ print '</table>';
if ($invoice->socid != $conf->global->$constforcompanyid)
{
print '<!-- Show customer -->';
print '<p class="right">';
print $langs->trans("Customer").': '.$soc->name;
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"];
if (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1")

View File

@ -678,7 +678,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "day").'</span>';
?>
</a>
<a onclick="Customer();"><?php echo $langs->trans("Customer"); ?></a>
<a id="customer" onclick="Customer();"></a>
</div>
<div class="topnav-right">
<div class="login_block_other">