kdash1228 Posted May 3, 2022 Share Posted May 3, 2022 I want to update existing Specific Prices based on the Wholesale/Cost Price for items that are active. Below is an example of the final calculation. This is the Excel calculation for when I am manually determining the Fixed Price: RoundUp((CostPrice*0.2)+CostPrice,0)+3 =RoundUp[(34.02*.2)+34.02]+3 =RoundUp(40.824)+3 =41+3=44 I believe I will need to use the following Database tables/fields: ps_product.active ps_product.wholesale_price ps_specific_price.price ps_specific_price.id_product ps_product.id_product Can someone let me know if my query is correct or if I should make any changes? UPDATE ps_Specific_PriceINNER JOIN ps_ProductON ps_specific_price.id_product = ps_product.id_productSET ps_Specific_Price.Price = CEILING((ps_Product.Wholesale_Price*0.2)+ps_Product.Wholesale_Price)+3WHERE ps_Product.Active= 1 Thank You!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now