2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 13:56:30 +00:00

settings for internal prices added

This commit is contained in:
2021-06-07 04:58:37 +02:00
parent 62638f76ed
commit 37c0025399
4 changed files with 27 additions and 2 deletions

View File

@ -1,6 +1,7 @@
{% extends "part/part_base.html" %}
{% load static %}
{% load i18n %}
{% load inventree_extras %}
{% block menubar %}
{% include 'part/navbar.html' with tab='internal-prices' %}
@ -11,7 +12,8 @@
{% endblock %}
{% block details %}
{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %}
{% if show_internal_price %}
<div id='internal-price-break-toolbar' class='btn-group'>
<button class='btn btn-primary' id='new-internal-price-break' type='button'>
<span class='fas fa-plus-circle'></span> {% trans "Add Internal Price Break" %}
@ -21,11 +23,14 @@
<table class='table table-striped table-condensed' id='internal-price-break-table' data-toolbar='#internal-price-break-toolbar'>
</table>
{% endif %}
{% endblock %}
{% block js_ready %}
{{ block.super }}
{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %}
{% if show_internal_price %}
function reloadPriceBreaks() {
$("#internal-price-break-table").bootstrapTable("refresh");
}
@ -105,4 +110,5 @@ $('#internal-price-break-table').inventreeTable({
]
})
{% endif %}
{% endblock %}

View File

@ -2,6 +2,8 @@
{% load static %}
{% load inventree_extras %}
{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %}
<ul class='list-group'>
<li class='list-group-item'>
<a href='#' id='part-menu-toggle'>
@ -94,7 +96,7 @@
</a>
</li>
{% endif %}
{% if part.salable and roles.sales_order.view %}
{% if show_internal_price %}
<li class='list-group-item {% if tab == "internal-prices" %}active{% endif %}' title='{% trans "Internal Price Information" %}'>
<a href='{% url "part-internal-prices" part.id %}'>
<span class='menu-tab-icon fas fa-dollar-sign' style='width: 20px;'></span>