This a series of code written for a Grocery Shop within an organization to facilitate the calculation as well as the accmulation of goods purchased by users.
This is a discount calculator program for a Grocery Shop within an organization that takes accounts of user categories in that organization. It then prescribes a discount which is maintained by the company as well as its stakeholders.
Employees: These individuals are the staff of the company and by virtue, are to obtain a discount of 5% of their total purchase.
Customers: They are the active users of the service and are subdivided into two groups:
- Constant Customers: The requirement for being a constant customer is that the number of years pertaining to the usage of the service should be two or more. It then follows that these set of people obtain a reduction of 2%.
- Regular Customers: For a person to to qualify as a regular customer , that individual in question should have used the service for less than two years. As it persists , regular customers are denied a discount of any sort.
Affiliates: Affiliates denote people that have a relation to the employees of the organiszation. They are thereof granted a discount of 3% of their total purchase.
However, a combined discount of 5 dollars is granted every individual in question. This is elaborated in the duties of this program.
-
Combined Discount: This permits every user, regarldess of their category to have a 5 dollar disocunt for every 100 dollar-purchase and above.
-
Product: This accounts for the orders made by the user of the service.
-
Total Price: The total price depicts the overall price accumulated after the orders have been keyed in and their associated quantities have been accounted for.
-
Net-Total Price: This is the price the user is required to pay and is denoted as the accorded discount subtracted from the total price. This is what the user is demanded to make payment for
As having tried and tested this,it is undoubtedly ordinary that it can be susceptible to bugs. I am receptive to any issue or required changes on this piece.
Kindly open a PR and state your opinion with an ample description as to what you feel should be implemented.
You can also fork this repository , clone it in your IDE and make the necessary changes with any branch of your choice.