Production Cost Calculation Program

advertisement
PRODUCTION COST CALCULATION
PROGRAM

FOR THE CENTER OF VOCATIONAL BUILDING TECHNOLOGIES
BY JUSTIN GROOMS
Table of Contents
Introduction ......................................................................................................... 3
Time for Change.................................................................................................. 3
Designing the Database ..................................................................................... 3
Future Work ......................................................................................................... 7
Conclusion .......................................................................................................... 7
Appendix A – Original Scope ............................................................................. 8
Appendix B – Updated Scope ............................................................................ 9
Works Cited ....................................................................................................... 10
Table of Figures
Figure 1 - Production Cost Database ER Diagram ........................................... 4
Figure 2 - Production Cost Form: Total Costs ................................................. 5
Figure 3 - Production Cost Form: Fixed Costs................................................. 6
Figure 4 - Production Cost From: Variable Costs ............................................ 5
Figure 5 - Production Cost Form: Retail, Wholesale, & Tax ............................ 6
Introduction
The Center for Vocational Building Technology (CVBT) was founded in 1991 to
create new employment in Northeastern Thailand by promoting small-scale
manufacture of building materials. These can replace imports to the region and
help reduce the migration of workers to Bangkok or foreign countries. The CVBT
designs tools, technologies, and products used for production and testing of
building materials.
Time for Change
The CVBT uses several production cost spreadsheets in supporting
management of production units, in feasibility studies and in setting the prices for
villagers’ products. The spreadsheets have evolved over the years and have
become very sophisticated and complicated. The CVBT would like to change
most of the spreadsheets to databases and to have a user-friendly menu-driven
tool for the CVBT and others to use.
A few reasons to make the transition to a database follow. First, it produces
information as you want it, allowing you to have consistent information for all to
access and share. Second, a database saves time and money as inputting data
costs both. A third reason is that it gives the user a competitive edge by allowing
them to be effective when it comes to time and resources, ultimately influencing
success.
While working on this project, the scope itself changed due to several
circumstances, such as complications with the spreadsheets, time, and
resources; availability for the database program used, R:base, was only limited to
45 days as an evaluation version. For the original and updated scope, see
Appendix I and II. Further development of the database is to be completed in the
months following completion of the work stated in the updated scope.
Designing the Database
The first step to creating the database involved brainstorming about which tables
from the spreadsheets were actually needed. Furthermore, it was necessary to
develop what is called an entity-relationship diagram as show in Figure 1. The
ER diagram shows how each used table is related to the others. Rectangles in
the ER diagram represent entities, or what could be considered nouns, while
diamonds represent the relationship between two or more entities. Both entities
and relationships have what are called attributes, which make up the actual data
columns in a table. Not all relationship tables are needed however. For
example, a product group can incur many individual capital costs for production,
and a certain capital cost can be assigned to many of the product groups. This
created what is called a many-to-many relationship. If the relationship is
anything other than a many-to-many, a relationship table is not needed; this is
shown in the figure as a green diamond. For the interim, extra tables were
created to store needed values, instead of having them calculated from original
tables created from the spreadsheets, and thusly, not all tables are shown in the
ER diagram, and not all tables in the ER diagram are used in calculating costs.
Figure 1 - Production Cost Database ER Diagram
The next step was to import the tables, at that time in the form of spreadsheets,
into R:base. Figure 2 shows the “products” table, which contains information
such as overall product group, English and Thai product name, and mix number,
as well as several other attributes. It was important to carefully and uniquely
define the column names so that R:base can link common columns in multiple
tables. An example of this for the table in Figure 2 is the “Overall Name” column.
In order to link the information from the “Product Group” table to individual
products, the “Products” table as well as the “Product Group” table had to have a
common column entitled “Overall Name.”
Figure 2 - Products Table
With the relationships defined, and the tables imported, it was now possible to
actually start designing the functional aspects of the database, using what are
called forms, and reports. For the main part of the updated scope, calculating
production costs for individual products, a form was used. The function of this
form was for the user to choose an overall product group, one of four. Next, the
user would pick a product from another menu, now populated only with products
under the category selected in the previous step. Finally, the user would select a
color for the product model. After the “Calculate Now!” button is pressed, there
are several options in the form of viewing tabs. First, the user could view for the
product selected the total variable costs, total fixed costs, total production costs,
and total profit as shown in Figure 3. Second and third, the user could view an
itemized list of all fixed and variable costs, respectively in Figures 4 and 5. Lastly,
the user could view wholesale and retail prices along with tax amounts. Shown
in Figure 6.
Figure 3 - Production Cost Form: Total Costs
Figure 4 - Production Cost From: Fixed Costs
Figure 5 - Production Cost Form: Variable
Costs
Figure 5 - Production Cost Form: Retail,
Wholesale, & Tax
In order to calculate the values to populate the value fields, command codes
needed to be written to pull the data pertaining to the correct model and color
from the tables. The most important of these commands for getting the fixed
costs was based on engineering economics. Using the payment function, it was
possible to calculate the periodic payment needed to pay off a present value,
based on the periodic interest rate, and the number of compounding years. For
the rest of the calculations, much more simple functions were written and used,
by pulling data from the tables and manipulating them using basic mathematic
operators.
Following the creation of the production cost form, several other forms and
reports were created used for verifying and printing data in certain tables.
Ultimately, the database was designed to be menu-driven and user friendly. To
make it so, the final step was to create an application that could be used by
essentially anyone. Figure 7 below shows an image of the final application.
Along the top of the window, menus are placed by category allowing the user to
select several things. Again, the most important of the choices is the first one,
entitled “Production Costs” which when clicked, shows the production cost form
described previously. Similarly, there are menus to select the other forms and
reports for printing and verifying data.
Figure 6 - Application: Production Costs
Future Work
Since the original scope changed, the CVBT would like to further enhance the
functionality of the database in several ways including: economic analysis or all
products to determine cost breakdown, breakeven analysis, rate of return, and
payback period, as well as using a component program, R:charts, to create
graphs for the aforementioned enhancements.
Conclusion
In a few words, this project proved to be extremely difficult. This was mainly for
three reasons. First, previous experience using databases was very limited and
had having to learn a new program, while only having six weeks to do it, was
very challenging. Second, the program only works on PCs and having a Mac
made it necessary to rely solely on using other people’s computers in order to
complete the project. The final reason it proved to be as difficult as it was, is that
as stated earlier, the spreadsheets had become sophisticated and complicated,
and without having the director of the CVBT around to clarify certain aspects, it
was hard to make sense of them at times.
Overall however, after nearly 100 hours, a completed product was created that
accomplishes the goals mentioned in the updated scope. With this, it was
beneficial for a couple reasons. One was that it allowed for a gain in experience
with another program commonly used in industry. Second it was a good
refresher for some previous course work that might have otherwise gone
forgotten. Finally, it was good to work on a project that did in fact present so
many challenges, as nothing in the real world works so smoothly. Ultimately, this
program will hopefully prove to be very beneficial by adding value to the CVBT.
Appendix A – Original Scope
Design Goals:









