No more need to set scroolTop, lines are sorted with last added first
This commit is contained in:
parent
ff10a2ab5a
commit
9105e205ff
@ -61,7 +61,7 @@ if ($action=="change") {
|
|||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
parent.$("#poslines").load("invoice.php?place="+<?php print $place;?>, function() {
|
parent.$("#poslines").load("invoice.php?place="+<?php print $place;?>, function() {
|
||||||
parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
|
//parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
|
||||||
parent.$.colorbox.close();
|
parent.$.colorbox.close();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -407,6 +407,8 @@ print "</tr>\n";
|
|||||||
|
|
||||||
if ($placeid > 0)
|
if ($placeid > 0)
|
||||||
{
|
{
|
||||||
|
if (is_array($invoice->lines) && count($invoice->lines))
|
||||||
|
{
|
||||||
$tmplines = array_reverse($invoice->lines);
|
$tmplines = array_reverse($invoice->lines);
|
||||||
foreach($tmplines as $line)
|
foreach($tmplines as $line)
|
||||||
{
|
{
|
||||||
@ -441,6 +443,12 @@ if ($placeid > 0)
|
|||||||
|
|
||||||
print $htmlforlines;
|
print $htmlforlines;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td></tr>';
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -170,7 +170,7 @@ else print "var received=0;";
|
|||||||
}
|
}
|
||||||
console.log("We click on the payment mode to pay amount = "+amountpayed);
|
console.log("We click on the payment mode to pay amount = "+amountpayed);
|
||||||
parent.$("#poslines").load("invoice.php?place=<?php echo $place;?>&action=valid&pay="+payment+"&amount="+amountpayed+"&invoiceid="+invoiceid, function() {
|
parent.$("#poslines").load("invoice.php?place=<?php echo $place;?>&action=valid&pay="+payment+"&amount="+amountpayed+"&invoiceid="+invoiceid, function() {
|
||||||
parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
|
//parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
|
||||||
parent.$.colorbox.close();
|
parent.$.colorbox.close();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,9 +66,9 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
|||||||
<?php
|
<?php
|
||||||
$categories = $categorie->get_full_arbo('product', 0, (($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0)?$conf->global->TAKEPOS_ROOT_CATEGORY_ID:0));
|
$categories = $categorie->get_full_arbo('product', 0, (($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0)?$conf->global->TAKEPOS_ROOT_CATEGORY_ID:0));
|
||||||
|
|
||||||
//$conf->global->TAKEPOS_ROOT_CATEGORY_ID=0;
|
|
||||||
|
|
||||||
// Search root category to know its level
|
// Search root category to know its level
|
||||||
|
//$conf->global->TAKEPOS_ROOT_CATEGORY_ID=0;
|
||||||
$levelofrootcategory=0;
|
$levelofrootcategory=0;
|
||||||
if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0)
|
if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0)
|
||||||
{
|
{
|
||||||
@ -267,7 +267,7 @@ function ClickProduct(position) {
|
|||||||
|
|
||||||
function deleteline() {
|
function deleteline() {
|
||||||
$("#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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,13 +295,13 @@ function TakeposOrderNotes() {
|
|||||||
|
|
||||||
function Refresh() {
|
function 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 Search() {
|
||||||
$("#poslines").load("invoice.php?action=search&place="+place, function() {
|
$("#poslines").load("invoice.php?action=search&place="+place, function() {
|
||||||
$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ function 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"); ?>");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -347,7 +347,7 @@ function 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"); ?>");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -360,7 +360,7 @@ function 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"); ?>");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -395,13 +395,13 @@ function Edit(number){
|
|||||||
|
|
||||||
function TakeposPrintingOrder(){
|
function 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(){
|
||||||
$("#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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user