BUG When load a draft invoice from history I can't add products

This commit is contained in:
andreubisquerra 2021-10-23 16:07:47 +02:00 committed by GitHub
parent a95a99afef
commit 85cc5851ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1719,7 +1719,13 @@ if ($resql) {
print '<tr class="oddeven"';
if ($contextpage == 'poslist') {
print ' onclick="parent.$(\'#poslines\').load(\'invoice.php?action=history&placeid='.$obj->id.'\', function() {parent.$.colorbox.close();});"';
print ' onclick="parent.$(\'#poslines\').load(\'invoice.php?action=history&placeid='.$obj->id.'\', function() {parent.$.colorbox.close();';
if (strpos($obj->ref, 'PROV') !== false) {
//If is a draft invoice, load var to be able to add products
$place = str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $obj->ref));
print 'parent.place=\''.$place.'\'';
}
print '});"';
}
print '>';