Small supermarket inventory and sales management system based on C language

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/demongwc/article/details/84928532

1 needs analysis

Log 1.1

Administrator and salesman by their account, enter an administrator password respectively salesman and subsystems. The input is not stored by the system account or account password does not match the input, it requires the user to re-enter.

1.2 User Management

Admin user can see all the users in the system of accounts, passwords, permissions categories, you can add users, delete users.

1.3 Inventory Management

Administrators can manually add items, can also batch import of goods from a file, you can view all the product information in the inventory for the number in stock 0 goods in bulk can clean up.

1.4 Queries goods

Administrator and clerk can check product information by product name, product manufacturers, and the name of the manufacturer's way. Administrators can get all the product information (product ID, product name, purchase price, price, manufacturer, margin), sales of goods available out information other than the purchase price. Inquiries can be made to support fuzzy search, enter only the prefix.

1.5 Sales of goods

Administrator and salesman may be on the inside of the stock sales, sales requests are reviewed on the balance corresponding goods inventory is updated after sales, while sales of recorded product information, sales time sales record update data files.

1.6 Sales Statistics

Administrators can browse all sales records in one day or date range, can be integrated statistical sales records within the specified date range, each commodity sales statistics, income, total income statistics, statistics can be screened by sales volume, sales result.

2 Summary of design

2.1 Data Structure

Goods individual commodity data storage structure, a plurality of commodity storage as a linked list.

  1. typedef struct
  2. {
  3. int id;
  4. char name[MAXGOODSNAME];
  5. double buying_price;
  6. double selling_price;
  7. char manufacturer[MAXMANUFACTURERNAME];
  8. int quantity;
  9. } Goods;
  10.  
  11. typedef struct GoodsListNode *GoodsList;
  12. struct GoodsListNode
  13. {
  14. Goods goods;
  15. GoodsList next;
  16. };

SoldGoodsRecord individual sales data storage structure, a plurality of sales data is stored as a linked list.

 

Click here to download the source code and documentation

Guess you like

Origin blog.csdn.net/demongwc/article/details/84928532