If Else statement in Complementary attributes (lines)


Currently I am using the following code to display inventory in the sales order forms

And it works perfectly for the sales orders.

Now I would like to be able to show on the PDF whether something is in stock or not.
not by displaying the actual inventory, but by using the and if else statement.



warehouse inventory is available by matching the quantity to order

  • show on PDF = Ex-stock


Warehouse stock partially available

  • show on PDF = Partially in stock


No stock available

  • show on PDF = Out of stock

I know I need to create new additional attributes that will only appear in the PDF.

Can someone help me?