Custom Script to Add Sales Invoice Item Row

Hello guys,
I am trying to add row in Sales Invoice Item but not reflecting value in Rate field, its getting always 0.0
custom script :
var si_item = frappe.model.add_child(cur_frm.doc, ‘Sales Invoice Item’, ‘items’);
frappe.model.set_value(si_item.doctype,, ‘item_code’, ‘Product1’);
frappe.model.set_value(si_item.doctype,, ‘qty’, 100);
frappe.model.set_value(si_item.doctype,, ‘rate’, 50);

if any solution pls let me know.