├── Procfile ├── .gitignore ├── error.log ├── public ├── logo.png ├── styles.css ├── admin.svg ├── creditcard.svg ├── login.css ├── addstock.svg ├── sales_filter.svg ├── stock_filter.svg ├── sales.svg ├── lock.svg ├── dashboard.svg ├── category.svg └── stock.svg ├── views ├── register.ejs ├── login.ejs ├── sizes.ejs ├── categories.ejs ├── brands.ejs ├── index.ejs ├── stock_filter.ejs ├── viewstocks.ejs ├── stocks.ejs ├── orders.ejs └── bill.ejs ├── package.json ├── passport-config.js └── README.md /Procfile: -------------------------------------------------------------------------------- 1 | web: node server.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | node_modules 3 | package-lock.json 4 | -------------------------------------------------------------------------------- /error.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShetuRaj/Inventory-Management-and-Billing-Website/HEAD/error.log -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShetuRaj/Inventory-Management-and-Billing-Website/HEAD/public/logo.png -------------------------------------------------------------------------------- /views/register.ejs: -------------------------------------------------------------------------------- 1 |

Register

2 |
3 |
4 | 5 | 6 |
7 |
8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 | 16 |
17 | Login -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "full_stack", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node server.js" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "bcrypt": "^5.0.1", 13 | "body-parser": "^1.19.0", 14 | "chart.js": "^3.0.1", 15 | "easyinvoice": "^1.0.111", 16 | "ejs": "^3.1.6", 17 | "express": "^4.17.1", 18 | "express-flash": "^0.0.2", 19 | "express-session": "^1.17.1", 20 | "fs": "^0.0.1-security", 21 | "method-override": "^3.0.0", 22 | "mongodb": "^3.6.5", 23 | "mysql": "^2.18.1", 24 | "natives": "^1.1.6", 25 | "passport": "^0.4.1", 26 | "passport-local": "^1.0.0", 27 | "pdfkit": "^0.11.0" 28 | }, 29 | "devDependencies": { 30 | "dotenv": "^8.2.0", 31 | "nodemon": "^2.0.7" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /passport-config.js: -------------------------------------------------------------------------------- 1 | const LocalStrategy = require('passport-local').Strategy 2 | const bcrypt = require('bcrypt') 3 | 4 | function initialize(passport, getUserByEmail, getUserById) { 5 | const authenticateUser = async (email, password, done) => { 6 | const user = getUserByEmail(email) 7 | if (user == null) { 8 | return done(null, false, { message: 'No user with that email' }) 9 | } 10 | 11 | try { 12 | if (password == user.password) { 13 | return done(null, user) 14 | } else { 15 | console.log(`Username =${user}`) 16 | console.log(`password =${password}`) 17 | console.log(`user.password =${user.password}`) 18 | 19 | return done(null, false, { message: 'Password incorrect' }) 20 | } 21 | } catch (e) { 22 | return done(e) 23 | } 24 | } 25 | 26 | passport.use(new LocalStrategy({ usernameField: 'email' }, authenticateUser)) 27 | passport.serializeUser((user, done) => done(null, user.id)) 28 | passport.deserializeUser((id, done) => { 29 | return done(null, getUserById(id)) 30 | }) 31 | } 32 | 33 | module.exports = initialize -------------------------------------------------------------------------------- /public/styles.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ========================================== 4 | * CUSTOM UTIL CLASSES 5 | * ========================================== 6 | * 7 | */ 8 | 9 | .vertical-nav { 10 | min-width: 17rem; 11 | width: 17rem; 12 | height: 100vh; 13 | position: fixed; 14 | top: 0; 15 | left: 0; 16 | box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1); 17 | transition: all 0.4s; 18 | overflow-y:auto 19 | } 20 | 21 | .page-content { 22 | width: calc(100% - 17rem); 23 | margin-left: 17rem; 24 | transition: all 0.4s; 25 | } 26 | 27 | /* for toggle behavior */ 28 | 29 | #sidebar.active { 30 | margin-left: -17rem; 31 | } 32 | 33 | #content.active { 34 | width: 100%; 35 | margin: 0; 36 | } 37 | 38 | @media (max-width: 768px) { 39 | #sidebar { 40 | margin-left: -17rem; 41 | } 42 | #sidebar.active { 43 | margin-left: 0; 44 | } 45 | #content { 46 | width: 100%; 47 | margin: 0; 48 | } 49 | #content.active { 50 | margin-left: 17rem; 51 | width: calc(100% - 17rem); 52 | } 53 | } 54 | 55 | /* 56 | * 57 | * ========================================== 58 | * FOR DEMO PURPOSE 59 | * ========================================== 60 | * 61 | */ 62 | /* 63 | body { 64 | background: #599fd9; 65 | background: -webkit-linear-gradient(to right, #599fd9, #c2e59c); 66 | background: linear-gradient(to right, #599fd9, #c2e59c); 67 | min-height: 100vh; 68 | overflow-x: hidden; 69 | } */ 70 | 71 | .separator { 72 | margin: 3rem 0; 73 | border-bottom: 1px dashed #fff; 74 | } 75 | 76 | .text-uppercase { 77 | letter-spacing: 0.1em; 78 | } 79 | 80 | .text-gray { 81 | color: #aaa; 82 | } 83 | 84 | a:hover { 85 | background: linear-gradient(to right, #00ebb0 26%, #b016da 91%); 86 | } 87 | 88 | #pdf { 89 | text-align: center; 90 | } 91 | 92 | #pdf canvas { 93 | border: 1px solid black; 94 | width: 95%; 95 | } 96 | 97 | -------------------------------------------------------------------------------- /public/admin.svg: -------------------------------------------------------------------------------- 1 | male_avatar -------------------------------------------------------------------------------- /views/login.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Login 13 | 14 | 15 | 16 |
17 |
18 |
19 |
20 |
21 | 22 |

