Skip to content

Import Stock error: systemException Warning: Undefined array key “source_code”

I am experiencing this error when Importing stock via CSV file:

systemException
Additional data: Warning: Undefined array key “source_code” in /var/www/html/vendor/magento/module-inventory-import-export/Model/Import/SourceItemConvert.php on line 40

My file passes validation and always fails this.

enter image description here

Any help appreciated. Also cant find anything in the exception log