mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 19:45:46 +00:00
Add ability to create a new extra line item
This commit is contained in:
@ -146,6 +146,7 @@
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onPanelLoad('order-attachments', function() {
|
||||||
enableDragAndDrop(
|
enableDragAndDrop(
|
||||||
'#attachment-dropzone',
|
'#attachment-dropzone',
|
||||||
'{% url "api-po-attachment-list" %}',
|
'{% url "api-po-attachment-list" %}',
|
||||||
@ -171,6 +172,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
loadStockTable($("#stock-table"), {
|
loadStockTable($("#stock-table"), {
|
||||||
params: {
|
params: {
|
||||||
@ -219,6 +221,7 @@ $('#new-po-line').click(function() {
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
onPanelLoad('order-items', function() {
|
||||||
loadPurchaseOrderLineItemTable('#po-line-table', {
|
loadPurchaseOrderLineItemTable('#po-line-table', {
|
||||||
order: {{ order.pk }},
|
order: {{ order.pk }},
|
||||||
{% if order.supplier %}
|
{% if order.supplier %}
|
||||||
@ -274,6 +277,7 @@ loadExtraLineTable({
|
|||||||
allow_delete: false,
|
allow_delete: false,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
loadOrderTotal(
|
loadOrderTotal(
|
||||||
'#poTotalPrice',
|
'#poTotalPrice',
|
||||||
|
@ -102,7 +102,18 @@ onPanelLoad('order-details', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#new-return-order-extra-line').click(function() {
|
$('#new-return-order-extra-line').click(function() {
|
||||||
// TODO: Create new return order extra line item
|
let fields = extraLineFields({
|
||||||
|
order: {{ order.pk }},
|
||||||
|
});
|
||||||
|
|
||||||
|
constructForm('{% url "api-return-order-extra-line-list" %}', {
|
||||||
|
fields: fields,
|
||||||
|
method: 'POST',
|
||||||
|
title: '{% trans "Add Extra Line" %}',
|
||||||
|
onSuccess: function() {
|
||||||
|
$("#return-order-extra-lines-table").bootstrapTable('refresh');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -244,6 +244,8 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onPanelLoad('order-items', function() {
|
||||||
|
|
||||||
$("#new-so-line").click(function() {
|
$("#new-so-line").click(function() {
|
||||||
createSalesOrderLineItem({
|
createSalesOrderLineItem({
|
||||||
order: {{ order.pk }},
|
order: {{ order.pk }},
|
||||||
@ -304,6 +306,8 @@
|
|||||||
allow_delete: false,
|
allow_delete: false,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
loadOrderTotal(
|
loadOrderTotal(
|
||||||
'#soTotalPrice',
|
'#soTotalPrice',
|
||||||
|
Reference in New Issue
Block a user