allowanceCharge (true,false chargeIndicator) issue

hi dear ;
i am trynig to add allowance (true,false chargeIndicator)
but i am alwayes getting this warning
// “message”: “Invoice line net amount (BT-131) must equal (Invoiced quantity (BT-129) * (Item net price (BT-146) / item price base quantity (BT-149))) + Sum of invoice line charge amount (BT-141) - Sum of invoice line allowance amount (BT-136)”,

and this is my code

$itemNetPrice = $linePrice - $LineDiscounts + $LineCharges ;//BT-146

$LineExtensionAmount = ($lineInvoiceQuantity * ($itemNetPrice / $lineBaseQuantity)) ;//+ $LineCharges - $LineDiscounts;//BT-131

i just want to know how to get BT-131,and $linePrice and BT-146
i tried to find in pdf but keep rounding in the same error