diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index 5d856433..c6ec12a6 100644
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -104,7 +104,7 @@ span.has-danger,
font-weight: 400;
}
-.placeholder-row {
+.placeholder-row td {
background-color: #fff !important;
padding: 32px 0 !important;
text-align: center;
diff --git a/templates/job-order/incoming.html.twig b/templates/job-order/incoming.html.twig
index 744419a5..642bdfc5 100644
--- a/templates/job-order/incoming.html.twig
+++ b/templates/job-order/incoming.html.twig
@@ -266,8 +266,8 @@
-
- |
+ |
+ |
No items to display.
|
@@ -682,6 +682,7 @@ $(function() {
// remove from invoice table
$(document).on("click", ".btn-invoice-delete", function() {
+ var tbody = $("#invoice-table tbody");
var row = $(this).closest('tr');
var qty = row.find('.col-quantity').html();
var unitPrice = row.find('.col-unit-price').html();
@@ -702,6 +703,13 @@ $(function() {
// remove from table
row.remove();
+
+ // get total item rows and show placeholder if needed
+ var visibleRows = tbody.find('tr:not(.placeholder-row)').length;
+
+ if (visibleRows === 0) {
+ tbody.find('.placeholder-row').removeClass('hide');
+ }
});
});