23 | 24 |
25 |

LOGIN to your account

26 | 27 | <% if (messages.error) {%> 28 | 32 | 33 | <% } %> 34 |
35 |
36 |
37 |
38 | 39 |
40 |
41 |
42 |
43 |
44 | 45 | 46 |
47 |
48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 |
56 | 57 |
58 |
59 |
60 |
61 | 62 |
63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Inventory Management and Billing Website using NodeJS, MySQL and Javascript 3 | 4 | This is a free lancing project where I made a dynamic website for managing inventory with features like Billing, Adding, Removing Inventory/Stock and Analysis of Sales and Stocks with custom filters for a retail client 5 | 6 | 7 | ## Demo 8 | 9 | Here is a working demo of the website:- https://www.youtube.com/watch?v=MTikCHU2FL0&t=603s 10 | 11 | 12 | ## Authors 13 | 14 | - [@sheturaj](https://github.com/ShetuRaj) 15 | 16 | 17 | ## Contributing 18 | 19 | Contributions are always welcome! 20 | 21 | You can let me know if you want to contribute to this project. 22 | 23 | 24 | 25 | 26 | ## Features 27 | 28 | - Stock Inventory 29 | - Billing 30 | - Sales Analysis 31 | - Stock Analysis 32 | - Generation of Bill in printable format 33 | - Passport Authentication ([Tutorial Link](https://www.youtube.com/watch?v=-RCnNyD0L-s)) 34 | 35 | 36 | ## Tech Stack 37 | 38 | **Client:** Javascript, Bootstrap, Semantic-UI 39 | 40 | **Server:** Node, Express 41 | 42 | ## MySQL database setup and congfiguration 43 | 44 | Install MySQL 45 | 46 | ```bash 47 | https://dev.mysql.com/downloads/installer/ 48 | ``` 49 | 50 | MySQL Installation Guide 51 | 52 | ```bash 53 | https://www.youtube.com/watch?v=u96rVINbAUI 54 | ``` 55 | Download mysql database **.sql** file from here 56 | 57 | ```bash 58 | https://drive.google.com/file/d/1r0zaU-5Jzvf8aAqs4a-yiOMHxdkR5Y87/view?usp=sharing 59 | ``` 60 | Open mysql command prompt(as Administrator) and run the following command:- 61 | 62 | ```bash 63 | create database warehousedb; 64 | ``` 65 | 66 | Copy that sql file into this location (Your MySQL Server version could be different) 67 | ```bash 68 | C:\Program Files\MySQL\MySQL Server 8.0\bin 69 | ``` 70 | 71 | Now open command prompt(as Administrator) and execute following commands 72 | ```bash 73 | cd "C:\Program Files\MySQL\MySQL Server 8.0\bin" 74 | mysql –u root –p warehousedb < warehousedb.sql 75 | ``` 76 | 77 | ## Install node dependencies and run server locally 78 | 79 | Download and install **node** from here 80 | ```bash 81 | https://nodejs.org/en/download/ 82 | ``` 83 | 84 | Clone the project (You can also download this project directly as a zip file by clicking on **Code** present on top of this page and then clicking **Download Zip**) 85 | 86 | ```bash 87 | git clone https://github.com/ShetuRaj/Inventory-Management-and-Billing-Website.git 88 | ``` 89 | 90 | Go to the project directory 91 | 92 | ```bash 93 | cd Inventory-Management-and-Billing-Website 94 | ``` 95 | 96 | Install dependencies 97 | 98 | ```bash 99 | npm install 100 | ``` 101 | 102 | 103 | Start the server (Please set up the environment variables before starting the server) 104 | 105 | ```bash 106 | npm run start 107 | ``` 108 | 109 | Type this is your browser to open the local version of the website 110 | 111 | ```bash 112 | http://localhost:5000/ 113 | ``` 114 | 115 | 116 | ## Environment Variables 117 | 118 | To run this project, you will need to add the following environment variables to your `.env` file (Create a file named `.env` at the root of your project directory, i.e., in **Inventory-Management-and-Billing-Website** folder) 119 | 120 | ```bash 121 | SESSION_SECRET=secret 122 | 123 | db_name=warehousedb 124 | 125 | db_user_name= 126 | 127 | db_password= 128 | 129 | login_id= 130 | 131 | login_password= 132 | ``` 133 | 134 | 135 | Here `login_id` and `login_password` are the login credentials for the website. Similarly `db_user_name` and `db_password` are the credenials for the MySQL database which was configured during installation of MySQL. So please change all the credentials accordingly. 136 | Leave `SESSION_SECRET=secret` and `db_name=warehousedb` as it is. 137 | 138 | Folowing is an example with actual values in a .env file:- 139 | 140 | ```bash 141 | SESSION_SECRET=secret 142 | 143 | db_name=warehousedb 144 | 145 | db_user_name=root 146 | 147 | db_password=root1234 148 | 149 | login_id=admin@xyz.com 150 | 151 | login_password=admin1234 152 | ``` 153 | 154 | In the `.env` file, don't use double quotes for values and there should be no space before or after `=`. Also you can edit the shop name and other details on the bill pdf generated by simply going to **views/bill.ejs** and editing lines `488` to `494` in the file 155 | 156 | 157 | -------------------------------------------------------------------------------- /public/creditcard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/login.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;1,500&display=swap"); 2 | 3 | // $purple: #8a15ff; 4 | // $blue: #3800e7; 5 | // $ltblue: #15e0ff; 6 | // $magenta: #d000c5; 7 | 8 | // This is an example of animations & svgs... I completely understand that the amount of absolute positioning in this file is insane... ;) <3 9 | 10 | body { 11 | background: linear-gradient(#3800e7, #8a15ff); 12 | height: 100vh; 13 | font-size: calc(14px + (26 - 14) * ((100vw - 300px) / (1600 - 300))); 14 | font-family: "DM Mono", monospace; 15 | font-weight: 300; 16 | overflow: hidden; 17 | color: white; 18 | text-align: center; 19 | } 20 | 21 | h1 { 22 | font-size: 3em; 23 | margin-bottom: 0.2em; 24 | } 25 | 26 | h2 { 27 | font-size: 2em; 28 | } 29 | 30 | .main { 31 | height: 100vh; 32 | display: flex; 33 | flex-direction: column; 34 | flex-wrap: wrap; 35 | position: relative; 36 | justify-content: center; 37 | align-items: center; 38 | 39 | &:before, 40 | &:after { 41 | content: ""; 42 | display: block; 43 | position: absolute; 44 | z-index: -3; 45 | } 46 | &:before { 47 | right: 0; 48 | bottom: -19; 49 | height: 30em; 50 | width: 30em; 51 | border-radius: 30em; 52 | background: linear-gradient(#3800e7, #8a15ff); 53 | align-self: flex-end; 54 | animation: gradient-fade 8s ease-in-out 3s infinite alternate; 55 | } 56 | &:after { 57 | $circle-unit: 10em; 58 | top: 0; 59 | left: 30; 60 | height: $circle-unit; 61 | width: $circle-unit; 62 | border-radius: $circle-unit; 63 | background: linear-gradient(#3800e7, #8a15ff); 64 | animation: gradient-fade-alt 6s ease-in-out 3s infinite alternate; 65 | } 66 | 67 | &__text-wrapper { 68 | position: relative; 69 | padding: 2em; 70 | 71 | &:before, 72 | &:after { 73 | content: ""; 74 | display: block; 75 | position: absolute; 76 | } 77 | 78 | &:before { 79 | $circle-unit: 13em; 80 | z-index: -1; 81 | top: -3em; 82 | right: -3em; 83 | width: $circle-unit; 84 | height: $circle-unit; 85 | opacity: 0.7; 86 | border-radius: $circle-unit; 87 | background: linear-gradient(#15e0ff, #8a15ff); 88 | animation: rotation 7s linear infinite; 89 | } 90 | 91 | &:after { 92 | $circle-unit: 20em; 93 | z-index: -1; 94 | bottom: -#{$circle-unit}; 95 | width: $circle-unit; 96 | height: $circle-unit; 97 | border-radius: $circle-unit; 98 | background: linear-gradient(#d000c5, #8a15ff); 99 | animation: rotation 7s linear infinite; 100 | } 101 | } 102 | } 103 | 104 | .arrow { 105 | z-index: 1000; 106 | opacity: 0.5; 107 | position: absolute; 108 | 109 | &--top { 110 | top: 0; 111 | left: -5em; 112 | } 113 | 114 | &--bottom { 115 | bottom: 0; 116 | right: 3em; 117 | } 118 | } 119 | 120 | .circle { 121 | transform: translate(50%, -50%) rotate(0deg); 122 | transform-origin: center; 123 | 124 | &--ltblue { 125 | $circle-unit: 20em; 126 | height: $circle-unit; 127 | width: $circle-unit; 128 | border-radius: $circle-unit; 129 | background: linear-gradient(#15e0ff, #3800e7); 130 | } 131 | } 132 | 133 | .backdrop { 134 | position: absolute; 135 | width: 100vw; 136 | height: 100vh; 137 | display: block; 138 | background-color: pink; 139 | } 140 | 141 | .dotted-circle { 142 | position: absolute; 143 | top: 0; 144 | right: 0; 145 | opacity: 0.3; 146 | animation: rotation 38s linear infinite; 147 | } 148 | 149 | // animations 150 | .draw-in { 151 | stroke-dasharray: 1000; 152 | stroke-dashoffset: 10; 153 | animation: draw 15s ease-in-out alternate infinite; 154 | } 155 | 156 | @keyframes draw { 157 | from { 158 | stroke-dashoffset: 1000; 159 | } 160 | 161 | to { 162 | stroke-dashoffset: 0; 163 | } 164 | } 165 | 166 | .item-to { 167 | animation-duration: 10s; 168 | animation-iteration-count: infinite; 169 | transform-origin: bottom; 170 | } 171 | 172 | .bounce-1 { 173 | animation-name: bounce-1; 174 | animation-timing-function: ease; 175 | } 176 | 177 | .bounce-2 { 178 | animation-name: bounce-2; 179 | animation-timing-function: ease; 180 | } 181 | 182 | .bounce-3 { 183 | animation-name: bounce-3; 184 | animation-timing-function: ease; 185 | } 186 | 187 | @keyframes bounce-1 { 188 | 0% { 189 | transform: translateY(0); 190 | } 191 | 50% { 192 | transform: translateY(50px); 193 | } 194 | 100% { 195 | transform: translateY(0); 196 | } 197 | } 198 | 199 | @keyframes bounce-2 { 200 | 0% { 201 | transform: translateY(0); 202 | } 203 | 50% { 204 | transform: translateY(-30px); 205 | } 206 | 100% { 207 | transform: translateY(0); 208 | } 209 | } 210 | 211 | @keyframes bounce-3 { 212 | 0% { 213 | transform: translateY(0); 214 | } 215 | 50% { 216 | transform: translateY(30px); 217 | } 218 | 100% { 219 | transform: translateY(0); 220 | } 221 | } 222 | 223 | // gradient fade 224 | 225 | @keyframes rotation { 226 | from { 227 | transform: rotate(0deg); 228 | } 229 | to { 230 | transform: rotate(360deg); 231 | } 232 | } 233 | 234 | @keyframes gradient-fade { 235 | from { 236 | transform: translate(10%, -10%) rotate(0deg); 237 | } 238 | to { 239 | transform: translate(50%, -50%) rotate(360deg); 240 | } 241 | } 242 | 243 | @keyframes gradient-fade-alt { 244 | from { 245 | transform: translate(-20%, 20%) rotate(0deg); 246 | } 247 | to { 248 | transform: translate(-60%, 60%) rotate(360deg); 249 | } 250 | } 251 | -------------------------------------------------------------------------------- /public/addstock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/sales_filter.svg: -------------------------------------------------------------------------------- 1 | personal_finance -------------------------------------------------------------------------------- /views/sizes.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Sizes 15 | 16 | 17 | 18 | 113 | 114 | 115 | 116 |
117 | 118 | 119 | 120 | 121 | 122 |

