Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
maintain price matrix
09-24-2017, 04:47 PM,
#1
maintain price matrix
When looking at the item card in the item maintenance column there is an option for maintaining price matrix. what is this option and what is it used for as I thought it was price break per quantity ordered and when I set it up and put an order in for the quantity I set up the price does not change in the order?
Reply
10-01-2017, 05:15 AM,
#2
RE: maintain price matrix
no help?
Reply
10-01-2017, 01:48 PM, (This post was last modified: 10-01-2017, 02:37 PM by TurboPT.)
#3
RE: maintain price matrix
(10-01-2017, 05:15 AM)rjonesbsink Wrote: no help?

I'm still investigating, but it appears [so far] that the pricematrix is only referenced/used with SelectCreditItems.php, SelectOrderItems_IntoCart.inc, and StockDispatch.php. [based on a source-wide search, see image below]

The primary script is PriceMatrix.php. The pricematrix table is referenced by another script named includes/GetPrice.inc.

The GetPrice.inc file defines a function called GetPrice(), BUT although GetPrice.inc is included in several files, only the first three files that I mentioned at the beginning are the ones that actually have calls to the GetPrice() function. [as found in another source-wide search, see image below]

I'm not 100% certain why this is at the moment, but I did find a comment in some other files with:

Quote: /*This is quite complicated - the idea is that prices set up should be unique and there is no way two prices could be returned as valid - when getting a price in includes/GetPrice.inc the logic is to first look for a price of the salestype/currency within the effective start and end dates - then if not get the price with a start date prior but a blank end date (the default price). We would not want two prices where one price falls inside another effective date range except in the case of a blank end date - ie no end date - the default price for the currency/salestype.
I first thought that we would need to update the previous default price (blank end date), when a new default price is entered, to have an end date of the startdate of this new default price less 1 day - but this is converting a default price into a special price which could result in having two special prices over the same date range - best to leave it unchanged and use logic in the GetPrice.inc to ensure the correct default price is returned
*
* After further discussion (Ricard) if the new price has a blank end date - i.e. no end then the pre-existing price with no end date should be changed to have an end date just prior to the new default (no end date) price commencing
*/

...so there might be a reason, that I don't know, why the matrix is not referenced in the other files that have GetPrice.inc included, but NO calls to the GetPrice() function? The other files that have included GetPrice.inc, without the GetPrice() function, are querying the prices table instead, or have no price-related queries.

For others that might also look into this matter...

Here's the file references to pricematrix:

[Image: 3461ag3.jpg]

...and the file references to GetPrice:

[Image: 23hw3t1.jpg]

So, all that being said, I would need the perspective of someone closer to the pricematrix history/use that can elaborate more into this matter.
Reply
10-02-2017, 06:36 AM,
#4
RE: maintain price matrix
The pricematrix is Exson's "baby" ... I think he monitors this forum.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
10-09-2017, 07:55 PM,
#5
RE: maintain price matrix
Hi, Phil and all,

The pricematrix is workable when you add an item to the cart.
But it seems does not work when you revise the quantity of the line later. The workaround currently is to delete the line and add a new line with right quantity later.

Best regards!
Exson



(10-02-2017, 06:36 AM)phil Wrote: The pricematrix is Exson's "baby" ... I think he monitors this forum.

Reply
10-26-2017, 08:25 AM,
#6
RE: maintain price matrix
(10-09-2017, 07:55 PM)Exsonqu_Qu Wrote: Hi, Phil and all,

The pricematrix is workable when you add an item to the cart.
But it seems does not work when you revise the quantity of the line later. The workaround currently is to delete the line and add a new line with right quantity later.

Best regards!
Exson



(10-02-2017, 06:36 AM)phil Wrote: The pricematrix is Exson's "baby" ... I think he monitors this forum.

I have done this and it still does not work. also it is creating another line with the same item but it does not change pricing
Reply
10-27-2017, 07:50 PM,
#7
RE: maintain price matrix
From memory I think the reason we did it so that the price doesn't automatically update was to do with special prices.

For instance imagine the scenario where you enter an order, and then override the price from the price matrix, with a one off special price. Then at some stage an alteration is made to the order. Most likely you won't want to revert to the price from the price matrix, so you can't call the GetPrice() function. It is also made more complicated by the issue of some users having the ability to change prices, and others not.

In other words this comes down to companies internal policies, and coming up with a "one size fits all" code was impossible.

Tim
Reply
10-30-2017, 08:24 AM, (This post was last modified: 10-30-2017, 08:24 AM by rjonesbsink.)
#8
RE: maintain price matrix
(10-27-2017, 07:50 PM)falkoner Wrote: From memory I think the reason we did it so that the price doesn't automatically update was to do with special prices.

For instance imagine the scenario where you enter an order, and then override the price from the price matrix, with a one off special price. Then at some stage an alteration is made to the order. Most likely you won't want to revert to the price from the price matrix, so you can't call the GetPrice() function. It is also made more complicated by the issue of some users having the ability to change prices, and others not.

In other words this comes down to companies internal policies, and coming up with a "one size fits all" code was impossible.

Tim

I would of thought that feature would be used as when a product is created and a set single piece price is entered and the price matrix would be the next step in the discount price for buying a greater quantity of that item.
Reply
10-30-2017, 08:42 AM,
#9
RE: maintain price matrix
In theory yes, but in practice there are always times when a price taken from the matrix could be overwritten. There needs to be a policy as to what happens then.

Tim
Reply
10-31-2017, 05:31 AM, (This post was last modified: 10-31-2017, 05:31 AM by phil.)
#10
RE: maintain price matrix
Quote:a set single piece price is entered and the price matrix would be the next step in the discount price for buying a greater quantity of that item
This is how the "discount" matrix works. Not really looked at the price matrix code.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)