Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -321,7 +321,8 @@ Public Class ClsContratos
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "",
|
||||
Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1) As Integer
|
||||
Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "",
|
||||
Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveAF As Integer = -1) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Con_ContratosAdd")
|
||||
@@ -378,7 +379,8 @@ Public Class ClsContratos
|
||||
.Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion
|
||||
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -1795,6 +1795,7 @@ Public Class ClsVentas
|
||||
Optional ServicioDomicilio As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPS")
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
@@ -1850,6 +1851,7 @@ Public Class ClsVentas
|
||||
Optional CveClasificacion2 As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional ServicioDomicilio As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPSDetalle")
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
|
||||
266
Ashx/E119.ashx
266
Ashx/E119.ashx
@@ -427,36 +427,79 @@ Public Class E119 : Implements IHttpHandler
|
||||
If Not String.IsNullOrEmpty(UsoCFDI) Then
|
||||
CveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI().FiltroPrimeroValor("CveUsoCFDI", $"UsoCFDI = '{UsoCFDI.Trim}'").ToEntero()
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existe cliente definido")
|
||||
End If
|
||||
|
||||
'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.DtResultados.Rows.Count > 0 Then
|
||||
'Resp.TieneError = False
|
||||
CveCliente = ObjClientes.CveCliente
|
||||
'Resp.Mensajes.Add("El RFC ya existe en el sistema")
|
||||
If Not TieneError Then
|
||||
|
||||
|
||||
'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.DtResultados.Rows.Count > 0 Then
|
||||
'Resp.TieneError = False
|
||||
CveCliente = ObjClientes.CveCliente
|
||||
'Resp.Mensajes.Add("El RFC ya existe en el sistema")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
MsgLog.AppendLine("1.4 verificar cliente")
|
||||
MsgLog.AppendLine("1.4 verificar cliente.")
|
||||
|
||||
|
||||
If CveCliente = 0 Then
|
||||
' 'DATOS DE BILLING
|
||||
MsgLog.AppendLine("1.5 crear cliente")
|
||||
If JsonRequest("billing") IsNot Nothing Then
|
||||
If CveCliente = 0 Then
|
||||
' 'DATOS DE BILLING
|
||||
MsgLog.AppendLine("1.5 crear cliente")
|
||||
If JsonRequest("billing") IsNot Nothing Then
|
||||
Dim CveEstado As Integer = -1
|
||||
Dim CveRegimenFiscal As Integer = -1
|
||||
|
||||
Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
|
||||
Dim NumExt As String = ""
|
||||
Dim NumInt As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
|
||||
If Not String.IsNullOrEmpty(Estado) Then
|
||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||
CveEstado = 26
|
||||
End If
|
||||
Else
|
||||
CveEstado = 26
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(RegimenCliente) Then
|
||||
CveRegimenFiscal = ClsPaginas.GlobalDTRegimenesFiscales().FiltroPrimeroValor("CveRegimenFiscal", $"CodigoRegimenFiscal = '{RegimenCliente.Trim}'").ToEntero()
|
||||
End If
|
||||
|
||||
If ObjClientes.AgregarClienteNoFrecuente(NombreCliente, Direccion, NumExt, NumInt, Colonia, Localidad, Ciudad, CveEstado, RFC, CP, Telefono, Correo, CveSubProyecto, CveUsuario, CveEmpresa, "", -1, -1, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
CveCliente = ObjClientes.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||
MsgLog.AppendLine("1.5.5 cliente creado")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgLog.AppendLine("1.5.9 sin datos cliente")
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existen datos del cliente.")
|
||||
End If
|
||||
|
||||
End If
|
||||
If JsonRequest("shipping") IsNot Nothing AndAlso Not TieneError Then
|
||||
Dim CveEstado As Integer = -1
|
||||
Dim CveRegimenFiscal 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("shipping")("address_1") Is Nothing, "", JsonRequest("shipping")("address_1").ToString())
|
||||
Dim NumExt As String = ""
|
||||
Dim NumInt As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
|
||||
Dim Ciudad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("shipping")("postcode") Is Nothing, "", JsonRequest("shipping")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("shipping")("phone") Is Nothing, "", JsonRequest("shipping")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("shipping")("email") Is Nothing, "", JsonRequest("shipping")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("shipping")("state") Is Nothing, "", JsonRequest("shipping")("state").ToString())
|
||||
If Not String.IsNullOrEmpty(Estado) Then
|
||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||
@@ -465,137 +508,100 @@ Public Class E119 : Implements IHttpHandler
|
||||
Else
|
||||
CveEstado = 26
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(RegimenCliente) Then
|
||||
CveRegimenFiscal = ClsPaginas.GlobalDTRegimenesFiscales().FiltroPrimeroValor("CveRegimenFiscal", $"CodigoRegimenFiscal = '{RegimenCliente.Trim}'").ToEntero()
|
||||
End If
|
||||
|
||||
If ObjClientes.AgregarClienteNoFrecuente(NombreCliente, Direccion, NumExt, NumInt, Colonia, Localidad, Ciudad, CveEstado, RFC, CP, Telefono, Correo, CveSubProyecto, CveUsuario, CveEmpresa, "", -1, -1, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
CveCliente = ObjClientes.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||
MsgLog.AppendLine("1.5.5 cliente creado")
|
||||
If ObjClientes.DireccionEnvioGet(-1, CveCliente, -1) Then
|
||||
Dim dtt As DataTable = ObjClientes.DtResultados
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
dtt = dtt.FiltraParametros($"EnvioDireccion = '{Direccion}' and EnvioCP = '{CP}'")
|
||||
If dtt.Rows.Count > 0 Then
|
||||
CveDireccionEnvio = dtt.FiltroPrimeroValor("CveDireccionEnvio").ToEntero
|
||||
End If
|
||||
Else
|
||||
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, Direccion, NumExt, NumInt, Colonia, Ciudad, Estado, CP, "", 100, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgLog.AppendLine("1.5.9 sin datos cliente")
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existen datos del cliente")
|
||||
End If
|
||||
|
||||
End If
|
||||
If JsonRequest("shipping") IsNot Nothing AndAlso Not TieneError Then
|
||||
Dim CveEstado As Integer = -1
|
||||
Dim Direccion As String = If(JsonRequest("shipping")("address_1") Is Nothing, "", JsonRequest("shipping")("address_1").ToString())
|
||||
Dim NumExt As String = ""
|
||||
Dim NumInt As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim Ciudad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("shipping")("postcode") Is Nothing, "", JsonRequest("shipping")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("shipping")("phone") Is Nothing, "", JsonRequest("shipping")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("shipping")("email") Is Nothing, "", JsonRequest("shipping")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("shipping")("state") Is Nothing, "", JsonRequest("shipping")("state").ToString())
|
||||
If Not String.IsNullOrEmpty(Estado) Then
|
||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||
CveEstado = 26
|
||||
End If
|
||||
Else
|
||||
CveEstado = 26
|
||||
MsgLog.AppendLine("1.6 inicio generar venta")
|
||||
ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem")
|
||||
MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no"))
|
||||
|
||||
If JsonRequest("shiping_lines") IsNot Nothing Then
|
||||
' shiping
|
||||
'shiping_lines/ method_id: free_shipping/local_pickup
|
||||
Dim Entrega As String = If(JsonRequest("shiping_lines")("method_id") Is Nothing, "", JsonRequest("shiping_lines")("method_id").ToString())
|
||||
ObjFactura.Alfa1 = Entrega
|
||||
End If
|
||||
|
||||
If ObjClientes.DireccionEnvioGet(-1, CveCliente, -1) Then
|
||||
Dim dtt As DataTable = ObjClientes.DtResultados
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
dtt = dtt.FiltraParametros($"EnvioDireccion = '{Direccion}' and EnvioCP = '{CP}'")
|
||||
If dtt.Rows.Count > 0 Then
|
||||
CveDireccionEnvio = dtt.FiltroPrimeroValor("CveDireccionEnvio").ToEntero
|
||||
ObjFactura.CveDireccionEnvio = CveDireccionEnvio
|
||||
ObjFactura.CveVentaTerminal = IdEcommerce
|
||||
ObjFactura.CveUsoCFDI = CveUsoCFDI
|
||||
|
||||
If JsonRequest("line_items") IsNot Nothing Then
|
||||
Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())
|
||||
Dim Consec As Integer = 1
|
||||
MsgLog.AppendLine("1.6.1 recorrer ps")
|
||||
For Each JsonPS As JObject In ListaPS
|
||||
Cantidad = JsonPS("quantity").ToString.ToDecimal()
|
||||
PU = JsonPS("price").ToString.ToDecimal()
|
||||
CvePS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, Codigo:=JsonPS("sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
|
||||
|
||||
ObjFactura.AgregarPS(CvePS, Cantidad, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto)
|
||||
MsgLog.AppendLine("1.6.1 agregar ps a venta")
|
||||
''VALIDAR QUE SEA EL MISMO PRODUCTO
|
||||
If CvePS <= 0 Then
|
||||
TieneError = True
|
||||
'Retorno.Mensajes.Add(String.Format("No se encontró el producto: {0}", JsonPS("name").ToString()))
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, Direccion, NumExt, NumInt, Colonia, Ciudad, Estado, CP, "", 100, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgLog.AppendLine("1.5.9 sin datos cliente")
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existen datos del cliente")
|
||||
End If
|
||||
|
||||
MsgLog.AppendLine("1.6 inicio generar venta")
|
||||
ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem")
|
||||
MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no"))
|
||||
|
||||
If JsonRequest("shiping_lines") IsNot Nothing Then
|
||||
' shiping
|
||||
'shiping_lines/ method_id: free_shipping/local_pickup
|
||||
Dim Entrega As String = If(JsonRequest("shiping_lines")("method_id") Is Nothing, "", JsonRequest("shiping_lines")("method_id").ToString())
|
||||
ObjFactura.Alfa1 = Entrega
|
||||
End If
|
||||
|
||||
ObjFactura.CveDireccionEnvio = CveDireccionEnvio
|
||||
ObjFactura.CveVentaTerminal = IdEcommerce
|
||||
ObjFactura.CveUsoCFDI = CveUsoCFDI
|
||||
|
||||
If JsonRequest("line_items") IsNot Nothing Then
|
||||
Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())
|
||||
Dim Consec As Integer = 1
|
||||
MsgLog.AppendLine("1.6.1 recorrer ps")
|
||||
For Each JsonPS As JObject In ListaPS
|
||||
Cantidad = JsonPS("quantity").ToString.ToDecimal()
|
||||
PU = JsonPS("price").ToString.ToDecimal()
|
||||
CvePS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, Codigo:=JsonPS("sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
|
||||
|
||||
ObjFactura.AgregarPS(CvePS, Cantidad, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto)
|
||||
MsgLog.AppendLine("1.6.1 agregar ps a venta")
|
||||
''VALIDAR QUE SEA EL MISMO PRODUCTO
|
||||
If CvePS <= 0 Then
|
||||
TieneError = True
|
||||
'Retorno.Mensajes.Add(String.Format("No se encontró el producto: {0}", JsonPS("name").ToString()))
|
||||
Exit For
|
||||
End If
|
||||
Consec += 1
|
||||
Next
|
||||
ObjFactura.CalculaTotales()
|
||||
Else
|
||||
ObjFactura = Nothing
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existen productos definidos")
|
||||
End If
|
||||
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso Not TieneError Then
|
||||
MsgLog.AppendLine("1.7 agregar la remision")
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
|
||||
|
||||
If Resp.CveVenta > 0 Then
|
||||
MsgLog.AppendLine("2.0 remisión registrada")
|
||||
Dim data As New JArray
|
||||
Dim objSucursal As New JObject(
|
||||
New JProperty("Cve", Resp.CveVenta),
|
||||
New JProperty("SerieFolio", Resp.SerieFolio)
|
||||
)
|
||||
data.Add(objSucursal)
|
||||
Respuesta.status = "success"
|
||||
Respuesta.data = data
|
||||
Consec += 1
|
||||
Next
|
||||
ObjFactura.CalculaTotales()
|
||||
Else
|
||||
MsgLog.AppendLine("1.8 error al agregar la remision")
|
||||
ObjFactura = Nothing
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existen productos definidos")
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
If ObjFactura IsNot Nothing AndAlso Not TieneError Then
|
||||
MsgLog.AppendLine("1.7 agregar la remision")
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
|
||||
|
||||
If Resp.CveVenta > 0 Then
|
||||
MsgLog.AppendLine("2.0 remisión registrada")
|
||||
Dim data As New JArray
|
||||
Dim objSucursal As New JObject(
|
||||
New JProperty("Cve", Resp.CveVenta),
|
||||
New JProperty("SerieFolio", Resp.SerieFolio)
|
||||
)
|
||||
data.Add(objSucursal)
|
||||
Respuesta.status = "success"
|
||||
Respuesta.data = data
|
||||
Else
|
||||
MsgLog.AppendLine("1.8 error al agregar la remision.")
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
Dim sb As New StringBuilder()
|
||||
For Each msg As String In Resp.Mensajes
|
||||
sb.AppendFormat("{0}. ", msg)
|
||||
Next
|
||||
RespuestaError.message = sb.ToString()
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Dim sb As New StringBuilder()
|
||||
For Each msg As String In Resp.Mensajes
|
||||
sb.AppendFormat("{0}. ", msg)
|
||||
Next
|
||||
RespuestaError.message = sb.ToString()
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
Dim sb As New StringBuilder()
|
||||
For Each msg As String In Resp.Mensajes
|
||||
sb.AppendFormat("{0}. ", msg)
|
||||
Next
|
||||
RespuestaError.message = sb.ToString()
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
|
||||
@@ -1536,7 +1536,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim Valido As Boolean = True
|
||||
|
||||
Dim RowPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0)
|
||||
Dim RowPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("")
|
||||
If RowPS Is Nothing Then Exit Sub
|
||||
|
||||
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero()
|
||||
|
||||
@@ -3948,7 +3949,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
|
||||
If ObjInventario.Modulo.Contiene("TA/G1", "Recons", "API-PT/C1") Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, DtCostos.SUMD("Total").RoundSQL, 68, Concepto, Concepto, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -842,10 +842,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
''validaciones de carta porte en productos
|
||||
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
||||
' Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
'If Not ValidaPSSAT(DrPS) Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
For Each gvr As GridViewRow In GvDatos.Rows
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToEntero).FiltroPrimero("")
|
||||
If Not ValidaPSSAT(DrPS) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -2950,7 +2950,7 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
ObjOS.Dispose()
|
||||
|
||||
DdlUsuarioAtendio.DataSource = TecnicosResultado
|
||||
DdlUsuarioAtendio.DataSource = TecnicosResultado.FiltraParametros("", "Nombre")
|
||||
DdlUsuarioAtendio.DataBind()
|
||||
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||
End Sub
|
||||
|
||||
@@ -211,14 +211,14 @@
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
|
||||
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataValueField="CveActivoFijo"
|
||||
DataTextField="Descripcion" Class="table-group-action-input form-control input-inline select2me"
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte"
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
@@ -227,6 +227,19 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" visible="false">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlAF" AppendDataBoundItems="true" DataTextField="Descripcion"
|
||||
DataValueField="CveAF" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4">
|
||||
|
||||
@@ -23,15 +23,17 @@ Partial Class ListadoContratos
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
'Lista Activos Fijos'
|
||||
Dim ObjAF As New ClsAF()
|
||||
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DdlTransporte.DataSource = ObjAF.DtResultados
|
||||
DdlTransporte.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
End If
|
||||
End If
|
||||
DdlTransporte.DataBind()
|
||||
ObjAF.Dispose()
|
||||
'Dim ObjAF As New ClsAF()
|
||||
'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||
' If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
' DdlAF.DataSource = ObjAF.DtResultados
|
||||
' DdlAF.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
' End If
|
||||
'End If
|
||||
'ObjAF.Dispose()
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
|
||||
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
@@ -58,7 +60,7 @@ Partial Class ListadoContratos
|
||||
TxtFechaRegreso.Text = FechaRegreso
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
DdlTransporte.SelectedValue = Transporte
|
||||
DdlAF.SelectedValue = Transporte
|
||||
DdlClientes.SelectedText = Cliente
|
||||
DdlChofer.SelectedValue = Chofer
|
||||
TxtDolares.Text = Dolares
|
||||
|
||||
Reference in New Issue
Block a user