Manage Sizes

123 |
124 |
125 |
126 | 127 | 130 | 131 | 153 |
154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | <% size.forEach(function(order){ %> 162 | 163 | 164 | 165 | <% }); %> 166 | 167 |

Sizes

<%= order.Size %>

168 |
169 |
170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /views/categories.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Categories 15 | 16 | 17 | 18 | 113 | 114 | 115 | 116 | 117 | 118 |
119 | 120 | 121 | 122 | 123 | 124 |

Manage Categories

125 |
126 |
127 | 128 | 131 |
132 | 133 | 134 | 156 |
157 |
158 |
159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | <% category.forEach(function(order){ %> 167 | 168 | 169 | 170 | <% }); %> 171 | 172 |

Categories

<%= order.Category %>

173 |
174 |
175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 193 | 194 | 195 | -------------------------------------------------------------------------------- /views/brands.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Brands 15 | 16 | 17 | 18 | 119 | 120 | 121 | 122 |
123 | 124 | 125 | 126 | 127 | 128 |

Manage Brands

129 |
130 |
131 |
132 | 133 | 136 | 137 | 159 |
160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | <% brand.forEach(function(order){ %> 168 | 169 | 170 | 171 | <% }); %> 172 | 173 |

Brands

<%= order.Brand %>

174 |
175 |
176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 193 | 194 | 195 | 196 | -------------------------------------------------------------------------------- /public/stock_filter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/sales.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/lock.svg: -------------------------------------------------------------------------------- 1 | safe -------------------------------------------------------------------------------- /views/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Shanti Wear House 14 | 15 | 16 | 17 | 111 | 112 | 113 | 114 | 115 |
116 | 117 | 118 | 119 | 120 | 121 |
122 |

