FIX Dates of sales start in TakePOS

This commit is contained in:
Laurent Destailleur 2020-12-30 21:43:04 +01:00
parent 255b943b99
commit 6ef7d3db79
3 changed files with 4 additions and 3 deletions

View File

@ -99,6 +99,7 @@ CashDeskRefNumberingModules=Numbering module for POS sales
CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag is used to add the terminal number CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag is used to add the terminal number
TakeposGroupSameProduct=Group same products lines TakeposGroupSameProduct=Group same products lines
StartAParallelSale=Start a new parallel sale StartAParallelSale=Start a new parallel sale
SaleStartedAt=Sale started at %s
ControlCashOpening=Control cash desk at opening POS ControlCashOpening=Control cash desk at opening POS
CloseCashFence=Close cash desk control CloseCashFence=Close cash desk control
CashReport=Cash report CashReport=Cash report

View File

@ -1019,13 +1019,13 @@ $( document ).ready(function() {
if ($resql) { if ($resql) {
while ($obj = $db->fetch_object($resql)) { while ($obj = $db->fetch_object($resql)) {
echo '$("#customerandsales").append(\''; echo '$("#customerandsales").append(\'';
echo '<a class="valignmiddle" onclick="place=\\\''; echo '<a class="valignmiddle" title="'.dol_escape_js($langs->trans("SaleStartedAt", dol_print_date($db->jdate($obj->datec), '%H:%M'))).'" onclick="place=\\\'';
$num_sale = str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $obj->ref)); $num_sale = str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $obj->ref));
echo $num_sale; echo $num_sale;
if (str_replace("-", "", $num_sale) > $max_sale) $max_sale = str_replace("-", "", $num_sale); if (str_replace("-", "", $num_sale) > $max_sale) $max_sale = str_replace("-", "", $num_sale);
echo '\\\';Refresh();">'; echo '\\\';Refresh();">';
if ($placeid == $obj->rowid) echo "<b>"; if ($placeid == $obj->rowid) echo "<b>";
echo date('H:i', strtotime($obj->datec)); echo dol_print_date($db->jdate($obj->datec), '%H:%M');
if ($placeid == $obj->rowid) echo "</b>"; if ($placeid == $obj->rowid) echo "</b>";
echo '</a>\');'; echo '</a>\');';
} }