webERP Forum

Full Version: Hang on Customer Receipt - SOLVED
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Main Menu > Receivables > Enter Customer Payments


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.


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>
Change committed to SVN.
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>

Yes, that is right, Tim. I'll go back and the urlencode() calls on the param values.
Updated SVN commit.
A usual thank you both for making sure my change meets conventions and for getting it committed.
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.

Reference URL's