In order to circumvent this error, log in to QuickBooks Online using the web browser and Windows desktop versions & follow below-mentioned steps:
Steps:
Navigate to Sales > Products and Services, then use the search bar to find the inventory item.
Once the inventory item is located, click the ▼ downward arrow symbol to reveal additional options, then click Adjust starting value. Read the warning and click Got it!
When the Inventory Starting Value popup page loads, adjust the As of date field to a date that is earlier than the date you wish to record the inventory transaction.
Click Save & Close and attempt the transaction again.
Note: source can be found here.