The total balance is calculated as follows:
Total Balance = Overdue Balance from customer record + Unbilled Orders Amount from customer record + Current Sales Order amount.
If the difference between the total balance and the credit limit is less than or equal to $50, the order creation will be allowed.