Title: My Inventory
Author: drago888
Published: <strong>October 6, 2016</strong>
Last modified: November 2, 2016

---

Search plugins

![](https://ps.w.org/my-inventory/assets/banner-772x250.jpg?rev=1509227)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/my-inventory/assets/icon-128x128.jpg?rev=1509227)

# My Inventory

 By [drago888](https://profiles.wordpress.org/drago888/)

[Download](https://downloads.wordpress.org/plugin/my-inventory.zip)

 * [Details](https://wordpress.org/plugins/my-inventory/#description)
 * [Reviews](https://wordpress.org/plugins/my-inventory/#reviews)
 *  [Installation](https://wordpress.org/plugins/my-inventory/#installation)
 * [Development](https://wordpress.org/plugins/my-inventory/#developers)

 [Support](https://wordpress.org/support/plugin/my-inventory/)

## Description

A simple Inventory management system that allows from 10-19 levels of UOM.

Eg. Carton <- Box <- Piece will be 3 levels of UOM.
 Meaning that 1 carton will 
contain X number of boxes and 1 box will contain Y number of piece.

Only tested for iribbon and ocin-lite themes.

**Plugin Dependencies :** WordPress Twitter Bootstrap (from iControlWP), Insert 
PHP

**Non WordPress plugin dependencies :** Bootstrap 3, Bootstrap select, JQuery Validation,
Bootstrap Datatables

Bootstrap shall be using version 3.

Below is a description of the functionality allowed for each user roles rights

_view\_inventory_ – can see/select from the inventory,

_stock\_mod\_inventory_ – can add/remove stocks from inventory

_create\_inventory_ – can create new inventory (this is only for txt table)

_mod\_inventory_ – can modify current inventory (this is only for txt table),

_delete\_inventory_ – can delete inventory (this is only for txt table),

_view\_inventory\_master_ – can see/select from any master tables (starts with @wp_@_myi\
_mst. note that @wp_@ is the wp table prefix)

_mod\_inventory\_master_ – can modify any of the mst tables,

_create\_inventory\_master_ – can create any of the mst tables,

_delete\_inventory\_master_ – can delete any of the mst tables,

_create\_user_ – can create a new user

_mod\_user_ – can modify the new user

_delete\_user_ – can delete the user. Note that user is not physically deleted in
wp_users tables. To physically delete, use wordpress dashboard users.
 please take
note that if physically deleting the user might break any past logs/transaction

_mod\_roles_ – can modify the roles for any users. Do not modify the administrator
as it will change the administrator role.

_view\_logs_ – can view the logs

_view\_reports_ – can view the reports

when enqueue css for child theme, remember to set priority to more than 99999 so
that it will load after the plugin

Take note when deleting plugin, all databases and wordpress roles created by the
plugin will be deleted. Thus ensure that all the users
 are not using any roles 
starting with myi. Only users that had their roles changed in the application will
have any chance of their wordpress role been changed.

When using ocin-lite theme, remember to change the submenu background color in css
to non white so that can see the wordings.

## Screenshots

[⌊Searchable Product List⌉⌊Searchable Product List⌉[

Searchable Product List

[⌊Store Manager Menu List⌉⌊Store Manager Menu List⌉[

Store Manager Menu List

[⌊Menu - User⌉⌊Menu - User⌉[

Menu – User

[⌊Menu - Master Setup -> Client⌉⌊Menu - Master Setup -> Client⌉[

Menu – Master Setup -> Client

[⌊Menu - Master Setup -> Product⌉⌊Menu - Master Setup -> Product⌉[

Menu – Master Setup -> Product

[⌊Menu - Master Setup -> Unit Of Measure (UOM)⌉⌊Menu - Master Setup -> Unit Of Measure(
UOM)⌉[

Menu – Master Setup -> Unit Of Measure (UOM)

[⌊Menu - Master Setup -> Category⌉⌊Menu - Master Setup -> Category⌉[

Menu – Master Setup -> Category

[⌊Menu - Master Setup -> Location⌉⌊Menu - Master Setup -> Location⌉[

Menu – Master Setup -> Location

[⌊Menu - Master Setup -> Product to Category Linkage⌉⌊Menu - Master Setup -> Product
to Category Linkage⌉[

Menu – Master Setup -> Product to Category Linkage

[⌊Menu - Master Setup -> Setup Product UOMs⌉⌊Menu - Master Setup -> Setup Product
UOMs⌉[

Menu – Master Setup -> Setup Product UOMs

[⌊Menu - Stocks⌉⌊Menu - Stocks⌉[

Menu – Stocks

[⌊Menu - Logs⌉⌊Menu - Logs⌉[

Menu – Logs

[⌊Menu - Reports⌉⌊Menu - Reports⌉[

Menu – Reports

[⌊Stock Count Reports selection⌉⌊Stock Count Reports selection⌉[

Stock Count Reports selection

## Installation

Download the zip file and unzip into your wordpress wp-content/plugins directory.

Go to the wordpress dashboard (plugins) and activate it.

## FAQ

  How do I enable storing other languages in database when upgrading from v1.0.7?(
fresh install of v1.0.8 onwards already support utf8mb4)

 * Backup your database (just in case)
 * rename myi-inventory/assets/delete_tables.sql to myi-inventory/assets/delete_tables_prod.
   sql
 * rename myi-inventory/assets/convert_utf8.sql to myi-inventory/assets/delete_tables.
   sql
 * deactivate this plugin and reactivate it
 * rename myi-inventory/assets/delete_tables.sql to myi-inventory/assets/convert_utf8.
   sql
 * rename myi-inventory/assets/delete_tables_prod.sql to myi-inventory/assets/delete_tables.
   sql

  How do I change the default client_cd?

To change the default client_cd, go to myi-inventory/assets/setup_tables.sql and
modify the statement

INSERT INTO `@wp_@myi_mst_client` (`client_id`, `client_cd`, `client_name`, `client_remark`,`
deleted`, `create_date`, `create_by_id`, `last_mod_date`, `last_mod_by_id`, `delete_date`,`
delete_by_id`)
 VALUES (NULL, ‘Default’, ‘Default’, NULL, 0, now(), @cur_user_id@,
now(), @cur_user_id@, NULL, NULL);

to

INSERT INTO `@wp_@myi_mst_client` (`client_id`, `client_cd`, `client_name`, `client_remark`,`
deleted`, `create_date`, `create_by_id`, `last_mod_date`, `last_mod_by_id`, `delete_date`,`
delete_by_id`)
 VALUES (NULL, ‘Name I want’, ‘Default’, NULL, 0, now(), @cur_user_id@,
now(), @cur_user_id@, NULL, NULL);

then rename myi-inventory/assets/delete_tables.sql to myi-inventory/assets/delete_tables_prod.
sql
 followed by rename myi-inventory/assets/delete_tables_dev.sql to myi-inventory/
assets/delete_tables.sql

Deactivate the plugin and then reactivate it.

Followed by the below to revert back (in case accidentally click on deactivate and
all tables deleted)

rename myi-inventory/assets/delete_tables.sql to myi-inventory/assets/delete_tables_dev.
sql
 rename myi-inventory/assets/delete_tables_prod.sql to myi-inventory/assets/
delete_tables.sql

  How do I get my theme css to take precedence over the css of the plugin?

For any themes css to take precedence over the plugin, set the priority of the theme
to higher than 99999.
 eg. // set priority to 999999 so that will load after plugin
add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’,999999 ); if ( ! function_exists(‘
my_theme_enqueue_styles’ ) ) { function my_theme_enqueue_styles() { wp_enqueue_style(‘
parent-style’, get_template_directory_uri() . ‘/style.css’ ); wp_enqueue_style( ‘
parent-style’, get_template_directory_uri() . ‘/style-rtl.css’ );

    ```
                $parent_style = 'parent-style';  
                 wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );  
                wp_enqueue_style( 'child-style',  
                    get_stylesheet_directory_uri() . '/style.css',  
                    array( $parent_style )  
                );  
        }  
    } 
    ```

  Can I transfer the same products into different packings?

So long as it is the same product with the same smallest UOM, you can transfer between
each other.

Eg. Product A have the below UOM Sets.

(1.) Box <- (X50) <- Packages

(2.) Box <- (X100) <- Packages

(3.) Box <- (X1000) <- Pieces

You can transfer between (1.) and (2.) as both have the same smallest UOM (Packages).

However, you can’t do it for (3.) In order to transfer from (1.) to (3.), you need
to add in the number of pieces per package for (1.)

  Why can’t I delete the product/UOM/Category etc?

Ensure that there are no longer any inventory for that product.
 Ensure that the
product/UOM/Category is no longer in use. (also not set in Prod UOM Setup).

  Hey!!! Some codes in this plugin belongs to me

I try to give proper credit to all the Authors of my codes.
 However, at times (
especially when rushing dateline), I might have forgotten to give you proper credit.

Please forgive me and drop me an email at [ng.kock.leong@elinemm.com](https://wordpress.org/plugins/my-inventory/ng.kock.leong@elinemm.com?output_format=md)
indicating the function name and the author name.
 I will add into the codes the
proper author of the function.

  Who is the photographer for the plugin header (the warehouse photo)?

The photo belongs to [Ronnieb](https://morguefile.com/creative/ronnieb).
 You can
find the photo at [https://morguefile.com/search/morguefile/2/shelves/pop](https://morguefile.com/search/morguefile/2/shelves/pop).

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“My Inventory” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ drago888 ](https://profiles.wordpress.org/drago888/)

[Translate “My Inventory” into your language.](https://translate.wordpress.org/projects/wp-plugins/my-inventory)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/my-inventory/), check
out the [SVN repository](https://plugins.svn.wordpress.org/my-inventory/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/my-inventory/) by
[RSS](https://plugins.trac.wordpress.org/log/my-inventory/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.9

 * change mysql tables to use utf84mb so that can store other languages. (See FAQ
   for how to do it)

#### 1.0.7

 * add in codes to create primary menu for current theme if it does not exists.

#### 1.0.6

 * add in handling of @ignore@ tag for sql files. This tag will not raise any error
   for this statement and if this statement fails, next statement will not raise
   any errors. Meant to be used for the CREATE TABLE command before the ALTER TABLE
   command. Needed so that reactivation will not raise error but first run will 
   raise error if SQL failed.

#### 1.0.5

 * Modify the codes to use @new_command@ to determine a new command instead of using
   line breaks which are not working consistently.

#### 1.0.4

 * Add in codes to throw error when the processing of the sql files failed. (eg 
   tables or functions not created)
 * Change the function that process sql statement to treat ; followed by 4 line 
   breaks to treat as new command as WP SVN will alter the sql files and insert 
   additional linebreaks

#### 1.0.3

 * update readme.txt to correct some incorrect wordings and change Requires at least.
 * add in the screenshots

#### 1.0.2

 * Prefix myi to all functions
 * change plugin class from my_inventory_plugin to myi_inventory_plugin to standardise
   all prefixes as myi
 * add namespace for everything. Everything shall be at least \my_inventory namespace
 * throw error if functions/classes already exists for same namespace and classes/
   functions. This is to prevent other plugins breaking this plugin.
 * change all path to use plugins_dir_path
 * move all the functions to external files
 * rename function pippin_get_image_id to myi_get_image_id
 * rename function remove_admin_bar to myi_remove_admin_bar
 * rename and move function km_get_user_role to myi_get_user_role and move to myi_main_unused_functions.
   php files
 * remove the codes for the previous wordpress user roles which are no longer in
   use
 * change all path with wp-content to use plugin_dir_url( **FILE** ) instead

#### 1.0.1

 * Add in member-account page if not exists

#### 1.0

 * Initial rollout

## Meta

 *  Version **1.0.9**
 *  Last updated **10 years ago**
 *  Active installations **Fewer than 10**
 *  Tested up to **4.6.30**
 * Tags
 * [Free](https://wordpress.org/plugins/tags/free/)[inventory](https://wordpress.org/plugins/tags/inventory/)
 *  [Advanced View](https://wordpress.org/plugins/my-inventory/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/my-inventory/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/my-inventory/reviews/)

## Contributors

 *   [ drago888 ](https://profiles.wordpress.org/drago888/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/my-inventory/)