When you get this error:
1.line_items.ledger_account : is invalid
It is generally an error message given by Sage when you are trying to post purchase invoices to an account type that Sage does not allow accept purchase invoices. You will need to either change the type of this account in Sage, if this is possible, or else choose a different category code.
Please note: we cannot advise what account type/category code you should be choosing.