Order printer fulfilled_line_items not working correctly with part of an item quantity fulfilled

Shopify Partner
1 0 0

Hi there,

I directly contacted the support with the "Get support" button on the app store of the app and was told by someone who doesn't know anything about the app to ask my question here. So here I am ?

So, in Order printer, we are trying to add a column with the fulfilled quantity. We want a column for the quantity and a column for the fulfilled quantity. So I did something like that to get the fulfilled quantity of the current item:
{% assign qty_fulfilled = 0 %}
{% for fulfilled_item in fulfilled_line_items %}
  {% if line_item.sku == fulfilled_item.sku %}
    {% assign qty_fulfilled = fulfilled_item.quantity %}
  {% endif %}
{% endfor %}
{{qty_fulfilled }}

The issue with that is that if an item have a quantity of 2 and only 1 fulfilled, the item won't be in the fulfilled_line_items variable and in the unfulfilled_line_items the quantity will be 2 and not 1. Is there a way to fix that or another way to do what we want?

Shopify Partner
6 0 1

I have the same problem now. Could anyone have a solution for this problem please?