You can create one payment for Account Opening Balance instead of importing all previous invoices and payments.
If the balance is receivable then create payment as Payment Out and if balance is payable then create payment as Payment In.