sjasthi / learnandhelp

Learn and Help: Learn programming and help different causes.
MIT License
0 stars 10 forks source link

(FP3, FP4) Support for "books 4 school" list #21

Closed sjasthi closed 1 year ago

sjasthi commented 1 year ago

Use Case:

[1] There are many books in the database.

[2] Each book is suitable for high, upper primary, primary, other.

[3] Volunteers ship books to a school.

Based on the type of school (high, upper primary, primary, other), they can get a list of books from the database where the "available" flag is 1.

--> A book in the database may become out of print and is no longer available. (have a new column called "available" - 0 means Not available. 1 means available)

[4] The following scenarios must be supported:

(a) Multiple copies of the same book: Sometimes, we ship multiple copies of the same book. By default, number of copies is 1. However, the admins may overwrite it with 2 or 3 or 4 or 5 (the upper limit is 10).

(b) Excluding a book from shipment we are shipping 0 books even though it is available.

[5] Admins finalize the selection of books and the number of copies for each book. (this should be intuitive, simpler, and faster)

Master list (coming from the database) to School specific list (subset /filtered subset where number of copies can be > 1 for some books).

[6] Once they finalize, we need to support "print invoice" functionality.

--> We generate a list of books in three flavors ---> Show three buttons (as Ibrahima demonstrated) --> Once the user clicks a button, show the invoice / report in a new tab.


[A] Invoice with prices

no, ID of book, title of the book, number of copies, price_per_book, total_price show the grand total at the bottom

1, 99, title1, 2, 100, 200 2, 169, title 2, 1, 50, 50 3, 345, title 3, 4, 20, 80 Total Count of Books: 7 Total Price of Books: 330.

[B] Invoice without the pricing information. no, ID of book, title of the book, number of copies Show the grand total number of books at the bottom of the page.

1, 99, title1, 2 2, 169, title 2, 1 3, 345, title 3, 4 Total Count of Books: 7

[C] Visual Report

We will display the icon of each book. Below the icon, we will display the count of books.

We can show 5 (configurable number of books) books per row. And create a HTML of books with all the selected books.


Here is the overall goal.

Admins can print (A) and (C) to send it to the non-profit organization. Admins can print (B) and (C) to send it to schools along with the book shipment.