Register    Login    Forum    Search    FAQ

Board index » Bugs » Bugs happen!




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: No Tracking # in Report > Customer > Invoices/Packing Slips
 Post Posted: Thu Feb 02, 2012 9:41 pm 
Offline

Joined: Wed Jan 18, 2012 3:20 am
Posts: 32
Location: Redmond, WA
File: modules > phreebooks > classes > entry_builder.php
Line: 255 and 262

In Report Designer for Invoices/Packing Slips, I wanted to display the carrier tracking number. I used the Field Setup and added "tracking_id". Running the report, the tracking number was not displayed.

From the Report/Form Designer > Database Setup say it uses table journal_main with a join to the table shipping_log via the entry_builder. A quick check found the function load_shipment_details(). In this function, there is no join, instead there is an SQL search for ref_id LIKE purchase_invoice_id . "-%". I'm not sure why the hyphen is being looked at as I don't have hyphens in my invoice numbers. Removing the hyphen allows the search to work correctly.

Another problem once the above mod is made, the tracking number has prepended to it the Carrier and Service. Since the invoice report already has the Carrier and Service displayed, I removed them from the tracking_id assignment. This produces a clean tracking number only.

Let me know if I'm overlooking something with my fix since I still new to using the product.

Larry

_________________
Larry


Top 
 Profile  
 
 Post subject: Re: No Tracking # in Report > Customer > Invoices/Packing Sl
 Post Posted: Wed Feb 08, 2012 1:19 pm 
Offline

Joined: Fri Oct 26, 2007 3:55 pm
Posts: 3499
Location: Colorado, US
The dash is generated when you use the FedEx method to generate shipping labels (which is what I use, so therefore it is the default, developers preference). If you ship a multi-piece shipment I needed to add the hyphen as there is a unique tracking number assigned to each package. I will need to look at the code. The intent here was to prevent pulling the wrong value ( and pulling all values or a given invoice) by uniquely identifying the invoice number and package id.

The ship carrier and method can be removed. I just find it more convenient if they are all on the same line to keep from looking in two places on the invoice to get the information needed to track a package.

Dave


Top 
 Profile  
 
 Post subject: Re: No Tracking # in Report > Customer > Invoices/Packing Sl
 Post Posted: Fri Oct 12, 2012 3:10 pm 
Offline

Joined: Fri Oct 26, 2007 3:55 pm
Posts: 3499
Location: Colorado, US
I've changed the sql in R3.5 to look for an exact match OR the coded sequence (for multipiece shipment)
Code:
select tracking_id from " . TABLE_SHIPPING_LOG . "
       where ref_id = ".$this->purchase_invoice_id." or ref_id like '".$this->purchase_invoice_id."-%'


Dave


Top 
 Profile  
 
 Post subject: Re: No Tracking # in Report > Customer > Invoices/Packing Sl
 Post Posted: Fri Oct 12, 2012 3:39 pm 
Offline

Joined: Wed Jan 18, 2012 3:20 am
Posts: 32
Location: Redmond, WA
Thanks Dave,

Larry

_________________
Larry


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 4 posts ] 

Board index » Bugs » Bugs happen!


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: