The following is the CowSystem ERP Module Diagram

ERPModuleDiagram

The functionality of a Order System is really depend how many difference order types that it can manage.  The more order type it manage, the more comprehesive of the system:  The following are the very common order type of an Order System should cover:
  • Normal Sales Order (SO) – Normal Sales Order
  • Consignment Order (CF, CI)
  • - Consignment Fill – base on customer request to fill the Consignment hub.  Although the stock is delivered to Customer but it is still owned by the company. 
  • - Consignment Issue – base on customer actual consumption list, issue the consignment issue order and bill the customer.
  • Free Sample Order (FS) – Free of charge sample order.
  • Quotation (QT) – Quotation Order
  • Sale Cash Order (SC) – Quick Order, Fast Order etc..  No need to pick the goods and can immediately issue the invoice.
  • Sales Forecast Order (SF) – very similar to normal sales order but these order type will be totally replaced by next batch of forecast
  • Goods Return Order (RT) – Due to whatever reason, the goods is returned back to the warehouse. 
  • Credit Note/Debit Note (DN, CN) for sales price adjustment
  • Transfer Order (TO) between Plants within one legal entity
  • Transfer Order (TI) between plants with two difference legal entities. Inter-company Sales Invoice will be issued.
  • Make-to-Order (MO),

CustomerOrderType

The following is the Order Processing Flow Overview of the CowSystem ERP:

  • Pre-Sales Activities – Process customer Inquiries, quotation and pricing
  • Sales Order Processing – Enter sales orders
  • Inventory Sourcing – Verify delivery dates and availability
  • Shipping – Deliver order (pick, pack and ship)
  • Billing – Bill outbound delivery
  • Payment – post payment
 Sales Order Process Overview
For Order Management System, we need know some basic feature of it:
  • Stanard Order Information – understand what information should contain within one customer order
  • Order Processing Flow – under the flow of business process within order processing, from start to end and their options provided.
  • Order Type classification – understand the what kind of order type that it can manage
  • Order Functions – within the order processing, what feature provided that automate and assit user to complete the order entry and order follow-up
 
Standard orders normally contain: 
  • Customer and material information
  • Pricing conditions for each item
  • Delivery dates and quantities
  • Shipping Information
  • Billing information
Basically, the Inventory System is the core of the SD system.  The following is the standard feature that provided by Inventory System of the CowSystem ERP:
  • Product Definition – user-defined product code, Product category, group and subgroup for classifications of a product
  • Lot Control – provide better Lot tracing flexibility.  This Lot Control should be defined in Item level as some items may not required this feature at all.
  • Shelf life definition – the system can calculate the Expiration Date if Expiration Date is not provided during goods receiving
  • FIFO, LIFO, by Expiration Date.  Whenever the goods is issued/delivered from the warehouse, the system should provide some algorithm selection how existing inventory being selected.  
  • Flexible Costing method : Standard Cost, Weighted Average Cost, Actual Cost, etc..
  • Stock Valuation – LIFO/FIFO/weighted average
  • Physical verifications of stock
 
Furthermore, the following is the standard inventory transaction in a company:
- Provide standard procedure for inventory transaction
  • Goods Receive – Purchase Order Receiving, Customer Goods Return Receiving, Shop Floor Order Receiving
  • Goods Issue – Customer Order Issue (should be disable if Customer Order Module is built),  
  • Stock Adjustment – Write-off, Opening Balance Input, Cycle Count, Physical Take, etc..
  • Stock Transfer – stock transfer between warehouses or within warehouse
 
The following is additional feature for an Inventory System
  • Multi-Company
  • Multi-Plant or Multi-Facility – Each plant or Facility can should have its own Item-related or Plant specific setup. 
  • Multiple warehouses/branches/regional offices
  • Enquiry Inventory in Lot/Warehouse/Company Levels 
  • Consolidation at any level of company hierarchy
  • Record all Inventory transaction (Stock In, Stock Out and Stock Adjustments) for better traceability.
  • Each Inventory transaction should be capable to post to G/L Module.
 
For a Sales and Distribution System, it can further divide into several module
  1. INV – Inventory System
  2. ORD – Customer Order System
  3. PUR – Purchasing Order System
  4. SAL – Sales Analysis System
  5. FOR – Sales Forecast System
  6. WHS – Warehouse Management System

THe following is the Module Relationship within SD of the CowSystem ERP:

SD-Overview

ERP means Enterprise Resource Planning System.  A system that is used to manage and coordinate all the resources, information, and functions of a business within a corporation.  The primary objective is to integrate most information system into one big system.  As it is integrated, it can provide better information sharing and data integrity than difference separate system.
 
Basically, a completed ERP should have  the following module that cover their business processes :
  1. SD – Sales and Distribution Management System
  2. FI – Financial System
  3. MG – Manufacturing System
  4. HR – Human Resource System
  5. PJ – Project Management System
  6. CR – Customer Relationship Management System

The following is the Module relationship of the CowSystemERP , a simple web-base ERP package that can be easily implemented for small-to-medium enterprise.

