TakePOS supplement handling needs the rowid of the previously selected
line so the new line can be attached as a child via fk_parent_line.
htdocs/takepos/invoice.php:837 reads $selectedline = GETPOSTINT('selectedline')
and SELECTs FROM facturedet WHERE rowid = $selectedline to find the
parent.
When the JS in htdocs/takepos/index.php:590 dropped the selectedline
query parameter (regression since 19.x), GETPOSTINT returns 0, the
parent lookup matches no row, fk_parent_line stays null and the
supplement is added as a regular standalone line.
Restore the &selectedline= parameter to the AJAX URL.
Signed-off-by: Dolicraft <contact@dolicraft.com>
Co-authored-by: Dolicraft <contact@dolicraft.com>
This commit is contained in:
parent
cf40d4ded2
commit
f9712f978d
1 changed files with 1 additions and 1 deletions
|
|
@ -587,7 +587,7 @@ function ClickProduct(position, qty = 1) {
|
|||
return;
|
||||
}
|
||||
// Call page invoice.php to generate the section with product lines
|
||||
$("#poslines").load("invoice.php?action=addline&token=<?php echo newToken(); ?>&place="+place+"&idproduct="+idproduct+"&qty="+qty+"&invoiceid="+invoiceid, function() {
|
||||
$("#poslines").load("invoice.php?action=addline&token=<?php echo newToken(); ?>&place="+place+"&idproduct="+idproduct+"&selectedline="+selectedline+"&qty="+qty+"&invoiceid="+invoiceid, function() {
|
||||
<?php if (getDolGlobalString('TAKEPOS_CUSTOMER_DISPLAY')) {
|
||||
echo "CustomerDisplay();";
|
||||
}?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue