{% extends "cpq/base.html" %}{% load cpq_extras %}{% block title %}{{ p.sku }}{% endblock %} {% block content %}

{{ p.sku }} {{ p.name }}

{{ p.get_type_display }} · {{ p.family }} · per {{ p.unit }}

{% if user.is_staff %}
Edit in admin
{% endif %}

Prices

{% for pr in p.prices.all %}{% endfor %}
CurrencyListCostMargin
{{ pr.currency }}{{ pr.list_price|money:pr.currency }}{{ pr.cost|money:pr.currency }}{{ pr.margin_pct|pct }}

Configuration rules

{% for r in rules %}
{{ r.subject.sku }} {{ r.get_kind_display|lower }} {{ r.target.sku }}{% if r.kind == 'ratio' %} ({{ r.qty }} per {{ r.per }}){% endif %}{% if r.kind == 'bundle_discount' %} ({{ r.discount_pct }}% off){% endif %}
{% empty %}

None.

{% endfor %} {% for g in p.option_groups.all %}

{{ g.name }} min {{ g.min_select }}{% if g.max_select is not None %}, max {{ g.max_select }}{% endif %}

{% for x in g.products.all %}{{ x.sku }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endfor %}

Pricing rules

{% for r in pricing_rules %}
{{ r.name }} · {{ r.get_kind_display }} {{ r.params }}{% if r.customer %} · {{ r.customer.name }}{% endif %}
{% empty %}

None.

{% endfor %}
{% endblock %}