Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Supplier Inquiry Screen display
10-21-2016, 09:12 PM
Post: #1
Problem with Supplier Inquiry Screen display
Hi all,

Am using Weberp 4.12.3 hosted at godaddy

The problem I have is that for only one supplier, Supplier Account Inquiry (SupplierInquiry.php) displays the supplier transactions as in the image below.

The transactions marked in red and fail to display correctly are all supplier purchase invoices (type 20) to this supplier. All other suppliers display all transactions correctly

Any advice highly appreciated

[Image: supplierenq.png]

Thanks in advance


R2-g
Find all posts by this user
Quote this message in a reply
10-21-2016, 10:52 PM
Post: #2
RE: Problem with Supplier Inquiry Screen display
It would be helpful if you could show the contents of the supptrans table for this supplier.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
10-21-2016, 11:58 PM
Post: #3
RE: Problem with Supplier Inquiry Screen display

.xlsx  URA-UGX-supptrans.xlsx (Size: 19.76 KB / Downloads: 4)
(10-21-2016 10:52 PM)falkoner Wrote:  It would be helpful if you could show the contents of the supptrans table for this supplier.
Tim

Hi Tim,
Thanks for quick response
The supptrans table contains 146 rows for the supplier with whom the problem is seen.
The only way I can provide the transaction for this supplier from supptrans is to attach
a excel sheet with the exported data.

attached is URA-UGX-supptrans.xlsx
Find all posts by this user
Quote this message in a reply
10-24-2016, 12:27 AM
Post: #4
RE: Problem with Supplier Inquiry Screen display
There seem to be a lot of transactions not displayed. Try inserting an
echo $SQL;
at line 77, and then copying and pasting the resultant SQL into a mysql session and seeing what the output is for those missing transactions.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
10-27-2016, 01:53 AM
Post: #5
RE: Problem with Supplier Inquiry Screen display
Hi Tim,

The problem seem to have been the presence of % signs e.g (25% Import duty UBNT 2015 D65864) in the transtext field of supptrans table
after running the below search and replace sql on the supptrans table, the problem is gone

UPDATE supptrans SET transtext = REPLACE(transtext, '%', 'PerCent') WHERE INSTR(transtext, '%') > 0 ;

Thanks


R2-g
Find all posts by this user
Quote this message in a reply
10-27-2016, 08:08 AM
Post: #6
RE: Problem with Supplier Inquiry Screen display
Ah yes, I see. This is a problem with the inquiry using the printf() function.

What you need to do is to change the printf statements at lines 284 and 293 to be echo statements. So for instance 293 changes from

printf($BaseTD8);

to

echo $BaseTD8;

This should now show those lines correctly with the original text.

Thanks
Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
10-27-2016, 10:52 PM
Post: #7
RE: Problem with Supplier Inquiry Screen display
Hi Tim,

Below is how the printf statement looks at lines 284 and 293

printf($BaseTD8 . $PaymentTD1 . $GLEntriesTD1 . '</tr>',

Exactly how do I change it to use echo rather then printf ?

Thanks,
Find all posts by this user
Quote this message in a reply
10-28-2016, 04:10 AM
Post: #8
RE: Problem with Supplier Inquiry Screen display
Both of the following:

printf('Hello World');
echo 'Hello World';

would achieve the same result of outputting the string to the browser. So best answer is to remove the brackets around the output, and replace printf with echo.

Note: echo can also work like a function , so:

echo('Hello World');

would work, but I would advise against that usage, if for no other reason than it makes the code confusing, but more importantly it is the sort of inconsistency that the developers of PHP are prone to suddenly remove.

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)