gocodebox / gocodebox/lifterlms

[Orders] Add support for sequential/ incremental invoice number in purchase receipts

Open
#1,020 1 comment 0 reactions 0 assignees View on GitHub
Type: Feature Request Type: Notes
Dominant language
PHP
Stars
212
Forks
140
Avg merge
2d 14h
Merged PRs (30d)
19

Description

## Intro

Some countries (EU, India, etc) have a legal requirement of a sequentially incremental invoice/purchase receipt for every incoming transaction.

## Proposal

Add a serial number merge code to purchase receipts. Based on user feedback, I have created a gist that does this in a slightly hacky way in the meantime: https://gist.github.com/actual-saurabh/a479571b6ceb5e6b32e30f31575050f0

It ignores test mode transactions and all failed transactions to generate incremental serial numbers. It includes refunded transactions (as per legal requirement, the serial number stays as it is even if the transaction was refunded subsequently and will be used for reference).

The gist contains a way to set a length with leading zeroes (as is preferred/required in some places) and even add a prefix.

It is hacky and the first run (where existing transactions get assigned a serial number) needs a full review but I wanted to note this down to be able to track and continue discussing.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked gist and the purchase-receipt merge-code flow. Confirm how successful, failed, test-mode, and refunded transactions should affect sequential numbering, including the first run for existing transactions. Done means the supported serial number behavior, prefixes, and leading-zero formatting are defined and covered by the project’s relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.