Opinion Poll - changes to Discounting(additions really)

Can I get Opinions on this addition - following a user request.

The Proposal:

Current :

  • Discounts at Patient and Client level based on either % or $ value.
  • Products have a maximum discount which defaults to 100%.
  • At invoicing of a product the system applies relevant discounts and then checks it doesnt exceed the maximum discount and applies a discount as a $ value. 
  • Discounts can be applied to the fixed price component or it can be excluded based on the discount type.
  • Updating the qty or price will cause the discount to be relcalculated.

Suggested Changes:

  • Add a new cost price discount - this would be selected during discount setup, and when applied would discount the product to sell it for Cost plus relevant tax. (probably relevant for staff)
  • During product price creation the maximum discount will be a calculated value based on the calculated product markup, this will mean maximum discount will never allow a product to be sold below cost via discounting.  The discount can be overridden to reset it to 100 % at product creation OR overridden at product sale to sell below cost.
  • Change to the Discount fields at product sale to allow for the entry of % based discounts. Upon entry the entry will accept an entry (for example 10%) but the system will take this figure calculate the discount and update the field with the calculated discount (like a macro).
  • A warning box will pop up should the applied discount exceed maximum discount for a product.

 

The system would recalculate the maximum discount when ever a change is made to the markup or the Sale Price.  

It would work as follows -

if the markup is changed....

  1. Update the Sale Price
  2. Update the Discount - formula  = (MARKUP / (1+MARKUP))*100 

For example if you set the markup to 50% the max discount would be set to 33% this effectively stops discounting below cost price.

If the Sale Price is changed

  1. Recalculate the markup
  2. Relcalulate the discount based on the new markup (formula as above)

The maximum discount can be overridden by manually entering the required figure. where no markup figure exists set the max to 100%.

IF the maximum discount has been set to 0% manually it will not be recalculated.  This would mean the products price cannot have automatic discounts under any circumstances at sale.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Opinion Poll - changes to Discounting(additions really)

Ben - I suspect that for the sake of completeness, that the 'at cost' discount should include the ability to to set the discount so that the sell price is 'at cost + x%'. This would allow a practice to do sales to staff at a little be more that the cost price.

Hence the original request for a facility to enable sales at cost price is in fact the 'at cost +0%' case of the more generalised 'at cost + x%' discount facility.

That said, I think that your proposed changes are very sensible and improve the discount facility.

Regards, Tim

Re: Opinion Poll - changes to Discounting(additions really)

Yep thats pretty sensible - I have adjusted to allow for cost + variable % situation.  However in all cases when this discount is used I am applying practice level tax to the final price if it is in place - ie I use the tax rules over the final price.  

In effect how this works in practice is when calculating the discount the system recalls the cost price adds the variable % if present then adds tax.  It then subtracts this value from the price and that it returned as the final discount.  In cases where a product has a cost of 0 then in effect the purchaser with this discount would get it free.

I do this because if we sold a product at cost to a staff with no markup then the practice would be left with the GST component of the sale to pay...they would have purchased the product at a higher price than they sold it...  anyone see issue with this?

If no taxrule applies then no tax is added.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Opinion Poll - changes to Discounting(additions really)

Ben - no issue.  The statement 'we sell to our staff at cost' does not mean that the staff pay the cost price shown in the system - because this is an ex-tax cost price - and the staff need to pay this PLUS the applicable tax.

On the 'cost price set to $0' issue, prior to this 'cost plus' discount facility, the only effect of not setting the cost price for an item has been to screw up margin calculations.  Now we have a situation where, if one wants to use 'cost plus' discounts, then it is imperative that the costs are set correctly.

I wonder if it would be sensible to pop up a warning if 'cost plus' discounting is being used and the cost price (ie sum of the unit and fixed costs) is zero.

Regards, Tim G

Re: Opinion Poll - changes to Discounting(additions really)

Yeah I was going to try and construct a warning pop up if an item was being sold below cost anyway - this could be another addition.

 

Ben

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Opinion Poll - changes to Discounting(additions really)

Yeah I was going to try and construct a warning pop up if an item was being sold below cost anyway - this could be another addition.

 

Ben

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Opinion Poll - changes to Discounting(additions really)

This would be very helpful at our clinic.  Particularly with a cost + x% function.  Some of the staff are complaining that their 'cost price' discount isn't calculated properly resulting in them paying more for products than they used to.

 

