Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Price breaks depending on quantity
09-30-2014, 05:06 AM,
#1
Price breaks depending on quantity
Hi,

is it possible to maintain several purchasing costs for one and the same article depending on quantities ("Price Breaks"), e.g.:

10 pcs: $5/ pc.
20 pcs: $4/pc.
50 pcs. $3/pc.

I tried to set up different prices for the same article with different quantities, but I got a key constraint error (because every article can only be set up once).

How could I set up the above example in both the purchase and the sales module?

Thanks a lot!
MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Reply
09-30-2014, 05:19 AM,
#2
RE: Price breaks depending on quantity
You can set this up in the sales side using the discount matrix. However, we don't have the functionality on the purchasing side
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
09-30-2014, 05:46 AM,
#3
RE: Price breaks depending on quantity
Hi Phil,

thanks a lot for clarifying.

On my end, it would certainly be "nice to have" (on the purchasing side), but it's not a "killer feature" either. Maybe that's an item for a "wishlist" Smile

Thanks again!


MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Reply
05-18-2016, 06:54 PM,
#4
RE: Price breaks depending on quantity
We would like to use WebERP for our electronics manufacturing purchasing hooked up with Octopart and this for us is certainly a killer feature as prices can vary widely across breaks of 10,100,1k pcs.

Phil - to implement purchasing price breaks in a WebERP database friendly way what would need to be done (and we can maybe have a tinker... Smile )
Reply
05-19-2016, 08:10 AM, (This post was last modified: 05-20-2016, 03:51 PM by phil.)
#5
RE: Price breaks depending on quantity
Well this is really what the discount matrix is about ... if you get into a 100 prices the general price changes can get quite horrific. However, judicious use of discount matrices can make this whole nightmare much more manageable. The price increases and the discount % remains the same for all customers specific discount matrix set up ... change the 1 price and all customer prices after discount are updated .... VERY cool... but it needs discipline in marketing - yes VERY difficult for such types ... but when explained the virtues of this approach as a way to manage customer net pricing far out weigh the simplistic headline price changes and having a ridiculous number of prices to manage ... that you just can't!!
So more a management philosophy than a specific answer to your question - but I want webERP to be about best business practice. Yes you build in tools to work in a less efficient way.... but me not so interested sorry.

(edit: sorry was thinking about the sales price here)
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
05-19-2016, 11:14 AM,
#6
RE: Price breaks depending on quantity
Hi,
There is a price matrix for each item now. Just check the select product interface.
I think it is each to extend this feature to purchasing side.
Thanks and best regards!

Exson


Reply
05-20-2016, 01:40 AM,
#7
RE: Price breaks depending on quantity
This came up today at our company. I was considering altering the query on purchdata in PO_Items.php to include check on the Min Quantity field as a short term fix. Only select those where min qty >= qty on order line.
Reply
05-27-2016, 04:48 PM,
#8
RE: Price breaks depending on quantity
(05-19-2016, 08:10 AM)phil Wrote: Well this is really what the discount matrix is about ...

Hey Phil any thoughts about the purchasing side of things ?
Reply
05-27-2016, 07:58 PM,
#9
RE: Price breaks depending on quantity
It's not too hard to do this, but requires a few changes:

Firstly you need a new field in the purchdata table something like:

ALTER TABLE purchdata ADD COLUMN qtygreaterthan DOUBLE NOT NULL DEFAULT 0.0 AFTER price;

Then you need to change the primary key to include this field

ALTER TABLE purchdata DROP PRIMARY KEY;
ALTER TABLE purchdata ADD PRIMARY KEY (`supplierno`, `stockid` , `effectivefrom`, `qtygreaterthan`);

Then change the PurchData.php script to enable you to add values to this field. The only gotcha I found here was making sure you deal with the case where you are updating rather than inserting and the qtygreaterthan field was changing, but this is something of an edge case. So now I have data like this:

| supplierno | stockid | price | qtygreaterthan
+------------+---------+----------+----------------+--------------+
| 412001 | CB11 | 100.0000 | 0 |
| 412001 | CB11 | 110.0000 | 100 |
| 412001 | CB11 | 120.0000 | 200 |

Then in PO_Items.php you need to alter the sql at about line 586 to be the following:

$SQL = "SELECT price,
conversionfactor,
supplierdescription,
suppliersuom,
suppliers_partno,
leadtime,
MAX(purchdata.effectivefrom) AS latesteffectivefrom
FROM purchdata
WHERE purchdata.supplierno = '" . $_SESSION['PO' . $Identifier]->SupplierID . "'
AND purchdata.effectivefrom <=CURRENT_DATE
AND purchdata.stockid = '" . $ItemCode . "'
AND qtygreaterthan<'" . $Quantity . "'
GROUP BY purchdata.price,
purchdata.conversionfactor,
purchdata.supplierdescription,
purchdata.suppliersuom,
purchdata.suppliers_partno,
purchdata.leadtime
ORDER BY latesteffectivefrom DESC,
qtygreaterthan DESC LIMIT 1";

This should now select the correct the price when you insert a new item. What it doesn't currently do is alter the price if you change the quantity on an order and then update. This obviously depends on the company workflow - should the person entering the order manually alter the price would you want that overridden?

There are a number of reports/inquiries that would then need to be altered but the above should be enough to get you going. If you want the full diff (it's way too big to post here) then contact me privately.

Thanks
Tim
Reply
05-28-2016, 12:19 AM,
#10
RE: Price breaks depending on quantity
I got around the issue of updating by adding a "Refresh Prices" button to POItems.php

Tim
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)