Company has four departments, each representing a physical store front. Inventory is setup to the main revenue, cogs, asset and accounts. The department can only be determined at the time of sale. So the invoice is generated, revenue department is chosen…