Welcome, Guest. Please Login.
05/15/25 at 13:19:30
News:
Home Help Search Login


Pages: 1
Send Topic Print
IMPORTING SALES ORDERS (Read 1054 times)
carolg
Full Member
***


I Love EvoERP!

Posts: 169
Gender: female
IMPORTING SALES ORDERS
10/31/12 at 10:44:56
 
We have to prepare a sales order with about 100 lines.  Any way we can put it into a spreadsheet and import it?
Back to top
 
 
  IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 784
Gender: male
Re: IMPORTING SALES ORDERS
Reply #1 - 10/31/12 at 12:59:33
 
Are you planning to import SO data on a regular basis? or it is a one time thing
 
 Huh
 
Kelloggs
 
PD: that post is from 2009!!!
 
http://www.istechforum.com/YaBB.pl?num=1249917161/2#2
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
carolg
Full Member
***


I Love EvoERP!

Posts: 169
Gender: female
Re: IMPORTING SALES ORDERS
Reply #2 - 11/01/12 at 12:19:20
 
I'm hoping this is a one time occurrence but may want to use it in the future
Back to top
 
 
  IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 784
Gender: male
Re: IMPORTING SALES ORDERS
Reply #3 - 11/02/12 at 11:18:19
 
I can create a ms excel app that would do it.
 
Let me know if you interested.
 
 Cool
 
Kelloggs
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
carolg
Full Member
***


I Love EvoERP!

Posts: 169
Gender: female
Re: IMPORTING SALES ORDERS
Reply #4 - 11/02/12 at 11:27:19
 
Thanks. Good to know.
Back to top
 
 
  IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 784
Gender: male
Re: IMPORTING SALES ORDERS
Reply #5 - 11/02/12 at 11:56:36
 
With a little bit of imagination it can be done. Example
This will validate  your "Parts" before attempting  to export your data to DBA. You should change the ODBC Name, Sheet Name and Range.
 
 Tongue
 
Option Explicit
Public var_sql As String
Public Response As Integer
Public conn As New ADODB.Connection
Public rs As New ADODB.Recordset
Public cmd As New ADODB.Command
 
Public Sub USE_IT_TO_TEST()
    'Test Run
    MsgBox validate_sku
End Sub
 
Public Function validate_sku() As Boolean
Dim rng As Range
Dim row As Range
Dim cell As Range
 
Set rng = Sheets("Main").Range("C5:C100") 'CHANGE HERE
 
For Each row In rng.Rows
  For Each cell In row.Cells
    
        If row.Value <> "" Then
            var_sql = "SELECT Count(*) as CC FROM BKICMSTR WHERE BKIC_PROD_CODE='" & row.Value & "'"
            If tc_tf(var_sql) = False Then
                validate_sku = False
                Response = MsgBox("Unable to Find SKU on DBA. ", vbCritical, " Saturn")
                Exit Function
            End If
            'All entries on Sheet Are valid
            validate_sku = True
        End If
        validate_sku = True
  Next cell
Next row
End Function
 
Public Function tc_tf(the_sql As String) As Boolean
conn.CursorLocation = adUseClient
conn.Open "provider=MSDASQL;dsn=" & "DBA"  'CHANGE HERE
rs.Open the_sql, conn, adOpenStatic
    
If rs("CC") <> 0 Then
    tc_tf = True
Else
    tc_tf = False
End If
    
rs.Close
conn.Close
End Function
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
Pages: 1
Send Topic Print