Hi,
So, if I understand correctly, your plugin has a special system to calculate the recurring amount by recalculating it so that discounts applied on the original order are not taken into account. And, to be able to do that, you want to use the column order_product_tax_before_discount, but in some cases, the data in there is not correct.
In that case, try to change the line:
$orderProduct->order_product_tax_before_discount = $orderProduct->discount->taxes_without_discount;
to:
$orderProduct->order_product_tax_before_discount = $orderProduct->discount->price_value_without_discount_with_tax - $orderProduct->discount->price_value_without_discount;
in the file administrator/components/com_hikashop/classes/order.php
It should hopefully help.
Let us know how it goes so that we can add the change on our end if it fixes the problem.