Hi faiz.
You're calling
EcoResProductTranslation::findByProductLanguage(this.itemId(_custInvoiceTrans),ar);
This method awaits 2 parameters :
- 1 product (refrecid)
- 1 languageid
And returns 1 object (EcoResProductTranslation)
So there are 3 problems in your code:
1) you give an itemid instead of a product
2) you give a variable name "ar" that has not been decleared instead of a languageid
3) You're not telling wich field of EcoResProductTranslation you want to put in your
salesInvoiceTmp.NameAR
So the proper way to call this method should be :
EcoResProductTranslation::findByProductLanguage(InventTable::find(this.itemId(_custInvoiceTrans)).product,"ar").Description));