Decreasing stock levels on same item but different SKU

Hi there,

I have a Shopify business selling face masks.

One issue I have run into is stock levels for the same product but selling in various quantities.

An example: I have 1,000 blue masks.

This means I have 20 x 50 packs or 10 x 100 packs.
If I have the quantity for the 50 packs as 20 and the 100 packs as 10 I am therefore advertising I have 2,000 for sale (the issue being I sell over 1,050 before I manually fix the stock levels).

Is there a way I can have the stock levels for both at the correct levels and decrease on both SKU’s as one is purchased?

I will also add these are two different products in the shop.

  1. 100pc Colourful Disposable Face Masks

  2. 50pc Colourful Disposable Face Masks

Cheers
Matthew