Some of my items has UOM by square metre m2 and it’s calculated from
multiply the length by the width
where i have to add this calculation and it’s only for some of items not all and how i can use it in transaction in purcahse and selling sycle starting from quotation to purchase and sales order and so on
You need to do a bit of coding to achieve this. First of all, create custom field for width and height in a transaction item table (for example, Sales Order item). Then you need to write a small custom script which will calculate qty based in width and height.
Dear @nabinhait
Thanks for your reply
i’m already have a custom script to do this calculation but my question is i have to add it to all document for sales and purchase cycle or if i did for one document i can move it to other also by custom script
You have to do it for all the transactions.
For example if i add it to quotation items and make purchase order from this quotation what will happen in item at purchase order
and how i can apply it only for specific item group not for all
Thanks
If you keep same field name for the width and height for all doctypes, when you will make a document from other one, system will copy those values from previous doc automatically.
To apply it for specific item groups (for less numbers), you can use depends_on
property. If there are many item groups, for which it will be shown, then write custom script to hide/unhide those field.
Thanks nabihait
could you post example of custom script to hide/unhide field
In this case hiding a child table field is little bit difficult, because it needs hide only specific rows. But width field is behave like a column in the table, so either it should be hidden entirely or not. I think depends_on
will work.