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.
and drag it to the Data Form:
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;
}
Comments
0 comments
Please sign in to leave a comment.