mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
Include pricing information in part supplier view
Also some CSS tweaks to secondary modal buttons
This commit is contained in:
@ -3,7 +3,8 @@
|
||||
{% block pre_form_content %}
|
||||
|
||||
<div class='alert alert-info alert-block'>
|
||||
Calculate pricing information for {{ part }}.
|
||||
Pricing information for:<br>
|
||||
{{ part }}.
|
||||
</div>
|
||||
|
||||
<h4>Quantity</h4>
|
||||
|
@ -57,6 +57,15 @@
|
||||
title: 'Create New Part',
|
||||
url: "{% url 'part-create' %}",
|
||||
},
|
||||
{
|
||||
field: 'supplier_part',
|
||||
label: 'New Supplier Part',
|
||||
title: 'Create new Supplier Part',
|
||||
url: "{% url 'supplier-part-create' %}",
|
||||
data: {
|
||||
part: {{ part.id }}
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'location',
|
||||
label: 'New Location',
|
||||
|
@ -38,11 +38,21 @@
|
||||
|
||||
$('#supplier-create').click(function () {
|
||||
launchModalForm(
|
||||
"{% url 'supplier-part-create' %}",
|
||||
{
|
||||
reload: true,
|
||||
data: {part: {{ part.id }} }
|
||||
});
|
||||
"{% url 'supplier-part-create' %}",
|
||||
{
|
||||
reload: true,
|
||||
data: {
|
||||
part: {{ part.id }}
|
||||
},
|
||||
secondary: [
|
||||
{
|
||||
field: 'supplier',
|
||||
label: 'New Supplier',
|
||||
title: 'Create new supplier',
|
||||
url: "{% url 'company-create' %}"
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
$("#supplier-table").bootstrapTable({
|
||||
@ -83,6 +93,18 @@
|
||||
sortable: true,
|
||||
field: 'MPN',
|
||||
title: 'MPN',
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
field: 'pricing',
|
||||
title: 'Price',
|
||||
formatter: function(value, row, index, field) {
|
||||
if (value) {
|
||||
return value;
|
||||
} else {
|
||||
return "<span class='warning-msg'><i>No pricing available</i></span>";
|
||||
}
|
||||
},
|
||||
}
|
||||
],
|
||||
url: "{% url 'api-part-supplier-list' %}"
|
||||
|
Reference in New Issue
Block a user