Results 1 to 9 of 9

Thread: inventory sms system

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    inventory sms system

    hi, how to make an very simple inventory

    this is the screenshots



    now if the Amt Loaded receive P26.00 in the income will appear P4.00

    then schem

    Amt Loaded / Income

    P26.00 / P4.00
    P52.00 / P8.00
    P100.00 / P15.00
    P200.00 / P0.00
    P300.00 / P10.00
    P500.00 / P0.00
    P1000.00 / P0.00
    i want only to compute the INCOME

    daily/monthly/yearly

    the code for listview is

    VB Code:
    1. Sub LoadListView(strPath As String, SettingsList As ListView)
    2.  
    3.  Dim s1              As String
    4.        
    5.    SettingsList.ListItems.Clear
    6.        
    7.       Dim fso As New FileSystemObject, tso As TextStream
    8.        
    9.         Set tso = fso.OpenTextFile(strPath)
    10.          
    11.         Do While Not tso.AtEndOfStream
    12.             s1 = tso.ReadLine
    13.             SettingsList.ListItems.Add , , s1
    14.         Loop
    15.        
    16.         tso.Close
    17.    End Sub

    VB Code:
    1. Dim i               As Long
    2.         Dim strData()       As String
    3.        
    4.         Call LoadListView(App.Path & "\ReadELoadMessages", lstRawData)
    5.         DoEvents
    6.        
    7.         lstRawData.ListItems.Remove 1
    8.         lstRawData.ListItems.Remove 1
    9.         DoEvents
    10.        
    11.         If lstRawData.ListItems.Count >= 10 Then
    12.             For i = 10 To lstRawData.ListItems.Count Step 11
    13.                 If InStr(lstRawData.ListItems.Item(i).Text, "Unable to process transaction") = 0 Then
    14.                     If InStr(lstRawData.ListItems.Item(i).Text, ":") <> 0 Then
    15.                         strData = Split(lstRawData.ListItems.Item(i), ":")
    16.                        
    17.                         lstData.ListItems.Add , , strData(0)
    18.                         lstData.ListItems.Item(lstData.ListItems.Count).ListSubItems.Add , , Mid$(strData(1), InStr(strData(1), " to ") + 4, InStrRev(strData(1), ".") - InStr(strData(1), " to ") - 4)
    19.                         lstData.ListItems.Item(lstData.ListItems.Count).ListSubItems.Add , , Mid$(strData(1), InStr(strData(1), "(") + 1, InStrRev(strData(1), ")") - InStr(strData(1), "(") - 1)
    20.                         lstData.ListItems.Item(lstData.ListItems.Count).ListSubItems.Add , , strData(3)
    21.                         lstData.ListItems.Item(lstData.ListItems.Count).ListSubItems.Add , , Left$(strData(2), InStrRev(strData(2), ".") - 1)
    22.                     End If
    23.                 End If
    24.             Next i
    25.         End If
    Last edited by nokmaster; Sep 30th, 2005 at 09:28 PM.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: inventory sms system

    What is the question?

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: inventory sms system

    dglienna:
    Quote Originally Posted by nokmaster
    hi, how to make an very simple inventory
    So go and teach him...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: inventory sms system

    @dglienna

    the question is how to compute and then if the Amt Loaded Receive P26.00 the Income Should P4.00 and so on... u will see the schem...

    i want to compute the DAILY/MONTHLY/YEARLY Income

    and of course to have an database...

    thanks a lot...

  5. #5
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: inventory sms system

    1st... you should try to distinguish even a bit between storing data, processing data and displaying data or a 3 tier design approach ESPECIALLY with accounting related apps, makes modifications/updates later on easier. Doing computations in the GUI should be a last resort.

    With a good DB design and knowledge on SQL query this task will become more manageable. You can easily extract the daily/monthly/yearly info from one or several tables and easily create reports with existing objects/OCXs/etc.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: inventory sms system

    @leinad31

    thanks for replying...

    could write some sample?

    thanks...

  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: inventory sms system

    You should also use numbers for calculations. P4.00 doesn't make sense to a computer as a currency amount. You could use a select case statement to calculate 'income'

    VB Code:
    1. select case AmtLoaded
    2. case 0 to 26
    3.   profit = 4
    4. case 27 to 52
    5.   profilt = 8
    6. case 53 to 100
    7.   profit = 15
    8. case 100-200
    9.   profit = 0
    10. case 200 to 300
    11.   profit = 10
    12. end select

    except that I don't understand your breakdown. at first it looked like you were using ranges, except that they started going down...

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: inventory sms system

    @dglienna

    i got an error with

    AmtLoader
    it says not Variable Not Defined

  9. #9
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: inventory sms system

    Quote Originally Posted by nokmaster
    @leinad31

    thanks for replying...

    could write some sample?

    thanks...
    The topic is too broad to cover with one thread ^^

    Read up on it and ask more specific questions. Start with SQL queries just the basics, you'll then get a good idea for the design of the DB tables in line with your knowledge of SQL (one inventory data table, SQl for the different views/reports). GUI module should be just that, transferring/formatting data from a DB or an inbetween data store for display to the user.

    Avoid data bound controls or anything similar... its a nightmare to update. Any changes to the DB struct would require a code update all the way to the GUI just to avoid run time errors. Any changes/errors in computation are hard to track down since its sandwhiched in GUI and data layer code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width