Don't add "remove row" button if there is only one row

This commit is contained in:
Oliver Walters 2022-03-21 21:58:21 +11:00
parent 27b55eb8f8
commit b4f8136142

View File

@ -655,12 +655,14 @@ function receivePurchaseOrderItems(order_id, line_items, options={}) {
); );
} }
if (line_items.length > 1) {
buttons += makeIconButton( buttons += makeIconButton(
'fa-times icon-red', 'fa-times icon-red',
'button-row-remove', 'button-row-remove',
pk, pk,
'{% trans "Remove row" %}', '{% trans "Remove row" %}',
); );
}
buttons += '</div>'; buttons += '</div>';