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.

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.