NEW Weighing Scale compatibility with TakePOS connector
This commit is contained in:
parent
48e34c2069
commit
e55c16c039
@ -121,4 +121,5 @@ GiftReceiptButton=Add a "Gift receipt" button
|
||||
GiftReceipt=Gift receipt
|
||||
ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first
|
||||
AllowDelayedPayment=Allow delayed payment
|
||||
PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts
|
||||
PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts
|
||||
WeighingScale=Weighing scale
|
||||
@ -233,6 +233,14 @@ print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_AUTO_PRINT_TICKETS", $conf->global->TAKEPOS_AUTO_PRINT_TICKETS, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('WeighingScale');
|
||||
print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_WEIGHING_SCALE", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -747,6 +747,19 @@ function FullScreen() {
|
||||
document.documentElement.requestFullscreen();
|
||||
}
|
||||
|
||||
function WeighingScale(){
|
||||
console.log("Weighing Scale");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/scale',
|
||||
})
|
||||
.done(function( editnumber ) {
|
||||
$("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
||||
editnumber="";
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
PrintCategories(0);
|
||||
LoadProducts(0);
|
||||
@ -975,6 +988,11 @@ if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"></span><div class="trunc">'.$langs->trans("Logout").'</div>', 'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';');
|
||||
}
|
||||
|
||||
if ($conf->global->TAKEPOS_WEIGHING_SCALE)
|
||||
{
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-balance-scale paddingrightonly"></span><div class="trunc">'.$langs->trans("WeighingScale").'</div>', 'action'=>'WeighingScale();');
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- Show buttons -->
|
||||
<div class="div3">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user