I am creating an invoice template for a customer and need assistance with displaying bundled information and discount reasons on the invoice with the correct expression for the template. Currently, discounts appears as a negative line item. For example, in a “3 products for 10 euros” promotion, where each product individually costs 4.50 euros, the invoice shows a negative line item of 3.50 euros. I would like to include the reason for the discount on the invoice. How can I achieve this effectively?
Unfortunately, there are no sources to back up the response of Novi. To prevent wrong answers, the response has been stopped. Create a new topic for your question in one of our Q&A categories.
I am creating an invoice template for a customer and need assistance with displaying bundled information and discount reasons on the invoice with the correct expression for the template. Currently, discounts appears as a negative line item. For example, in a “3 products for 10 euros” promotion, where each product individually costs 4.50 euros, the invoice shows a negative line item of 3.50 euros. I would like to include the reason for the discount on the invoice. How can I achieve this effectively?
Wrong answer has been removed.
<Item>
<Description>{ProductName} - Discount: {DiscountReason}</Description>
<Amount>{DiscountAmount}</Amount>
</Item>
[/quote]
This is not working
Wrong answer has been removed.
@StephanRS thank you for your question. Unfortunately, this question is difficult to answer without the specific context of your activity template.
Also, Novi is not capable to answers these specific questions yet. It should not have responded in that case. I will tweak the system prompt a little more, that should prevent it from hallucinating.
Is the reason already stored somewhere in the application? Then you can probably access the description of the “reason” with an expression and add that to your export definition as a custom field.
If also if it is a text that can be determined based on a set of conditions, you can try to check for these conditions with “if” statements in a custom expression.
These posts might help:
Search
Found 2 results for 'expressions frequently used functions'
For a comprehensive guide on frequently used functions in Novulo expressions, you might find this post helpful: Expressions: Frequently Used Functions.
Additionally, for further guidance on document generation, you may refer to this post: Document Generation Activities and Content Blocks.
These resources should assist in implementing the correct expressions for your template.