C
C
Cat Anton2018-09-02 00:08:42
PHP
Cat Anton, 2018-09-02 00:08:42

How to implement complex Accounting?

Good afternoon.
There are many participants in the system between whom it is required to correctly distribute money: the client who pays for the service; several performers, each of which performs its part of the work; a service that takes its commission. Several types of currency are involved in operations: cash and non-cash money, bonus points of two types.
A large number of rules, a few examples:
1. If the performer has bonus points, then he will be able to compensate for a certain part of the commission (not all) with these points. That is, he has more cash from the client in his hands, and he pays the commission in points (1 to 1).
2. The client may have a promo code for an N% discount, but the performers' earnings should not decrease. The service compensates for the difference with points or cashless payments.
3. There are additional services of the service that the client pays for, and the performers must only transfer this money to the service. That is, this money is not a commission for performers, and this must be taken into account.
4. Performers can be assigned to several orders of different clients at once. And if the performer has only 500 points, and 400 of them will be debited after the first order is completed, then when calculating earnings for the second order, it must be taken into account that the performer has only 10 points left.
4. Dozens of other similar rules...
Now it's all implemented "on the forehead" and somehow works in production. Any release that affects the financial part leads to errors. It's time to refactor, the business is ready to rewrite the system from scratch.
How to properly implement such a system and minimize errors? Interested in: your own experience in solving similar problems, libraries (preferably PHP), design patterns, frameworks, articles, conference presentations that can help in this matter or suggest the right idea.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ambrosian, 2018-09-02
@Ambrosian

Just hire a specialist.
All the points you described are a common task.
PS:
You have stated the complete statement of the problem, in fact.
Would you like us to solve it for you?
This is not a question The
question is what exactly is your specific problem.
You also wrote:
"I have no idea what to do."
Answer:
"Hire someone who represents."

D
Dimonchik, 2018-09-02
@dimonchik2013

straight homework on patterns,
well , see for example
with regard to
they need to be done with clear instructions from the financial department, by reporting periods and the principles of recognition of expense / income / conversion

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question