From ae0f2bc613996b3b9d4602c046537efaefcc66e5 Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Mon, 6 May 2024 17:31:56 +0530 Subject: [PATCH] CHANGE_INVOICE_FORM_AMOUNT_CALCULATION_DESCRIPTION_CSS_EXTRA_TD_REMOVE : AADHAVAN --- app/Views/invoice_form.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index c09a44fe..179d9374 100644 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -160,7 +160,7 @@ } ?> - + " name="quantity[]" oninput="calculateInvoice(this,)" value="" min="1" /> @@ -204,7 +204,7 @@ - + @@ -321,10 +321,8 @@
- - + +
@@ -731,11 +729,14 @@ Account No : 89900787655 var cell2 = newRow.insertCell(1); var cell3 = newRow.insertCell(2); var cell4 = newRow.insertCell(3); + cell4.style.display = "none"; + var cell5 = newRow.insertCell(4); var cell6 = newRow.insertCell(5); var cell7 = newRow.insertCell(6); var cell8 = newRow.insertCell(7); - var cell9 = newRow.insertCell(8); + + // var cell9 = newRow.insertCell(8); html = `'; - cell1.innerHTML += ''; + cell1.innerHTML += ''; cell2.innerHTML = ''; cell3.innerHTML = ''; - // cell4.innerHTML = ''; - cell4.innerHTML = ''; - cell5.innerHTML = ''; - cell6.innerHTML = ''; - cell7.innerHTML = '
'; + cell4.innerHTML = ''; + cell5.innerHTML = ''; + cell6.innerHTML = ''; + cell7.innerHTML = ''; + cell8.innerHTML = '
'; $(newRow.querySelector('.book-select')).select2(); localStorage.setItem('add_book_index', counter); @@ -781,6 +782,7 @@ Account No : 89900787655 var selectedBook = bookData.find(book => book.book_id == bookId); if (selectedBook) { + console.log(row); // Update the fields in the current row with book details row.querySelector('#quantity' + counter).value = 1; row.querySelector('#rate' + counter).value = selectedBook.price; @@ -806,6 +808,7 @@ Account No : 89900787655 var discountType = row.querySelector('select[name="discount_type[]"]').value; // Get the selected discount type var discountAmount = parseFloat(row.querySelector('input[name="discount_amount[]"]').value) || 0; + console.log(rate); if (!isNaN(quantity) && !isNaN(rate)) { var amount = quantity * rate;