Typically ORDERS and INVOICES though very closely related are decoupled; you're conflating them into a single entity.
The CUSTOMER places an ORDER for one or more PRODUCTS. That generates the Order Header and Order Detail. The merchant issues an INVOICE referencing the Order. But in a very simple mom-and-pop operation you could dispense with ORDERS and let the INVOICE entity represent the order.
ORDER|INVOICE DETAIL
id int PK
headerid foreign key references INVOICEHEADERS or ORDERHEADERS *mutatis mutandis*
productid foreign key references PRODUCTS(id)
quantity
extendedamount
Foreign keys are necessary because they prevent things like creating an order for a product that does not exist, or invoicing a customer that does not exist. They ensure that the database row contains no impossibilities.
Typically you'd have CUSTOMERADDRESSES as a separate table that refers back to CUSTOMERS. A customer can have one or more addresses.
Whenever an entity can "have one or more of X" that's a sign that you need a separate table to capture the Xes.