Results 1 to 2 of 2

Thread: Advice for Creating an Inventory Control Program Using C++

  1. #1

    Default Advice for Creating an Inventory Control Program Using C++

    Background: I work for a warehouse that interacts with a retail/salvage store. I am a nursing major, but am switching to either CS or CE and will graduate in around 3 years. I have been learning C++ for about 8 months, and have been studying and learning from & C++ Primer. I took a short break during those 8 months, and was introduced to HTML and JAVA.

    I have an opportunity to create an inventory program for the company I work for that they could actually use, although it wasn't requested of me. I see this as a great opportunity to add something noteworthy to my portfolio, and genuinely would like to create something helpful for the business.

    I went through most of, and I am having some difficulty starting the program. I have also looked through some open source inventory programs, but I am having a great deal of difficulty applying them to the needs of the program. I am seeking additional resources, advice, and links to topics that would help me create this program. I hope this post in no way comes off as a lack of diligence. I am honestly looking for direction and advice.

    Needs of the program:

    1) To be able to store information such as distributors/suppliers, locations, expiration dates, cost, retail value, and so on.

    2) Interact with a scanner to create/read a barcode that would contain this information. Interact with the printer to print stickers with the barcodes for certain boxes, and be able to "scan out" the item from active inventory, and then be placed into a inventory history database of some type. This part of the program seems particularly difficult with the understanding I have right now.

    3) Have a user interface that the retail store would work with the be able to create "Pick lists" or "lists", which would would automatically deduce inventory, create a list history, and create a printable list which would contain the location, the item description, the date the list as made, etc.

    Any resources, help, or advice would be greatly appreciated. There is more to the program than just these 3 needs... but I see these 3 postulates specifically hard for me to visualize in C++ code. We actually use a list right now that is purely Excel... and it has many drawbacks. I am amazed that Excel can do what it can, but I really see this as an opportunity to optimize the list with a new, updated program.

  2. #2
    Join Date
    Jan 2008
    Alameda, CA, USA
    Thanked 619 Times in 609 Posts
    Qt products
    Unix/X11 Windows Android

    Default Re: Advice for Creating an Inventory Control Program Using C++

    From your post it sounds like there is one warehouse and one retail store, and if you are currently using Excel, then this doesn't demand some fancy, real-time distributed inventory control system.

    You need to build a database back end, I think. SQLite sounds ideal; it's free and there are drivers in the stock Qt distribution so you don't have to build them yourself. I am sure it can accomodate the needs of your inventory - I use it to create a database of some 65 million chemical structures, nearly 400 GB in size, with great performance.

    Your system has two major parts: the inventory database and the interactions between various users and the database. You should design them separately, while keeping in mind the "use cases" for the database (e.g. warehouse needs like adding new distributors, adding new items, adding new units of existing items, etc. and retail needs such as you have described in 3) above).

    So for your database, you will need to decide which tables you need. You might be able to easily map this from your Excel design - if you have a sheet for Distributors, this maps to the Distributors table in the database. You'll need a Products table containing the description of each product (but not of individual instances of those products) that links back to the Distributors table. You'll keep the data that gets mapped to bar codes in this table. You may want a ProductCategory table (containing entries like "widget", "puppy", "kitten", "dump truck". etc.) so that each entry in the Products table could also have a link to its category to allow your users to easily and quickly search by category. You'll also want a ProductItems table, where the information about the actual individual items stored in the warehouse inventory is kept. The items in this table will have the location, date added, expiration date, cost, retail value, etc. as fields, since these could change on an item by item basis as new lots of a Product are purchased from distributors. You may want to have an additional table for your pick lists, as well as a field in your item table that contains its status (available, picked, delivered, discarded, etc.) to prevent an item from being picked twice or picked when it no longer exists. It would probably serve a useful purpose if items never got deleted from the items table, but just got marked as such when they went away. The items table needs a unique inventory control number for each item (its "primary key") so that it can be printed on the item's label and scanned as it moves from receiving to storage to picking to out the door. As pick lists are filled by the warehouse, this unique number assigns a specific instance of an item to the list.

    You can use freeware such as "DB Browser SQLite" to design your database and its tables. I found O'Reilly's "Using SQLite" by Jay Kreibich to be an easy to understand reference book.

    Once you have your database designed, then you'll need to lay out your use cases and design one or more GUI programs around them. You'll probably want an additional program or two that will read the CSV files from a dump of your Excel worksheets and use that to initially populate the database.

    You may want to write separate programs for use by the warehouse personnel vs. the retail personnel. Presumably it is the warehouse personnel who will have responsibility for maintaining the warehouse and its inventory and for delivering items upon request of the retail front end. They'll need read / write control of the inventory system. The retail front end needs mostly read-only access - they will be creating pick lists and reports but not actually modifying inventory. About the only write interaction will be when the item is handed over to the customer or boxed for shipment and needs to be marked as delivered.

    A scanner is nothing more than a fancy keyboard that converts a barcode into a string of characters. Your PC will accept input from it whenever it is activated and scans a barcode. So in your GUI, you position the cursor to the appropriate input line (QLineEdit), scan the code, and the text appears. There are low-cost barcode printers available that will print a barcode in any of the many formats. They just look like a printer to your PC.

    I presume that since you ask this in a Qt forum, you plan to use Qt for the GUI part (and could also use it for the database driver instead of the SQLite C interfaces). Good books for this are the new book by Witold Wysota and Lorenz Haas called "Qt5 Game Programming" or something like that (look it up on Amazon), which isn't really about game programming much at all, and the many examples and tutorials that come with the Qt distribution.

    I see this as a great opportunity to add something noteworthy to my portfolio
    If you can pull it off successfully, absolutely. Especially if that portfolio entry includes the fact that it is not just an academic project but something that is in active use in a real company.

    Good luck and have fun!
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Advice in creating a Book Organizer App
    By rdelgado in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2011, 21:27
  2. Advice needed - creating items
    By been_1990 in forum General Discussion
    Replies: 5
    Last Post: 3rd November 2010, 15:27
  3. Some advice on how to structure this program?
    By mrwooster in forum Newbie
    Replies: 13
    Last Post: 12th August 2009, 14:24
  4. Program crashes on creating new dialog
    By eekhoorn12 in forum Qt Programming
    Replies: 2
    Last Post: 11th June 2009, 11:52


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.