Dashboard

123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | 133 |
134 |
135 |
136 |
137 |

138 | 139 | <% total_sales.forEach(function(order){ %> 140 | <%= order.TotalItemsOrdered %> 141 | <% }); %> 142 |

143 |
144 |
145 | Total Sales 146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 | 155 |
156 |
157 |
158 |
159 |

160 | <% ord_num.forEach(function(order){ %> 161 | <%= order. NumberOfProducts %> 162 | <% }); %> 163 |

164 |
165 |
166 | Total Orders 167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |

180 | <% stock_num.forEach(function(order){ %> 181 | <%= order. NumberOfProducts %> 182 | <% }); %> 183 |

184 |
185 |
186 | Total Stock 187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 | 196 |
197 |
198 |
199 |
200 |

201 | <% total_stock.forEach(function(order){ %> 202 | <%= order. TotalItemsOrdered %> 203 | <% }); %> 204 |

205 |
206 |
207 | Total Stock Value 208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 | 217 | 218 | 219 | 220 |
221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 237 | 238 | 239 | 240 | 241 | -------------------------------------------------------------------------------- /public/dashboard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/stock_filter.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Stock Filter 14 | 15 | 16 | 17 | 116 | 117 | 118 | 119 | 120 |
121 | 122 | 123 | 124 | 125 | 126 | 127 |

