How can I create a rule that divides Amount value with Quantity to get unit price in Invoice table, Please Share the script for this case.
Creating a rule in FC 12 Document Definition that Divides Amount with Quantity in Invoice Table
Was this article helpful?
0 out of 0 found this helpful
Comments
3 comments
Hello, you can create a script rule to calculate the unit price. Details about setting up the rule can be found in https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/rule_script/
A sample script in C# is below, but please note you may need to adjust it based on your settings and requirements.
Thank you.
Hello , i tried a similar script that multiple two columns as shown in the below script:
double NetQuantity = double.Parse( Context.Field( "Quantity" ).Text );
double NetWeight = double.Parse( Context.Field( "Unit_weight" ).Text );
NetQuantity = NetQuantity*NetWeight;
Context.Field( "Quantity" ).Text = NetQuantity.ToString();
but there is issue as shown in attachment,please advise how to solve it
Hello, I am afraid we will need your project and some sample for further investigation. I have created a support ticket, my colleagues will reach out to you shortly. Thank you.
Please sign in to leave a comment.