sarojaramkumar
Technical User
Hello, i am using the below code, It is working find with my system windows 7, sql express..
but not adding the shipment charges in server environment..
i am checking the same MISC.CHARGES ALREADY EXISTS. if the same misc.charges code is not available, then i am adding the line.
could anybody help please?
'----------------------------------------------------
Dim SFILTER5 As String
Dim Count As Integer
Count = 0
SFILTER5 = ""
SFILTER5 = "ORDUNIQ =" & """" & dsOEORDH.Fields("ORDUNIQ").Value & """" & ""
adsOEORDD.Browse SFILTER5, True
Do While adsOEORDD.Fetch
Dim i As Integer
If dsOEORDD.Fields("LINETYPE").Value = 2 And dsOEORDD.Fields("MISCCHARGE").Value = "SHIPNG" Then
Count = Count + 1
Else
'-----------
End If
Loop
MsgBox ("checked for MISC.CHARGES count SHIPNG, " & Count)
If Count = 0 Then
Dim iLINE As Integer
adsOEORDD.RecordClear
adsOEORDD.GoBottom
iLINE = adsOEORDD.Fields("LINENUM")
adsOEORDD.RecordGenerate (False)
With adsOEORDD
.Fields("LINETYPE").Value = 2
.Fields("MISCCHARGE").Value = "SHIPNG"
.Fields("DESC").Value = "SHIPPING CHARGES"
.Fields("EXTINVMISC").Value = 0
.Process
.Insert
End With
End If
'--------------------------------------------------
Thanks
Sarora
but not adding the shipment charges in server environment..
i am checking the same MISC.CHARGES ALREADY EXISTS. if the same misc.charges code is not available, then i am adding the line.
could anybody help please?
'----------------------------------------------------
Dim SFILTER5 As String
Dim Count As Integer
Count = 0
SFILTER5 = ""
SFILTER5 = "ORDUNIQ =" & """" & dsOEORDH.Fields("ORDUNIQ").Value & """" & ""
adsOEORDD.Browse SFILTER5, True
Do While adsOEORDD.Fetch
Dim i As Integer
If dsOEORDD.Fields("LINETYPE").Value = 2 And dsOEORDD.Fields("MISCCHARGE").Value = "SHIPNG" Then
Count = Count + 1
Else
'-----------
End If
Loop
MsgBox ("checked for MISC.CHARGES count SHIPNG, " & Count)
If Count = 0 Then
Dim iLINE As Integer
adsOEORDD.RecordClear
adsOEORDD.GoBottom
iLINE = adsOEORDD.Fields("LINENUM")
adsOEORDD.RecordGenerate (False)
With adsOEORDD
.Fields("LINETYPE").Value = 2
.Fields("MISCCHARGE").Value = "SHIPNG"
.Fields("DESC").Value = "SHIPPING CHARGES"
.Fields("EXTINVMISC").Value = 0
.Process
.Insert
End With
End If
'--------------------------------------------------
Thanks
Sarora