{% load seizou_icons %} {# 明細 1 行 (line。annotate_remaining の remaining_total を持つ) の入口: 出荷する・指示書を発行する。受注 (order) が取消でなく、残が 0 より大きいときだけ。 #} {# 出荷の新規登録と指示書の発行は、土台の get_initial が ?order_line= をその明細の初めの選択にする。部品が入っていない会社では URL が空なので、その入口を出さない。 #} {% url 'shipping:shipment_create' as ship_url %} {% url 'workorders:workorder_create' as issue_url %} {% if order.status == "cancelled" or not line.remaining_total > 0 or not ship_url and not issue_url %}— {% else %}
{% if ship_url %}{% icon "truck" "size-4" %}出荷する{% endif %} {% if issue_url %}{% icon "factory" "size-4" %}指示書を発行する{% endif %}
{% endif %}