const editSalesTaxbtn=document.querySelectorAll(".editSalesTaxbtn");
editSalesTaxbtn.forEach(btn=>{
    btn.addEventListener("click",()=>{
        document.getElementById("editSalesTaxId").value=btn.dataset.id;
        document.getElementById("editSalesTaxamount").value=btn.dataset.amount;
    })
});
document.querySelectorAll(".btn_dlt_salesTax").forEach(btn=>{
    btn.addEventListener("click",()=>{
        if(confirm("Are you sure you want to delete this sales tax?")){
            const ID=btn.dataset.id;
            fetch("../pages/submissions/salesTaxSubmission.php",{
                method:"POST",
                headers:{"Content-Type":"application/x-www-form-urlencoded"},
                body:"ID="+ID
            })
            .then(res=>res.text())
            .then(data => location.reload())
        }
    })
})