New: Input field to search product always visible with focus so you can
use a barcode flasher at any time
This commit is contained in:
parent
eef95a8a78
commit
50395b7dd7
@ -4062,7 +4062,8 @@ class Product extends CommonObject
|
|||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
$result.=$linkstart;
|
$result.=$linkstart;
|
||||||
if ($withpicto) {
|
if ($withpicto)
|
||||||
|
{
|
||||||
if ($this->type == Product::TYPE_PRODUCT) { $result.=(img_object(($notooltip?'':$label), 'product', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
if ($this->type == Product::TYPE_PRODUCT) { $result.=(img_object(($notooltip?'':$label), 'product', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
||||||
}
|
}
|
||||||
if ($this->type == Product::TYPE_SERVICE) { $result.=(img_object(($notooltip?'':$label), 'service', ($notooltip?'class="paddinright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
if ($this->type == Product::TYPE_SERVICE) { $result.=(img_object(($notooltip?'':$label), 'service', ($notooltip?'class="paddinright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
|
||||||
@ -4151,11 +4152,11 @@ class Product extends CommonObject
|
|||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
if (! empty($conf->productbatch->enabled)) { $langs->load("productbatch");
|
if (! empty($conf->productbatch->enabled)) { $langs->load("productbatch");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type == 2) {
|
if ($type == 2) {
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
@ -4177,9 +4178,9 @@ class Product extends CommonObject
|
|||||||
return dolGetStatus($langs->trans('Unknown'));
|
return dolGetStatus($langs->trans('Unknown'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$statuttrans=empty($status)?'status5':'status4';
|
$statuttrans=empty($status)?'status5':'status4';
|
||||||
|
|
||||||
if($status == 0){
|
if($status == 0){
|
||||||
// $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch"
|
// $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch"
|
||||||
if($type==0){
|
if($type==0){
|
||||||
@ -4210,8 +4211,8 @@ class Product extends CommonObject
|
|||||||
$labelstatutShort = $langs->trans('ProductStatusOnBatchShort');
|
$labelstatutShort = $langs->trans('ProductStatusOnBatchShort');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($mode>6){
|
if($mode>6){
|
||||||
return dolGetStatus($langs->trans('Unknown'), '', '', 'status0', 0);
|
return dolGetStatus($langs->trans('Unknown'), '', '', 'status0', 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,6 @@ button.calcbutton {
|
|||||||
width:24%;
|
width:24%;
|
||||||
height:24%;
|
height:24%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #555555;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.calcbutton2 {
|
button.calcbutton2 {
|
||||||
@ -33,7 +32,6 @@ button.calcbutton2 {
|
|||||||
width:24%;
|
width:24%;
|
||||||
height:24%;
|
height:24%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #555555;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.calcbutton3 {
|
button.calcbutton3 {
|
||||||
@ -70,11 +68,11 @@ div.wrapper{
|
|||||||
height:25%;
|
height:25%;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:1px;
|
padding:1px;
|
||||||
border: 0.1em solid;
|
border: 2px solid #D1D1D1;
|
||||||
box-shadow: 3px 3px 2px #888;
|
/*box-shadow: 3px 3px 3px #bbb; */
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color:#f0eeee;
|
background-color:#fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.wrapper2{
|
div.wrapper2{
|
||||||
@ -84,11 +82,11 @@ div.wrapper2{
|
|||||||
height:25%;
|
height:25%;
|
||||||
margin:0;
|
margin:0;
|
||||||
/* padding:1px; */
|
/* padding:1px; */
|
||||||
border: 0.1em solid;
|
border: 2px solid #D1D1D1;
|
||||||
box-shadow: 2px 2px 1px #888;
|
/*box-shadow: 3px 3px 3px #bbb;*/
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color:#f0eeee;
|
background-color:#fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active{
|
button:active{
|
||||||
@ -119,8 +117,26 @@ div.catwatermark{
|
|||||||
text-align:center;
|
text-align:center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
display: none;
|
display: none;
|
||||||
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.postablelines tr td {
|
||||||
|
line-height: unset;
|
||||||
|
padding-top: 3px;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
}
|
||||||
|
.posinvoiceline td {
|
||||||
|
height: 40px !important;
|
||||||
|
}
|
||||||
|
.poscolordelete {
|
||||||
|
color: #600;
|
||||||
|
}
|
||||||
|
.poscolorgreen {
|
||||||
|
color: #060;
|
||||||
|
}
|
||||||
|
.poscolorblue {
|
||||||
|
color: #006;
|
||||||
|
}
|
||||||
@media only screen and (max-aspect-ratio: 6/4) {
|
@media only screen and (max-aspect-ratio: 6/4) {
|
||||||
div.description{
|
div.description{
|
||||||
min-height:20%;
|
min-height:20%;
|
||||||
|
|||||||
@ -415,7 +415,7 @@ if (! empty($conf->use_javascript_ajax))
|
|||||||
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min invoice">';
|
print '<div class="div-table-responsive-no-min invoice">';
|
||||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
print '<table id="tablelines" class="noborder noshadow postablelines" width="100%">';
|
||||||
print '<tr class="liste_titre nodrag nodrop">';
|
print '<tr class="liste_titre nodrag nodrop">';
|
||||||
print '<td class="linecoldescription">';
|
print '<td class="linecoldescription">';
|
||||||
print '<span style="font-size:120%;" class="right">';
|
print '<span style="font-size:120%;" class="right">';
|
||||||
@ -450,13 +450,19 @@ if ($placeid > 0)
|
|||||||
{
|
{
|
||||||
$htmlforlines = '';
|
$htmlforlines = '';
|
||||||
|
|
||||||
$htmlforlines.= '<tr class="drag drop oddeven';
|
$htmlforlines.= '<tr class="drag drop oddeven posinvoiceline';
|
||||||
if ($line->special_code == "3") {
|
if ($line->special_code == "3") {
|
||||||
$htmlforlines.= ' order';
|
$htmlforlines.= ' order';
|
||||||
}
|
}
|
||||||
$htmlforlines.= '" id="' . $line->id . '">';
|
$htmlforlines.= '" id="' . $line->id . '">';
|
||||||
$htmlforlines.= '<td class="left">';
|
$htmlforlines.= '<td class="left">';
|
||||||
$htmlforlines.= $line->product_label;
|
//if ($line->product_label) $htmlforlines.= '<b>'.$line->product_label.'</b>';
|
||||||
|
if (isset($line->product_type))
|
||||||
|
{
|
||||||
|
if (empty($line->product_type)) $htmlforlines.=img_object('', 'product').' ';
|
||||||
|
else $htmlforlines.=img_object('', 'service').' ';
|
||||||
|
}
|
||||||
|
if ($line->product_label) $htmlforlines.= $line->product_label;
|
||||||
if ($line->product_label && $line->desc) $htmlforlines.= '<br>';
|
if ($line->product_label && $line->desc) $htmlforlines.= '<br>';
|
||||||
if ($line->product_label != $line->desc)
|
if ($line->product_label != $line->desc)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -117,9 +117,17 @@ var pageactions=0;
|
|||||||
var place="<?php echo $place;?>";
|
var place="<?php echo $place;?>";
|
||||||
var editaction="qty";
|
var editaction="qty";
|
||||||
var editnumber="";
|
var editnumber="";
|
||||||
|
|
||||||
function PrintCategories(first) {
|
function PrintCategories(first) {
|
||||||
|
console.log("PrintCategories");
|
||||||
for (i = 0; i < <?php echo ($MAXCATEG - 2); ?>; i++) {
|
for (i = 0; i < <?php echo ($MAXCATEG - 2); ?>; i++) {
|
||||||
if (typeof (categories[parseInt(i)+parseInt(first)]) == "undefined") break;
|
if (typeof (categories[parseInt(i)+parseInt(first)]) == "undefined")
|
||||||
|
{
|
||||||
|
$("#catdesc"+i).text("");
|
||||||
|
$("#catimg"+i).attr("src","genimg/empty.png");
|
||||||
|
$("#catwatermark"+i).hide();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']);
|
$("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']);
|
||||||
$("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[parseInt(i)+parseInt(first)]['rowid']);
|
$("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[parseInt(i)+parseInt(first)]['rowid']);
|
||||||
$("#catdiv"+i).data("rowid",categories[parseInt(i)+parseInt(first)]['rowid']);
|
$("#catdiv"+i).data("rowid",categories[parseInt(i)+parseInt(first)]['rowid']);
|
||||||
@ -156,16 +164,19 @@ function MoreCategories(moreorless) {
|
|||||||
$("#catdiv"+i).data("rowid",categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']);
|
$("#catdiv"+i).data("rowid",categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']);
|
||||||
$("#catwatermark"+i).show();
|
$("#catwatermark"+i).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#search").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function LoadProducts(position, issubcat=false) {
|
function LoadProducts(position, issubcat=false) {
|
||||||
|
console.log("LoadProducts");
|
||||||
var maxproduct = <?php echo ($MAXPRODUCT - 2); ?>;
|
var maxproduct = <?php echo ($MAXPRODUCT - 2); ?>;
|
||||||
|
|
||||||
$('#catimg'+position).animate({opacity: '0.5'}, 1);
|
$('#catimg'+position).animate({opacity: '0.5'}, 1);
|
||||||
$('#catimg'+position).animate({opacity: '1'}, 100);
|
$('#catimg'+position).animate({opacity: '1'}, 100);
|
||||||
if (issubcat==true) currentcat=$('#prodiv'+position).data('rowid');
|
if (issubcat==true) currentcat=$('#prodiv'+position).data('rowid');
|
||||||
else currentcat=$('#catdiv'+position).data('rowid');
|
else currentcat=$('#catdiv'+position).data('rowid');
|
||||||
if (currentcat==undefined) return;
|
if (currentcat == undefined) return;
|
||||||
pageproducts=0;
|
pageproducts=0;
|
||||||
ishow=0; //product to show counter
|
ishow=0; //product to show counter
|
||||||
|
|
||||||
@ -206,9 +217,12 @@ function LoadProducts(position, issubcat=false) {
|
|||||||
idata++; //Next data everytime
|
idata++; //Next data everytime
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#search").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function MoreProducts(moreorless) {
|
function MoreProducts(moreorless) {
|
||||||
|
console.log("MoreProducts");
|
||||||
var maxproduct = <?php echo ($MAXPRODUCT - 2); ?>;
|
var maxproduct = <?php echo ($MAXPRODUCT - 2); ?>;
|
||||||
|
|
||||||
if (moreorless=="more"){
|
if (moreorless=="more"){
|
||||||
@ -251,9 +265,12 @@ function MoreProducts(moreorless) {
|
|||||||
idata++; //Next data everytime
|
idata++; //Next data everytime
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#search").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClickProduct(position) {
|
function ClickProduct(position) {
|
||||||
|
console.log("ClickProduct");
|
||||||
$('#proimg'+position).animate({opacity: '0.5'}, 1);
|
$('#proimg'+position).animate({opacity: '0.5'}, 1);
|
||||||
$('#proimg'+position).animate({opacity: '1'}, 100);
|
$('#proimg'+position).animate({opacity: '1'}, 100);
|
||||||
if ($('#prodiv'+position).data('iscat')==1){
|
if ($('#prodiv'+position).data('iscat')==1){
|
||||||
@ -269,15 +286,18 @@ function ClickProduct(position) {
|
|||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$("#search").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteline() {
|
function deleteline() {
|
||||||
|
console.log("Delete line");
|
||||||
$("#poslines").load("invoice.php?action=deleteline&place="+place+"&idline="+selectedline, function() {
|
$("#poslines").load("invoice.php?action=deleteline&place="+place+"&idline="+selectedline, function() {
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function Customer() {
|
function Customer() {
|
||||||
|
console.log("Open box to select the thirdparty");
|
||||||
$.colorbox({href:"../societe/list.php?contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("Customer");?>"});
|
$.colorbox({href:"../societe/list.php?contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("Customer");?>"});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,30 +308,34 @@ function CloseBill() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Floors() {
|
function Floors() {
|
||||||
|
console.log("Open box to select floor");
|
||||||
$.colorbox({href:"floors.php?place="+place, width:"90%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("Floors");?>"});
|
$.colorbox({href:"floors.php?place="+place, width:"90%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("Floors");?>"});
|
||||||
}
|
}
|
||||||
|
|
||||||
function FreeZone() {
|
function FreeZone() {
|
||||||
|
console.log("Open box to enter a free product");
|
||||||
$.colorbox({href:"freezone.php?action=freezone&place="+place, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("FreeZone");?>"});
|
$.colorbox({href:"freezone.php?action=freezone&place="+place, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("FreeZone");?>"});
|
||||||
}
|
}
|
||||||
|
|
||||||
function TakeposOrderNotes() {
|
function TakeposOrderNotes() {
|
||||||
|
console.log("Open box to order notes");
|
||||||
$.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("OrderNotes");?>"});
|
$.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("OrderNotes");?>"});
|
||||||
}
|
}
|
||||||
|
|
||||||
function Refresh() {
|
function Refresh() {
|
||||||
|
console.log("Refresh");
|
||||||
$("#poslines").load("invoice.php?place="+place, function() {
|
$("#poslines").load("invoice.php?place="+place, function() {
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function Search() {
|
function ClearSearch() {
|
||||||
$("#poslines").load("invoice.php?action=search&place="+place, function() {
|
console.log("ClearSearch");
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
$("#search").val('').focus();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Search2() {
|
function Search2() {
|
||||||
|
console.log("Search2");
|
||||||
pageproducts=0;
|
pageproducts=0;
|
||||||
$.getJSON('./ajax.php?action=search&term='+$('#search').val(), function(data) {
|
$.getJSON('./ajax.php?action=search&term='+$('#search').val(), function(data) {
|
||||||
for (i = 0; i < 30; i++) {
|
for (i = 0; i < 30; i++) {
|
||||||
@ -329,20 +353,26 @@ function Search2() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function Edit(number){
|
function Edit(number) {
|
||||||
|
|
||||||
|
if (typeof(selectedtext) == "undefined") return; // We click on an action on the number pad but there is no line selected
|
||||||
|
|
||||||
var text=selectedtext+"<br> ";
|
var text=selectedtext+"<br> ";
|
||||||
|
|
||||||
if (number=='c'){
|
if (number=='c'){
|
||||||
editnumber="";
|
editnumber="";
|
||||||
Refresh();
|
Refresh();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (number=='qty'){
|
else if (number=='qty'){
|
||||||
|
console.log("Edit "+number);
|
||||||
if (editaction=='qty' && editnumber!=""){
|
if (editaction=='qty' && editnumber!=""){
|
||||||
$("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
$("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
||||||
editnumber="";
|
editnumber="";
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
$("#qty").html("<?php echo $langs->trans("Qty"); ?>");
|
$("#qty").html("<?php echo $langs->trans("Qty"); ?>");
|
||||||
});
|
});
|
||||||
|
$("#search").focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -350,12 +380,14 @@ function Edit(number){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (number=='p'){
|
else if (number=='p'){
|
||||||
|
console.log("Edit "+number);
|
||||||
if (editaction=='p' && editnumber!=""){
|
if (editaction=='p' && editnumber!=""){
|
||||||
$("#poslines").load("invoice.php?action=updateprice&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
$("#poslines").load("invoice.php?action=updateprice&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
||||||
editnumber="";
|
editnumber="";
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
$("#price").html("<?php echo $langs->trans("Price"); ?>");
|
$("#price").html("<?php echo $langs->trans("Price"); ?>");
|
||||||
});
|
});
|
||||||
|
$("#search").focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -363,12 +395,14 @@ function Edit(number){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (number=='r'){
|
else if (number=='r'){
|
||||||
|
console.log("Edit "+number);
|
||||||
if (editaction=='r' && editnumber!=""){
|
if (editaction=='r' && editnumber!=""){
|
||||||
$("#poslines").load("invoice.php?action=updatereduction&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
$("#poslines").load("invoice.php?action=updatereduction&place="+place+"&idline="+selectedline+"&number="+editnumber, function() {
|
||||||
editnumber="";
|
editnumber="";
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>");
|
$("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>");
|
||||||
});
|
});
|
||||||
|
$("#search").focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -400,18 +434,21 @@ function Edit(number){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TakeposPrintingOrder(){
|
function TakeposPrintingOrder(){
|
||||||
|
console.log("TakeposPrintingOrder");
|
||||||
$("#poslines").load("invoice.php?action=order&place="+place, function() {
|
$("#poslines").load("invoice.php?action=order&place="+place, function() {
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function TakeposPrintingTemp(){
|
function TakeposPrintingTemp(){
|
||||||
|
console.log("TakeposPrintingTemp");
|
||||||
$("#poslines").load("invoice.php?action=temp&place="+place, function() {
|
$("#poslines").load("invoice.php?action=temp&place="+place, function() {
|
||||||
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function OpenDrawer(){
|
function OpenDrawer(){
|
||||||
|
console.log("OpenDrawer");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER;?>:8111/print',
|
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER;?>:8111/print',
|
||||||
@ -466,8 +503,8 @@ $( document ).ready(function() {
|
|||||||
<button type="button" id="reduction" class="calcbutton2" onclick="Edit('r');"><?php echo $langs->trans("ReductionShort"); ?></button>
|
<button type="button" id="reduction" class="calcbutton2" onclick="Edit('r');"><?php echo $langs->trans("ReductionShort"); ?></button>
|
||||||
<button type="button" class="calcbutton" onclick="Edit(0);">0</button>
|
<button type="button" class="calcbutton" onclick="Edit(0);">0</button>
|
||||||
<button type="button" class="calcbutton" onclick="Edit('.');">.</button>
|
<button type="button" class="calcbutton" onclick="Edit('.');">.</button>
|
||||||
<button type="button" class="calcbutton" onclick="Edit('c');">C</button>
|
<button type="button" class="calcbutton poscolorblue" onclick="Edit('c');">C</button>
|
||||||
<button type="button" class="calcbutton2" id="delete" style="color: red;" onclick="deleteline();"><b>X</b></button>
|
<button type="button" class="calcbutton2 poscolordelete" id="delete" onclick="deleteline();"><span class="fa fa-trash"></span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -499,42 +536,33 @@ if (count($maincategories)==0) {
|
|||||||
// User menu and external TakePOS modules
|
// User menu and external TakePOS modules
|
||||||
$menus = array();
|
$menus = array();
|
||||||
$r=0;
|
$r=0;
|
||||||
$menus[$r++]=array('title'=>'<span class="fas fa-search paddingrightonly"></span>'.$langs->trans("SearchProduct"),
|
//$menus[$r++]=array('title'=>'<span class="fas fa-search paddingrightonly"></span>'.$langs->trans("SearchProduct"), 'action'=>'Search();');
|
||||||
'action'=>'Search();');
|
$menus[$r++]=array('title'=>'<span class="far fa-building paddingrightonly"></span>'.$langs->trans("Customer"), 'action'=>'Customer();');
|
||||||
$menus[$r++]=array('title'=>$langs->trans("FreeZone"),
|
$menus[$r++]=array('title'=>'<span class="fa fa-cube paddingrightonly"></span>'.$langs->trans("FreeZone"), 'action'=>'FreeZone();');
|
||||||
'action'=>'FreeZone();');
|
$menus[$r++]=array('title'=>'<span class="far fa-money-bill-alt paddingrightonly"></span>'.$langs->trans("Payment"), 'action'=>'CloseBill();');
|
||||||
$menus[$r++]=array('title'=>'<span class="far fa-building paddingrightonly"></span>'.$langs->trans("Customer"),
|
|
||||||
'action'=>'Customer();');
|
|
||||||
$menus[$r++]=array('title'=>'<span class="fa fa-home paddingrightonly"></span>'.$langs->trans("BackOffice"),
|
|
||||||
'action'=>'window.open(\''.(DOL_URL_ROOT ? DOL_URL_ROOT : '/').'\', \'_backoffice\');');
|
|
||||||
$menus[$r++]=array('title'=>$langs->trans("DoPayment"),
|
|
||||||
'action'=>'CloseBill();');
|
|
||||||
$menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"></span>'.$langs->trans("Logout"),
|
|
||||||
'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';');
|
|
||||||
|
|
||||||
// BAR RESTAURANT specific menu
|
// BAR RESTAURANT specific menu
|
||||||
if($conf->global->TAKEPOS_BAR_RESTAURANT){
|
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
|
||||||
$menus[$r++]=array('title'=>$langs->trans("Floors"), 'action'=>'Floors();');
|
{
|
||||||
if ($conf->global->TAKEPOS_ORDER_PRINTERS){
|
$menus[$r++]=array('title'=>'<span class="fa fa-layer-group paddingrightonly"></span>'.$langs->trans("Floors"), 'action'=>'Floors();');
|
||||||
$menus[$r++]=array('title'=>$langs->trans("Order"),
|
if ($conf->global->TAKEPOS_ORDER_PRINTERS)
|
||||||
'action'=>'TakeposPrintingOrder();');
|
{
|
||||||
|
$menus[$r++]=array('title'=>$langs->trans("Order"), 'action'=>'TakeposPrintingOrder();');
|
||||||
}
|
}
|
||||||
//add temp ticket button
|
//add temp ticket button
|
||||||
if ($conf->global->TAKEPOS_BAR_RESTAURANT){
|
if ($conf->global->TAKEPOS_BAR_RESTAURANT)
|
||||||
if ($conf->global->TAKEPOSCONNECTOR) $menus[$r++]=array('title'=>$langs->trans("Receipt"),'action'=>'TakeposPrinting(placeid);');
|
{
|
||||||
else $menus[$r++]=array('title'=>$langs->trans("Receipt"),'action'=>'Print(placeid);');
|
if ($conf->global->TAKEPOSCONNECTOR) $menus[$r++]=array('title'=>'<span class="fa fa-receipt paddingrightonly"></span>'.$langs->trans("Receipt"),'action'=>'TakeposPrinting(placeid);');
|
||||||
|
else $menus[$r++]=array('title'=>'<span class="fa fa-receipt paddingrightonly"></span>'.$langs->trans("Receipt"),'action'=>'Print(placeid);');
|
||||||
}
|
}
|
||||||
if ($conf->global->TAKEPOSCONNECTOR && $conf->global->TAKEPOS_ORDER_NOTES==1){
|
if ($conf->global->TAKEPOSCONNECTOR && $conf->global->TAKEPOS_ORDER_NOTES==1)
|
||||||
$menus[$r++]=array('title'=>$langs->trans("OrderNotes"),
|
{
|
||||||
'action'=>'TakeposOrderNotes();');
|
$menus[$r++]=array('title'=>$langs->trans("OrderNotes"), 'action'=>'TakeposOrderNotes();');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->TAKEPOSCONNECTOR){
|
if ($conf->global->TAKEPOSCONNECTOR) {
|
||||||
$menus[$r++]=array(
|
$menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"), 'action'=>'OpenDrawer();');
|
||||||
'title'=>$langs->trans("DOL_OPEN_DRAWER"),
|
|
||||||
'action'=>'OpenDrawer();'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('takeposfrontend'));
|
$hookmanager->initHooks(array('takeposfrontend'));
|
||||||
@ -543,34 +571,48 @@ if (!empty($reshook)) {
|
|||||||
$menus[$r++]=$reshook;
|
$menus[$r++]=$reshook;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
if ($r % 3 == 2) $menus[$r++]=array('title'=>'', 'style'=>'visibility: hidden;');
|
||||||
<div class="div3">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$i = 0;
|
$menus[$r++]=array('title'=>'<span class="fa fa-home paddingrightonly"></span>'.$langs->trans("BackOffice"), 'action'=>'window.open(\''.(DOL_URL_ROOT ? DOL_URL_ROOT : '/').'\', \'_backoffice\');');
|
||||||
foreach($menus as $menu) {
|
$menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"></span>'.$langs->trans("Logout"), 'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';');
|
||||||
$i++;
|
|
||||||
if (count($menus)>9 and $i==9)
|
?>
|
||||||
{
|
<!-- Show buttons -->
|
||||||
echo '<button type="button" id="actionnext" class="actionbutton" onclick="MoreActions('.count($menus).');">'.$langs->trans("Next").'</button>';
|
<div class="div3">
|
||||||
echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>';
|
<?php
|
||||||
}
|
$i = 0;
|
||||||
elseif ($i>9) echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>';
|
foreach($menus as $menu)
|
||||||
else echo '<button type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>';
|
{
|
||||||
}
|
$i++;
|
||||||
|
if (count($menus) > 9 and $i == 9)
|
||||||
|
{
|
||||||
|
echo '<button style="'.$menu['style'].'" type="button" id="actionnext" class="actionbutton" onclick="MoreActions('.count($menus).');">'.$langs->trans("Next").'</button>';
|
||||||
|
echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>';
|
||||||
|
}
|
||||||
|
elseif ($i>9) echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>';
|
||||||
|
else echo '<button style="'.$menu['style'].'" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<!-- Show the search input text -->'."\n";
|
||||||
|
print '<div class="margintoponly">';
|
||||||
|
print '<input type="text" id="search" name="search" onkeyup="Search2();" style="width:80%;font-size: 150%;" placeholder="'.$langs->trans("Search").'" autofocus> ';
|
||||||
|
print '<a class="marginleftonly" onclick="ClearSearch();">'.img_picto('', 'searchclear').'</a>';
|
||||||
|
print '</div>';
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row2">
|
<div class="row2">
|
||||||
|
|
||||||
|
<!-- Show categories -->
|
||||||
<div class="div4">
|
<div class="div4">
|
||||||
<?php
|
<?php
|
||||||
$count=0;
|
$count=0;
|
||||||
while ($count < $MAXCATEG)
|
while ($count < $MAXCATEG)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class='wrapper' <?php if ($count==($MAXCATEG-2)) echo 'onclick="MoreCategories(\'less\');"'; elseif ($count==($MAXCATEG-1)) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'>
|
<div class='wrapper' <?php if ($count==($MAXCATEG-2)) echo 'onclick="MoreCategories(\'less\');"'; elseif ($count==($MAXCATEG-1)) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id="catdiv<?php echo $count;?>">
|
||||||
<img class='imgwrapper' <?php if ($count==($MAXCATEG-2)) echo 'src="img/arrow-prev-top.png"'; if ($count==($MAXCATEG-1)) echo 'src="img/arrow-next-top.png"';?> width="100%" height="100%" id="catimg<?php echo $count;?>" />
|
<img class='imgwrapper' <?php if ($count==($MAXCATEG-2)) echo 'src="img/arrow-prev-top.png"'; if ($count==($MAXCATEG-1)) echo 'src="img/arrow-next-top.png"';?> height="100%" id="catimg<?php echo $count;?>" />
|
||||||
<div class='description'>
|
<div class='description'>
|
||||||
<div class='description_content' id='catdesc<?php echo $count;?>'></div>
|
<div class='description_content' id='catdesc<?php echo $count;?>'></div>
|
||||||
</div>
|
</div>
|
||||||
@ -582,16 +624,17 @@ foreach($menus as $menu) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Show product -->
|
||||||
<div class="div5">
|
<div class="div5">
|
||||||
<?php
|
<?php
|
||||||
$count=0;
|
$count=0;
|
||||||
while ($count < $MAXPRODUCT)
|
while ($count < $MAXPRODUCT)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class='wrapper2' id='prodiv<?php echo $count;?>' <?php if ($count==($MAXPRODUCT-2)) {?> onclick="MoreProducts('less');" <?php } if ($count==($MAXPRODUCT-1)) {?> onclick="MoreProducts('more');" <?php } else echo 'onclick="ClickProduct('.$count.');"';?>>
|
<div class="wrapper2" id='prodiv<?php echo $count;?>' <?php if ($count==($MAXPRODUCT-2)) {?> onclick="MoreProducts('less');" <?php } if ($count==($MAXPRODUCT-1)) {?> onclick="MoreProducts('more');" <?php } else echo 'onclick="ClickProduct('.$count.');"';?>>
|
||||||
<img class='imgwrapper' <?php if ($count==($MAXPRODUCT-2)) echo 'src="img/arrow-prev-top.png"'; if ($count==($MAXPRODUCT-1)) echo 'src="img/arrow-next-top.png"';?> width="100%" height="100%" id="proimg<?php echo $count;?>" />
|
<img class="imgwrapper" <?php if ($count==($MAXPRODUCT-2)) echo 'src="img/arrow-prev-top.png"'; if ($count==($MAXPRODUCT-1)) echo 'src="img/arrow-next-top.png"';?> height="100%" id="proimg<?php echo $count;?>" />
|
||||||
<div class='description'>
|
<div class="description">
|
||||||
<div class='description_content' id='prodesc<?php echo $count;?>'></div>
|
<div class="description_content" id="prodesc<?php echo $count;?>"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="catwatermark" id='prowatermark<?php echo $count;?>'>+</div>
|
<div class="catwatermark" id='prowatermark<?php echo $count;?>'>+</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user