Stocks Filter

128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |

Select Filter

136 |
137 |
138 |
139 | 140 | 143 |
144 |
145 | 146 | 149 |
150 | 151 |
152 | 153 |
154 |
155 | 156 |
157 | 158 |
159 |
160 | 161 |
162 | 163 |
164 |
165 |
166 |
167 | <% if (filter_type == 'brand') { %> 168 |
169 |
170 |

Showing Results for BRAND

171 |
172 |
173 |
174 |
175 |
176 |
177 |

<% total_items.forEach(function(order){ %> 178 | <%= order.Count %> 179 | <% }); %>

180 |
181 |
182 |
183 |
184 | Total Items in Stock 185 |
186 |
187 |
188 |
189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | <% display_content.forEach(function(order){ %> 199 | 200 | 201 | 202 | 203 | 204 | <% }); %> 205 | 206 |
Brand Stock LeftStock Value
<%= order.Brand %><%= order.Count %> <%= order.Amount %>
207 |
208 | <% } %> 209 | 210 | <% if (filter_type == 'category') { %> 211 |
212 |
213 |

Showing Results for Filter_Type = CATEGORY

214 |
215 |
216 |
217 |
218 |
219 |
220 |

<% total_items.forEach(function(order){ %> 221 | <%= order.Count %> 222 | <% }); %>

223 |
224 |
225 |
226 |
227 | Total Items in Stock 228 |
229 |
230 |
231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | <% display_content.forEach(function(order){ %> 241 | 242 | 243 | 244 | 245 | 246 | <% }); %> 247 | 248 |
Category Stock Left Stock Value
<%= order.Category %><%= order.Count %> <%= order.Amount %>
249 |
250 | <% } %> 251 |
252 | 253 | 254 | 255 | 256 |
257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 273 | 274 | 275 | 276 | 277 | -------------------------------------------------------------------------------- /views/viewstocks.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | View Stocks 15 | 16 | 17 | 18 | 112 | 113 | 114 | 115 |
116 | 117 | 118 | 119 | 120 |

