Variant Pricing Behavior

Hi, I initially posted this under products & services section of the forum, but I think this is probably a better choice. So if the moderators would prefer I delete the other one, please let me know. Original post: Variant Pricing Behavior Questions

My questions surround expected behavior on both percentage and negative numbers for price. Thank you in advance for any insight on both of these. Before I get into hacking the behavior, I want to understand what should, or will eventually, be happening with both of these.

My first question is on the “Percentage variation” option when adding a variant to a product:

I know it utilizes the createProductCombination method to save the data, but what is the expected behavior for the percentage option supposed to be? When adding a line item to a Sales Order that has a percentage it does not seem to impact price or totals in any way. In fact the percentage is changed to 0.00 in the line item cost and total. I know it is storing the data, because when I edit the parent product it clearly shows the percent. It just doesn’t seem to do anything on the Sales Order. I would have thought it would add that percent to the overall total or something similar. Can anyone tell me what the point of that is or if it is just there for a future release?

REFERENCE:

https://doxygen.dolibarr.org/8.0/d4/d2a/class_product_combination.html

$price_var_percent : Is the price variation a relative variation?

##########################################################

My second question is on negative numbers.

I see when adding a negative number for the price on a Sales Order “add line” using the “free-text” option it works as expected. It actually shows the negative number in the line item and also removes it from the overall total. However, if I try using that same concept when adding a variant it fails. It shows the negative number under price impact in the variant tab when reviewing a product, but inserts the price as 0.00 when added as a line item on the Sales Order. Is this a bug or am I misunderstanding how this should be working?