Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hang on Customer Receipt - SOLVED
12-13-2017, 05:45 AM, (This post was last modified: 12-13-2017, 05:56 AM by VortecCPI.)
#1
Hang on Customer Receipt - SOLVED
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.

   

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>
https://www.linkedin.com/in/eclipsepaulbecker
Reply
12-14-2017, 06:00 AM,
#2
RE: Hang on Customer Receipt - SOLVED
Change committed to SVN.
Reply
12-15-2017, 08:39 AM,
#3
RE: Hang on Customer Receipt - SOLVED
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
Reply
12-15-2017, 10:49 AM, (This post was last modified: 12-15-2017, 11:10 AM by TurboPT.)
#4
RE: Hang on Customer Receipt - SOLVED
Yes, that is right, Tim. I'll go back and the urlencode() calls on the param values.
Updated SVN commit.
Reply
12-15-2017, 10:27 PM,
#5
RE: Hang on Customer Receipt - SOLVED
A usual thank you both for making sure my change meets conventions and for getting it committed.
https://www.linkedin.com/in/eclipsepaulbecker
Reply
12-16-2017, 12:41 AM,
#6
RE: Hang on Customer Receipt - SOLVED
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)