Internal selling

hello everyone …

A holding company that owns several companies.
Company 1 is an internal supplier of the holding company.
Company 2 is an internal customer of the holding company.
Company 1 purchases item X from an external supplier named Y and sells it to Company 2.
Additionally, Company 1 wants to transfer item X directly from supplier Y’s warehouse to Company 2’s warehouse.

Is the entire purchase and sale process of this scenario executable in Frappe? If so, how?

https://docs.frappe.io/erpnext/user/manual/en/inter-company-invoices

https://docs.frappe.io/erpnext/v13/user/manual/en/accounts/inter-company-journal-entry