Finally I abandonned the Entity way and I went for the Ticket Tag way as explained in here and it works.
However I don’t understand everything I’ve done.
New Action - Update Program Setting
- Setting Name: SerialNumber ??
- Setting Value: 1
- Update Type:Increase
- IsLocal = False
What did I do ? Did I create a program variable named “SerialNumber” ?
New Action - “Update Ticket Tag”
- Tag Name: SunatNumber ??
- Tag Value: {:SerialNumber}
What did I do? Did I create a TICKET TAG name “SunatNumber”? (I did not add SunatNumber manually with “Add Ticket TAG”.)
I add these 2 actions on the Print Bill rule and now I have a number which is incremented everytime I print a ticket. I know it’s a bit weird but that’s the way the SUNAT wants to see the bills printed, avoiding the Zero Tickets (Merge table, VOID table, …)
Marc