How to set invoice type by default?

Question

How to set invoice type by default?

 

Answer

It can be done by modifying the Detect Invoice type script rule with the code below:

if( Context.Field("InvoiceType").IsVerified )
{
    return;
}
bool isCreditNote = false;
Context.Field("InvoiceType").Field("Invoice").Value = !isCreditNote;

To edit the rule, please go to the document definition, open InvoiceType field properties, select rule "Detect invoice type" - edit, open tab "rule Settings" and press edit:



After saving changes and publishing the Document Definition, all invoice documents will be always identified as Invoices.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.

Recently viewed