Stocks Summary

121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |

View Stock By

129 |
130 | 131 |
132 |
133 | 134 | 137 |
138 |
139 | 140 | 143 |
144 |
145 |
146 | 152 |
153 |
154 | 160 |
161 |
162 |
163 |
164 |
165 |
166 | 167 |
168 | 169 |
170 |
171 |
172 |
173 | <% if(filter_type == 'None') { %> 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | <% all_stocks.forEach(function(order){ %> 189 | 190 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | <% }); %> 201 | 202 |
Item IDItem NameCategoryBrand NameSizeAmountDate EnteredTime Entered
<%= order.ItemID %> 191 | <%= order.ItemName %><%= order.Category %><%= order.Brand %><%= order.Size %><%= order.Amount %><%= order.StockDate %><%= order.StockTime %> 
203 | <% } %> 204 | 205 | <% if(filter_type == 'brand') { %> 206 |
207 |

Showing Stocks for <%= filter_name %>

208 |
209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | <% display_content.forEach(function(order){ %> 224 | 225 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | <% }); %> 236 | 237 |
Item IDItem NameCategoryBrand NameSizeAmountDate EnteredTime Entered
<%= order.ItemID %> 226 | <%= order.ItemName %><%= order.Category %><%= order.Brand %><%= order.Size %><%= order.Amount %><%= order.StockDate %><%= order.StockTime %> 
238 | <% } %> 239 | 240 | <% if(filter_type == 'category') { %> 241 |
242 |

Showing Stocks for <%= filter_name %>

243 |
244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | <% display_content.forEach(function(order){ %> 259 | 260 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | <% }); %> 271 | 272 |
Item IDItem NameCategoryBrand NameSizeAmountDate EnteredTime Entered
<%= order.ItemID %> 261 | <%= order.ItemName %><%= order.Category %><%= order.Brand %><%= order.Size %><%= order.Amount %><%= order.StockDate %><%= order.StockTime %> 
273 | <% } %> 274 | 275 |
276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 292 | 293 | 306 | 307 | -------------------------------------------------------------------------------- /views/stocks.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Add New Stock 15 | 16 | 17 | 18 | 119 | 120 | 121 | 122 |
123 | 124 | 125 | 126 | 127 | 128 |

