Version: eXtendRoyalties all versions

Audience: Administrator, User

Scenario

A royalty transaction was already created for an invoice. Later, you add or change invoice lines, delete the royalty transaction, or need to stop the invoice or a line from being processed again.

What triggers processing?

eXtendRoyalties evaluates royalties at the invoice level when the scheduled script runs, or when you run the Royalties Invoice Job Runner. Editing an invoice does not immediately create or update a royalty transaction.

When it runs, it looks for an existing royalty transaction linked to the invoice:

  • If no royalty transaction exists, the invoice is treated as unprocessed and a new royalty transaction is created.
  • If a royalty transaction exists, eXtendRoyalties compares the current invoice total to the total stored on that royalty transaction:
    • If the totals match, the invoice is skipped.
    • If the totals don’t match, the invoice is processed again.

What happens during reprocessing

When an invoice is reprocessed due to a total change, eXtendRoyalties:

  1. Reviews the latest invoice lines (including newly added lines).
  2. Opens the existing royalty transaction linked to the invoice.
  3. Updates that same royalty transaction (it does not create another one):
    • Removes all existing royalty lines.
    • Rebuilds royalty lines from the current invoice lines.

What happens if the royalty transaction is deleted

If the royalty transaction for an invoice is deleted, eXtendRoyalties creates a new royalty transaction the next time the scheduled script or Royalties Invoice Job Runner runs.

This happens because:

  1. The invoice is still eligible for processing. Previously processed invoices are not automatically excluded.
  2. No existing royalty transaction is found for the invoice.
  3. The invoice is treated as unprocessed, and a new royalty transaction is created.

Editing the invoice does not immediately recreate the royalty. Regeneration happens on the next scheduled run or on-demand Job Runner run.

How to stop a royalty from being recreated

If a royalty was generated in error, or if it should no longer be considered for credit memo processing:

  1. Delete the royalty transaction.
  2. Flag the source invoice or invoice line as canceled so it is not processed again.

If you delete the royalty without canceling the source invoice or line, a new royalty transaction is created on the next run.

See Using eXtendRoyalties for the cancel fields.

Exclude an entire invoice

On the invoice, go to the eXtendRoyalties subtab and check IS EXTENDTECH CANCEL ROYALTY. The invoice is excluded from royalty processing.

Exclude individual lines

On specific item lines, check EXTEND CANCEL ROYALTY. Only those lines are skipped. Remaining non-canceled royalty lines on the invoice are processed normally.

Expected results

  • If the invoice total changes and a royalty transaction still exists, that same royalty transaction is updated. No new royalty transaction is created.
  • Newly added royalty-eligible lines are included when lines are rebuilt.
  • If the royalty transaction is deleted and the invoice or line is not canceled, a new royalty transaction is created on the next run.
  • If the invoice or line is canceled, it is excluded from future processing.

When a new line might not be picked up

If the invoice total doesn’t change, the invoice is skipped because the stored total still matches the current total. Common examples:

  • The new line amount is 0.
  • You changed something that doesn’t affect the invoice total.

Frequently Asked Questions (FAQs)

Q: If I delete a royalty transaction, will it be created again?

A: Yes. On the next scheduled run or Royalties Invoice Job Runner run, eXtendRoyalties detects that no royalty transaction exists and creates a new one. To prevent this, cancel the invoice or the source line.

Q: What happens if I change an invoice amount or quantity after royalties have been generated?

A: If the invoice total is different from the total stored on the existing royalty transaction, eXtendRoyalties updates that same royalty transaction. It does not create a duplicate.

Q: How do I completely exclude an invoice or line from royalty processing?

A: Check IS EXTENDTECH CANCEL ROYALTY on the invoice to exclude the entire transaction, or check EXTEND CANCEL ROYALTY on specific lines to exclude only those lines.