i would like to fetch Sales Order Po no to sale invoice item table individual item row.
i have create a custom field, customer order po no under sales invoice item table (customer_po_item) and add the below
custom script under Sales Invoice Item and it seen not works.
frappe.ui.form.on(“Sales Order”, “po_no”, function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, “customer_po_item”);
});
Thanks for the quick advice. i have follow your advice to add the script under ‘Sales Invoice’. still not lucky to make this work. did my script got issues? how i should link it to sales invoice table item column? as i create " customer_po_item" under sales invoice item forms.
can further advice how i can use the custom script below?
such as field and syntax?
as i not so sure as i read through from the previous discussion and try to modify from there.
frappe.ui.form.on(“Sales Invoice”, “po_no”, function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, “customer_po_item”);
});
Why you want “po_no” in the Sales Invoice Item table? You can add the field in the Sales Invoice table. And if you maintain the same fieldname in SO and SI, the value should be copied automatically (if no_copy unchecked).
By the way, Are you doing the changes for the UAE VAT? Then for your information, we are also adding vat rate and value column in Invoice Item table to show it in the print format.
Yes, I have actually added both the columns, vat rate and vat value. Is it possible to autofill the corresponding vat of an item when a new item is added to the row?
@nabinhait unfortunately it doesn’t work in my case .
I’m looking for the total net amount on which tax are calculated, let’s have an example:
Let’s suppose there are 3 items in a Sales or Purchase Invoice
Item1 for a net total amount of $100.00 and VAT @ 20%
Item2 for a net total amount of $50.00 and VAT @ 10%
Item3 for a net total amount of $150.00 and VAT @ 20%
So the total net amount on which taxes are calculated are:
in item_wise_tax_detail i can find tax value per item, what i need is the total amount which generate that tax amount; in the example above $250.00 for VAT@20% and $50.00 for VAT@10%