Add New Stock

129 |
130 |
131 |
132 |
Add New Item
133 |
134 |
135 |
136 |
137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 160 | 167 | 189 | 209 | 225 | 232 | 233 | 234 | 235 | 236 | 237 |
Item No.Item IDItem NameCategoryBrandSizeAmount
155 |
156 | 157 | 158 |
159 |
161 |
162 | 163 | 164 | 165 |
166 |
168 |
169 | 186 | 187 |
188 |
190 |
191 | 206 | 207 |
208 |
210 |
211 | 222 | 223 |
224 |
226 |
227 | 228 | 229 | 230 |
231 |
238 |
239 |
240 | 241 | 242 |
243 | 244 |
245 |
247 |
248 |
250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 340 | 349 | 350 | -------------------------------------------------------------------------------- /public/category.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/orders.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Orders 15 | 16 | 17 | 18 | 112 | 113 | 114 | 115 |
116 | 117 | 118 | 119 | 120 | 121 |

Order Summary

122 | 123 | 124 |
125 |
126 |
127 |
128 |
129 |
130 |

View Orders By

131 |
132 | 133 |
134 |
135 | 136 | 139 |
140 |
141 | 142 | 145 |
146 |
147 |
148 | 163 |
164 |
165 | 173 |
174 |
175 |
176 |
177 |
178 |
179 | 180 |
181 | 182 |
183 |
184 |
185 |
186 | 187 | <% if(selected_item == 'None') { %> 188 | <% orders.forEach(function(order){ %> 189 |
190 |
191 |
192 | 193 | 194 |
195 |
196 |
197 |

Order ID: <%= order.TransactionID %>

198 |
199 |
200 |

Total Amount: <%= order.Amount %>

201 |
202 |
203 |
204 |
205 |

Date: <%= order.TransactionDate %>

206 |
207 |
208 |

Time: <%= order.TransactionTime %>

209 |
210 |
211 |
212 | 213 |
214 |
215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | <% sub_orders.forEach(function(sub_order){ %> 230 | <% console.log(`sub_order.TransactionID = ${sub_order.TransactionID}`) %> 231 | <% console.log(`order.TransactionID = ${order.TransactionID}`) %> 232 | <% if(sub_order.TransactionID == order.TransactionID) { %> 233 | <% console.log(sub_order) %> 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | <% } %> 244 | 245 | 246 | <% }) %> 247 | 248 |
Item IDItem NameCategoryBrand NameSizeAmountCustomer Number
<%= sub_order.ItemID %><%= sub_order.ItemName %><%= sub_order.Category %><%= sub_order.Brand %><%= sub_order.Size %><%= sub_order.Amount %><%= sub_order.CustomerNumber %>
249 |
250 |
251 | <% }) %> 252 | 253 | <% } %> 254 | 255 | <% if(selected_item == 'month') { %> 256 |

Showing Orders for <%= month_name %>, <%= year %>

257 | <% orders.forEach(function(order){ %> 258 |
259 |
260 |
261 | 262 |
263 |
264 |
265 |

Order ID: <%= order.TransactionID %>

266 |
267 |
268 |

Total Amount: <%= order.Amount %>

269 |
270 |
271 |
272 |
273 |

Date: <%= order.TransactionDate %>

274 |
275 |
276 |

Time: <%= order.TransactionTime %>

277 |
278 |
279 |
280 |
281 |
282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | <% sub_orders.forEach(function(sub_order){ %> 297 | <% console.log(`sub_order.TransactionID = ${sub_order.TransactionID}`) %> 298 | <% console.log(`order.TransactionID = ${order.TransactionID}`) %> 299 | <% if(sub_order.TransactionID == order.TransactionID) { %> 300 | <% console.log(sub_order) %> 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | <% } %> 311 | 312 | 313 | <% }) %> 314 | 315 |
Item IDItem NameCategoryBrand NameSizeAmountCustomer Number
<%= sub_order.ItemID %><%= sub_order.ItemName %><%= sub_order.Category %><%= sub_order.Brand %><%= sub_order.Size %><%= sub_order.Amount %><%= sub_order.CustomerNumber %>
316 |
317 |
318 | <% }) %> 319 | 320 | <% } %> 321 | 322 | <% if(selected_item == 'year') { %> 323 |

Showing Orders for <%= year %>

324 | <% orders.forEach(function(order){ %> 325 |
326 |
327 |
328 | 329 |
330 |
331 |
332 |

Order ID: <%= order.TransactionID %>

333 |
334 |
335 |

Total Amount: <%= order.Amount %>

336 |
337 |
338 |
339 |
340 |

Date: <%= order.TransactionDate %>

341 |
342 |
343 |

Time: <%= order.TransactionTime %>

344 |
345 |
346 |
347 |
348 |
349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | <% sub_orders.forEach(function(sub_order){ %> 364 | <% console.log(`sub_order.TransactionID = ${sub_order.TransactionID}`) %> 365 | <% console.log(`order.TransactionID = ${order.TransactionID}`) %> 366 | <% if(sub_order.TransactionID == order.TransactionID) { %> 367 | <% console.log(sub_order) %> 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | <% } %> 378 | 379 | 380 | <% }) %> 381 | 382 |
Item IDItem NameCategoryBrand NameSizeAmountCustomer Number
<%= sub_order.ItemID %><%= sub_order.ItemName %><%= sub_order.Category %><%= sub_order.Brand %><%= sub_order.Size %><%= sub_order.Amount %><%= sub_order.CustomerNumber %>
383 |
384 |
385 | <% }) %> 386 | 387 | <% } %> 388 | 389 | <% orders.forEach(function(order){ %> 390 | 391 | <%= order.TransactionID %> 392 | <%= order.ItemID %> 393 | <%= order.ItemName %> 394 | <%= order.Category %> 395 | <%= order.Brand %> 396 | <%= order.Size %> 397 | <%= order.Amount %> 398 | <%= order.TransactionDate %> 399 | <%= order.TransactionTime %> 
400 | <%= order.CustomerNumber %> 401 | 402 | <% }); %> 403 | 404 | --> 405 |
406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 422 | 423 | 428 | 429 | 442 | 443 | 444 | -------------------------------------------------------------------------------- /public/stock.svg: -------------------------------------------------------------------------------- 1 | window_shopping -------------------------------------------------------------------------------- /views/bill.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Bill 15 | 16 | 17 | 18 | 112 | 113 | 114 | 115 |
116 | 117 | 118 | 119 | 120 |

Bill

121 |
122 |
123 |
Add New Item
124 |
125 |
126 |
127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 152 | 159 | 170 | 181 | 192 | 199 | 205 | 206 | 207 | 208 | 209 | 210 |
Item No.Item IDItem NameCategoryBrandSizeAmountPhone Number
146 |
147 | 148 | 149 | 150 |
151 |
153 |
154 | 155 | 156 | 157 |
158 |
160 |
161 | 167 | 168 |
169 |
171 |
172 | 178 | 179 |
180 |
182 |
183 | 189 | 190 |
191 |
193 |
194 | 195 | 196 | 197 |
198 |
200 |
201 | 202 | 203 |
204 |
211 |
212 | 213 | 214 | 215 |
216 | 217 |

218 | 219 | TOTAL CART VALUE 220 |

221 |
222 |
223 |
224 | 225 |
226 |
227 | 228 | 229 | 230 |
231 |
232 |
233 |
234 | 235 |
236 |
237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 331 | 426 | 435 | 436 | 508 | 509 | --------------------------------------------------------------------------------