Merge pull request #13411 from andreubisquerra/develop

No reload page to load other sale in TakePOS
This commit is contained in:
Laurent Destailleur 2020-03-25 18:29:35 +01:00 committed by GitHub
commit 9d25a0f83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -733,7 +733,6 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
?>
</a></div>
<div class="inline-block valignmiddle" id="customerandsales">
<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>

View File

@ -717,7 +717,7 @@ $( document ).ready(function() {
<?php
$s = $langs->trans("Customer");
if ($invoice->socid != $conf->global->$constforcompanyid) {
if ($invoice->id > 0 && ($invoice->socid != $conf->global->$constforcompanyid)) {
$s = $soc->name;
}
?>
@ -733,17 +733,17 @@ $( document ).ready(function() {
while ($obj = $db->fetch_object($resql)) {
echo '$("#customerandsales").append(\'';
if ($placeid==$obj->rowid) echo "<b>";
echo '<a class="valignmiddle" onclick="location.href=\\\'index.php?place=';
echo '<a class="valignmiddle" onclick="place=\\\'';
$num_sale=str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $obj->ref));
echo $num_sale;
if (str_replace("-", "", $num_sale)>$max_sale) $max_sale=str_replace("-", "", $num_sale);
echo '\\\'">'.date('H:i', strtotime($obj->datec));
echo '\\\';Refresh();">'.date('H:i', strtotime($obj->datec));
if ($placeid==$obj->rowid) echo "</b>";
echo '</a>\');';
}
echo '$("#customerandsales").append(\'<a onclick="location.href=\\\'index.php?place=0-';
echo '$("#customerandsales").append(\'<a onclick="place=\\\'0-';
echo $max_sale+1;
echo '\\\'"><span class="fa fa-plus-square" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"></a>\');';
echo '\\\';Refresh();"><span class="fa fa-plus-square" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"></a>\');';
} else {
dol_print_error($db);
}