ERP-Overview

After practice so many feature of ASP.NET, the most used is still Gridview.  As I mentioned before, it is powerful and ease to use.  Even you are not a IT professional, you can built your own web application.  Of course, is it enough for a application to have only Gridview, it is other story.  But I think that once you master Gridview, you can explore other easily, such DetailView, ListView etc..
 
For me, I can classify the master file maintenance into 3 Category:.
  1. Basic. Very simple one.  Normally, there are some files within a system that having a very simple structure.  They have less than 10 fields.  Normally, they are coding master, such as Department Master, Delivery Term Master, Division Master, etc. As it is so simple, we can really use the basic Gridview for the file maintanence with Footer for Add function.
  2. Intermediate. For file having fields more than 10 to 30 fields.  As there are so many fields, it is not convenice to use the row base to input all required information. They need scroll to right to input additional fields.  So I prefer to use  Gridview for the initial screen for action selection and then DetailView for actual maintenance.  So far, I use to two separate program for each function, the records selected in Gridview will pass to DetailView to edit.  If user presss ‘Create’ button, it will go to DetailView and with insert screen.  The deletion is done in Gridview.
  3. Advance:  For file having fields more than 30 fields, the detailview is not so good also.  DetailView show one field per line, user need scroll down for additional fields.  So we can used FormView and paint the screen by myself.  We can use Tab to group certain similar information into one Tab screen.  It will look more professional.
It is so easy to create a simple file maintanance Web program by using Gridview.  However, in case that our key fields are also allowed to be changed, we need take care the old value of the key field so that we can base on the old key fields to update the file.
in Gridview, there are several handling to get this old value of the keys.
1. The most simple is that you define the “OldValueParametFormatString” keyword in asp:SQLDataSource section.
    <asp:SqlDataSource ID=”SqlDataSource1″ runat=”server”
            OldValuesParameterFormatString=”original_{0}”
    After this definition, you can simply using the Original_ItemCode (keyfield) to update your records in UpdateCommand.
    UpdateCommand=”UPDATE ItemMast set ItemCode=@ItemCode, ItemDescription=@ItemDescription WHERE ItemCode=@Original_ItemCode
2. Manual define one hiden field in Gridview that bind the Keyfield.  Then you can use this hiden field as Original Value of the key fields
3. In RowUpdating routine, you can use e.Key(0) to get the old value of the first key field. Maybe it is more simple to have a look of my sub-routine as follow:

   Sub GridView_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles GridView1.RowUpdating
        Dim result As Boolean = False
        Dim oldKey As String
        Dim newKey As String

        oldKey = e.Keys(0)
        newKey = e.NewValues(0)

        If oldKey <> newKey Then
            If ValidateKey(newKey) Then
                result = True
            Else
                result = False
                e.Cancel = “True”
                Exit Sub
            End If
            ‘Return result
        End If

    End Sub 

So far, I do not know how to get old value of Key fields in CustomValidator sub-routine.  So I normally, write the actual validation routine within RowUpdating.  If validation fails, it will stop the update process by setting e.Canel=”True”

I had created one GridView – Simple File Maintenance.  It works fine with all standard feature of Gridview provided.  Without any programming in VB, I am happy with this simple web program.  In this simple program, I had create one Footer row to accept new record.  Some fields can be prompt by defining DropDownList in aspx as follow:
                        <asp:DropDownList ID=”TypeDDL” runat=”server” DataSourceID=”stdCode2″ DataTextField=”Code”
                            DataValueField=”Code” SelectedValue=’<%# Bind(“Type”) %>’>
                        </asp:DropDownList>
                        <asp:SqlDataSource ID=”stdCode2″ runat=”server” ConnectionString=”<%$                      ConnectionStrings:CowSystemConnectionString %>”
                            SelectCommand=”SELECT [Code] FROM [CodeMast] WHERE [Prefix]= ‘TYPE’ ORDER BY Code “>
                        </asp:SqlDataSource>
But when I copy this set of statement into Edit template, it always prompt me the caption error when I click the ‘Edit’ button.
It is very strange for me as the set of code is proven when I used it in Footer Template.  The value should be well defined in CodeMast.  I only re-edit the created records.  As normal, some program bugs cannot be resolved when you are rush.  I put it aside and let the program with out any DropDownList.  It is ok.  Then I re-visit this program week by week.  At last, I found the problem. 
 
It is very clear that it is not the program code problem.  After my study, it is the database problem.  The field that I defined in this file is 4 Char.  But the CodeMast, it is a very general Coding, the field length is 10 Char.  In the Insert mode, Footer Row with Add function, it is no problem to retrieive the value from the CodeMast and build the DDL.  In the Insertion time, SQL will not check the length of the fields as far as both are the same type.  So I can create one new records.  However, when I edit the Master File, the fields with 4 char and match with DropDownList with. It fails for this alignment.
 
So we need take care the field length of the field should match fields defined in DDL.

Next Page »