Manage Gift Cards

Rational

Selling or given gift cards is a common practice for some businesses.
A gift card is managed mostly like a deposit but not linked to a party but to a gift card ID.
A gift card can be sold but also created by the user (for free).
The result of a sale complain could be a gift card.

References

Proposal

On product, we add a checkbox to make it a gift card for types service or goods.

On processing the sale, for each line with a product gift card we create a gift card instance with a unique ID (if it is configured). The ID comes from a sequence configured on the product configuration per companies. The gift card instance stores also the amount in currency of the sale line (without taxes) and the sale line as origin. If the product is a goods, we link to the stock move the card instance. A number must be required on the instance to do the move.

To consume a gift card, we add a One2Many on the sale order (like the coupon) but only for the same currency and company. A gift card can be added only to one sale.
On quotation a return line for each card is added which reduce the amount to pay.

Implementation

In some cases there will be actual cards whose stock will have to be managed. How do you intend to manage those cases if gift card can only be used for products of service type?

I do not think physical gift cards should be treated as goods (at best they are consumable). But any way, they must not be managed with stock moves because they are not stocked. Indeed in such case, it is about a task to sent the gift card like talked at New invoicing method when selling both goods and services.

I concur with the objection raised by @albert: you can buy gift cards and print them out if desired. And the raw gift cards are subject to the usual stock and supply management.

If https://discuss.tryton.org/t/new-invoicing-method-when-selling-both-goods-and-services/345/5 is deemed to be needed, then well, it should be implemented and used. But the shortcut “because they are not stocked” doesn’t meet existing real use cases.

There are companies who buy the gift cards from a supplier like a print shop. Because the gift cards can have a nice design or special features to prevent fraud. These gift cards are bought in batches and that means IMO that the company have to stock those gift cards before they are sold.

If they are not sold, but just handed out for a later sale, there is a financial value that should be considered as accrual.

I updated the not always fill the ID so it can be assigned later when the material is actually sent.

Indeed in this case, we should allow to have gift card as goods.

I think we should always use the full amount of the gift card. This will simplify a lot for concurrency as we could simply use a Many2One which will serve as lock. If the amount of the card is greater than the sale, it will generate a credit note. But the salesman could add another gift card for the remaining amount if he wants. I think also we could add an option to convert the extra amount into deposit if the module is activated.

Normally gift cards have an end valid date.

As gift cards are accounted as a passive for the company once the gift cards are expired the company should account the non claimed gift cards as revenues.

How do you plan to manage both facts?

The trends is to ban expiration date on gift cards. So for now I do not plan to implement it. But if someone needs it, it should not be difficult to add an end date and set a cron task that spend the value to the proper account.