Hello,
This error simply means one of the system-generated posting lines ended up with the wrong sign, usually because of rounding, discounts, item charges, or custom extensions. That’s why it appears only sometimes, it depends on the specific invoice values.
The posting routine creates hidden Gen. Journal Lines.
If one of them should be negative but becomes positive, BC blocks posting and shows this message.
It happens with: rounding, currencies, discounts, negative lines, or extensions modifying posting.
Sandbox vs Production differences come from setups or extensions behaving differently.
Check the below:
Remove invoice discounts and test again.
Remove item charges.
Try posting without VAT.
Check currency rounding precision.
Temporarily disable custom extensions.
One of these usually reveals the cause.
Regards,
Oussama Sabbouh