Post Reply 
 
Thread Rating:
  • 0 Votes - 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.)
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
12-14-2017, 06:00 AM
Post: #2
RE: Hang on Customer Receipt - SOLVED
Change committed to SVN.
Find all posts by this user
Quote this message in a reply
12-15-2017, 08:39 AM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
12-15-2017, 10:49 AM (This post was last modified: 12-15-2017 11:10 AM by TurboPT.)
Post: #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.
Find all posts by this user
Quote this message in a reply
12-15-2017, 10:27 PM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2017, 12:41 AM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)