Trilby

Re: Opinion Poll - changes to Discounting(additions really)

How would this work for multiple discounts?

Also, a charge item total is calculated as:

Total = FixedPrice - Discount + Quantity * UnitPrice

This calculation can't be changed, so for the cost + x% case, Discount needs to be calculated so that the above evalulates to cost + x% + tax, taking into account the tax rates used to derive the prices.

Re: Opinion Poll - changes to Discounting(additions really)

The discount would stack with any other applicable discounts - effectively exactly as the current rule allows - so practices will need to ensure they set it up correctly.

To be honest the current system of stacking discounts already has the same problems inherently built in..ie the risk that discount stacking with bring the price below cost or even to a negative value.

To provide a method of stop gapping this problem,  i suggested we create a code change to autoupdate the maximum product discount at product creation that avoids selling below cost (overridable off course).  This would be used rather than the default of 100%.  

This would mean that even with this discount randomly stacked with any other the total discount would not fall below cost + tax.

This means that no change is required as far as this discount change goes t the TOTAL calculation 

I will say that the method for Total calculation is incorrect.  My post on the user forum reflects the problem with the current system.

Total calculation really should be: -

Total = if(qty==0){BigDecimal.Zero};

if(qty>0){1 x FixedPrice) - discount + (qty * unitPrice}

The case where qty = -1 is actually irrelevant as the current discount system cannot handle -qty's at all.

In fact if you sell a service for say 100$ unit price and have a discount that equates to 65% you would expect a sale price of 35.00 per unit.

if you enter -1 as the qty you will get a sale price of 0.  The discount is returned as (-100) and the calculation as above gives:  fixedPrice -(discount) + -qty*unitprice = 0  to correct this at the total calculation you would have an calculation that was 

if(qty<0){-1 x fixedprice -(-1* discount) + (qty * unitprice) }

 

Cheers

Ben

 

 

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Opinion Poll - changes to Discounting(additions really)

There would need to be a restriction when calculating discounts to ensure that only one at-cost discount is applied. The at-cost discount calculation needs to negate the FixedPrice + Quantity * UnitPrice of the Total calculation i.e. given:

Total = FixedPrice - Discount + Quantity * UnitPrice

I think the at-cost calculation would be:

Cost = FixedCost + Quantity * UnitCost
CostFactor = Cost + Cost * %x
TaxIncCost = CostFactor + CostFactor * sum(tax rates)
Discount = (FixedPrice + Quantity * UnitPrice) - TaxIncCost

I agree that the handling of negative quantities is wrong.

Whats the business case for a zero quantity on an invoice? At the moment, any quantity will generate medication, investigations, reminders, and documents.

Re: Opinion Poll - changes to Discounting(additions really)

I dont think there is a business case for 0 qty - the point I was making was that it was theoretically possible and there fore we had to account for it in the math to advoid 0 divisor exceptions.

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Opinion Poll - changes to Discounting(additions really)

regarding the restriction on AT-COST discounts  being applied once....

I agree in principal, however we currently allow discount stacking on other discounts...setting the max discount to prevent undercost sales...

I will code a restricition on 1 at-cost discount.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Opinion Poll - changes to Discounting(additions really)

I don't believe it makes sense to allow multiple at-cost discounts, as the overall total needs to be cost + %x + tax. The restriction either needs to be applied on save of the customer and patient, or the discount rules need to handle the fact the multiple at-cost discounts exist. This could occur if discount groups are being used.

The simplest approach would be to select the at-cost discount with the highest rate.

Re: Opinion Poll - changes to Discounting(additions really)

Fair call - I am checking at the discount rule level....I just need to check for the highest +% and include that one

although wouldnt the choice be to select the one with the lowest +%rate ie to give the customer the highest discount they are entitled too.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Opinion Poll - changes to Discounting(additions really)

https://openvpms.atlassian.net/browse/OVPMS-1517

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Jira Updated - OVPMS-1517

https://openvpms.atlassian.net/browse/OVPMS-1517

I have added 2 new patches that address the concerns with the popup as well as modify the discounting to account for customer tax variations.

I have not addressed the issues with :

  • The maximum discounts for a price is set to 100% if the price is changed from its configured value
  • estimates and at-cost discounts
Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content