How to diagnose the Reversed Charge if it doesn't work?

Question

How to diagnose the Reversed Charge if it doesn't work?

 

Answer

If you will enable the "ReversedCharge" keyword matching for the verification you will be able to see if FlexiCapture has found it on the document.
mceclip0.png

and drag it to the Data Form:

mceclip1.png

mceclip0.png

However, the logic to set the checkmark "Reversed Charge" to true condition contains additional variables. They are TaxRate 1 and TaxRate 2 values. These values should be equal to 0.00 or empty.

The rule can be found in the Reversed Charge checkmark option and named "Reversed Charge field is empty or completed"

if (!Context.Field("Reversed Charge").IsVerified)
{
bool AllTaxGroupTaxRatesEmptyOrNull = true;
for ( int i = 0; i < Context.Field("TaxRate").Items.Count; i++ ) {
if ( Context.Field("TaxRate").Items[i].Text != "" || Context.Field("TaxRate").Items[i].Text == "0.00") {
AllTaxGroupTaxRatesEmptyOrNull = false;
break;
}
}

if (Context.Field("ReversedCharge").IsMatched && (Context.Field("TaxRate1").Text == "" || Context.Field("TaxRate1").Text == "0.00") && (Context.Field("TaxRate2").Text == "" || Context.Field("TaxRate2").Text == "0.00") && AllTaxGroupTaxRatesEmptyOrNull)
Context.Field("Reversed Charge").Value = true;
else
Context.Field("Reversed Charge").Value = false;
}

 

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.