This commit is contained in:
Sampanna Rimal
2024-07-12 17:57:29 +05:45
parent 9cd05ef3cb
commit 7ffe31e260
22 changed files with 209 additions and 97 deletions

View File

@ -174,6 +174,33 @@
// newRow.find('.select2').select2();
// calculateTotals();
});
// $(document).on('change', '.select_item', function(){
// var selectedOption = $(this).find(':selected');
// var selectedValue = selectedOption.val();
// alert(selectedValue);
// var unitInput = $(this).closest('.sales-detail-duplicator').find('.item_unit');
// if (selectedValue) {
// $.ajax({
// url: '<?php //echo base_url(); ?>application/controllers/inventory/Sales/getUnitByItemId/' + selectedValue,
// method: 'POST',
// success: function(response) {
// console.log(response);
// unitInput.val(unitName);
// alert("Selected Item Value: " + selectedValue + "\nUnit: " + unitName);
// },
// error: function() {
// alert("Error retrieving unit data.");
// }
// });
// } else {
// unitInput.val('');
// alert("No item selected.");
// }
// });
// $(document).on("click", ".remove-sales-detail", function() {
// $(this).closest(".sales-detail").remove();
// calculateTotals();