Hi There,
Do you know if there is any way to make the landed cost voucher add the charges based on weight instead of valuation or quantity. There is a field “net weight” on item, so that info is already there. Actually most of transport charges are based on weight instead of valuation or quantity. It would be a very useful thing to do.
If not possible, any work around that.
Best,
François
You can do this using custom script, like this,
rate_per_weight_unit is transport charges per kg(or unit)
rate_per_weight_unit * net_weight of item is equal to transporter charges for one item
cur_frm.cscript.rate_per_weight_unit = function(doc, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);
var rate = item.rate_per_weight_unit * item.net_weight;
frappe.model.set_value(cdt, cdn, "rate", rate);
};
1 Like
Thanks a lot Kolate. Let me try that.
Best,
François