Topic: Auto populate "Price After Tax" in Purchase Orders

I am trying to figure out how to get the "Price After Tax" in the purchase orders to automatically pull the most recent purchase from from the Purchasing Pricing section for an item type Service.  For example, when I purchase fuel I want it to populate the price for me because my fuel cost per gallon is a fixed amount each quarter.

Is there a way to do this in the PO?  All my items are set up as service items because I don't keep inventory and my business is a service business anyways.

I guess my other question with this is when I update the price each quarter, will this change the price for all of the closed PO's as well or will they keep the price that it was at when the PO was created?

2 (edited by apmuthu 12/15/2016 06:52:00 pm)

Re: Auto populate "Price After Tax" in Purchase Orders

Sales Prices and currency for items (stock_id) are stored in the prices table.
Suppliers Prices for items (stock_id along with suppliers UoM and conversion factor) are stored in purch_data table.
The above are used when looking up the fields in the sales and purchase order/invoice forms.
The actual price used for the specific invoice's item is stored in the sales_order_details  and purch_order_details tables respectively.

Hence the closed PO's and Invoices will not have their prices altered when the items' sales and purchase prices vary at the item's lookup tables for sale and purchase.

Unless your most recent purchase item cost is entered against the supplier's list of items on that date, it will not be the one looked up thereafter.

Re: Auto populate "Price After Tax" in Purchase Orders

apmuthu wrote:

Sales Prices and currency for items (stock_id) are stored in the prices table.
Suppliers Prices for items (stock_id along with suppliers UoM and conversion factor) are stored in purch_data table.
The above are used when looking up the fields in the sales and purchase order/invoice forms.
The actual price used for the specific invoice's item is stored in the sales_order_details  and purch_order_details tables respectively.

Hence the closed PO's and Invoices will not have their prices altered when the items' sales and purchase prices vary at the item's lookup tables for sale and purchase.

Unless your most recent purchase item cost is entered against the supplier's list of items on that date, it will not be the one looked up thereafter.

That's what I thought, but for some reason nothing auto populates in my po's when I select the item. I have to enter the price manually every time. Where is the function that calls the info so I can check it and name sure it is correct?

Re: Auto populate "Price After Tax" in Purchase Orders

myhandgunpursedotcom wrote:
apmuthu wrote:

Sales Prices and currency for items (stock_id) are stored in the prices table.
Suppliers Prices for items (stock_id along with suppliers UoM and conversion factor) are stored in purch_data table.
The above are used when looking up the fields in the sales and purchase order/invoice forms.
The actual price used for the specific invoice's item is stored in the sales_order_details  and purch_order_details tables respectively.

Hence the closed PO's and Invoices will not have their prices altered when the items' sales and purchase prices vary at the item's lookup tables for sale and purchase.

Unless your most recent purchase item cost is entered against the supplier's list of items on that date, it will not be the one looked up thereafter.

That's what I thought, but for some reason nothing auto populates in my po's when I select the item. I have to enter the price manually every time. Where is the function that calls the info so I can check it and name sure it is correct?

Nevermind.  I figured out why it wasn't working.  I had a completely unrelated issue and turned debug mode on.  Found I had a few errors in that PO module.  Once I fixed those issues it started pulling the price from the purchasing pricing screen smile  Me very happy now!

I love that debug feature in the config.php file.  It has been a life saver!

Re: Auto populate "Price After Tax" in Purchase Orders

You will find the Wiki page on Troubleshooting FA useful.