{% extends "fruit/mystore.html" %}
{% load static %}
{% load crispy_forms_tags %}

{% block header %}            
{% endblock %}

{% load django_bootstrap_breadcrumbs %}
{% block breadcrumbs %}
    {{ block.super }}
    {% breadcrumb "Vendor Orders" "fruit:vendororder_index" %}
{% endblock %}

{% block store_main %}

<a  class='btn btn-primary' href="{% url "fruit:vendororder_create" %}">Create Vendor Order</a>
<hr>
<h2>
    Vendor Order Index</h2>
{% include "fruit/_searchcenter.html" %}
<hr>
<table class='table table-borded table-striped'>
    <thead>
        <tr>
            <th>ID</th>
            <th>Vendor</th>
            <th>Product</th>
            <th>Price</th>
            <th>Unit</th>
            <th>Total</th>
            <th>Created At</th></tr>
    </thead>
    <tbody>
{% for p in page_obj %}
        <tr>
            <td><a href="{% url "fruit:vendororder_edit" pk=p.pk %}">{{ p.id }}</a></td><td>{{ p.vendor }}</td>
            <td>{{ p.product }}</td>
            <td>{{ p.price }}</td>
            <td>{{ p.unit }}</td>
            <td>{{ p.total }}</td>
            <td>{{ p.created_at }}</td>
        </tr>
{% endfor %}
    </tbody>
</table>
{% include "fruit/_paging.html" %}
{% endblock %}
