Please I Need Help Sales Tax

I duplicated Proposal and Proposal Item Doctypes from Quotation and Quotation Item Doctypes. The problem is that I had to use Client Script to get the new Doctypes to pull item cost and perform calculations of Amount and Total. Please note I had used translated Rate to (Unit Price) and Amount to (Total Price). I will the two client scripts used below:

Proposal Item Pull Up

frappe.ui.form.on("Proposal Item", {
    item_code: function (frm, cdt, cdn) {
        var child = locals[cdt][cdn];
        if (child.item_code) {
            frappe.call({
                method: "frappe.client.get",
                args: {
                    doctype: "Item",
                    name: child.item_code,
                    filters: {
                        fields: ["item_name", "description", "standard_rate", "stock_uom", "conversion_factor"]
                    }
                },
                callback: function (r) {
                    if (r.message) {
                        frappe.model.set_value(cdt, cdn, "item_name", r.message.item_name);
                        frappe.model.set_value(cdt, cdn, "description", r.message.description);
                        frappe.model.set_value(cdt, cdn, "unit_price", r.message.standard_rate);
                        frappe.model.set_value(cdt, cdn, "uom", r.message.stock_uom);
                        frappe.model.set_value(cdt, cdn, "uom_conversion_factor", r.message.conversion_factor);

                        calculateTotalPrice(cdt, cdn);
                    }
                }
            });
        }
    },
    qty: function (frm, cdt, cdn) {
        calculateTotalPrice(cdt, cdn);
    }
});

function calculateTotalPrice(cdt, cdn) {
    var child = locals[cdt][cdn];
    var qty = child.qty;
    var unit_price = child.unit_price;
    
    var total_price = qty * unit_price;
    
    frappe.model.set_value(cdt, cdn, "total_price", total_price);
}

Total and Grand Total Calculations

frappe.ui.form.on("Proposal Item", {
  item_code: function (frm, cdt, cdn) {
    var child = locals[cdt][cdn];
    if (child.item_code) {
      calculateTotal(frm);
    }
  },

  qty: function (frm, cdt, cdn) {
    var d = locals[cdt][cdn];
    frappe.model.set_value(cdt, cdn, "total_price", d.qty * d.unit_price);
    calculateTotal(frm);
  },

  unit_price: function (frm, cdt, cdn) {
    var d = locals[cdt][cdn];
    frappe.model.set_value(cdt, cdn, "total_price", d.qty * d.unit_price);
    calculateTotal(frm);
  },
});

function calculateTotal(frm) {
  var total = 0;
  frm.doc.items.forEach(function (item) {
    total += item.total_price;
  });
  frm.set_value("total", total);
}




frappe.ui.form.on("Proposal Item", {
  item_code: function (frm, cdt, cdn) {
    var child = locals[cdt][cdn];
    if (child.item_code) {
      calculateGrandTotal(frm);
    }
  },

  qty: function (frm, cdt, cdn) {
    var d = locals[cdt][cdn];
    frappe.model.set_value(cdt, cdn, "total_price", d.qty * d.unit_price);
    calculateGrandTotal(frm);
  },

  unit_price: function (frm, cdt, cdn) {
    var d = locals[cdt][cdn];
    frappe.model.set_value(cdt, cdn, "total_price", d.qty * d.unit_price);
    calculateGrandTotal(frm);
  },
});


function calculateGrandTotal(frm) {
  var grand_total = 0;
  frm.doc.items.forEach(function (item) {
    grand_total += item.total_price;
  });
  frm.set_value("grand_total", grand_total);
}



frappe.ui.form.on("Proposal Item", {
  item_code: function (frm, cdt, cdn) {
    var child = locals[cdt][cdn];
    if (child.item_code) {
      calculateNetTotal(frm);
    }
  },

  qty: function (frm, cdt, cdn) {
    var d = locals[cdt][cdn];
    frappe.model.set_value(cdt, cdn, "total_price", d.qty * d.unit_price);
    calculateNetTotal(frm);
  },

  unit_price: function (frm, cdt, cdn) {
    var d = locals[cdt][cdn];
    frappe.model.set_value(cdt, cdn, "total_price", d.qty * d.unit_price);
    calculateNetTotal(frm);
  },
});


function calculateNetTotal(frm) {
  var net_total = 0;
  frm.doc.items.forEach(function (item) {
    net_total += item.total_price;
  });
  frm.set_value("net_total", net_total);
}

Right now, where I need help is that, when I try to apply sales tax template, it doesn’t work on the items in the cart. How do I go about this? Any idea or help?

Thank you in advance.

Has anyone done this before? Please I need help with this!