Set currency labels for fields in child table erpnext

Hi,

I have two tables like

1. Shipment (Parent Table)
2. Shipment Details (Child Table)

In Parent table i have Currency and customer field.

Currency field linked to Currency Doctype

Currency Field have values like USD,INR,EUR etc based on customer selection

I need to populate amount field(currency) symbol in child table based on parent table

In Customer Script, I’m using

frm.set_currency_labels(["field_name"],frm.doc.currency)

How to change symbol in child table after assiging value

I’m assigning values to child field like:

cur_frm.get_field(shipment_details").grid.grid_rows[i].doc.amount = calculated_value;
    cur_frm.get_field("shipment_details").grid.grid_rows[i].refresh_field("amount");
1 Like

Hello
Did you find a solution?

Each time a field is refreshed the label gets ereased!

The only solution i have is:
frm.refresh_fields()

Set the options for the amount field in the child table to the field name of the Currency link field found on the parent.

Example.
If parent currency field has field name ‘currency_field’, then set the options for the amount field in the child table to currency_field.