ZettaKonsult/zetta-workspace

Unique reference id for invoice

开放

#97 创建于 2018年3月9日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (0 个派生)auto 404
enhancementgood first issueinvoice

仓库指标

星标
 (0 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南