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.
typedef struct
{
int id;
char name[MAXGOODSNAME];
double buying_price;
double selling_price;
char manufacturer[MAXMANUFACTURERNAME];
int quantity;
} Goods;
typedef struct GoodsListNode *GoodsList;
struct GoodsListNode
{
Goods goods;
GoodsList next;
};
SoldGoodsRecord individual sales data storage structure, a plurality of sales data is stored as a linked list.