New Year revamp #40
@ -1,5 +1,15 @@
|
||||
{% extends 'minifigure/base/select.sql' %}
|
||||
|
||||
{% block total_missing %}
|
||||
SUM(IFNULL(missing.quantity, 0)) AS total_missing,
|
||||
{% endblock %}
|
||||
|
||||
{% block join %}
|
||||
LEFT JOIN missing
|
||||
ON minifigures.fig_num IS NOT DISTINCT FROM missing.set_num
|
||||
AND minifigures.u_id IS NOT DISTINCT FROM missing.u_id
|
||||
{% endblock %}
|
||||
|
||||
{% block where %}
|
||||
WHERE minifigures.fig_num IN (
|
||||
SELECT
|
||||
@ -13,3 +23,8 @@ WHERE minifigures.fig_num IN (
|
||||
GROUP BY missing.set_num
|
||||
)
|
||||
{% endblock %}
|
||||
|
||||
{% block group %}
|
||||
GROUP BY
|
||||
minifigures.fig_num
|
||||
{% endblock %}
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'minifigure/base/select.sql' %}
|
||||
|
||||
{% block total_quantity %}
|
||||
SUM(minifigures.quantity) AS total_quantity,
|
||||
{% endblock %}
|
||||
|
||||
{% block where %}
|
||||
WHERE minifigures.fig_num IN (
|
||||
SELECT
|
||||
@ -13,3 +17,8 @@ WHERE minifigures.fig_num IN (
|
||||
GROUP BY inventory.set_num
|
||||
)
|
||||
{% endblock %}
|
||||
|
||||
{% block group %}
|
||||
GROUP BY
|
||||
minifigures.fig_num
|
||||
{% endblock %}
|
||||
|
@ -10,8 +10,8 @@
|
||||
{{ badge.set(item.fields.set_num, solo=solo, last=last, id=item.fields.u_id) }}
|
||||
{{ badge.quantity(item.fields.quantity, solo=solo, last=last) }}
|
||||
{% endif %}
|
||||
{{ badge.quantity(item.fields.total_quantity, solo=solo, last=last) }}
|
||||
{{ badge.total_sets(using | length, solo=solo, last=last) }}
|
||||
{{ badge.total_quantity(item.fields.total_quantity, solo=solo, last=last) }}
|
||||
{{ badge.total_missing(item.fields.total_missing, solo=solo, last=last) }}
|
||||
{% if not last %}
|
||||
{{ badge.rebrickable(item, solo=solo, last=last) }}
|
||||
|
Loading…
Reference in New Issue
Block a user