{# Price comparison card body. Included by set/sidecar.html on page load (cache-only values) and served standalone by set.price_card for the background refresh when SIDECAR_AUTO_FETCH_PRICE is on. #} {% if sidecar_summary %} {% set p = sidecar_summary.prices %} {% set show_paid = config['SIDECAR_SHOW_PRICE_PAID'] %} {% set show_msrp = config['SIDECAR_SHOW_PRICE_MSRP'] %} {% set show_market = config['SIDECAR_SHOW_PRICE_MARKET'] %} {% if (show_paid or show_msrp or show_market) and (p.paid is not none or p.msrp is not none or p.msrp_inflated is not none or p.has_market) %}
Price comparison
{% if show_paid %} {% endif %} {% if show_msrp %} {% if p.msrp_inflated is not none %} {% endif %} {% endif %} {% if show_market %} {% endif %} {% if show_msrp and p.savings_vs_msrp is defined %} {% endif %} {% if show_paid and p.gain_vs_paid is defined %} {% endif %}
Paid {% if p.paid is not none %}{{ '%.2f' | format(p.paid) }} {{ config['PURCHASE_CURRENCY'] }}{% else %}{% endif %}
Retail (MSRP) {% if p.msrp is not none %}{{ '%.2f' | format(p.msrp) }} {{ p.msrp_currency }}{% else %}{% endif %}
Retail (inflated) {{ '%.2f' | format(p.msrp_inflated) }} {{ p.msrp_inflated_currency }}
Worth now (new) {% if p.market_new is not none %}{{ '%.2f' | format(p.market_new) }} {{ p.market_currency }}{% if p.market_min is not none and p.market_max is not none %}{% endif %}{% else %}{% endif %}
Worth now (used) {% if p.market_used is not none %}{{ '%.2f' | format(p.market_used) }} {{ p.market_currency }}{% if p.market_used_min is not none and p.market_used_max is not none %}{% endif %}{% else %}{% endif %}
Saved vs retail {{ '%+.2f' | format(p.savings_vs_msrp) }}
Change vs paid ({{ p.market_basis or 'used' }}) {{ '%+.2f' | format(p.gain_vs_paid) }}
{% if p.has_market and p.market_fetched_at %}Value fetched {{ p.market_fetched_at }}{% elif not p.has_market %}Market value not fetched yet{% endif %} {% if g.login.is_authenticated() %}
{% endif %}
{% endif %} {% endif %}