User-friendly
Multi-language capability, initially Thai-English
Calculates production cost
Reports
o Production Cost Break Down
 Annually
 Monthly
 By piece
 Percent
o Recommended Selling Prices
o Raw material cost trends
Graphs:
o Cost Break Down (usually a pie chart)
o Break Even (showing both in pieces and in time)
o Pay-back period versus Production Capacity usage
o Rate of Return versus Production Capacity usage
Integrate with existing CVBT database
o Allow for future expansion including
 Production and qa recording and reporting
 Inventory
 Payroll
Rbase Database based
o Customized help
o Includes graphics/pictures of villagers products and raw materials
Economical Runtime version for distribution with Rbase license
Beautiful, fun to use
Output Goals:



Menu Driven Program zipped on CD
Relational Database
Program Documentation in hardcopy and pdf format.
o Includes flow charts
o Includes commented copy of any program code.
Appendix B – Updated Scope
Create an application, which includes



Input forms for at least the Product and Commodity tables.
A way to handle cost model data (i.e., % down, interest rate, loan period,
etc.)
Reports:
o Products (just to check input)
o Commodities (just to check input)
o Production
 A basic list of inputs (similar to the input "page" of the Excel
program).
 An itemized list of Fixed and Variable costs per slab.
 All reports can be done in English language only for the
interim.
 The production cost Report works for at least one product.
The sample I suggest is a plain (cement gray) paving slab of
Quadrant pattern. This will prove your report works while
keeping you from having to chase down and verify lots of
data. You'll only need to have one mix loaded correctly in
your mix Table and one Product loaded correctly in your
product table. You can actually put the rest of the data in
another table for the interim
Works Cited
AQumen Solutions. (2001). Database Solutions by Design. Retrieved 6 1, 2009,
from AQSL Relational Databases:
http://www.aqumensolutions.com/RDBenefits.asp
R;Base Technologies. (n.d.). R:base help and available resources. Retrieved 5
2009, from
http://razzakmemon.us/ste/pdf/RBASEHelpAndAvailableResources.pdf?FromTh
eEdgePage=2
Download