{% extends base_template_name %} {% load crispy_forms_tags %} {% load currency_filters %} {% block title %} Invoice for {{ invoice.label }} {% endblock %} {% load static %} {% block extra_js %} {% if is_admin %} {% endif %} {% if print_label_link and not invoice.printed and not is_admin %} {% endif %} {% endblock %} {% block content %} {% if show_links %}{% include 'auction_ribbon.html' %}{% endif %}

{{ invoice.auctiontos_user.name }}

{{ invoice.invoice_summary_short }} {% if invoice.status == "PAID" %}Paid in full{% endif %} {% if invoice.auction.multi_location %} {% if location == 'No location selected' %}{% else %}
{{location}}
{% endif %} {% endif %}
{% if show_links %} {% if is_admin %} {% if debug %} View as bidder {% endif %} {% include 'invoice_buttons.html' %} {% endif %} {% if invoice.auctiontos_user.user == request.user or using_no_login_link %} {% if invoice.show_payment_button and not hide_payment_button%} {% if invoice.reason_for_payment_not_available %} {# Unavailable-action standard: keep the button clickable and explain why on click (see /style_reference.md). #} {% else %} {% comment %} Web PayPal/Square pay buttons redirect to the provider's hosted checkout, which doesn't work inside the native app WebView. PayPal is removed from the app entirely; Square is collected via on-device Tap to Pay (see quick_checkout_htmx.html), so hide both here. {% endcomment %} {% if invoice.show_paypal_button and not request.is_mobile_app %}
{% csrf_token %}
{% endif %} {% if invoice.show_square_button and not request.is_mobile_app %}
{% csrf_token %}
{% endif %} {% endif %} {% endif %} {% endif %} {% comment %} Print invoice relies on the browser print dialog (none in the app WebView) and label printing is handled natively over Bluetooth in the mobile app, so hide both print buttons on mobile. {% endcomment %} {% if not request.is_mobile_app %} Print invoice {% if show_links and print_label_link %} Print labels for your lots {% endif %} {% endif %}
{% if not is_admin %} Leave feedback {% if website_focus == "fish" %} Info on transporting fish {% endif %} {% if location_map %} Get directions {% endif %} {% else %} {% endif %}

{% if is_admin and show_links %} {% if invoice.status == "DRAFT" and not invoice.email_sent %} {% if invoice.auctiontos_user.email and auction.created_by.userdata.is_trusted %} Marking this invoice ready or paid will send a notification email to {{ invoice.auctiontos_user.name }}
{% elif not auction.created_by.userdata.is_trusted %} {% else %} {{ invoice.auctiontos_user.name }} does not have an email address set!
{%endif%}
{%endif%}

Adjustments
{{ formset.management_form }}
{% crispy formset helper %}
{% endif %}
{% if is_admin %}{% include "auctions/partials/invoice_membership_renewal.html" %}{% endif %} {{ auction.invoice_payment_instructions | default:""}}
{% if print_label_link %}
{% if show_links %} Either print your labels or write {% else %} Write {% endif %} the lot number and the name of the winner {% if invoice.auction.multi_location %} and the destination location {% endif %} on each lot. {% endif %}
{% endif %} {% if invoice.first_bid_payout %} {% endif %} {% include "auctions/partials/invoice_club_member_discount_row.html" %} {% include "auctions/partials/invoice_tax_row.html" %} {% include "auctions/partials/invoice_membership_fee_row.html" %} {% for adjustment in invoice.changed_adjustments %} {% endfor %} {% for payment in invoice.payments.all %} {% endfor %} {% include "auctions/partials/invoice_final_total_row.html" %}
Contact info: {% if invoice.auctiontos_user.bidder_number %}Bidder number: {{ invoice.auctiontos_user.bidder_number}}
{% endif %} {{ invoice.auctiontos_user.name|default:""}}
{% if invoice.auctiontos_user.address %}{{ invoice.auctiontos_user.address| linebreaksbr}}
{% endif %} {{ invoice.auctiontos_user.email|default:"" }}
{{ invoice.auctiontos_user.phone_as_string|default:"" }}
Auction: {% if show_links %} {{ auction }} {% else %} {{ auction }} {%endif%}
Status: {{ invoice.get_status_display }}
Location: {{ location.name }}
{% if location.contact_person %} Lost? Running late? Contact: {{location.contact_person.name | default:""}}
{{location.contact_person.email | default:"" | urlize}}
{{location.contact_person.phone_number | default:"" }}
{% endif %}
{% if location.description %}{{ location.description }} on {%endif%}{{ location.pickup_time }}
{% if location.second_pickup_time %}
You must also come back on {{ location.second_pickup_time }} to pick up lots purchased from other locations{%endif%} {% if show_links %}{% endif %}
Total payout {{ invoice.currency_symbol }}{{ invoice.total_sold|floatformat:2 }}
Total bought {{ invoice.currency_symbol }}{{ invoice.total_bought|floatformat:2 }}
Auction promotion {{ invoice.currency_symbol }}{{ invoice.first_bid_payout|floatformat:2 }}
{{ adjustment.notes }} {{ adjustment.display }}
{{ payment.payment_method }}{% if payment.receipt_number %} (#{{ payment.receipt_number }}){% elif payment.external_id %} ({{ payment.external_id }}){% endif %} {{ invoice.currency_symbol }}{{ payment.amount|floatformat:2 }}
{%if invoice.lots_sold %}

Lots sold

{% if invoice.auctiontos_user.is_club_member and invoice.auctiontos_user.auction.uses_alternate_split %} Note: {{ invoice.auctiontos_user.auction.alternative_split_label|capfirst }} fees have been applied
{% endif %} {% if auction.multi_location %} {% endif %} {% for lot in invoice.sold_lots_queryset_sorted %} {% if auction.multi_location %} {% endif %} {% endfor %}
# Lot WinnerWinner LocationPrice Club cut Net
{{ lot.lot_number_display }} {% if show_links %} {% if is_admin %} {{ lot.lot_name }} {% else %} {{ lot.lot_name }} {% endif %} {% else %} {{ lot.lot_name }} {% endif%} {% if lot.partial_refund_percent %}({{ lot.partial_refund_percent }}% refund){% endif %} {% if lot.bap_points_awarded and not viewer_has_bap %}Breeder points: {{ lot.bap_points_awarded }}{% endif %} {% if viewer_has_bap and show_links and lot.i_bred_this_fish %}{% include "auctions/bap_lot_buttons.html" with default_points=bap_default_points %}{% endif %} {% if lot.winning_price %} {% if show_links and is_admin %} {{ lot.winner_name }} {% else %} {{ lot.winner_name }} {% endif %} {% else %} Not sold {% endif %} {% if lot.auctiontos_winner %} {{ lot.winner_location }} {% endif %} {% if lot.winning_price %} {{ invoice.currency_symbol }}{{ lot.winning_price|floatformat:2 }} {% else %} {% if lot.banned %} Removed {% else %} Not sold {% endif %} {% endif %} {{ invoice.currency_symbol }}{{ lot.club_cut|floatformat:2 }}{% if lot.pre_register_discount %}*{% endif %} {% if lot.donation %} Donation {% else %} {{ invoice.currency_symbol }}{{ lot.your_cut|floatformat:2 }} {% endif %}
{% if invoice.pre_register_used %}*Pre-registeration discount applied{% endif %}
Total donations: {{ invoice.currency_symbol }}{{ invoice.total_donations|floatformat:2 }}
Total payout: {{ invoice.currency_symbol }}{{ invoice.total_sold|floatformat:2 }}
{% endif %}

{% if invoice.lots_bought %}

Lots purchased

{% if auction.multi_location %} {% endif %} {% if is_admin %} {% endif %} {% for lot in invoice.bought_lots_queryset %} {% if auction.multi_location %} {% endif %} {% if is_admin %} {% endif %} {% endfor %}
# LotLocationSellerPrice
{{ lot.lot_number_display }} {% if show_links %} {% if is_admin %} {{ lot.lot_name }} {% else %} {{ lot.lot_name }} {%endif%} {% else %} {{ lot.lot_name }} {% endif %} {% if lot.partial_refund_percent %}({{ lot.partial_refund_percent }}% refund){% endif %} {{ lot.location }} {% if show_links %} {{ lot.seller_name }} {% else %} {{ lot.seller_name }} {% endif %} {{ invoice.currency_symbol }}{{ lot.final_price|floatformat:2 }}
Total bought: {{ invoice.currency_symbol }}{{ invoice.total_bought|floatformat:2 }}
{% endif %} {% if request.user.is_superuser and show_links %} Admin {% endif %}
{% endblock %}