I a working to implement more discounts on purchase. There is need for 5 discount % values which are applied one by one to the purchase base price, e.g.
price = 100
dis1 = 10 % > 90
dis2 = 3% > 87,3
dis3 = 2% > 85.55
aso
I already added the required fields as extra fields, so creating a purchase price shows 5 discount values, 1 of dolibarr core, 4 of extra fields.
To show the price correct on produc stock and purchase listing i need to add discount 2-5 to :
fournisseur.product.class.php _> function find_min_price_product_fournisseur
But this function has no hook. So I will need to fully replace the core function with my own.
Can somebody tell me, how to replaye a core function with my own?
Thank you very much.