{% extends "page_base.html" %} {% load static %} {% load i18n %} {% load inventree_extras %} {% block page_title %} {% inventree_title %}{% if title %} | {{ title }}{% endif %} {% endblock page_title %} {% block heading %} {{ title }} {% endblock heading %} {% block actions %} {% if pagetype == 'manufacturers' and roles.purchase_order.add or pagetype == 'suppliers' and roles.purchase_order.add or pagetype == 'customers' and roles.sales_order.add %} {% endif %} {% endblock actions %} {% block page_info %}
{% include "filter_list.html" with id='company' %}
{% endblock page_info %} {% block js_ready %} {{ block.super }} $('#new-company').click(function() { var fields = companyFormFields(); // Field overrides fields.is_supplier.value = {% if pagetype == 'suppliers' %}true{% else %}false{% endif %}; fields.is_manufacturer.value = {% if pagetype == 'manufacturers' %}true{% else %}false{% endif %}; fields.is_customer.value = {% if pagetype == 'customers' %}true{% else %}false{% endif %}; createCompany({ fields: fields, }); }); loadCompanyTable("#company-table", "{% url 'api-company-list' %}", { pagetype: '{{ pagetype }}', params: { {% for key,value in filters.items %}{{ key }}: "{{ value }}",{% endfor %} } } ); {% endblock js_ready %}