- mejora en registro de venta ecommerce
This commit is contained in:
@@ -384,8 +384,13 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
CveMoneda = 1
|
CveMoneda = 1
|
||||||
Descuento = 0
|
Descuento = 0
|
||||||
MsgLog.AppendLine("1.3 billing")
|
MsgLog.AppendLine("1.3 billing")
|
||||||
Dim RFC As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString())
|
Dim RFC As String = ""
|
||||||
Dim NombreCliente As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString())
|
Dim NombreCliente As String = ""
|
||||||
|
If JsonRequest("billing") IsNot Nothing Then
|
||||||
|
RFC = JsonRequest("billing").First("first_name").ToString()
|
||||||
|
NombreCliente = JsonRequest("billing").First("first_name").ToString() & " " & JsonRequest("billing").First("last_name").ToString()
|
||||||
|
End If
|
||||||
|
|
||||||
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
|
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
|
||||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
|
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -401,16 +406,16 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
MsgLog.AppendLine("1.5 crear cliente")
|
MsgLog.AppendLine("1.5 crear cliente")
|
||||||
If JsonRequest("billing") IsNot Nothing Then
|
If JsonRequest("billing") IsNot Nothing Then
|
||||||
Dim CveEstado As Integer = -1
|
Dim CveEstado As Integer = -1
|
||||||
Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
|
Dim Direccion As String = If(JsonRequest("billing").First("address_1") Is Nothing, "", JsonRequest("billing").First("address_1").ToString())
|
||||||
Dim NumExt As String = ""
|
Dim NumExt As String = ""
|
||||||
Dim NumInt As String = ""
|
Dim NumInt As String = ""
|
||||||
Dim Colonia As String = ""
|
Dim Colonia As String = ""
|
||||||
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
Dim Ciudad As String = If(JsonRequest("billing").First("city") Is Nothing, "", JsonRequest("billing").First("city").ToString())
|
||||||
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
Dim Localidad As String = If(JsonRequest("billing").First("city") Is Nothing, "", JsonRequest("billing").First("city").ToString())
|
||||||
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
|
Dim CP As String = If(JsonRequest("billing").First("postcode") Is Nothing, "", JsonRequest("billing").First("postcode").ToString())
|
||||||
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
|
Dim Telefono As String = If(JsonRequest("billing").First("phone") Is Nothing, "", JsonRequest("billing").First("phone").ToString())
|
||||||
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
|
Dim Correo As String = If(JsonRequest("billing").First("email") Is Nothing, "", JsonRequest("billing").First("email").ToString())
|
||||||
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
|
Dim Estado As String = If(JsonRequest("billing").First("state") Is Nothing, "", JsonRequest("billing").First("state").ToString())
|
||||||
If Not String.IsNullOrEmpty(Estado) Then
|
If Not String.IsNullOrEmpty(Estado) Then
|
||||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||||
|
|||||||
Reference in New Issue
Block a user