ZettaKonsult/zetta-workspace

Unique reference id for invoice

Offen

#97 geöffnet am 09.03.2018

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (0 Forks)auto 404
enhancementgood first issueinvoice

Repository-Metriken

Stars
 (0 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

In prepareTemplate currently, the invoice id in the returned object is set to the createdAt-time stamp. This is probably OK but could be problematic if invoices happen to be created simultaneously.

The number in question is a reference id for the invoice and is as such required to be digits only.

Two spontaneous solutions:

  1. Find a hash-generator without collisions that only generate numbers.
  2. Find some way to make sure that two invoices never get the same id, e.g. by making the creation of n invoices take n ms.

Contributor Guide