webERP Forum
Hang on Customer Receipt - SOLVED - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: Hang on Customer Receipt - SOLVED (/showthread.php?tid=7980)



Hang on Customer Receipt - SOLVED - VortecCPI - 12-13-2017

Main Menu > Receivables > Enter Customer Payments

CustomerReceipt.php

After Accepting an entry (or entries) if you try to delete one you are presented with a blank screen that contains only the header.

It appears the identifier is missing from the end of the URL attached to the delete links.

[attachment=616]

Fix is to change line 1009 From this:
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type=' . $_GET['Type']. '">' . _('Delete') . '</a></td>

To this:
<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=' . $ReceiptItem->ID . '&Type=' . $_GET['Type'] . '&amp;identifier=' . $identifier . '">' . _('Delete') . '</a></td>



RE: Hang on Customer Receipt - SOLVED - TurboPT - 12-14-2017

Change committed to SVN.


RE: Hang on Customer Receipt - SOLVED - TimSchofield - 12-15-2017

A minor point but worth keeping in mind is that the values passed via a URL should be encoded so the above link becomes

<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Delete=' . urlencode($ReceiptItem->ID) . '&Type=' . urlencode($_GET['Type']) . '&amp;identifier=' . urlencode($identifier) . '">' . _('Delete') . '</a></td>

Thanks
Tim


RE: Hang on Customer Receipt - SOLVED - TurboPT - 12-15-2017

Yes, that is right, Tim. I'll go back and the urlencode() calls on the param values.
Updated SVN commit.


RE: Hang on Customer Receipt - SOLVED - VortecCPI - 12-15-2017

A usual thank you both for making sure my change meets conventions and for getting it committed.


RE: Hang on Customer Receipt - SOLVED - TimSchofield - 12-16-2017

It should also be noted that &&/AND are not identical operators as they have different precedence rules so care needs to be taken when replacing them as it could lead to obscure regression bugs.

Tim