This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-04-15 07:23:01 -07:00
46 changed files with 2594 additions and 789 deletions

View File

@@ -1680,6 +1680,63 @@ Public Class ClsClientes
Return Retorno Return Retorno
End Function End Function
Public Function UpdateClienteNoFrencuente(CveCliente As Integer, Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer,
RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer,
NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClientesNoFrecuenteUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
.Add("@Direccion", SqlDbType.VarChar).Value = Direccion
.Add("@NoExt", SqlDbType.VarChar).Value = NoExt
.Add("@NoInt", SqlDbType.VarChar).Value = NoInt
.Add("@Colonia", SqlDbType.VarChar).Value = Colonia
.Add("@Localidad", SqlDbType.VarChar).Value = Localidad
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
.Add("@CveEstado", SqlDbType.Int).Value = CveEstado
' .Add("@Pais", SqlDbType.VarChar).Value = Pais
.Add("@RFC", SqlDbType.VarChar).Value = RFC
.Add("@CP", SqlDbType.VarChar).Value = CP
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@Mail", SqlDbType.VarChar).Value = Mail
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveMetodoPago33", SqlDbType.Int).Value = CveMetodoPago33
.Add("@CveFormaPago33", SqlDbType.Int).Value = CveFormaPago33
.Add("@NumCuentaPago", SqlDbType.VarChar).Value = NumCuentaPago
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
Alert("El Nuevo Cliente no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("Número: 2601;") Then
If Ex1.Message.Contains("UN_ClientesRFCEmpresa") Then
Alert("Ya existe un cliente registrado con el mismo RFC.", TipoMensaje.MsgAdvertencia)
End If
If Ex1.Message.Contains("IND_Clientes_Codigo") Then
Alert("Ya existe un cliente registrado con el mismo Código.", TipoMensaje.MsgAdvertencia)
End If
Else
Me.OnError("Ocurrió un error al Intentar guardar el Nuevo Cliente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception
OnError("Ocurrió un error al guardar el cliente", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region "UNIFICAR CLIENTES" #Region "UNIFICAR CLIENTES"
Public Function UnificarClientes(CveClienteAUnificar As Integer, CveClienteOriginal As Integer) As Boolean Public Function UnificarClientes(CveClienteAUnificar As Integer, CveClienteOriginal As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -3571,6 +3571,26 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function ReconstruirCostos(CvePS As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ReconstruirCostos")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener al reconstruir los costos del producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region #End Region
#Region " INVENTARIOS - OC " #Region " INVENTARIOS - OC "

View File

@@ -979,7 +979,7 @@ Public Class ClsNominas
Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer, Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer,
EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer,
AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer) As Boolean AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Nom_ConceptosUpdate") DataAdapter("PA_Nom_ConceptosUpdate")
@@ -1004,6 +1004,7 @@ Public Class ClsNominas
.Add("Especie", SqlDbType.Bit).Value = Especie .Add("Especie", SqlDbType.Bit).Value = Especie
.Add("Imprimir", SqlDbType.Bit).Value = Imprimir .Add("Imprimir", SqlDbType.Bit).Value = Imprimir
.Add("CveSATConcepto", SqlDbType.Int).Value = CveSATConcepto .Add("CveSATConcepto", SqlDbType.Int).Value = CveSATConcepto
.Add("CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try

View File

@@ -208,7 +208,7 @@ Public Class ClsProductosServicios
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1", Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1",
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000) As Boolean Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_ProductosServiciosGet") DataAdapter("PA_ProductosServiciosGet")
@@ -229,6 +229,7 @@ Public Class ClsProductosServicios
.Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS .Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@SATClavePS", SqlDbType.VarChar).Value = SATClavePS .Add("@SATClavePS", SqlDbType.VarChar).Value = SATClavePS
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@TopSelect", SqlDbType.Int).Value = TopSelect
End With End With
@@ -252,7 +253,7 @@ Public Class ClsProductosServicios
Oferta = Data.Rows(0)("Oferta").ToString.ToDouble Oferta = Data.Rows(0)("Oferta").ToString.ToDouble
IVA = Data.Rows(0)("IVA").ToString.ToDouble IVA = Data.Rows(0)("IVA").ToString.ToDouble
RetIVA = Data.Rows(0)("RetIVA").ToString.ToDouble RetIVA = Data.Rows(0)("RetIVA").ToString.ToDouble
CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero Me.CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero
AplicaParaConcepto = CBool(Data.Rows(0)("AplicaParaConcepto").ToString) AplicaParaConcepto = CBool(Data.Rows(0)("AplicaParaConcepto").ToString)
AplicaParaVenta = Data.Rows(0)("AplicaParaVenta").ToString = "True" AplicaParaVenta = Data.Rows(0)("AplicaParaVenta").ToString = "True"
Estado = Data.Rows(0)("Estado").ToString = "Activo" Estado = Data.Rows(0)("Estado").ToString = "Activo"

View File

@@ -357,7 +357,7 @@ Public Class ClsSisNotificaciones
If LSRutasMail.Count > 0 Then If LSRutasMail.Count > 0 Then
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
End If End If
@@ -418,7 +418,7 @@ Public Class ClsSisNotificaciones
End If End If
If Archivos.Count > 0 Then If Archivos.Count > 0 Then
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", $"Se adjunta el {Formato} en el Reporte Programado.", "", Archivos) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", $"Se adjunta el {Formato} en el Reporte Programado.", "", Archivos) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
End If End If
@@ -467,7 +467,7 @@ Public Class ClsSisNotificaciones
If LSRutasMail.Count > 0 Then If LSRutasMail.Count > 0 Then
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
End If End If
@@ -509,7 +509,7 @@ Public Class ClsSisNotificaciones
If LSRutasMail.Count > 0 Then If LSRutasMail.Count > 0 Then
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
End If End If
@@ -557,7 +557,7 @@ Public Class ClsSisNotificaciones
If LSRutasMail.Count > 0 Then If LSRutasMail.Count > 0 Then
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
End If End If
@@ -596,7 +596,7 @@ Public Class ClsSisNotificaciones
If LSRutasMail.Count > 0 Then If LSRutasMail.Count > 0 Then
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
End If End If
@@ -635,7 +635,7 @@ Public Class ClsSisNotificaciones
If LSRutasMail.Count > 0 Then If LSRutasMail.Count > 0 Then
Dim ObjMail As New ClsSisMail() Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Correos, $"Reporte Programado {Date.Today.ToShortDateString}", "Se adjunta en pdf el Reporte Programado.", "", LSRutasMail) Then
UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
End If End If
End If End If

View File

@@ -580,6 +580,14 @@ Namespace Modelos
Me.DtRemisionesDocumentosRelacionados = ObjVentas.DtResultados.Copy() Me.DtRemisionesDocumentosRelacionados = ObjVentas.DtResultados.Copy()
End If End If
'CARGA LOS IMPUESTOS LOCALES
If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
DtImpuestosLocales = ObjVentas.DtResultados.Copy()
End If
End If
ObjVentas.Dispose() ObjVentas.Dispose()
If Me.RealizarDevolucionAlmacen Then If Me.RealizarDevolucionAlmacen Then
@@ -1618,8 +1626,8 @@ Namespace Modelos
End If End If
'Impuestos Locales 'Impuestos Locales
If DtImpuestosLocales IsNot Nothing Then If factura.DtImpuestosLocales IsNot Nothing Then
For Each gvr As DataRow In DtImpuestosLocales.Rows For Each gvr As DataRow In factura.DtImpuestosLocales.Rows
If Not ObjVentas.AddVentaImpuestoLocales(factura.CveVenta, gvr("CveImpuestoLocal").ToString.ToEntero(), gvr("Importe").ToString().ToDouble()) Then If Not ObjVentas.AddVentaImpuestoLocales(factura.CveVenta, gvr("CveImpuestoLocal").ToString.ToEntero(), gvr("Importe").ToString().ToDouble()) Then
ErrorList.Add("Ocurrió un error al Guardar Impuestos Locales") ErrorList.Add("Ocurrió un error al Guardar Impuestos Locales")
End If End If
@@ -1627,8 +1635,8 @@ Namespace Modelos
End If End If
If DtFirmas IsNot Nothing AndAlso DtFirmas.Rows.Count > 0 Then If factura.DtFirmas IsNot Nothing AndAlso factura.DtFirmas.Rows.Count > 0 Then
For Each Row As DataRow In DtFirmas.Rows For Each Row As DataRow In factura.DtFirmas.Rows
If Not ObjVentas.AddVentasFirmas(factura.CveVenta, Row("Titulo").ToString, Row("Nombre").ToString, Row("Puesto").ToString, Row("Lado").ToString.ToEntero) Then If Not ObjVentas.AddVentasFirmas(factura.CveVenta, Row("Titulo").ToString, Row("Nombre").ToString, Row("Puesto").ToString, Row("Lado").ToString.ToEntero) Then
ErrorList.Add("Ocurrio un error al Guardar Firmas") ErrorList.Add("Ocurrio un error al Guardar Firmas")
End If End If
@@ -4828,8 +4836,10 @@ Namespace Modelos
If Not ErrorCancelar Then If Not ErrorCancelar Then
Dim Filtro As String = "" Dim Filtro As String = ""
Select Case ObjFactura.TipoDocto Select Case ObjFactura.TipoDocto
Case "Ing", "Ped", "Dev" Case "Ing", "Ped"
Filtro = "CveConcepto IN (3, 40)" Filtro = "CveConcepto IN (3, 40)"
Case "Dev"
Filtro = "CveConcepto = 18"
Case Else Case Else
Filtro = "CveConcepto = 9" Filtro = "CveConcepto = 9"
End Select End Select
@@ -4860,19 +4870,22 @@ Namespace Modelos
If Not ErrorCancelar AndAlso RealizarDevolucionAlmacen Then If Not ErrorCancelar AndAlso RealizarDevolucionAlmacen Then
'REALIZA DEVOLUCION A LAS SALIDAS PENDIENTES 'REALIZA DEVOLUCION A LAS SALIDAS PENDIENTES
For Each RowMovimiento As DataRow In DtSalidas.Rows For Each RowMovimiento As DataRow In DtSalidas.Rows
Dim CveConceptoDevolucion As Integer = -1 Dim CveConceptoMovimiento As Integer = -1
Dim CveAlmacenDevolucion As Integer = -1 Dim CveAlmacenMovimiento As Integer = -1
Dim CveMovimientoDevolucion As Integer = 0 Dim CveMovimientoDevolucion As Integer = 0
Dim Folio As Integer = 0 Dim Folio As Integer = 0
Select Case RowMovimiento("CveConcepto").ToString().ToEntero() Select Case RowMovimiento("CveConcepto").ToString().ToEntero()
Case 3 Case 3
CveConceptoDevolucion = 18 'DEVOLUCION DEL CLIENTE CveConceptoMovimiento = 18 'DEVOLUCION DEL CLIENTE
CveAlmacenDevolucion = RowMovimiento("CveAlmacen").ToString().ToEntero() CveAlmacenMovimiento = RowMovimiento("CveAlmacen").ToString().ToEntero()
Case 40 Case 40
CveConceptoDevolucion = 41 'DEVOLUCIÓN DEL CLIENTE DIRECTA CveConceptoMovimiento = 41 'DEVOLUCIÓN DEL CLIENTE DIRECTA
CveAlmacenDevolucion = RowMovimiento("CveAlmacen").ToString().ToEntero() CveAlmacenMovimiento = RowMovimiento("CveAlmacen").ToString().ToEntero()
Case 18
CveConceptoMovimiento = 3 'DEVOLUCIÓN DEL CLIENTE DIRECTA
CveAlmacenMovimiento = RowMovimiento("CveAlmacen").ToString().ToEntero()
''SI TIENE REMISIONES RELACIONADAS ''SI TIENE REMISIONES RELACIONADAS
'If DtRemisionesFacturadas.Rows.Count > 0 Then 'If DtRemisionesFacturadas.Rows.Count > 0 Then
' Dim RowRemision As DataRow = DtExistencias.FiltroPrimero($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}") ' Dim RowRemision As DataRow = DtExistencias.FiltroPrimero($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}")
@@ -4896,12 +4909,20 @@ Namespace Modelos
'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION 'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION
If ObjFactura.SaldoAlmacen <> 0 Then If ObjFactura.SaldoAlmacen <> 0 Then
'SALIDA DE ALMACEN - SALIDA POR TRASPASO CUANDO ES REMISION - DEVOLUCION (SI ES TRASPASO Y TIENE CONTRATO NO HACE DEVOLUCIóN) 'SALIDA DE ALMACEN - SALIDA POR TRASPASO CUANDO ES REMISION - DEVOLUCION (SI ES TRASPASO Y TIENE CONTRATO NO HACE DEVOLUCIóN)
CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenDevolucion, CveConceptoDevolucion, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, Modulo:="Mod/CV1") CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenMovimiento, CveConceptoMovimiento, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, Modulo:="Mod/CV1")
Folio = ObjInventario.Folio Folio = ObjInventario.Folio
If CveMovimientoDevolucion > 0 Then If CveMovimientoDevolucion > 0 Then
For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero) Then
Dim FechaCaducidad As Date = MinFecha
If Not String.IsNullOrEmpty(Dr("FechaCaducidad").ToString()) Then
If IsDate(Dr("FechaCaducidad")) Then
FechaCaducidad = Dr("FechaCaducidad").ToString().ToDate()
End If
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, FechaCaducidad:=FechaCaducidad) Then
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar." MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar."
Exit For Exit For
@@ -4920,12 +4941,17 @@ Namespace Modelos
DtCostos = ObjInventario.DtResultados DtCostos = ObjInventario.DtResultados
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
'Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero 'Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0 Dim CveCuenta As Integer = 0
If tmpCostos.Rows.Count > 0 Then If tmpCostos.Rows.Count > 0 Then
Dim Multiplicador As Decimal = -1D
If ObjFactura.TipoDocto = "Dev" Then
Multiplicador = 1D
End If
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
Dim Fecha As Date = Now Dim Fecha As Date = Now
Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero
@@ -4950,7 +4976,7 @@ Namespace Modelos
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
If Not ErrorCancelar Then If Not ErrorCancelar Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, -1 * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=-1 * ValorInventario, CveCuenta:=CveCuenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveCuenta:=CveCuenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then
ErrorCancelar = True ErrorCancelar = True
End If End If
End If End If
@@ -4958,7 +4984,7 @@ Namespace Modelos
cont += 1 cont += 1
Next Next
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, True, -1 * TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=-1 * TotalCosto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, True, Multiplicador * TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * TotalCosto) Then
ErrorCancelar = True ErrorCancelar = True
End If End If
@@ -4995,7 +5021,7 @@ Namespace Modelos
'DEVOLUCION REMISION - REGRESA LAS EXISTENCIAS A ENTREGA POR ADELANTADO SI LA FACTURA VIENE DE REMISION 'DEVOLUCION REMISION - REGRESA LAS EXISTENCIAS A ENTREGA POR ADELANTADO SI LA FACTURA VIENE DE REMISION
'SI ES DEVOLUCION DEL CLIENTE DEBE REGRESAR A ENTREGA POR ADELANTADO 'SI ES DEVOLUCION DEL CLIENTE DEBE REGRESAR A ENTREGA POR ADELANTADO
If Not ErrorCancelar AndAlso CveConceptoDevolucion = 18 AndAlso RevivirRemisiones Then If Not ErrorCancelar AndAlso CveConceptoMovimiento = 18 AndAlso RevivirRemisiones Then
If Not GeneraMovimientosEntregaPorAdelantadoRemision(CveMovimientoDevolucion, ObjVentas, ObjInventario, DtDevRem, ListaRemisionesCancelar) Then If Not GeneraMovimientosEntregaPorAdelantadoRemision(CveMovimientoDevolucion, ObjVentas, ObjInventario, DtDevRem, ListaRemisionesCancelar) Then
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Ocurrió un error al generar los movimientos de devolución a remisión" MensajeError = "Ocurrió un error al generar los movimientos de devolución a remisión"

View File

@@ -115,6 +115,45 @@ Public Class E141 : Implements IHttpHandler
End Get End Get
End Property End Property
Public Property GlobalDTPSSimplificado(Optional CveClasificacion As Integer = -1, Optional Codigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSSimplificado(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
ObjPS.Dispose()
End If
Dim Cons = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow))
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
Codigo = Codigo.ToUpper()
If Codigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!Codigo).ToUpper() = Codigo))
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
Try
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
Catch ex As Exception
GlobalDTPSSimplificado = New DataTable
End Try
Else
GlobalDTPSSimplificado = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTMonedas() As DataTable Property GlobalDTMonedas() As DataTable
Get Get
GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable) GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable)
@@ -632,11 +671,14 @@ Public Class E141 : Implements IHttpHandler
Dim ObjClientes As New ClsClientes() Dim ObjClientes As New ClsClientes()
Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL()) Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL())
ObjClientes.IniciaTransacSQL()
Try Try
If Not String.IsNullOrEmpty(JsonRequest("timbrar").ToString) Then Dim timbrar_request As String = If(JsonRequest("timbrar") Is Nothing, "", JsonRequest("timbrar").ToString())
DebeTimbrar = CBool(JsonRequest("timbrar"))
If Not String.IsNullOrEmpty(timbrar_request) Then
DebeTimbrar = CBool(timbrar_request)
Else
DebeTimbrar = False
End If End If
ObjFactura = CreaFactura(ObjInventario, ObjClientes, "Ing", Resp, JsonRequest, Usuario) ObjFactura = CreaFactura(ObjInventario, ObjClientes, "Ing", Resp, JsonRequest, Usuario)
@@ -646,7 +688,7 @@ Public Class E141 : Implements IHttpHandler
If Resp.CveVenta > 0 Then If Resp.CveVenta > 0 Then
Respuesta.status = "success" Respuesta.status = "success"
Respuesta.data = Resp.CveVenta.ToString() Respuesta.data = Resp.SerieFolio
Else Else
TieneError = True TieneError = True
End If End If
@@ -674,9 +716,11 @@ Public Class E141 : Implements IHttpHandler
If TieneError Then If TieneError Then
ObjClientes.RollBack() ObjClientes.RollBack()
ObjClientes.Dispose() ObjClientes.Dispose()
ObjInventario.Dispose()
Else Else
ObjClientes.Commit() ObjClientes.Commit()
ObjClientes.Dispose() ObjClientes.Dispose()
ObjInventario.Dispose()
If DebeTimbrar Then If DebeTimbrar Then
Dim SeTimbro As Boolean = ObjFactura.TimbrarFactura() Dim SeTimbro As Boolean = ObjFactura.TimbrarFactura()
@@ -690,6 +734,10 @@ Public Class E141 : Implements IHttpHandler
End If End If
End If End If
If ObjFactura IsNot Nothing Then
ObjFactura.Dispose()
End If
Else Else
TieneError = True TieneError = True
RespuestaError.message = "No hay un usuario disponible" RespuestaError.message = "No hay un usuario disponible"
@@ -708,26 +756,83 @@ Public Class E141 : Implements IHttpHandler
#Region "D E F I N I R - O B J E T O S" #Region "D E F I N I R - O B J E T O S"
Private Function CrearCliente(ObjClientes As ClsClientes, ByRef Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Integer Private Function CrearCliente(TipoDocto As String, ObjClientes As ClsClientes, ByRef Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Integer
Dim CveCliente As Integer = -1 Dim CveCliente As Integer = -1
Dim CveSubProyecto As Integer = JsonRequest("branch_office_id").ToEntero() Dim CveSubProyecto As Integer = JsonRequest("branch_office_id").ToEntero()
Dim Nombre As String = If(JsonRequest("contact_name") Is Nothing, "", JsonRequest("contact_name").ToString())
Dim Direccion As String = If(JsonRequest("contact_address") Is Nothing, "", JsonRequest("contact_address").ToString())
Dim NumExt As String = If(JsonRequest("contact_ext_number") Is Nothing, "", JsonRequest("contact_ext_number").ToString()) Dim Nombre As String = ""
Dim NumInt As String = If(JsonRequest("contact_int_number") Is Nothing, "", JsonRequest("contact_int_number").ToString()) Dim Direccion As String = ""
Dim Colonia As String = If(JsonRequest("contact_neighborhood") Is Nothing, "", JsonRequest("contact_neighborhood").ToString()) Dim NumExt As String = ""
Dim Localidad As String = If(JsonRequest("contact_city") Is Nothing, "", JsonRequest("contact_city").ToString()) Dim NumInt As String = ""
Dim Ciudad As String = Localidad Dim Colonia As String = ""
Dim RFC As String = If(JsonRequest("invoice_rfc") Is Nothing, "XAXX010101000", JsonRequest("invoice_rfc").ToString()) Dim Localidad As String = ""
Dim CP As String = If(JsonRequest("contact_zip_code") Is Nothing, "", JsonRequest("contact_zip_code").ToString()) Dim Ciudad As String = ""
Dim Telefono As String = If(JsonRequest("contact_phone") Is Nothing, "", JsonRequest("contact_phone").ToString()) Dim Estado As String = ""
Dim Correo As String = If(JsonRequest("contact_email") Is Nothing, "", JsonRequest("contact_email").ToString()) Dim RFC As String = ""
Dim CP As String = ""
Dim Telefono As String = ""
Dim Correo As String = ""
'DATOS DE CONTACTO
Dim contact_name As String = If(JsonRequest("contact_name") Is Nothing, "", JsonRequest("contact_name").ToString())
Dim contact_address As String = If(JsonRequest("contact_address") Is Nothing, "", JsonRequest("contact_address").ToString())
Dim contact_ext_number As String = If(JsonRequest("contact_ext_number") Is Nothing, "", JsonRequest("contact_ext_number").ToString())
Dim contact_int_number As String = If(JsonRequest("contact_int_number") Is Nothing, "", JsonRequest("contact_int_number").ToString())
Dim contact_neighborhood As String = If(JsonRequest("contact_neighborhood") Is Nothing, "", JsonRequest("contact_neighborhood").ToString())
Dim contact_city As String = If(JsonRequest("contact_city") Is Nothing, "", JsonRequest("contact_city").ToString())
Dim contact_zip_code As String = If(JsonRequest("contact_zip_code") Is Nothing, "", JsonRequest("contact_zip_code").ToString())
Dim contact_phone As String = If(JsonRequest("contact_phone") Is Nothing, "", JsonRequest("contact_phone").ToString())
Dim contact_email As String = If(JsonRequest("contact_email") Is Nothing, "", JsonRequest("contact_email").ToString())
Dim contact_state As String = If(JsonRequest("contact_state") Is Nothing, "", JsonRequest("contact_state").ToString())
'DATOS DE FACTURACION
Dim invoice_rfc As String = If(JsonRequest("invoice_rfc") Is Nothing, "", JsonRequest("invoice_rfc").ToString())
Dim invoice_name As String = If(JsonRequest("invoice_name") Is Nothing, "", JsonRequest("invoice_name").ToString())
Dim invoice_address As String = If(JsonRequest("invoice_address") Is Nothing, "", JsonRequest("invoice_address").ToString())
Dim invoice_city As String = If(JsonRequest("invoice_city") Is Nothing, "", JsonRequest("invoice_city").ToString())
Dim invoice_state As String = If(JsonRequest("invoice_state") Is Nothing, "", JsonRequest("invoice_state").ToString())
Dim invoice_email As String = If(JsonRequest("invoice_email") Is Nothing, "", JsonRequest("invoice_email").ToString())
Dim invoice_phone As String = If(JsonRequest("invoice_phone") Is Nothing, "", JsonRequest("invoice_phone").ToString())
Dim CveEstado As Integer = -1 Dim CveEstado As Integer = -1
If Not String.IsNullOrEmpty(JsonRequest("contact_state").ToString()) Then If TipoDocto = "Ing" Then
CveEstado = GlobalDTEstado("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{JsonRequest("contact_state").ToString().Trim}'").ToEntero() RFC = If(Not String.IsNullOrEmpty(invoice_rfc), invoice_rfc, "XAXX010101000")
Nombre = If(Not String.IsNullOrEmpty(invoice_name), invoice_name, contact_name)
Direccion = If(Not String.IsNullOrEmpty(invoice_address), invoice_address, contact_address)
'SI LA DIRECCION ES LA MISMA QUE LA DE CONTACTO
If Direccion = contact_address Then
NumExt = If(Not String.IsNullOrEmpty(contact_ext_number), contact_ext_number, "")
NumInt = If(Not String.IsNullOrEmpty(contact_int_number), contact_int_number, "")
Colonia = If(Not String.IsNullOrEmpty(contact_neighborhood), contact_neighborhood, "")
End If
Ciudad = If(Not String.IsNullOrEmpty(invoice_city), invoice_city, contact_city)
Localidad = Ciudad
Estado = If(Not String.IsNullOrEmpty(invoice_state), invoice_state, contact_state)
CP = If(Not String.IsNullOrEmpty(contact_zip_code), contact_zip_code, "")
Correo = If(Not String.IsNullOrEmpty(invoice_email), invoice_email, contact_email)
Telefono = If(Not String.IsNullOrEmpty(invoice_phone), invoice_phone, contact_phone)
Else
Nombre = If(Not String.IsNullOrEmpty(contact_name), contact_name, "")
Direccion = If(Not String.IsNullOrEmpty(contact_address), contact_address, "")
NumExt = If(Not String.IsNullOrEmpty(contact_ext_number), contact_ext_number, "")
NumInt = If(Not String.IsNullOrEmpty(contact_int_number), contact_int_number, "")
Colonia = If(Not String.IsNullOrEmpty(contact_neighborhood), contact_neighborhood, "")
Ciudad = If(Not String.IsNullOrEmpty(contact_city), contact_city, "")
Localidad = Ciudad
Estado = If(Not String.IsNullOrEmpty(contact_state), contact_state, "")
CP = If(Not String.IsNullOrEmpty(contact_zip_code), contact_zip_code, "")
Correo = If(Not String.IsNullOrEmpty(contact_email), contact_email, "")
Telefono = If(Not String.IsNullOrEmpty(contact_phone), contact_phone, "")
End If
If Not String.IsNullOrEmpty(Estado) Then
CveEstado = GlobalDTEstado("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
If CveEstado <= 0 Then If CveEstado <= 0 Then
@@ -737,11 +842,18 @@ Public Class E141 : Implements IHttpHandler
CveEstado = 26 CveEstado = 26
End If End If
'SI NO EXISTE EL RFC UTILIZA EL GENERICO 'SI NO EXISTE EL RFC UTILIZA EL GENERICO
If String.IsNullOrEmpty(RFC) Then If String.IsNullOrEmpty(RFC) Then
RFC = "XAXX010101000" RFC = "XAXX010101000"
End If End If
If String.IsNullOrEmpty(Nombre) Then
Resp.TieneError = False
Resp.Mensajes.Add("El cliente no tiene un nombre")
Return -1
End If
'VALIDAR QUE NO EXISTA EL RFC 'VALIDAR QUE NO EXISTA EL RFC
If RFC <> "XAXX010101000" Then If RFC <> "XAXX010101000" Then
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
@@ -774,11 +886,19 @@ Public Class E141 : Implements IHttpHandler
Resp.TieneError = False Resp.TieneError = False
Dim Serie As String = "-1" Dim Serie As String = "-1"
Dim CveMoneda As Integer = 1 Dim CveMoneda As Integer = 1
Dim CveSubProyecto As Integer = JsonRequest("branch_office_id").ToEntero() Dim CveSubProyecto As Integer = JsonRequest("branch_office_id").ToEntero()
If CveSubProyecto <= 0 Then
Resp.TieneError = False
Resp.Mensajes.Add("La sucursal es requerida")
Return Nothing
End If
Dim CveCliente As Integer = If(JsonRequest("user_id") Is Nothing, 0, JsonRequest("user_id").ToEntero()) Dim CveCliente As Integer = If(JsonRequest("user_id") Is Nothing, 0, JsonRequest("user_id").ToEntero())
If CveCliente <= 0 Then If CveCliente <= 0 Then
CveCliente = CrearCliente(ObjClientes, Resp, JsonRequest, UsuarioActual) CveCliente = CrearCliente(TipoDocto, ObjClientes, Resp, JsonRequest, UsuarioActual)
End If End If
If CveCliente <= 0 Then If CveCliente <= 0 Then
@@ -854,19 +974,6 @@ Public Class E141 : Implements IHttpHandler
ElseIf ObjFactura.TipoDocto = "Ing" Then ElseIf ObjFactura.TipoDocto = "Ing" Then
If ObjFactura.Cliente IsNot Nothing AndAlso Not String.IsNullOrEmpty(JsonRequest("invoice_name").ToString()) Then
ObjFactura.Cliente.Nombre = JsonRequest("invoice_name").ToString()
ObjFactura.Cliente.NombreComercial = JsonRequest("invoice_name").ToString()
ObjFactura.Cliente.Direccion = JsonRequest("invoice_address").ToString()
ObjFactura.Cliente.Colonia = ""
ObjFactura.Cliente.NoInt = ""
ObjFactura.Cliente.NoExt = ""
ObjFactura.Cliente.Localidad = JsonRequest("invoice_city").ToString()
ObjFactura.Cliente.Estado = JsonRequest("invoice_state").ToString()
ObjFactura.Cliente.Mail = JsonRequest("invoice_email").ToString()
ObjFactura.Cliente.Telefono = JsonRequest("invoice_phone").ToString()
End If
'FORMA DE PAGO 'FORMA DE PAGO
If JsonRequest("invoice_way_to_pay") Is Nothing Then If JsonRequest("invoice_way_to_pay") Is Nothing Then
Resp.TieneError = False Resp.TieneError = False
@@ -941,10 +1048,73 @@ Public Class E141 : Implements IHttpHandler
End If End If
If ObjFactura.Cliente IsNot Nothing AndAlso TipoDocto = "Ing" Then
'DATOS DE CONTACTO
Dim contact_name As String = If(JsonRequest("contact_name") Is Nothing, "", JsonRequest("contact_name").ToString())
Dim contact_address As String = If(JsonRequest("contact_address") Is Nothing, "", JsonRequest("contact_address").ToString())
Dim contact_ext_number As String = If(JsonRequest("contact_ext_number") Is Nothing, "", JsonRequest("contact_ext_number").ToString())
Dim contact_int_number As String = If(JsonRequest("contact_int_number") Is Nothing, "", JsonRequest("contact_int_number").ToString())
Dim contact_neighborhood As String = If(JsonRequest("contact_neighborhood") Is Nothing, "", JsonRequest("contact_neighborhood").ToString())
Dim contact_city As String = If(JsonRequest("contact_city") Is Nothing, "", JsonRequest("contact_city").ToString())
Dim contact_zip_code As String = If(JsonRequest("contact_zip_code") Is Nothing, "", JsonRequest("contact_zip_code").ToString())
Dim contact_phone As String = If(JsonRequest("contact_phone") Is Nothing, "", JsonRequest("contact_phone").ToString())
Dim contact_email As String = If(JsonRequest("contact_email") Is Nothing, "", JsonRequest("contact_email").ToString())
Dim contact_state As String = If(JsonRequest("contact_state") Is Nothing, "", JsonRequest("contact_state").ToString())
'DATOS DE FACTURACION
Dim invoice_rfc As String = If(JsonRequest("invoice_rfc") Is Nothing, "", JsonRequest("invoice_rfc").ToString())
Dim invoice_name As String = If(JsonRequest("invoice_name") Is Nothing, "", JsonRequest("invoice_name").ToString())
Dim invoice_address As String = If(JsonRequest("invoice_address") Is Nothing, "", JsonRequest("invoice_address").ToString())
Dim invoice_city As String = If(JsonRequest("invoice_city") Is Nothing, "", JsonRequest("invoice_city").ToString())
Dim invoice_state As String = If(JsonRequest("invoice_state") Is Nothing, "", JsonRequest("invoice_state").ToString())
Dim invoice_email As String = If(JsonRequest("invoice_email") Is Nothing, "", JsonRequest("invoice_email").ToString())
Dim invoice_phone As String = If(JsonRequest("invoice_phone") Is Nothing, "", JsonRequest("invoice_phone").ToString())
Dim CveEstado As Integer = -1
ObjFactura.Cliente.RFC = If(Not String.IsNullOrEmpty(invoice_rfc), invoice_rfc, ObjFactura.Cliente.RFC)
ObjFactura.Cliente.Nombre = If(Not String.IsNullOrEmpty(invoice_name), invoice_name, contact_name)
ObjFactura.Cliente.NombreComercial = ObjFactura.Cliente.NombreComercial
ObjFactura.Cliente.Direccion = If(Not String.IsNullOrEmpty(invoice_address), invoice_address, contact_address)
ObjFactura.Cliente.Mail = If(Not String.IsNullOrEmpty(invoice_email), invoice_email, contact_email)
ObjFactura.Cliente.Telefono = If(Not String.IsNullOrEmpty(invoice_phone), invoice_phone, contact_phone)
ObjFactura.Cliente.Localidad = If(Not String.IsNullOrEmpty(invoice_city), invoice_city, contact_city)
ObjFactura.Cliente.Ciudad = ObjFactura.Cliente.Localidad
ObjFactura.Cliente.Estado = If(Not String.IsNullOrEmpty(invoice_state), invoice_state, contact_state)
If String.IsNullOrEmpty(ObjFactura.Cliente.RFC) Then
Resp.Mensajes.Add("No se ha ingresado un RFC")
Return Nothing
End If
If String.IsNullOrEmpty(ObjFactura.Cliente.Nombre) Then
Resp.Mensajes.Add("No se ha ingresado un nombre para el cliente")
Return Nothing
End If
If Not String.IsNullOrEmpty(ObjFactura.Cliente.Estado) Then
CveEstado = GlobalDTEstado("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{ObjFactura.Cliente.Estado.Trim}'").ToEntero()
'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
If CveEstado <= 0 Then
CveEstado = 26
End If
Else
CveEstado = 26
End If
Dim Cliente = ObjFactura.Cliente
If Not ObjClientes.UpdateClienteNoFrencuente(CveCliente, Cliente.Nombre, Cliente.Direccion, Cliente.NoExt, Cliente.NoInt, Cliente.Colonia, Cliente.Localidad, Cliente.Ciudad, CveEstado, Cliente.RFC, Cliente.CP, Cliente.Telefono, Cliente.Mail, CveSubProyecto, UsuarioActual.CveUsuario, CveEmpresa, "-1", ObjFactura.CveMetodoPago33, ObjFactura.CveFormaPago33) Then
Resp.TieneError = False
Resp.Mensajes.Add("No se puedo actualizar un cliente")
Return Nothing
End If
End If
ObjFactura.CveAlmacen = GlobalDTAlmacen(CveEmpresa, CveTipoAlmacen:=1).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero() ObjFactura.CveAlmacen = GlobalDTAlmacen(CveEmpresa, CveTipoAlmacen:=1).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
'DETALLES 'DETALLES
ObjFactura.DtDetalle = CreaDTDetalle(ObjInventario, ObjFactura, Resp, UsuarioActual, JsonRequest) ObjFactura.DtDetalle = CreaDTDetalle(ObjInventario, ObjFactura, Resp, UsuarioActual, JsonRequest)
@@ -958,7 +1128,6 @@ Public Class E141 : Implements IHttpHandler
End If End If
End If End If
'INVENTARIO 'INVENTARIO
If TipoDocto = "Ing" Then If TipoDocto = "Ing" Then
ObjFactura.DtInventario = ObjFactura.DtDetalle.Copy.FiltraParametros("CveTipoPS = 2") ObjFactura.DtInventario = ObjFactura.DtDetalle.Copy.FiltraParametros("CveTipoPS = 2")
@@ -1235,7 +1404,9 @@ Public Class E141 : Implements IHttpHandler
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String)) TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String)) TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveTamaño", GetType(Integer))
Try Try
Dim ListaPS = JArray.Parse(JsonRequest("details").ToString()) Dim ListaPS = JArray.Parse(JsonRequest("details").ToString())
Dim DescuentoTotal As Decimal = JsonRequest("discount").ToString().ToDecimal() Dim DescuentoTotal As Decimal = JsonRequest("discount").ToString().ToDecimal()
@@ -1245,7 +1416,9 @@ Public Class E141 : Implements IHttpHandler
For Each JsonPS As JObject In ListaPS For Each JsonPS As JObject In ListaPS
Dim Cantidad As Decimal = JsonPS("quantity").ToString.ToDecimal() Dim Cantidad As Decimal = JsonPS("quantity").ToString.ToDecimal()
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=JsonPS("product_sku").ToString()).FiltroPrimero("") Dim CvePS As Integer = GlobalDTPSSimplificado(Codigo:=JsonPS("product_sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS Is Nothing Then If DrPS Is Nothing Then
Retorno.TieneError = True Retorno.TieneError = True
@@ -1487,7 +1660,7 @@ Public Class E141 : Implements IHttpHandler
If Resp.CveVenta > 0 Then If Resp.CveVenta > 0 Then
Respuesta.status = "success" Respuesta.status = "success"
Respuesta.data = Resp.CveVenta.ToString() Respuesta.data = Resp.SerieFolio
Else Else
TieneError = True TieneError = True
End If End If
@@ -1499,6 +1672,8 @@ Public Class E141 : Implements IHttpHandler
Next Next
RespuestaError.message = sb.ToString() RespuestaError.message = sb.ToString()
End If End If
ObjFactura.Dispose()
Else Else
TieneError = True TieneError = True
Dim sb As New StringBuilder() Dim sb As New StringBuilder()
@@ -2077,7 +2252,8 @@ Public Class E141 : Implements IHttpHandler
New JProperty("age", 0), New JProperty("age", 0),
New JProperty("gender", 0), New JProperty("gender", 0),
New JProperty("address", ""), New JProperty("address", ""),
New JProperty("code", "") New JProperty("code", RowVendedor("CodigoVendedor")),
New JProperty("default_branchoffice", RowVendedor("CveSubProyecto"))
) )
ArrayVendedores.Add(vendedor) ArrayVendedores.Add(vendedor)
@@ -2097,6 +2273,10 @@ Public Class E141 : Implements IHttpHandler
End If End If
End If End If
If CountPeticionesExitosas > 0 Then
Retorno = True
End If
Return Retorno Return Retorno
End Function End Function
#End Region #End Region

View File

@@ -983,7 +983,7 @@ Partial Class Bancos_Creditos
For Each gvr As GridViewRow In GvTA.Rows For Each gvr As GridViewRow In GvTA.Rows
If Not ObjCredito.UpdateCreditosDetalle(gvr.DataKey("CveCreditoDetalle").ToString.ToEntero, gvr.FCTextBox("TxtFecha").Text.ToString.ToDate, gvr.FCTextBox("TxtCapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtIntereses").Text.ToString.ToDouble, If Not ObjCredito.UpdateCreditosDetalle(gvr.DataKey("CveCreditoDetalle").ToString.ToEntero, gvr.FCTextBox("TxtFecha").Text.ToString.ToDate, gvr.FCTextBox("TxtCapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtIntereses").Text.ToString.ToDouble,
gvr.FCTextBox("TxtSeguro").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVACapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtSeguro").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVACapital").Text.ToString.ToDouble,
gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, 1) Then gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, -1) Then
ErrorCredito = True ErrorCredito = True
Exit For Exit For
End If End If

View File

@@ -85,14 +85,7 @@
</div> </div>
</div> </div>
<div class="portlet-body" style="display: none"> <div class="portlet-body" style="display: none">
<div class="row">
<label class="col-md-1 truncate" style="width: 100px;">SubProyecto:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyectos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
</div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -104,15 +97,16 @@
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-2 truncate"></div> <div class="col-md-6" runat="server" style="text-align: right;">
<label class="col-md-2 truncate" style="width: 130px;">Cuenta Deposito:</label> <label style="font-size:1.2em">Cuenta Deposito:</label>
<div class="col-md-3"> <asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" style="width: 300px;"></asp:DropDownList>
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta"></asp:DropDownList> </div>
</div> <div class="col-md-3" runat="server" style="text-align: left;">
<div class="col-md-1" >
<label class="col-md-1 truncate" style="width: 70px;">Fecha:</label> <label style="width:70px; font-size:1.2em;">Fecha:</label>
<div class="col-md-2"> </div>
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;"> <div class="col-md-1" >
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="ImgCalendarioFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="ImgCalendarioFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -124,16 +118,41 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div>
<div class="col-md-3" style="align-content: flex-end;">
<div runat="server" id="divLabelTotal" style="width:100%;text-align:right;font-size:1.5em" visible="false">
<asp:label runat="server">Importe seleccionado: $</asp:label><asp:label runat="server" ID="lblValorTotal">00.00</asp:label>
</div> </div>
</div>
<div class="col-md-3" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="false">
<asp:label runat="server">Seleccionado: $</asp:label>
<asp:label runat="server" ID="lblValorTotal">00.00</asp:label>
<asp:label runat="server" ID="lblValorTotalSeleccionado" Visible="false"></asp:label>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-3" runat="server" Id="DivComision" Visible="false">
<label style="width: 70px; font-size:1.2em">Comisión:</label>
<asp:TextBox runat="server" ID="TxtComision" Class="table-group-action-input form-control input-inline input-small input-sm select2me" style="width: 70px;"></asp:TextBox>
</div>
<label class="col-md-1 truncate" style="width: 120px; font-size:1.2em; display: none" id="LblSubproyecto" >SubProyecto:</label>
<div class="col-md-2" style="display: none" id="divSubProyecton">
<asp:DropDownList ID="DdlSubProyectos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 120px; font-size:1.2em; display: none" id="LblClasificacion">Clasificación:</label>
<div class="col-md-2" style="display: none" id="divClasificacion">
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="50%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
</div>
</div>
<br />
<div style="height:550px;overflow-x:scroll"> <div style="height:550px;overflow-x:scroll">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None"> <asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
@@ -201,6 +220,9 @@
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
var ValorTotalSeleccionado = 0
var comision = 0;
function FnSuma(chk, cantidad) { function FnSuma(chk, cantidad) {
debugger; debugger;
var saldo = ToDouble($('#C_lblValorTotal').text()); var saldo = ToDouble($('#C_lblValorTotal').text());
@@ -212,8 +234,45 @@
saldo = saldo + cantidad; saldo = saldo + cantidad;
debugger; debugger;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); $('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
$('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldo, 2));
ValorTotalSeleccionado = saldo
debugger; debugger;
}
function txtSuma(txt) {
var saldo = ToDouble($('#C_lblValorTotal').text());
var comision2 = ToDouble($('#C_TxtComision').val());
if (comision2 < ValorTotalSeleccionado) {
comision2 = comision2 - comision
saldo = saldo - comision2;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
comision = ToDouble($('#C_TxtComision').val())
} else {
$('#C_TxtComision').val(comision)
alert("No es posible poner una comision superior a lo seleccionado")
} }
if (comision > 0) {
$('#LblSubproyecto').css("display", "block");
$('#divSubProyecton').css("display", "block");
$('#LblClasificacion').css("display", "block");
$('#divClasificacion').css("display", "block");
debugger;
} else {
$('#LblSubproyecto').css("display", "none");
$('#divSubProyecton').css("display", "none");
$('#LblClasificacion').css("display", "none");
$('#divClasificacion').css("display", "none");
debugger;
}
}
</script> </script>

View File

@@ -21,6 +21,8 @@ Partial Class Bancos_DepositosCaja
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = Now.ToShortDateString
txtFechaI.Text = Now.AddDays(-1).ToShortDateString txtFechaI.Text = Now.AddDays(-1).ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = Now.ToShortDateString
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
CargaCuentas() CargaCuentas()
End If End If
End Sub End Sub
@@ -35,6 +37,10 @@ Partial Class Bancos_DepositosCaja
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyectos.DataBind() DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
@@ -56,11 +62,14 @@ Partial Class Bancos_DepositosCaja
GvFacturas.DataBind() GvFacturas.DataBind()
lblValorTotal.Text = "00.00" lblValorTotal.Text = "00.00"
divLabelTotal.Visible = True divLabelTotal.Visible = True
DivComision.Visible = True
End Sub End Sub
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
Dim TotalImporte As Decimal = 0 Dim TotalImporte As Decimal = 0
Dim TotalImportePrePoliza As Decimal
For Each Gvr As GridViewRow In GvFacturas.Rows For Each Gvr As GridViewRow In GvFacturas.Rows
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
Next Next
@@ -70,6 +79,14 @@ Partial Class Bancos_DepositosCaja
Exit Sub Exit Sub
End If End If
TotalImportePrePoliza = TotalImporte
If TxtComision.Text.ToEntero > 0 Then
TotalImporte = TotalImporte - TxtComision.Text.ToEntero
If DdlSubProyectos.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Dim OcurrioError As Boolean = False Dim OcurrioError As Boolean = False
Dim ObjContabilidad As New ClsContabilidad() Dim ObjContabilidad As New ClsContabilidad()
@@ -88,7 +105,10 @@ Partial Class Bancos_DepositosCaja
Dim CveCuentaBancariaDestino As Integer = 0 Dim CveCuentaBancariaDestino As Integer = 0
Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim CveSubProyecto As Integer = 0
Dim CveClasificacion As Integer = 0
Dim documentos As String = "Los Depósitos se realizaron exitósamente<br/><br/>"
Dim imprimirFolios As String = ""
If drOrigen IsNot Nothing Then If drOrigen IsNot Nothing Then
CveMoneda = drOrigen("CveMoneda").ToString.ToEntero CveMoneda = drOrigen("CveMoneda").ToString.ToEntero
IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero
@@ -101,7 +121,9 @@ Partial Class Bancos_DepositosCaja
CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero
End If End If
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImporte, TotalImporte, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'Salida de Caja Chica 'Salida de Caja Chica
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
@@ -110,42 +132,59 @@ Partial Class Bancos_DepositosCaja
End If End If
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If TxtComision.Text.ToEntero > 0 Then
'Entrada a Bancos CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
If Not FolioIE > 0 Then If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
OcurrioError = True If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TxtComision.Text.ToEntero, "Comisión", 78, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
OcurrioError = True
End If
Else OcurrioError = True
End If
Else
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
OcurrioError = True
End If
End If End If
CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each Gvr As GridViewRow In GvFacturas.Rows For Each Gvr As GridViewRow In GvFacturas.Rows
If Gvr.FCCheckBox("ChkFactura").Checked Then If Gvr.FCCheckBox("ChkFactura").Checked Then
'Datos de las Nuevas PrePolizas 'Datos de las Nuevas PrePolizas
'Entrada a Bancos
Dim Importe As Double = Gvr.DataKey("Importe").ToDouble Dim Importe As Double = Gvr.DataKey("Importe").ToDouble
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
'Datos de las Prepolizas A Cancelar 'Datos de las Prepolizas A Cancelar
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8)
If Not FolioIE > 0 Then
OcurrioError = True
End If
CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
OcurrioError = True
End If
'Asignamos la cuenta Deposito 'Asignamos la cuenta Deposito
If Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then If Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then
OcurrioError = True OcurrioError = True
End If End If
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Documento {1}</a> &nbsp &nbsp ", CveIEDestino.ToString, SerieFolio)
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, SerieFolio)
End If End If
Next Next
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
OcurrioError = True
End If
Else OcurrioError = True
End If
If OcurrioError Then If OcurrioError Then
ObjContabilidad.RollBack() ObjContabilidad.RollBack()
@@ -153,12 +192,8 @@ Partial Class Bancos_DepositosCaja
Else Else
ObjContabilidad.Commit() ObjContabilidad.Commit()
CargaDatos() CargaDatos()
Dim SbMensaje As New StringBuilder()
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") Alert(documentos.ToString)
SbMensaje.Append("Los Depósitos se realizaron exitósamente<br/><br/>")
SbMensaje.AppendFormat("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Documento</a> &nbsp &nbsp ", CveIEDestino)
SbMensaje.AppendFormat("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a> ", StrEncript)
Alert(SbMensaje.ToString)
End If End If

View File

@@ -6676,5 +6676,6 @@ Partial Class Bancos_IE
End Sub End Sub
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub
End Class End Class

View File

@@ -3647,6 +3647,8 @@ Partial Class Bancos_PopIECompras
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub

View File

@@ -3665,6 +3665,8 @@ Partial Class Bancos_PopIEVentas
#End Region #End Region
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub

View File

@@ -3390,6 +3390,8 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub

View File

@@ -72,23 +72,25 @@ Partial Class Bancos_RepComplementoPago
Dim Banco As New ClsBancos Dim Banco As New ClsBancos
Banco.IniciaTransacSQL() Banco.IniciaTransacSQL()
Try
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then
If Banco.Mensaje = "" Then If Banco.Mensaje = "" Then
Banco.Commit() Banco.Commit()
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False) PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
Str.AppendFormat("Folio: <b>{0}</b> &nbsp;", Banco.ComplementoSerieFolio) Str.AppendFormat("Folio: <b>{0}</b> &nbsp;", Banco.ComplementoSerieFolio)
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class=""fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago))) Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class=""fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class=""fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago))) Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class=""fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> &nbsp; {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente")) Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> &nbsp; {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente"))
MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo")) MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo"))
End If
Else
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
Banco.RollBack()
End If End If
Catch ex As Exception
Else OnError("Ocurrió un error al generar el complemento de pago", ex)
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
Banco.RollBack() Banco.RollBack()
End If End Try
Banco.Dispose() Banco.Dispose()
End If End If
Next Next

View File

@@ -3,6 +3,7 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
.Filtros { .Filtros {
padding: 10px; padding: 10px;
@@ -45,7 +46,12 @@
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease; transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease;
} }
</style> .chkChoice input
{
margin-right: 5px;
}
</style>cc
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte Detalle de los Acercamientos Procesos Reporte Detalle de los Acercamientos Procesos
@@ -55,7 +61,15 @@
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li></li> <li>
<asp:LinkButton ID="LnkEditargv" runat="server" OnClick="LnkEditargv_Click"><i class="fa fa-edit" ></i><span style="padding-left:5px;">Personalizar Columnas</span></asp:LinkButton>
</li>
<%-- <li>
<asp:LinkButton ID="LnkImprimir" OnClick="LnkImprimir_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkImprimirExcel" OnClick="LnkImprimirExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton>
</li>--%>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
@@ -248,7 +262,7 @@
</div> </div>
</div> </div>
<asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRepAcercamientosDetalle" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento"> <asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRepAcercamientosDetalle" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento" OnRowDataBound="GVRepAcercamientosDetalle_RowDataBound">
<Columns> <Columns>
<asp:TemplateField HeaderText="Prospecto"> <asp:TemplateField HeaderText="Prospecto">
<ItemTemplate> <ItemTemplate>
@@ -296,10 +310,53 @@
<asp:Label ID="lblcelular" runat="server" Text='<%# Eval("Celular")%>'> </asp:Label> <asp:Label ID="lblcelular" runat="server" Text='<%# Eval("Celular")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="FechaApertura" ItemStyle-Width="5%" HeaderText="Fecha Apertura" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="FechaCierre" ItemStyle-Width="5%" HeaderText="Fecha de Cierre" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="PS" ItemStyle-Width="5%" HeaderText="Producto Servicio" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Prioridad">
<ItemTemplate>
<asp:Label ID="lblPrioridad" runat="server" Text='<%# Eval("Prioridad")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Importe" ItemStyle-Width="5%" HeaderText="Importe" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:c}" />
<asp:BoundField DataField="Comision" ItemStyle-Width="5%" HeaderText="Comisión" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:c}" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="ModalEditar" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpEditargv" class="modal-dialog modal-sm rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Editar Columnas</h4>
</div>
<div class="modal-body">
<asp:CheckBoxList ID="CBLEditargv" RepeatDirection="Horizontal" RepeatColumns="3" runat="server" CssClass="chkChoice">
<asp:ListItem Text=" Fecha Apertura" Value="1"></asp:ListItem>
<asp:ListItem Text=" Fecha de Cierre" Value="2"></asp:ListItem>
<asp:ListItem Text=" Producto Servicio" Value="3"></asp:ListItem>
<asp:ListItem Text=" Prioridad" Value="4"></asp:ListItem>
<asp:ListItem Text=" Importe" Value="5"></asp:ListItem>
<asp:ListItem Text=" Comisión" Value="6"></asp:ListItem>
</asp:CheckBoxList>
</div>
<div class="modal-footer">
<asp:Button id="GuardarEditargv" OnClick="GuardarEditargv_Click" type="button" class="btn btn-primary" runat="server" Text="Guardar"></asp:Button>
<button id="CancelarTiposAlmacen" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -196,6 +196,12 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados; GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados;
ObjRepA.Dispose(); ObjRepA.Dispose();
GVRepAcercamientosDetalle.DataBind(); GVRepAcercamientosDetalle.DataBind();
this.GVRepAcercamientosDetalle.Columns[9].Visible = false;
this.GVRepAcercamientosDetalle.Columns[10].Visible = false;
this.GVRepAcercamientosDetalle.Columns[11].Visible = false;
this.GVRepAcercamientosDetalle.Columns[12].Visible = false;
this.GVRepAcercamientosDetalle.Columns[13].Visible = false;
this.GVRepAcercamientosDetalle.Columns[14].Visible = false;
upDatosRepA.Update(); upDatosRepA.Update();
} }
@@ -225,4 +231,45 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero(); RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero();
cargarDatos(); cargarDatos();
} }
protected void GVRepAcercamientosDetalle_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 1)
{
e.Row.FCLabel("lblPrioridad").Text = "Baja";
}
else if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 2)
{
e.Row.FCLabel("lblPrioridad").Text = "Media";
}
else if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 3)
{
e.Row.FCLabel("lblPrioridad").Text = "Alta";
}
}
}
protected void LnkEditargv_Click(object sender, EventArgs e)
{
RegistraScript("$('#ModalEditar').modal('show')");
}
protected void GuardarEditargv_Click(object sender, EventArgs e)
{
foreach (ListItem item in CBLEditargv.Items)
{
if (item.Value.ToEntero() == 1) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[9].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[9].Visible = false; } }
if (item.Value.ToEntero() == 2) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[10].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[10].Visible = false; } }
if (item.Value.ToEntero() == 3) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[11].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[11].Visible = false; } }
if (item.Value.ToEntero() == 4) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[12].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[12].Visible = false; } }
if (item.Value.ToEntero() == 5) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[13].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[13].Visible = false; } }
if (item.Value.ToEntero() == 6) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[14].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[14].Visible = false; } }
}
upDatosRepA.Update();
RegistraScript("$('#ModalEditar').modal('hide')");
}
} }

View File

@@ -1449,6 +1449,8 @@ Partial Class Compras_Compras
DivEsNoDeducible.Visible = True DivEsNoDeducible.Visible = True
DivActualizarVincular.Visible = True DivActualizarVincular.Visible = True
Else Else
ViewState("CveProveedor") = -1 ViewState("CveProveedor") = -1
@@ -1824,7 +1826,7 @@ Partial Class Compras_Compras
DdlTipoCompra.Items.Clear() DdlTipoCompra.Items.Clear()
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1")) DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6")) DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9")) DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11")) DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11"))
@@ -2708,9 +2710,9 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("CveContrato", GetType(Integer)) TmpDT.Columns.Add("CveContrato", GetType(Integer))
TmpDT.Columns.Add("DifPSSat", GetType(Integer)) TmpDT.Columns.Add("DifPSSat", GetType(Integer))
If Not TmpDT.Columns.Contains("CveContratoDetalle") Then If Not TmpDT.Columns.Contains("CveContratoDetalle") Then
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
End If End If
@@ -6771,13 +6773,12 @@ Partial Class Compras_Compras
Dim CveSubProyecto69 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero Dim CveSubProyecto69 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
If CveSubProyecto69 <= 0 Then If CveSubProyecto69 <= 0 Then
Alert("Debe de asignar un sub proyecto o centro de constos", TipoMensaje.MsgAdvertencia) Alert("Debe de asignar un sub proyecto o centro de costos", TipoMensaje.MsgAdvertencia)
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
@@ -7300,6 +7301,10 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMovimiento = importeMovimiento.Abs.RoundSQL()
importeMN = importeMovimiento importeMN = importeMovimiento
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
@@ -7483,7 +7488,9 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMovimiento = importeMovimiento.Abs.RoundSQL()
importeMN = importeMovimiento importeMN = importeMovimiento
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -7577,7 +7584,9 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMovimiento = importeMovimiento.Abs.RoundSQL()
importeMN = importeMovimiento importeMN = importeMovimiento
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -7673,7 +7682,8 @@ Partial Class Compras_Compras
importeFluctuacion = importeFluctuacion.Abs.RoundSQL() importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
If importeFluctuacion <> 0 Then If importeFluctuacion <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -9035,9 +9045,14 @@ Partial Class Compras_Compras
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If End If
importeFluctuacion = importeFluctuacion.Abs.RoundSQL() importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
If importeFluctuacion <> 0 Then If importeFluctuacion <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then
ErrorMovtosCxP = 1 ErrorMovtosCxP = 1
End If End If
End If End If
@@ -9459,8 +9474,13 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento importeMN = ImporteMovimiento
End If End If
If ImporteMovimiento <> 0 Then If ImporteMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
Dim CveSubProyecto64 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto64, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
ErrorMovtosCxP = 1 ErrorMovtosCxP = 1
Exit For Exit For
End If End If
@@ -9483,7 +9503,8 @@ Partial Class Compras_Compras
End If End If
If ImporteMovimiento <> 0 Then If ImporteMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then Dim CveSubProyecto65 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto65, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
ErrorMovtosCxP = 1 ErrorMovtosCxP = 1
Exit For Exit For
End If End If
@@ -17841,7 +17862,7 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then
DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto")) DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto"))
Else Else
DdlProyecto.SelectedValueExist("-1") DdlProyecto.SelectedValueExist("-1")
End If End If
@@ -18049,7 +18070,7 @@ Partial Class Compras_Compras
DdlClasificacion.SelectedValueExist(PS("CveClasificacion").ToString) DdlClasificacion.SelectedValueExist(PS("CveClasificacion").ToString)
Else Else
Alert("El Productos/Servicio no tiene asignada una Clasificación.") Alert("El Productos/Servicio no tiene asignada una Clasificación.")
End If End If
UPPUM.Update() UPPUM.Update()
UpPSS.Update() UpPSS.Update()
@@ -19148,6 +19169,7 @@ Partial Class Compras_Compras
CargaAnticipos(CveProveedor, If(ChkNCInv.Checked, "NC", "-1")) CargaAnticipos(CveProveedor, If(ChkNCInv.Checked, "NC", "-1"))
UpAnticipos.Update() UpAnticipos.Update()
End Sub End Sub
Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False) Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False)
Dim SaldoAnticipo = 0.0 Dim SaldoAnticipo = 0.0
@@ -20198,7 +20220,7 @@ Partial Class Compras_Compras
Dim drInv As DataRow = DtInvOC.FiltroPrimero("") Dim drInv As DataRow = DtInvOC.FiltroPrimero("")
If drInv IsNot Nothing Then 'sino existe no hay problema, porque puede ser le producto un servicio If drInv IsNot Nothing Then 'sino existe no hay problema, porque puede ser le producto un servicio
DrInvOCDiferencias("TipoCambioAjuste") = drInv("TipoCambioAjuste").ToString.ToDecimal DrInvOCDiferencias("TipoCambioAjuste") = drInv("TipoCambioAjuste").ToString.ToDecimal
DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PU").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal ' DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PUOriginal").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal '
DrInvOCDiferencias("CveAlmacen") = drInv("CveAlmacen").ToString.ToEntero DrInvOCDiferencias("CveAlmacen") = drInv("CveAlmacen").ToString.ToEntero
DrInvOCDiferencias("CveMovimiento") = drInv("CveMovimiento").ToString.ToEntero DrInvOCDiferencias("CveMovimiento") = drInv("CveMovimiento").ToString.ToEntero
DrInvOCDiferencias("ConceptoSalida") = drInv("ConceptoSalida").ToString.ToEntero DrInvOCDiferencias("ConceptoSalida") = drInv("ConceptoSalida").ToString.ToEntero
@@ -20306,20 +20328,13 @@ Partial Class Compras_Compras
TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal
IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
CveCuentaAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
'' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
If DiferenciaInvOC.RoundSQL() <> 0 Then
If DiferenciaInvOC.RoundAD() <> 0 Then
If CveSubProyecto <= 0 Then If CveSubProyecto <= 0 Then
Alert("Debe de asignar un sub proyecto o centro de constos.", TipoMensaje.MsgAdvertencia) Alert("Debe de asignar un sub proyecto o centro de constos.", TipoMensaje.MsgAdvertencia)

View File

@@ -456,7 +456,11 @@ Partial Class PopUpVerFactura
If UrlParametros("EXT").ToString.ToUpper = "PDF" Then If UrlParametros("EXT").ToString.ToUpper = "PDF" Then
If UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero > 0 Then If UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero > 0 Then
PDFReciboDePagos(-1, UrlParametros("CVEIE").ToString.ToEntero, UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero, False) 'genero el documento de no existir Dim CveIE As Integer = -1
If UrlParametros("CVEIE") IsNot Nothing Then
CveIE = UrlParametros("CVEIE").ToString.ToEntero
End If
PDFReciboDePagos(-1, CveIE, UrlParametros("CVECOMPLEMENTOPAGO").ToString.ToEntero, False) 'genero el documento de no existir
End If End If
End If End If

View File

@@ -431,6 +431,10 @@ Partial Class Compras_ReembolsosComprobaciones
Next Next
'rmf. codigo temporal
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
ValFechaDocumento = False
End If
If ValFechaDocumento Then If ValFechaDocumento Then
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia) Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
@@ -2064,5 +2068,7 @@ Partial Class Compras_ReembolsosComprobaciones
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub
End Class End Class

View File

@@ -216,10 +216,20 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px"> <asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal> <%-- <table>
<tr>
<td><asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0}", Eval("Total", "{0:N2}")) %>'></asp:Literal></td>
<td><asp:Literal ID="LtlAbre" runat="server" Text='<%# String.Format("{0}", Eval("Abreviatura")) %>'></asp:Literal></td>
</tr>
</table>--%>
<%--<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>--%>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0}", Eval("Total", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="Abreviatura" Visible="true" HeaderText="" ItemStyle-Width="30px" />
<asp:BoundField DataField="CantidadOC" Visible="false" HeaderText="# OC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" /> <asp:BoundField DataField="CantidadOC" Visible="false" HeaderText="# OC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
<asp:TemplateField HeaderText="XML"> <asp:TemplateField HeaderText="XML">
<ItemTemplate> <ItemTemplate>

View File

@@ -719,9 +719,15 @@ Partial Class Compras_eFacturas
If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim
If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True
If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True 'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True
If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False 'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False
If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True 'If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True
If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(12).Visible = True : GvD.Columns(13).Visible = True
If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(11).Visible = False
If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(6).Visible = True
CargaGvBitacora() CargaGvBitacora()
CargaDatos() CargaDatos()
End If End If
@@ -913,6 +919,11 @@ Partial Class Compras_eFacturas
#Region "G V D A T O S" #Region "G V D A T O S"
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.Header Then
e.Row.Cells(4).Attributes.Add("data-tipodato", "numeric")
End If
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FindControl("lnkRegenerarPDF").Visible = True ' (UsuarioActual.CveRol = 1) e.Row.FindControl("lnkRegenerarPDF").Visible = True ' (UsuarioActual.CveRol = 1)
'e.Row.FindControl("lnkDownPdf").Visible = (UsuarioActual.CveRol = 1) 'e.Row.FindControl("lnkDownPdf").Visible = (UsuarioActual.CveRol = 1)
@@ -937,6 +948,13 @@ Partial Class Compras_eFacturas
e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString) e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString)
'e.Row.Cells(4).Attributes.Add("data-order", Convert.ToInt64(e.Row.DBCampo("Total").ToDecimal).ToString.PadLeft(10, "0"c))
If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then
e.Row.FCLiteral("LtlXML").Text = String.Format("<a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?RFC={0}&File={1}"">Ver</a>", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML"))) e.Row.FCLiteral("LtlXML").Text = String.Format("<a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?RFC={0}&File={1}"">Ver</a>", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML")))
If e.Row.DBCampo("TipoComprobante") = "P" Then If e.Row.DBCampo("TipoComprobante") = "P" Then

View File

@@ -185,13 +185,6 @@
<ADS:Dropdownlost ID="DdlProveedores" runat="server" data-metodo="getproveedores" UsaWebService="true" Width="100%" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlProveedores" runat="server" data-metodo="getproveedores" UsaWebService="true" Width="100%" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
</div> </div>
</asp:Panel> </asp:Panel>
<asp:Panel runat="server" ID="pnlOpcion2" Visible="false" CssClass="form-line">
<div class="catcuentas left">
<asp:Label runat="server" Text="Porcentaje IVA():"></asp:Label></div>
<div class="catcuentas right">
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
</div>
</asp:Panel>
<asp:Panel runat="server" ID="pnlOpcion3" Visible="false" CssClass="form-line"> <asp:Panel runat="server" ID="pnlOpcion3" Visible="false" CssClass="form-line">
<div class="catcuentas left"> <div class="catcuentas left">
<asp:Label runat="server" Text="Clasificación"></asp:Label></div> <asp:Label runat="server" Text="Clasificación"></asp:Label></div>
@@ -222,11 +215,18 @@
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost>
</div> </div>
</asp:Panel> </asp:Panel>
<asp:Panel runat="server" ID="pnlOpcion2" Visible="false" CssClass="form-line">
<div class="catcuentas left">
<asp:Label runat="server" Text="Porcentaje Impuesto:"></asp:Label></div>
<div class="catcuentas right">
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
</div>
</asp:Panel>
<br /> <br />
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>" data-btn-ok-label="si" /> <asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" /> <asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" /> <asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
</fieldset> </fieldset>
</div> </div>
@@ -270,5 +270,21 @@
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol') buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
}); });
}); });
function Afectable(btn) {
debugger;
$('#C_nuevacuenta').attr('data-toggle', 'confirmation');
$('#C_nuevacuenta').attr('data-popout', 'true');
$('#C_nuevacuenta').attr('data-original-title', '<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>');
$('#C_nuevacuenta').attr('data-btn-ok-label', 'si');
}
function NoAfectable() {
debugger;
$('#C_nuevacuenta').attr('data-toggle', '');
$('#C_nuevacuenta').attr('data-popout', '');
$('#C_nuevacuenta').attr('data-original-title', '');
$('#C_nuevacuenta').attr('data-btn-ok-label', '');
}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -206,7 +206,11 @@ Partial Class Contabilidad2_CatCuentas
End If End If
If Afectable Then If Afectable Then
RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID))
Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia) Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia)
Else
RegistraScript("NoAfectable();")
End If End If
TxtCuenta.Enabled = True TxtCuenta.Enabled = True
@@ -406,15 +410,21 @@ Partial Class Contabilidad2_CatCuentas
Dim CveTipoSaldo As Integer = 0 Dim CveTipoSaldo As Integer = 0
Dim PorcentajeIVA As Decimal = -1 Dim PorcentajeIVA As Decimal = -1
Dim drt As DataRow Dim drt As DataRow
Dim CveConceptoAdmin As Integer = -1 Dim CveConceptoAdmin As Integer
Dim CveProveedor As Integer = -1 Dim CveProveedor As Integer
Dim CveCliente As Integer = -1 Dim CveCliente As Integer
Dim CveClasificacion As Integer = -1 Dim CveClasificacion As Integer
Dim PorcentajeImpuesto As Decimal = -1 Dim PorcentajeImpuesto As Decimal
Dim CveBancoCuenta As Integer = -1 Dim CveBancoCuenta As Integer
Dim CveAlmacen As Integer = -1 'Dim CveAlmacen As Integer = -1
Dim CvePersonal As Integer = -1 'Dim CvePersonal As Integer = -1
Dim NombreCuenta As String
Dim TipoCuenta As String
Dim CuentaMayor As Integer
Dim CveMoneda As Integer
Dim DigAgrup As Integer
Dim CveAgrupadorSat As Integer
Dim NomIdioma As String
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
If CveConceptoContable > 0 Then If CveConceptoContable > 0 Then
@@ -438,19 +448,28 @@ Partial Class Contabilidad2_CatCuentas
CveBancoCuenta = IIf(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero) CveBancoCuenta = IIf(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero)
'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero) 'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero)
'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero) 'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero)
End If NombreCuenta = IIf(drt("Nombre").ToString = "", "", drt("Nombre").ToString.ToEntero)
TipoCuenta = IIf(drt("Tipo").ToString = "", "", drt("Tipo").ToString.ToEntero)
CuentaMayor = IIf(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero)
CveMoneda = IIf(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero)
DigAgrup = IIf(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero)
CveAgrupadorSat = IIf(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero)
NomIdioma = IIf(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString.ToEntero)
idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta) CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
If idnew > 0 Then If idnew > 0 Then
If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then If Not ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
ObjConta.RollBack() If ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda,
ObjConta.Dispose() DigAgrup, CveAgrupadorSat, NomIdioma) Then
Exit Sub ObjConta.RollBack()
ObjConta.Dispose()
Exit Sub
End If
End If
End If End If
End If End If
Else Else
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA) DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA)
@@ -640,7 +659,7 @@ Partial Class Contabilidad2_CatCuentas
pnlOpcion2.Visible = True pnlOpcion2.Visible = True
pnlOpcion3.Visible = True pnlOpcion3.Visible = True
If DdlClasificacion.Items.Count < 2 Then If DdlClasificacion.Items.Count < 2 Then
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1) DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind() DdlClasificacion.DataBind()
End If End If
Case 4 Case 4

View File

@@ -1578,22 +1578,39 @@ Partial Class GPS_Rastreo
If Opcion = "KM" Then If Opcion = "KM" Then
If GVKm.Rows.Count > 0 Then If GVKm.Rows.Count > 0 Then
RutaReporte = "Empresas/Grales/ReportesProgramados/RPTKmRecorridos.rdlc" If Format = "PDF" Then
NombreReporte = "ReporteKMRecorridos" RutaReporte = "Empresas/Grales/ReportesProgramados/RPTKmRecorridos.rdlc"
NombreReporte = "ReporteKMRecorridos"
Try
Dim RptParametro As New List(Of ReportParameter)
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
Catch ex As Exception
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
End Try
Else
Dim filtros As String = $"Fechas: {FechaI.ToString("dd/MM/yyyy")} a {FechaF.ToString("dd/MM/yyyy")}"
If DtDatos.Rows.Count > 0 AndAlso String.IsNullOrEmpty(DtDatos.Rows(0)("Vehiculo").ToString()) Then
DtDatos.Rows(0)("Vehiculo") = "Total Kilometros Recorridos"
End If
DtDatos.Columns.RemoveAt(0)
DtDatos.Columns("Vehiculo").ColumnName = "Vehículo"
DtDatos.Columns("TiempoOperativo").ColumnName = "Tiempo Operativo"
DtDatos.Columns("Dist").ColumnName = "Kilometros Recorridos"
ImprimirExcelG(DtDatos, "ReporteKMRecorridos.xlsx", "Reporte de Kilometros Recorridos", filtros, NombreHoja:="RepKM")
End If
Try
Dim RptParametro As New List(Of ReportParameter)
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
Catch ex As Exception
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
End Try
Else Else
Alert("No se pudo imprimir el pdf, ya que no se ha hecho una consulta, o ésta no arrojó resultados.", TipoMensaje.MsgInformacion) Alert("No se pudo imprimir el pdf, ya que no se ha hecho una consulta, o ésta no arrojó resultados.", TipoMensaje.MsgInformacion)
End If End If
@@ -1737,8 +1754,16 @@ Partial Class GPS_Rastreo
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex)) GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
End Try End Try
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC") If Opcion = "Idle" AndAlso Format = "EXCEL" Then
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format) Dim filtros As String = $"Fechas: {FechaI.ToString("dd/MM/yyyy")} a {FechaF.ToString("dd/MM/yyyy")}, Tiempo Muerto: {TxtMinutos.Text} minutos"
ImprimirExcelG(DtDatos, "ReporteKMRecorridos.xlsx", "Reporte de KM Recorridos", filtros)
Else
retorno = StreamPDF(RutaReporte, DtDatos, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
End If
DtDatos.Clear() DtDatos.Clear()
Else Else
Alert("No se pudo imprimir el pdf, ya que no se ha hecho una consulta, o ésta no arrojó resultados.", TipoMensaje.MsgInformacion) Alert("No se pudo imprimir el pdf, ya que no se ha hecho una consulta, o ésta no arrojó resultados.", TipoMensaje.MsgInformacion)
@@ -1785,7 +1810,7 @@ Partial Class GPS_Rastreo
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim FileExcel As ExcelFile = New ExcelFile Dim FileExcel As ExcelFile = New ExcelFile
Dim Dt = DtPosiciones.Copy() Dim Dt = DtPosiciones.Copy()
Dt.Columns.Add("Direccion", GetType(String)) Dt.Columns.Add("Dirección", GetType(String))
Dt.Columns.Remove("CveDispositivo") Dt.Columns.Remove("CveDispositivo")
Dt.Columns.Remove("Evento") Dt.Columns.Remove("Evento")
Dt.Columns.Remove("Icono") Dt.Columns.Remove("Icono")
@@ -1797,11 +1822,42 @@ Partial Class GPS_Rastreo
Dt.Columns.Remove("Posicion") Dt.Columns.Remove("Posicion")
For Each Dir As JObject In Direcciones For Each Dir As JObject In Direcciones
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() Dt.Rows(Dir("Indice").ToEntero())("Dirección") = Dir("Direccion").ToString()
Next Next
Dim item = FileExcel.Worksheets.Add("Última Posición") Dt.Columns("Vehiculo").ColumnName = "Vehículo"
item.InsertDataTable(Dt, New InsertDataTableOptions() With Dt.Columns("Velocidad").ColumnName = "Velocidad (KM/H)"
ImprimirExcelG(Dt, FileName, "Última Posición", "", NombreHoja:="UltimaPosicion")
'Dim item = FileExcel.Worksheets.Add("Última Posición")
'item.InsertDataTable(Dt, New InsertDataTableOptions() With
' {
' .ColumnHeaders = True,
' .StartRow = 0,
' .StartColumn = 0
' })
'item.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
'item.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
'Dim columnCount = item.CalculateMaxUsedColumns()
'For i = 0 To columnCount
' item.Columns(i).AutoFit(1, item.Rows(i), item.Rows(item.Rows.Count - 1))
'Next
'FileExcel.Save(Me.Response, FileName, SaveOptions.XlsxDefault)
End Sub
Private Sub ImprimirExcelG(DtDatos As DataTable, Archivo As String, Titulo As String, Filtros As String, Optional NombreHoja As String = "Hoja1")
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim excel As ExcelFile = New ExcelFile
Dim TotalRowHeader As Integer = 8
Dim TotalRowFooter As Integer = 2
Dim item = excel.Worksheets.Add(NombreHoja)
item.InsertDataTable(DtDatos, New InsertDataTableOptions() With
{ {
.ColumnHeaders = True, .ColumnHeaders = True,
.StartRow = 0, .StartRow = 0,
@@ -1813,9 +1869,127 @@ Partial Class GPS_Rastreo
Dim columnCount = item.CalculateMaxUsedColumns() Dim columnCount = item.CalculateMaxUsedColumns()
For i = 0 To columnCount For i = 0 To columnCount
item.Columns(i).AutoFit(1, item.Rows(i), item.Rows(item.Rows.Count - 1)) item.Columns(i).AutoFit(1, item.Rows(i), item.Rows(item.Rows.Count - 1))
Next Next
FileExcel.Save(Me.Response, FileName, SaveOptions.XlsxDefault)
Dim worksheet = excel.Worksheets(0)
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
celdasConTexto.Style.Font.Name = "Calibri Light"
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
RangoNombreEmpresa.Merged = True
RangoNombreEmpresa.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=UsuarioActual.CveCliente).FiltroPrimeroValor("Nombre")
RangoNombreEmpresa.Style.Font.Size = 18 * 20
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
RangoTitulo.Merged = True
RangoTitulo.Value = Titulo
RangoTitulo.Style.Font.Size = 20 * 20
RangoTitulo.Style.Font.Name = "Calibri Light"
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
'If FechaIMes.Trim.Length > 0 And FechaFMes.Trim.Length > 0 Then
' Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex)
' RangoFechas.Merged = True
' RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}"
' RangoFechas.Style.Font.Size = 15 * 20
' RangoFechas.Style.Font.Name = "Calibri Light"
' RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
' RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
'End If
'If SubProyecto.Length > 0 Then
' Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
' RangoSubProyecto.Merged = True
' RangoSubProyecto.Value = SubProyecto
' RangoSubProyecto.Style.Font.Size = 20 * 20
' RangoSubProyecto.Style.Font.Name = "Calibri Light"
' RangoSubProyecto.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
' RangoSubProyecto.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
'End If
If Not String.IsNullOrEmpty(Filtros) Then
Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
RangoDatoTituloExtra.Merged = True
RangoDatoTituloExtra.Value = Filtros
RangoDatoTituloExtra.Style.Font.Size = 15 * 20
RangoDatoTituloExtra.Style.Font.Name = "Calibri Light"
RangoDatoTituloExtra.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoDatoTituloExtra.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
End If
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
If i > 0 Then
Try
worksheet.Columns(i).AutoFit(1)
Catch ex As Exception
End Try
End If
Next
Dim IndexEndTable As Integer = DtDatos.Rows.Count + TotalRowHeader + TotalRowFooter
worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió"
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = UsuarioActual.Nombre
worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
'Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
'If Imagen.Exists Then
' Dim Ruta As String = String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)
' Using sr As New StreamReader(Ruta)
' Dim ms As New MemoryStream()
' sr.BaseStream.CopyTo(ms)
' worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", 100, 100, LengthUnit.Pixel)
' End Using
'End If
For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
If I > 0 Then
'If Divisor = 1 Then
' worksheet.Columns(I + 1).Style.NumberFormat = "#,##0.00"
'Else
' worksheet.Columns(I + 1).Style.NumberFormat = "#,##"
'End If
Try
worksheet.Columns(I).AutoFit(1)
Catch ex As Exception
End Try
End If
Next
excel.Save(Me.Response, Archivo, SaveOptions.XlsxDefault)
End Sub End Sub
Private Function CargaDireccion(ByVal lat As String, ByVal lng As String) As String Private Function CargaDireccion(ByVal lat As String, ByVal lng As String) As String
Try Try

View File

@@ -88,7 +88,7 @@
<asp:TemplateField ItemStyle-Width="7%"> <asp:TemplateField ItemStyle-Width="7%">
<ItemTemplate> <ItemTemplate>
<%--<asp:Literal ID="LtlExistencia" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>'></asp:Literal>--%> <%--<asp:Literal ID="LtlExistencia" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>'></asp:Literal>--%>
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("Existencia").ToString().Split("."c)(0) %>' Width="45px" style='text-align:right;' /> <asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("Existencia", "{0:####.###}") %>' Width="45px" style='text-align:right;' />
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator> <asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -212,11 +212,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Next Next
'inserto la prepoliza 'inserto la prepoliza
If CveMovimientoEntrada > 0 AndAlso CveMovimientoSalida > 0 Then If Not ErrorMovInv AndAlso CveMovimientoEntrada > 0 AndAlso CveMovimientoSalida > 0 Then
Dim Concepto As String = "Ajuste Sección" Dim Concepto As String = "Ajuste Sección"
Dim IdCtaContableOrigen As Integer = 0 Dim IdCtaContableOrigen As Integer = 0
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/AjusteAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim importe As Decimal = resultado.SUMD("Total").RoundAD Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
Dim contabilizable As Boolean = False Dim contabilizable As Boolean = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
ErrorMovInv = True ErrorMovInv = True
@@ -616,7 +616,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
'Mostrar Sección 'Mostrar Sección
GvD.Columns(11).Visible = ChkMostrarSeccion.Checked GvD.Columns(11).Visible = ChkMostrarSeccion.Checked
GvD.Columns(12).Visible = ChkMostrarSeccion.Checked GvD.Columns(12).Visible = ChkMostrarSeccion.Checked
CargaDatos()
UppD.Update() UppD.Update()
End Sub End Sub

View File

@@ -1362,7 +1362,7 @@ Partial Class Inventarios_EntradasSalidas
registro.Item("CveUM") = CveUM registro.Item("CveUM") = CveUM
registro.Item("UnidadMedida") = UM registro.Item("UnidadMedida") = UM
registro.Item("CvePS") = CvePS registro.Item("CvePS") = CvePS
registro.Item("CodigoPS") = PS registro.Item("CodigoPS") = String.Format("{0} - {1}", Codigo, PS)
registro.Item("PS") = PS registro.Item("PS") = PS
registro.Item("PU") = PU registro.Item("PU") = PU
'registro.Item("PUExtranjero") = PU 'registro.Item("PUExtranjero") = PU

View File

@@ -516,7 +516,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false"> <asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Enabled="false"></asp:TextBox> <asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false"> <asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">

View File

@@ -966,8 +966,8 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
e.Row.FCTextBox("TxtCaducidad").Visible = True e.Row.FCTextBox("TxtCaducidad").Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True e.Row.FCLinkButton("LnkCaducidad").Visible = True
'e.Row.FCTextBox("TxtCaducidad").readonly = True e.Row.FCTextBox("TxtCaducidad").readonly = True
e.Row.FCTextBox("TxtCaducidad").enabled = True ' e.Row.FCTextBox("TxtCaducidad").enabled = True
Else Else
e.Row.FCTextBox("TxtCaducidad").Visible = False e.Row.FCTextBox("TxtCaducidad").Visible = False
e.Row.FCLinkButton("LnkCaducidad").Visible = False e.Row.FCLinkButton("LnkCaducidad").Visible = False
@@ -975,8 +975,8 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(e.Row.DBCampo("AplicaLote")) Then If CBool(e.Row.DBCampo("AplicaLote")) Then
e.Row.FCTextBox("TxtLote").Visible = True e.Row.FCTextBox("TxtLote").Visible = True
' e.Row.FCTextBox("TxtLote").readonly = True e.Row.FCTextBox("TxtLote").readonly = True
e.Row.FCTextBox("TxtLote").enabled = True 'e.Row.FCTextBox("TxtLote").enabled = True
Else Else
e.Row.FCTextBox("TxtLote").Visible = False e.Row.FCTextBox("TxtLote").Visible = False
End If End If
@@ -2463,18 +2463,21 @@ Partial Class Inventarios_EntregaAlmacen
For Each Dr As DataRow In DtDatos.Rows For Each Dr As DataRow In DtDatos.Rows
CantidadPendiente = Dr("CantidadGV").ToString().ToDecimal - Dr("CantidadTraspaso").ToString().ToDecimal - CantidadEntradaSinCosto CantidadPendiente = Dr("CantidadGV").ToString().ToDecimal - Dr("CantidadTraspaso").ToString().ToDecimal - CantidadEntradaSinCosto
If CantidadPendiente > 0 Then If CantidadPendiente > 0 Then
Dim PU As Decimal = 0 Dim PU As Decimal = 0
Dim CveSeccionAlmacen As Integer = If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)
'SI FUE POR SERIE
'SI FUE POR SERIE
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec"))) DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
DtDetalleLote = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec"))) DtDetalleLote = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
If DtDetalle.Rows.Count > 0 Then If DtDetalle.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalle.Rows For Each Dr1 As DataRow In DtDetalle.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For Exit For
@@ -2483,10 +2486,11 @@ Partial Class Inventarios_EntregaAlmacen
ElseIf DtDetalleLote.Rows.Count > 0 Then ElseIf DtDetalleLote.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalleLote.Rows For Each Dr1 As DataRow In DtDetalleLote.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For Exit For
@@ -2497,7 +2501,7 @@ Partial Class Inventarios_EntregaAlmacen
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.")
Exit For Exit For

View File

@@ -0,0 +1,104 @@
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ReconstruirCostos.aspx.vb" Inherits="Inventario_ReconstruirCostos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server" Text="Reconstruir Costos"></asp:Literal>&nbsp;<asp:Literal ID="LtlReconstruir" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<%-- <li>
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
</li>--%>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<%--Filtros--%>
<label class="col-md-1 truncate" style="width: 100px;">Clasificacion:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 100px;">Marca:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlMarca" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Marca" DataValueField="CveMarca" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione la Marca (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="row">
<div class="col-md-12" align="right">
<asp:Label ID="LbFiltrar" Text="Filtrar" runat="server" />
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProdcutos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProdcutos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UpGvProductos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div style="height:650px; overflow-y: scroll;" >
<asp:GridView ID="GvProdcutos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, PS" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="ChkProducto" runat="server"/>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="PS" NullDisplayText="N/A" ItemStyle-Width="30%" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField NullDisplayText="N/A" ItemStyle-Width="60%" ItemStyle-HorizontalAlign="Center" />
</Columns>
<RowStyle Font-Size="Smaller" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpReconstruir" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div style="width: 100%; text-align: center;">
<div>
<br />
<asp:Button ID="BtnReconstruir" runat="server" Text="Guardar" CssClass="btn btn-primary" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,88 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports System.Data
Partial Class Inventario_ReconstruirCostos
Inherits ClsPaginas
Private Property FacturasCheckadas As Integer
Get
Return ViewState("FacturasCheckadas").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("FacturasCheckadas") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaClasificaciones()
CargaMarcas()
End If
End Sub
Private Sub CargaClasificaciones()
If UsuarioActual.Empresa.UsaAC Then
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
Else
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
End If
DdlClasificacion.DataBind()
End Sub
Private Sub CargaMarcas()
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarca.DataSource = ObjPS.DtResultados
DdlMarca.DataBind()
End If
ObjPS.Dispose()
End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim ObjPS As New ClsProductosServicios
ObjPS.GetPS(-1, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveMarca:=DdlMarca.SelectedValue.ToEntero)
If ObjPS.DtResultados.Rows.Count > 0 Then
GvProdcutos.DataSource = ObjPS.DtResultados
GvProdcutos.DataBind()
UpGvProductos.Update()
End If
ObjPS.Dispose()
End Sub
Private Sub BtnReconstruir_Click(sender As Object, e As EventArgs) Handles BtnReconstruir.Click
Dim objInv As New ClsInventarios
Dim TieneError As Boolean = False
Dim Producto As String = ""
For Each Gvr As GridViewRow In GvProdcutos.Rows
If Gvr.FCCheckBox("ChkProducto").Checked Then
Dim CvePS As Integer = Gvr.DataKey("CvePS").ToEntero
If Not objInv.ReconstruirCostos(CvePS, UsuarioActual.CveEmpresa) Then
TieneError = True
Producto += String.Format("{0} <br/>", Gvr.DataKey("PS").ToString)
End If
End If
Next
If TieneError Then
Alert(String.Format("Error al reconstruir los costos en los siguientes productos: {0}", Producto), TipoMensaje.MsgError)
Else
Alert("Se realizo el cambio correctamente", TipoMensaje.MsgConfirmacion)
End If
objInv.Dispose()
End Sub
End Class

View File

@@ -153,6 +153,9 @@
<li> <li>
<asp:HyperLink ID="LnkProvisionNomina" Visible="false" runat="server"><i class="fa fa-eye"></i>Ver provisión</asp:HyperLink> <asp:HyperLink ID="LnkProvisionNomina" Visible="false" runat="server"><i class="fa fa-eye"></i>Ver provisión</asp:HyperLink>
</li> </li>
<li>
<asp:HyperLink ID="LnkProvisionNominaAsimilados" Visible="false" runat="server"><i class="fa fa-eye"></i>Ver provisión Asimilados</asp:HyperLink>
</li>
<li> <li>
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton> <asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
</li> </li>

View File

@@ -1,7 +1,7 @@
Imports Extensiones Imports Extensiones
Imports System.Data Imports System.Data
Partial Class Sistemas_PopUpAddUsuario Partial Class Sistemas_PopUpAddUsuario
Inherits ClsPaginas Inherits ClsPaginas
#Region "PROPIEDADES" #Region "PROPIEDADES"
Public Property CveCliente As Integer Public Property CveCliente As Integer
Get Get
@@ -51,7 +51,7 @@ Partial Class Sistemas_PopUpAddUsuario
Set(value As Integer) Set(value As Integer)
ViewState("CvePlataforma") = value ViewState("CvePlataforma") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
@@ -164,8 +164,14 @@ Partial Class Sistemas_PopUpAddUsuario
If ObjUsuario.UpdateUsuario(LtlUsuario.Text, TxtNombre.Text, -1, TxtEmail.Text, -1, -1, True, True, -1, CveUsuario, -1, -1) Then If ObjUsuario.UpdateUsuario(LtlUsuario.Text, TxtNombre.Text, -1, TxtEmail.Text, -1, -1, True, True, -1, CveUsuario, -1, -1) Then
Alert("La contraseña se reestableció correctamente a la contraseña por default '-acceso-'.") Alert("La contraseña se reestableció correctamente a la contraseña por default '-acceso-'.")
Dim Liga As String = $"{Context.Request.Url.OriginalString.Substring(0, Context.Request.Url.OriginalString.Length - Context.Request.Url.PathAndQuery.Length)}/LogIn.aspx" Dim Liga As String = $"{Context.Request.Url.OriginalString.Substring(0, Context.Request.Url.OriginalString.Length - Context.Request.Url.PathAndQuery.Length)}/LogIn.aspx"
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa) Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa)
EnviaCorreo(Liga, LigaActivar)
If UsuarioActual.Empresa.CvePlataforma = 3 Then
EnviaCorreoGPS(Liga, LigaActivar)
Else
EnviaCorreo(Liga, LigaActivar)
End If
End If End If
End If End If
ObjUsuario.Dispose() ObjUsuario.Dispose()
@@ -251,8 +257,14 @@ Partial Class Sistemas_PopUpAddUsuario
'ENVIA CORREO 'ENVIA CORREO
If CveUsuario > 0 Then If CveUsuario > 0 Then
Dim Liga As String = $"{Context.Request.Url.OriginalString.Substring(0, Context.Request.Url.OriginalString.Length - Context.Request.Url.PathAndQuery.Length)}/LogIn.aspx" Dim Liga As String = $"{Context.Request.Url.OriginalString.Substring(0, Context.Request.Url.OriginalString.Length - Context.Request.Url.PathAndQuery.Length)}/LogIn.aspx"
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa) Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa)
Mensaje = EnviaCorreo(Liga, LigaActivar)
If UsuarioActual.Empresa.CvePlataforma = 3 Then
Mensaje = EnviaCorreoGPS(Liga, LigaActivar)
Else
Mensaje = EnviaCorreo(Liga, LigaActivar)
End If
Else Else
HuboError = True HuboError = True
End If End If
@@ -651,16 +663,139 @@ Partial Class Sistemas_PopUpAddUsuario
OnError("Ocurrió error al mandar MAIL", ex) OnError("Ocurrió error al mandar MAIL", ex)
End Try End Try
Return Retorno
End Function
Private Function EnviaCorreoGPS(Liga As String, LigaActivar As String) As String
Dim Retorno As String = ""
Try
'Dim URL As String = "https://gps.signalsgps.com/" + LigaActivar
Dim Para = TxtEmail.Text.Trim
Dim Asunto = "ACCESO A SIGNALS GPS"
'Dim SBBody As New StringBuilder
''Linia de estilos
'SBBody.Append("<style> .mailbody{ background-color:#EEF1F5; padding:15px; font-family :'Open Sans', sans-serif; } .mailcontent{ background-color:#fff; font-size: 14px; color: #333; padding:0px 15px ; } .mailtitle{padding:8px;color:#32C5D2; font-size: 18px;font-weight: 700!important;border-bottom:2px solid #EEF1F5;text-transform: uppercase;}.marco{border: 1px solid #869ab3;border-top: 0;background-color: #67809F; margin: 10px 15px 25px 15px;color: #fff;}.marco-title{padding: 10px 10px;text-transform: uppercase;font-weight: 700!important;}.marco-body{color:#333;background-color:#fff;}.nota{background: #E5E5E5;padding:15px;color:#333;} .logo { font-size:12px; font-style:italic; text-align:right; } .col1{width:180px;font-weight: 700!important;display:inline-block;} .col2{min-width:260px;display:inline-block;} </style>")
''incio Cuerpo del correo
'SBBody.Append("<div Class='mailbody'>")
'SBBody.Append("<div Class='mailcontent'>")
'SBBody.Append("<div Class='mailtitle'>")
'SBBody.Append("ALTA DE CUENTA")
'SBBody.Append("</div>")
'SBBody.Append("<br/>")
'SBBody.AppendFormat("<b> Estimado {0}:</b><br/>", TxtNombre.Text.ToUpper)
'SBBody.AppendFormat("El presente correo es para informarle que se le han asignado los siguientes datos para el acceso a la Plataforma de: <b>{0}</b><br/><br/>", UsuarioActual.Empresa.Empresa)
'SBBody.Append("<div Class='marco'>")
'SBBody.Append("<div Class='marco-title'>Datos de usuario</div>")
'SBBody.Append("<div Class='marco-body'>")
'SBBody.Append("<div>")
'SBBody.Append("<div>")
'SBBody.Append("<div class='col1'> Usuario</div>")
'SBBody.AppendFormat("<div class='col2'>{0}</div>", TxtEmail.Text)
'SBBody.Append("</div>")
'SBBody.Append("<div>")
'SBBody.Append("<div class='col1'> Accesé al sistema dando click a la liga y estableciendo su contraseña</div>")
'SBBody.AppendFormat("<div class='col2'><a href='{0}'target='_blank'>Activar</a></div>", LigaActivar)
'SBBody.Append("</div>")
'SBBody.Append("</div>")
'SBBody.Append("</div>")
'SBBody.Append("<br/>")
'SBBody.Append("Para Activar su cuenta debera cambiar su contraseña.<br/><br/>")
'SBBody.Append("<div Class='nota'>")
'SBBody.Append("Nota Favor de NO responder este correo. ")
'SBBody.Append("</div><br/><br/>")
'SBBody.AppendFormat("<div class='logo'><img src='{0}Imagenes/LogoSinFondo.png' style='width:30px;'/>ADSistemas </div>", URL)
'SBBody.Append("</div>")
'SBBody.Append("</div>")
Dim SBBody As New StringBuilder()
SBBody.Append("<div>")
SBBody.Append("<div style ='border: none; border-bottom: solid #eef1f5 1.5pt; padding: 0in 0in 6.0pt 0in;'>")
SBBody.Append(" <table style='border-collapse: collapse;' border='0' cellspacing='0' cellpadding='0'>")
SBBody.Append(" <tbody>")
SBBody.Append(" <tr>")
SBBody.Append(" <td style='width: 65.55pt; padding: 0in 5.4pt 0in 5.4pt;' valign='top' width='87'>&nbsp;</td>")
SBBody.Append(" <td style='width: 376.5pt; padding: 0in 5.4pt 0in 5.4pt;' valign='bottom' width='502'>")
SBBody.Append(" <p class='MsoNormal' style='background: white;'><span style='font-size: 13.5pt; font-family: ' Avenir Next LT Pro Light',sans-serif; color: #c00000; text-transform: uppercase;'>DATOS DE ACCESO<u></u><u></u></span></p>")
SBBody.Append(" <p class='MsoNormal'><span style='font-size: 13.5pt; font-family: ' Avenir Next LT Pro Light',sans-serif; color: #c00000; text-transform: uppercase;'><u></u>&nbsp;<u></u></span></p>")
SBBody.Append(" </td>")
SBBody.Append(" </tr>")
SBBody.Append(" </tbody>")
SBBody.Append(" </table>")
SBBody.Append("</div>")
SBBody.AppendFormat(" <p Class='MsoNormal' style='margin-bottom: 12.0pt; background: white;'><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Avenir Next LT Pro Light',sans-serif; color: #404040;'><br /><strong>Estimado / a {0}:<u></u><u></u></strong></span></p>", TxtNombre.Text)
SBBody.Append(" <p Class='MsoNormal' style='margin-bottom: 12.0pt; background: white;'><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Avenir Next LT Pro Light',sans-serif; color: #333333;'>El presente correo es para informarle que se le han asignado los siguentes datos para el acceso</span><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Avenir Next LT Pro Light',sans-serif; color: black;'> a la plataforma </span><strong><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Avenir Next LT Pro Light',sans-serif; color: #c00000;'>SIGNALS GPS</span></strong><u></u><u></u></p>")
SBBody.Append(" <table style ='border-collapse: collapse;' border='0' cellspacing='0' cellpadding='0'>")
SBBody.Append(" <tbody>")
SBBody.Append(" <tr style='height: 21.25pt;'>")
SBBody.Append(" <td style='width: 441.4pt; border: none; border-bottom: solid #c00000 1.0pt; background: #e7e6e6; padding: 5.4pt 5.4pt 5.4pt 5.4pt; height: 21.25pt;' valign='bottom' width='589'>")
SBBody.Append(" <p class='MsoNormal' style='margin-bottom: 12.0pt; text-align: center;' align='center'><strong><span style='font-family: ' Avenir Next LT Pro Light',sans-serif; color: #c00000;'>USUARIO ASIGNADO</span></strong><u></u><u></u></p>")
SBBody.Append(" </td>")
SBBody.Append(" </tr>")
SBBody.Append(" <tr>")
SBBody.Append(" <td style='width: 441.4pt; border: none; border-bottom: solid #c00000 1.0pt; padding: 5.4pt 5.4pt 5.4pt 5.4pt;' valign='top' width='589'>")
SBBody.Append(" <p class='MsoNormal' style='margin-bottom: 12.0pt;'><strong><span style='font-family: ' Arial Nova Light',sans-serif; color: #c00000;'>Usuario</span></strong><span style='font-family: ' Arial Nova Light',sans-serif; color: #c00000;'>:<u></u><u></u></span></p>")
SBBody.AppendFormat(" <p class='MsoNormal' style='margin-bottom: 12.0pt;'><span style='font-family: ' Arial Nova Light',sans-serif;'><a href='mailto:{0}' target='_blank' rel='noopener'>{0}</a><u></u><u></u></span></p>", TxtEmail.Text)
SBBody.Append(" </td>")
SBBody.Append(" </tr>")
SBBody.Append(" <tr>")
SBBody.Append(" <td style='width: 441.4pt; padding: 5.4pt 5.4pt 5.4pt 5.4pt;' valign='top' width='589'>")
SBBody.Append(" <p class='MsoNormal' style='margin-bottom: 12.0pt;'><strong><span style='font-family: ' Arial Nova Light',sans-serif; color: #c00000;'>Contrase&ntilde;a</span></strong><span style='font-family: ' Arial Nova Light',sans-serif; color: #c00000;'>:<u></u><u></u></span></p>")
SBBody.Append(" <p class='MsoNormal' style='margin-bottom: 12.0pt;'><span style='font-size: 9.0pt; font-family: ' Arial',sans-serif; color: #333333; background: white;'>-acceso-</span><u></u><u></u></p>")
SBBody.Append(" </td>")
SBBody.Append(" </tr>")
SBBody.Append(" <tr>")
SBBody.Append(" <td style='width: 441.4pt; background: #c00000; padding: 5.4pt 5.4pt 5.4pt 5.4pt;' valign='top' width='589'>")
SBBody.AppendFormat(" <p class='MsoNormal' style='margin-bottom: 12.0pt; text-align: center;' align='center'><strong><span style='font-size: 22.0pt; font-family: ' Segoe UI Emoji',sans-serif; color: white;'><img class='CToWUd' style='margin: 0 0.2ex; vertical-align: middle; max-height: 24px;' src='https://mail.google.com/mail/e/1f446' alt='👆' data-goomoji='1f446' data-image-whitelisted=''/></span></strong><strong><span style='font-size: 22.0pt; font-family: ' Arial Nova Light',sans-serif; color: white;'><a href='{0}' target='_blank' rel='noopener' data-saferedirecturl='https://www.google.com/url?q={0}&amp;source=gmail&amp;ust=1617928195657000&amp;usg=AFQjCNGY8Tj8s35QxHYX-RPcqPlzZoBBFg'><span style='color: white;'>INGRESAR A SIGNALS GPS</span></a></span></strong><strong><span style='font-size: 22.0pt; font-family: ' Segoe UI Emoji',sans-serif; color: white;'><img class='CToWUd' style='margin: 0 0.2ex; vertical-align: middle; max-height: 24px;' src='https://mail.google.com/mail/e/1f446' alt='👆' data-goomoji='1f446' data-image-whitelisted=''/></span></strong><u></u><u></u></p>", LigaActivar)
SBBody.Append(" </td>")
SBBody.Append(" </tr>")
SBBody.Append("</tbody>")
SBBody.Append("</table>")
SBBody.Append("<div>")
SBBody.Append("<p Class='MsoNormal' style='margin-bottom: 12.0pt; background: white;'><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Arial Nova Light',sans-serif; color: #333333;'><br /></span><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Arial Nova Light',sans-serif; color: black;'>F</span><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Arial Nova Light',sans-serif; color: #333333;'>avor de NO responder este correo. <u></u><u></u></span></p>")
SBBody.Append("</div>")
SBBody.Append(" <p Class='MsoNormal' style='margin-bottom: 12.0pt; background: white;'><span lang='ES-MX' style='font-size: 10.5pt; font-family: 'Arial Nova Light',sans-serif; color: #333333;'><u></u>&nbsp;<u></u></span></p>")
SBBody.Append("</div>")
'Termino Cuerpo del correo
Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo(Asunto, Para, SBBody.ToString))
Hilo.Start()
'Dim JSBTN As String = ""
'If UsuarioActual.CveCliente > 0 Then
' JSBTN = $"document.location.href=""javascript: Ir2({CveCliente})"";"
'ElseIf CveCliente > 0 Then
' JSBTN = $"document.location.href=""javascript:Ir({CveCliente})"";"
'End If
'If UsuarioActual.Empresa.CvePlataforma = 3 Then
' Alert("El correo se ha enviado correctamente a: " + TxtEmail.Text + ".", TipoMensaje.MsgInformacion, JSBTN)
'End If
Retorno = $"El correo se ha enviado correctamente a: <b>{TxtEmail.Text}</b>."
Catch ex As Exception
OnError("Ocurrió error al mandar MAIL", ex)
End Try
Return Retorno Return Retorno
End Function End Function
Private Sub MandaCorreo(Asunto As String, Para As String, Body As String) Private Sub MandaCorreo(Asunto As String, Para As String, Body As String)
Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para) Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para)
a.GuardaLog() a.GuardaLog()
Dim Mail As New ClsSisMail() Dim Mail As New ClsSisMail()
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
End Sub
#End Region
Dim EmpresaEnvio As Empresa = ClsPaginas.EmpresaNotificaciones
If UsuarioActual.Empresa.CvePlataforma = 3 Then
EmpresaEnvio = ClsPaginas.EmpresaNotificacionesGPS
End If
Mail.SendMail(EmpresaEnvio, Para, Asunto, Body)
End Sub
#End Region
#Region "M O D U L O S" #Region "M O D U L O S"
Public Sub CargaModulosAcceso() Public Sub CargaModulosAcceso()
Dim ObjPermisos As New ClsSisUsuarios Dim ObjPermisos As New ClsSisUsuarios
@@ -808,11 +943,11 @@ Partial Class Sistemas_PopUpAddUsuario
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "V E H I C U L O S" #Region "V E H I C U L O S"
Private Sub CargaDispositivos() Private Sub CargaDispositivos()
GvDispositivos.DataSource = GlobalDTDispositivos(CveCliente).FiltraParametros("Estatus = 1 ") GvDispositivos.DataSource = GlobalDTDispositivos(CveCliente).FiltraParametros("Estatus = 1 ")
@@ -826,10 +961,10 @@ Partial Class Sistemas_PopUpAddUsuario
End If End If
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "N O T I F I C A C I O N E S" #Region "N O T I F I C A C I O N E S"
Private Sub CargarNotificaciones() Private Sub CargarNotificaciones()
Dim ObjNotificaciones As New ClsSisNotificaciones Dim ObjNotificaciones As New ClsSisNotificaciones
@@ -851,11 +986,11 @@ Partial Class Sistemas_PopUpAddUsuario
e.Row.FCCheckBox("chkApp").Checked = If(DtNotificacionesUsuarios.FiltroPrimeroValor("Alerta_App", $"CveNotificacion = {e.Row.DBCampo("CveNotificacion")}").ToString = "True", True, False) e.Row.FCCheckBox("chkApp").Checked = If(DtNotificacionesUsuarios.FiltroPrimeroValor("Alerta_App", $"CveNotificacion = {e.Row.DBCampo("CveNotificacion")}").ToString = "True", True, False)
End If End If
End If End If
End Sub End Sub
#End Region #End Region
Protected Sub BtnCambiarUsuario_Click(sender As Object, e As EventArgs) Protected Sub BtnCambiarUsuario_Click(sender As Object, e As EventArgs)
CveUsuario = -1 CveUsuario = -1

View File

@@ -6,7 +6,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="es"> <html xmlns="http://www.w3.org/1999/xhtml" lang="es">
<head runat="server" id="HeadAD"> <head runat="server" id="HeadAD">
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Sistema de Información Gerencial</title> <title id="tTitulo" runat="server">Sistema de Información Gerencial</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" /> <meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />

View File

@@ -76,6 +76,7 @@ Partial Class Site
If UsuarioActual.Empresa.CvePlataforma = 3 Then If UsuarioActual.Empresa.CvePlataforma = 3 Then
lnkFavicon.Href = "/Imagenes/favicongps.ico" lnkFavicon.Href = "/Imagenes/favicongps.ico"
tTitulo.Text = "SIGNALS GPS"
Else Else
lnkFavicon.Href = "/Imagenes/favicon.ico" lnkFavicon.Href = "/Imagenes/favicon.ico"
End If End If

View File

@@ -365,7 +365,7 @@
<asp:TemplateField > <asp:TemplateField >
<HeaderTemplate>Complemento Pago</HeaderTemplate> <HeaderTemplate>Complemento Pago</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:LinkButton runat="server" ID="LnkComplemento" CssClass="text-success" Text="<i class='fa fa-check' aria-hidden='true'></i>" OnClientClick="return false;" ></asp:LinkButton> <asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -639,11 +639,10 @@ Partial Class Ventas_ClientesAbonar
If e.Row.DBCampo("CveVenta").ToEntero > 0 Then If e.Row.DBCampo("CveVenta").ToEntero > 0 Then
If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then
e.Row.FCLinkButton("LnkComplemento").Text = "<i class='fa fa-times' aria-hidden='true'></i>" e.Row.FCLiteral("LtlComplemento").Text = "<i class='fa fa-times text-danger ' aria-hidden='true'></i>"
e.Row.FCLinkButton("LnkComplemento").CssClass = "text-danger"
End If End If
Else Else
e.Row.FCLinkButton("LnkComplemento").Visible = False e.Row.FCLiteral("LtlComplemento").Visible = False
End If End If
@@ -3179,5 +3178,7 @@ Partial Class Ventas_ClientesAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub
End Class End Class

View File

@@ -2953,7 +2953,7 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox> <asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25" Enabled="false"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCEConsecutivoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsecutivoAjuste"></ajax:ValidatorCalloutExtender>--%> <%--<ajax:ValidatorCalloutExtender ID="VCEConsecutivoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsecutivoAjuste"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtConsecutivoAjuste.ClientID.ToString()%>">Consec.:</label> <label for="<%= TxtConsecutivoAjuste.ClientID.ToString()%>">Consec.:</label>

View File

@@ -6274,8 +6274,6 @@ Partial Class PV
GvRecepcionUsados.DataSource = DtTamanios GvRecepcionUsados.DataSource = DtTamanios
GvRecepcionUsadosModal.DataSource = DtTamanios GvRecepcionUsadosModal.DataSource = DtTamanios
DdlFolioGarantia.DataBind()
DdlTipoUso.DataBind() DdlTipoUso.DataBind()
DdlTipoDefecto.DataBind() DdlTipoDefecto.DataBind()
DdlFacturas.DataBind() DdlFacturas.DataBind()

View File

@@ -46,8 +46,10 @@
</div> </div>
<label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label> <label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label>
<div class="col-md-2" id="DivDdlCliente" runat="server"> <div class="col-md-2" id="DivDdlCliente" runat="server">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"> <ADS:Dropdownlost ID="DdlCliente" runat="server" AutoPostBack="False" DataTextField="NombreComercial" IncluyeTodos="false" DataValueField="CveCliente" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
</asp:DropDownList>
<%-- <asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList>--%>
</div> </div>
<div class="col-md-1" style="">Fecha Ini Doc:</div> <div class="col-md-1" style="">Fecha Ini Doc:</div>
<div class="col-md-1"> <div class="col-md-1">

View File

@@ -65,11 +65,16 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1")); DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
} }
//protected void CargaClientes()
//{
// DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1);
// DdlCliente.DataBind();
// DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
//}
protected void CargaClientes() protected void CargaClientes()
{ {
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1); DdlCliente.setEsWebService(true);
DdlCliente.DataBind(); DdlCliente.Attributes.Add("data-metodo", "getcliente");
DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
} }
protected void CargaVendedores() protected void CargaVendedores()
{ {
@@ -87,7 +92,12 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DateTime FechaFCorte; DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; } if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
ClsVentas ObjVenta = new ClsVentas(); ClsVentas ObjVenta = new ClsVentas();
if (ObjVenta.GetRepAnticiposNCIXC(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), int CveCliente = -1;
if (DdlCliente.SelectedValue.ToEntero() != 0)
{
CveCliente = DdlCliente.SelectedValue.ToEntero();
}
if (ObjVenta.GetRepAnticiposNCIXC(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(),
txtFechaF.Text.ToDate(),UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, DdlVendedor.SelectedValue.ToEntero(),DdlConSaldo.SelectedValue.ToEntero())) txtFechaF.Text.ToDate(),UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, DdlVendedor.SelectedValue.ToEntero(),DdlConSaldo.SelectedValue.ToEntero()))
{ {
GvDatos.DataSource = ObjVenta.DtResultados; GvDatos.DataSource = ObjVenta.DtResultados;
@@ -127,7 +137,7 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
String Sucursal; String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; } if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente; String Cliente;
if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; } if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
if (DtDatos.Rows.Count > 0) if (DtDatos.Rows.Count > 0)
{ {
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)); System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));

View File

@@ -50,8 +50,10 @@
</div> </div>
<label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label> <label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label>
<div class="col-md-2" id="DivDdlCliente" runat="server"> <div class="col-md-2" id="DivDdlCliente" runat="server">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"> <%-- <asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList> </asp:DropDownList>--%>
<ADS:Dropdownlost ID="DdlCliente" runat="server" AutoPostBack="False" DataTextField="NombreComercial" IncluyeTodos="false" DataValueField="CveCliente" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
</div> </div>
<div class="col-md-1" style="">Fecha Ini Doc:</div> <div class="col-md-1" style="">Fecha Ini Doc:</div>
<div class="col-md-1"> <div class="col-md-1">

View File

@@ -58,7 +58,12 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
TxtFechaFCorte.Text = DateTime.Today.ToString(); TxtFechaFCorte.Text = DateTime.Today.ToString();
CargaSucursales(); CargaSucursales();
CargaClientes(); CargaClientes();
DdlCliente.SelectedValueExist(Request["CveCliente"] == null ? "-1" : Request["CveCliente"].ToString()); int CveCliente = (Request["CveCliente"] == null ? -1 : Request["CveCliente"].ToString().ToEntero());
DdlCliente.SelectedValue = CveCliente.ToString();
DataTable dt = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:CveCliente);
DdlCliente.SelectedText = dt.FiltroPrimeroValor("NombreComercial", "");
DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString()); DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString());
DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString()); DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString());
CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero(); CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero();
@@ -90,16 +95,21 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
DdlSucursal.DataBind(); DdlSucursal.DataBind();
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1")); DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSucursal.SelectedValue = "-1"; DdlSucursal.SelectedValue = "-1";
}
//protected void CargaClientes()
//{
// DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
// DdlCliente.DataBind();
// DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
// DdlCliente.SelectedValue = "-1";
//}
protected void CargaClientes()
{
DdlCliente.setEsWebService(true);
DdlCliente.Attributes.Add("data-metodo", "getcliente");
} }
protected void CargaClientes()
{
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
DdlCliente.DataBind();
DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
DdlCliente.SelectedValue = "-1";
}
protected void CargaVendedores() protected void CargaVendedores()
{ {
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa); DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
@@ -116,8 +126,13 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
if (TxtFechaICorte.Text != "") { FechaICorte = TxtFechaICorte.Text.ToDate(); } else { FechaICorte = DateTime.MinValue; } if (TxtFechaICorte.Text != "") { FechaICorte = TxtFechaICorte.Text.ToDate(); } else { FechaICorte = DateTime.MinValue; }
DateTime FechaFCorte; DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; } if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
ClsVentas ObjVenta = new ClsVentas(); ClsVentas ObjVenta = new ClsVentas();
if (ObjVenta.GetRepAnticiposNCIXCDetalle(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), int CveCliente = -1;
if (DdlCliente.SelectedValue.ToEntero() != 0)
{
CveCliente = DdlCliente.SelectedValue.ToEntero();
}
if (ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(),
UsuarioActual.CveEmpresa, DdlConSaldo.SelectedValue.ToEntero(), DdlTipo.SelectedValue.ToEntero(), CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico)) UsuarioActual.CveEmpresa, DdlConSaldo.SelectedValue.ToEntero(), DdlTipo.SelectedValue.ToEntero(), CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico))
{ {
GvDatos.DataSource = ObjVenta.DtResultados; GvDatos.DataSource = ObjVenta.DtResultados;
@@ -128,7 +143,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
UpDatos.Update(); UpDatos.Update();
if (TxtFechaFCorte.Text != DateTime.Now.ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; } if (TxtFechaFCorte.Text != DateTime.Now.ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; }
if (LnkSaldar.Visible) { HabilitarCheckbox(); } if (LnkSaldar.Visible) { HabilitarCheckbox(); }
Tipo = DdlTipo.SelectedValue.ToEntero(); Tipo = DdlTipo.SelectedValue.ToEntero();
} }
protected void BtnConsultar_Click(object sender, EventArgs e) protected void BtnConsultar_Click(object sender, EventArgs e)
@@ -159,7 +174,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
String Sucursal; String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; } if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente; String Cliente;
if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; } if (DdlCliente.SelectedValue.ToEntero() != -1) { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
String ConSaldo; String ConSaldo;
if (DdlConSaldo.SelectedValue != "-1") { ConSaldo = $"&emsp;<b>Con Saldo:</b> {DdlConSaldo.SelectedItem.Text}"; } else { ConSaldo = ""; } if (DdlConSaldo.SelectedValue != "-1") { ConSaldo = $"&emsp;<b>Con Saldo:</b> {DdlConSaldo.SelectedItem.Text}"; } else { ConSaldo = ""; }
String Tipo2; String Tipo2;

View File

@@ -756,8 +756,7 @@
</tr> </tr>
<tr align="left" id="TrServicioDomicilio" runat="server" visible="false"> <tr align="left" id="TrServicioDomicilio" runat="server" visible="false">
<td><b>Servicio a Domicilio:</b>&nbsp;</td> <td><b>Servicio a Domicilio:</b>&nbsp;</td>
<td> <td>activado
activado
</td> </td>
</tr> </tr>
</table> </table>
@@ -1263,7 +1262,7 @@
<asp:DropDownList runat="server" ID="DdlFR" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="FuenteRecaudacionCodigoRubroIngreso" DataValueField="CvePresupuestoIngreso" Style="max-width: 100px;" OnSelectedIndexChanged="DdlFR_SelectedIndexChanged"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlFR" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="FuenteRecaudacionCodigoRubroIngreso" DataValueField="CvePresupuestoIngreso" Style="max-width: 100px;" OnSelectedIndexChanged="DdlFR_SelectedIndexChanged"></asp:DropDownList>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--22--%> <%--22--%>
<asp:BoundField DataField="TieneProntoPago" HeaderText="Pronto Pago" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ReadOnly="true" Visible="false" /> <asp:BoundField DataField="TieneProntoPago" HeaderText="Pronto Pago" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ReadOnly="true" Visible="false" />
</Columns> </Columns>
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
@@ -1428,7 +1427,8 @@
<td> <td>
<asp:TextBox ID="TxtSubTotal2" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td> <asp:TextBox ID="TxtSubTotal2" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
<td> <td>
<asp:LinkButton ID="LkbAgregarComplementos" runat="server" CssClass="btn btn-circle btn-xs gray" Text="<i class='fa fa-bell '></i>"></asp:LinkButton></td> <%-- <asp:LinkButton ID="LkbAgregarComplementos" runat="server" CssClass="btn btn-circle btn-xs gray" Text="<i class='fa fa-bell '></i>"></asp:LinkButton>--%>
</td>
</tr> </tr>
<tr align="right"> <tr align="right">
@@ -2210,8 +2210,7 @@
<ContentTemplate> <ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" class="TextTab"> <table border="0" cellpadding="0" cellspacing="0" class="TextTab">
<tr valign="top"> <tr valign="top">
<td> <td rowspan="2" colspan="1">
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;"> <div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
@@ -2343,8 +2342,7 @@
</div> </div>
</div> </div>
</td> </td>
<td> <td rowspan="1" colspan="1">
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;"> <div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
@@ -2435,123 +2433,7 @@
</div> </div>
</div> </div>
</td> </td>
<td> <td rowspan="1" colspan="2">
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">7Eleven</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="form-body">
<table border="0">
<tr align="left">
<td>Proveedor:&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox ID="Txt7ElevenNumProveedor" CssClass="form-control input-sm" runat="server" Enabled="False"></asp:TextBox><label></label><i></i>
</div>
</td>
</tr>
<tr align="left">
<td>Folio:&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox ID="Txt7ElevenFolio" CssClass="form-control input-sm" runat="server"></asp:TextBox><label></label><i></i>
</div>
</td>
</tr>
<tr align="left">
<td>Tienda:&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox type="number" CssClass="form-control input-sm" ID="Txt7ElevenTienda" runat="server"></asp:TextBox><label></label><i></i>
</div>
<%--<ajax:MaskedEditExtender runat="server" ID="MEE7ElevenTienda" TargetControlID="Txt7ElevenTienda" MaskType="Number" Mask="999999" AcceptNegative="Left" MessageValidatorTip="true"></ajax:MaskedEditExtender>--%>
</td>
</tr>
<tr align="left">
<td>Fecha:&nbsp;</td>
<td>
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="Txt7ElevenFecha" CssClass="form-control" runat="server" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:HyperLink ID="ImgCalendario7ElevenFecha" class="btn default" runat="server"><i class="fa fa-calendar"></i></asp:HyperLink>
</span>
<ajax:MaskedEditExtender ID="MEE7ElevenFecha" runat="server" TargetControlID="Txt7ElevenFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="Calendario7ElevenFecha" runat="server" TargetControlID="Txt7ElevenFecha" PopupButtonID="ImgCalendario7ElevenFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFecha7Eleven" runat="server" ControlToValidate="Txt7ElevenFecha" Display="None" ErrorMessage="El campo <b>''Fecha de Orden de Compra''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCORFV7Eleven1Fecha" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha7Eleven" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">FORD</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="form-body">
<table border="0">
<tr align="left">
<td>GSDB:&nbsp;&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtFordGSDB" CssClass="form-control input-sm" runat="server" MaxLength="5"></asp:TextBox><label></label><i></i>
</div>
</td>
</tr>
<tr align="left">
<td>ASN :&nbsp;&nbsp;</td>
<td>
<div class="form-group form-md-line-input" style="width: 120px; display: inline-block">
<asp:TextBox ID="TxtFordASN" CssClass="form-control input-sm" size="15" runat="server" MaxLength="20"></asp:TextBox><label></label>
</div>
&nbsp;
<asp:LinkButton ID="LnkASN" runat="server" CssClass="fa fa-plus" ValidationGroup="GrpFordASN"></asp:LinkButton>
<asp:RequiredFieldValidator ID="RFVFordASN" runat="server" ControlToValidate="TxtFordASN" ErrorMessage="Ingrese ASN" ValidationGroup="GrpFordASN"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:ListBox ID="LstFordASN" Width="130px" runat="server"></asp:ListBox>
<asp:LinkButton ID="LnkFordQuitar" runat="server" CssClass="fa fa-minus"></asp:LinkButton>
</td>
</tr>
</table>
</div>
</div>
</div>
<br />
<div class="portlet light xspadding bordered whitoutcol" style="width: 850px;"> <div class="portlet light xspadding bordered whitoutcol" style="width: 850px;">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
@@ -2723,6 +2605,230 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr valign="top">
<td rowspan="1" colspan="1">
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">7Eleven</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="form-body">
<table border="0">
<tr align="left">
<td>Proveedor:&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox ID="Txt7ElevenNumProveedor" CssClass="form-control input-sm" runat="server" Enabled="False"></asp:TextBox><label></label><i></i>
</div>
</td>
</tr>
<tr align="left">
<td>Folio:&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox ID="Txt7ElevenFolio" CssClass="form-control input-sm" runat="server"></asp:TextBox><label></label><i></i>
</div>
</td>
</tr>
<tr align="left">
<td>Tienda:&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox type="number" CssClass="form-control input-sm" ID="Txt7ElevenTienda" runat="server"></asp:TextBox><label></label><i></i>
</div>
<%--<ajax:MaskedEditExtender runat="server" ID="MEE7ElevenTienda" TargetControlID="Txt7ElevenTienda" MaskType="Number" Mask="999999" AcceptNegative="Left" MessageValidatorTip="true"></ajax:MaskedEditExtender>--%>
</td>
</tr>
<tr align="left">
<td>Fecha:&nbsp;</td>
<td>
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="Txt7ElevenFecha" CssClass="form-control" runat="server" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:HyperLink ID="ImgCalendario7ElevenFecha" class="btn default" runat="server"><i class="fa fa-calendar"></i></asp:HyperLink>
</span>
<ajax:MaskedEditExtender ID="MEE7ElevenFecha" runat="server" TargetControlID="Txt7ElevenFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="Calendario7ElevenFecha" runat="server" TargetControlID="Txt7ElevenFecha" PopupButtonID="ImgCalendario7ElevenFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFecha7Eleven" runat="server" ControlToValidate="Txt7ElevenFecha" Display="None" ErrorMessage="El campo <b>''Fecha de Orden de Compra''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCORFV7Eleven1Fecha" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha7Eleven" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</td>
<td rowspan="1" colspan="1">
<div class="portlet light xspadding bordered whitoutcol" style="width: 330px;">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">FORD</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="form-body">
<table border="0">
<tr align="left">
<td>GSDB:&nbsp;&nbsp;</td>
<td>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtFordGSDB" CssClass="form-control input-sm" runat="server" MaxLength="5"></asp:TextBox><label></label><i></i>
</div>
</td>
</tr>
<tr align="left">
<td>ASN :&nbsp;&nbsp;</td>
<td>
<div class="form-group form-md-line-input" style="width: 120px; display: inline-block">
<asp:TextBox ID="TxtFordASN" CssClass="form-control input-sm" size="15" runat="server" MaxLength="20"></asp:TextBox><label></label>
</div>
&nbsp;
<asp:LinkButton ID="LnkASN" runat="server" CssClass="fa fa-plus" ValidationGroup="GrpFordASN"></asp:LinkButton>
<asp:RequiredFieldValidator ID="RFVFordASN" runat="server" ControlToValidate="TxtFordASN" ErrorMessage="Ingrese ASN" ValidationGroup="GrpFordASN"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:ListBox ID="LstFordASN" Width="130px" runat="server"></asp:ListBox>
<asp:LinkButton ID="LnkFordQuitar" runat="server" CssClass="fa fa-minus"></asp:LinkButton>
</td>
</tr>
</table>
</div>
</div>
</div>
</td>
<td rowspan="1" colspan="1">
<div class="portlet light xspadding bordered whitoutcol" style="width: 450px;">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Complementos INE</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="form-body">
<div class="row">
<div class="modal-body col-md-6" style="border-right: 1px solid lightgray;">
<asp:UpdatePanel runat="server" ID="UpComplementos" UpdateMode="Conditional">
<ContentTemplate>
<asp:RadioButtonList ID="RblComplementos" runat="server" AutoPostBack="true" CssClass="rbl" DataValueField="CveVentaComplemento" DataTextField="VentaComplemento" RepeatLayout="Table">
</asp:RadioButtonList>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-body col-md-6">
<asp:UpdatePanel runat="server" ID="UpDatosComplementos" UpdateMode="Conditional">
<ContentTemplate>
<table>
<tr id="trTipoCampaña" runat="Server" visible="False">
<td>Tipo Campaña:</td>
<td>
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlTipoCampaña" runat="server">
<asp:ListItem Text="Campaña" Value="Campaña" />
<asp:ListItem Text="Precampaña" Value="Precampaña" />
</asp:DropDownList>
</td>
</tr>
<tr id="trAmbito" runat="Server" visible="False">
<td>Ambito:</td>
<td>
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlAmbitoComplemento" runat="server">
<asp:ListItem Text="Local" Value="Local" />
<asp:ListItem Text="Federal" Value="Federal" />
</asp:DropDownList>
</td>
</tr>
<tr id="trEntidad" runat="Server" visible="False">
<td>Entidad:</td>
<td>
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlINEEntidad" runat="server" AutoPostBack="true">
<asp:ListItem Text="AGU" Value="AGU" />
<asp:ListItem Text="BCN" Value="BCN" />
<asp:ListItem Text="BCS" Value="BCS" />
<asp:ListItem Text="CAM" Value="CAM" />
<asp:ListItem Text="CHP" Value="CHP" />
<asp:ListItem Text="CHH" Value="CHH" />
<asp:ListItem Text="COA" Value="COA" />
<asp:ListItem Text="COL" Value="COL" />
<asp:ListItem Text="DIF" Value="DIF" />
<asp:ListItem Text="DUR" Value="DUR" />
<asp:ListItem Text="GUA" Value="GUA" />
<asp:ListItem Text="GRO" Value="GRO" />
<asp:ListItem Text="HID" Value="HID" />
<asp:ListItem Text="JAL" Value="JAL" />
<asp:ListItem Text="MEX" Value="MEX" />
<asp:ListItem Text="MIC" Value="MIC" />
<asp:ListItem Text="MOR" Value="MOR" />
<asp:ListItem Text="NAY" Value="NAY" />
<asp:ListItem Text="NLE" Value="NLE" />
<asp:ListItem Text="OAX" Value="OAX" />
<asp:ListItem Text="PUE" Value="PUE" />
<asp:ListItem Text="QTO" Value="QTO" />
<asp:ListItem Text="ROO" Value="ROO" />
<asp:ListItem Text="SLP" Value="SLP" />
<asp:ListItem Text="SIN" Value="SIN" />
<asp:ListItem Text="SON" Value="SON" />
<asp:ListItem Text="TAB" Value="TAB" />
<asp:ListItem Text="TAM" Value="TAM" />
<asp:ListItem Text="TLA" Value="TLA" />
<asp:ListItem Text="VER" Value="VER" />
<asp:ListItem Text="YUC" Value="YUC" />
<asp:ListItem Text="ZAC" Value="ZAC" />
</asp:DropDownList>
</td>
</tr>
<tr id="trContaComplementos" runat="Server" visible="False">
<td>Id Conta:</td>
<td>
<asp:TextBox ID="TxtIdConta" runat="server" MaxLength="6" Width="100px"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVIdConta" runat="server" ControlToValidate="TxtIdConta" Display="None" ErrorMessage="El campo <b>''Id Conta''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GrpComplementosTimbrado"></asp:RegularExpressionValidator>
<ajax:ValidatorCalloutExtender ID="VCEIdConta" runat="server" HighlightCssClass="vco" TargetControlID="REVIdConta" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
</table> </table>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -2840,9 +2946,9 @@
<div class="col-md-5"> <div class="col-md-5">
<asp:RadioButtonList ID="RBLTipoContrato" AppendDataBoundItems="true" OnSelectedIndexChanged="RBLTipoContrato_SelectedIndexChanged" AutoPostBack="true" runat="server" RepeatDirection="Horizontal"> <asp:RadioButtonList ID="RBLTipoContrato" AppendDataBoundItems="true" OnSelectedIndexChanged="RBLTipoContrato_SelectedIndexChanged" AutoPostBack="true" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Text="Venta" Value="2" Selected="True" /> <asp:ListItem Text="Venta" Value="2" Selected="True" />
<asp:ListItem Text="Suministro" Value="1" /> <asp:ListItem Text="Suministro" Value="1" />
<asp:ListItem Text="Obra" Value="4" /> <asp:ListItem Text="Obra" Value="4" />
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@@ -3366,7 +3472,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
</div> </div>
<label id="lblCambio" class="col-md-2">Cambio:</label> <label id="lblCambio" class="col-md-2">Cambio:</label>
<div class="col-md-4 input-icon"> <div class="col-md-4 input-icon">
<i style="margin: 0px;">$</i> <i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox> <asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
@@ -3947,7 +4053,7 @@
</div> </div>
</div> </div>
<div id="ModalComplementos" class="modal ADS fade" role="dialog"> <%-- <div id="ModalComplementos" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 470px; min-width: 470px;"> <div class="modal-dialog" style="width: 470px; min-width: 470px;">
<div class="modal-content"> <div class="modal-content">
@@ -4053,7 +4159,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>--%>
<%-- ******************************************** Corte de Caja *************************************************************************************************************************************** --%> <%-- ******************************************** Corte de Caja *************************************************************************************************************************************** --%>
@@ -6060,7 +6166,8 @@
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-md-2"> <div class="col-md-2">
<label>Relación:</label></div> <label>Relación:</label>
</div>
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="DdlTipoRelacionARelacionar" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion"> <asp:DropDownList ID="DdlTipoRelacionARelacionar" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList> </asp:DropDownList>
@@ -6069,12 +6176,14 @@
<br /> <br />
<div id="DivDdlFacturaRela" runat="server" class="row"> <div id="DivDdlFacturaRela" runat="server" class="row">
<div class="col-md-2"> <div class="col-md-2">
<label>Factura:</label></div> <label>Factura:</label>
</div>
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="DdlFacturaARelacionar" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="100%" CssClass="select2me"></asp:DropDownList> <asp:DropDownList ID="DdlFacturaARelacionar" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="100%" CssClass="select2me"></asp:DropDownList>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<asp:LinkButton ID="LnkAgregarFacturaRelacionada" runat="server" CssClass="btn btn-sm btn-primary" OnClick="LnkAgregarFacturaRelacionada_Click"><i class="fa fa-plus"></i>Agregar</asp:LinkButton></div> <asp:LinkButton ID="LnkAgregarFacturaRelacionada" runat="server" CssClass="btn btn-sm btn-primary" OnClick="LnkAgregarFacturaRelacionada_Click"><i class="fa fa-plus"></i>Agregar</asp:LinkButton>
</div>
</div> </div>
<br /> <br />
<div class="row"> <div class="row">
@@ -6349,7 +6458,7 @@
<div class="col-md-12"> <div class="col-md-12">
<asp:RadioButtonList ID="RblRNCTipo" runat="server" RepeatDirection="Horizontal" CssClass="input-group col-md-12" CellSpacing="100" AutoPostBack="true" OnSelectedIndexChanged="RblRNCTipo_SelectedIndexChanged"> <asp:RadioButtonList ID="RblRNCTipo" runat="server" RepeatDirection="Horizontal" CssClass="input-group col-md-12" CellSpacing="100" AutoPostBack="true" OnSelectedIndexChanged="RblRNCTipo_SelectedIndexChanged">
<asp:ListItem Value="2" Class="one"><label><b>Bonificaciones</b></label></asp:ListItem> <asp:ListItem Value="2" Class="one"><label><b>Bonificaciones</b></label></asp:ListItem>
<asp:ListItem Value="1" Class="one" Selected="True"><label><b>Cargos</b></label></asp:ListItem> <asp:ListItem Value="1" Class="one" Selected="True"><label><b>Cargos</b></label></asp:ListItem>
<asp:ListItem Value="3" Class="one"><label><b>Ajuste/Garantía</b></label></asp:ListItem> <asp:ListItem Value="3" Class="one"><label><b>Ajuste/Garantía</b></label></asp:ListItem>
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
@@ -6907,75 +7016,124 @@
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="portlet light xspadding bordered"> <asp:RadioButtonList ID="RblRNCTipoDesc" runat="server" RepeatDirection="Horizontal" CssClass="input-group col-md-12" CellSpacing="100" AutoPostBack="true" OnSelectedIndexChanged="RblRNCTipoDesc_SelectedIndexChanged">
<div class="portlet-title"> <asp:ListItem Value="2" Class="one"><label><b>Bonificaciones</b></label></asp:ListItem>
<div class="caption font-green"> <asp:ListItem Value="1" Class="one" Selected="True"><label><b>Cargos</b></label></asp:ListItem>
<i class="icon-pin font-green"></i> <asp:ListItem Value="3" Class="one"><label><b>Ajuste/Garantía</b></label></asp:ListItem>
<span class="caption-subject bold uppercase">Cargos</span> </asp:RadioButtonList>
</div> </div>
<div class="actions"> </div>
<div class="btn-group">
</div> <div class="row" id="DivRNCCargoDesc" runat="server" visible="false">
</div> <div class="col-md-12">
<div class="tools"> <div class="row">
<a href="javascript:;" class="collapse"></a> <div class="col-md-12">
</div> <asp:CheckBox ID="ChkMostarProductosRNCDesc" runat="server" AutoPostBack="true" Text="Mostrar Productos" OnCheckedChanged="ChkMostarProductosRNCDesc_CheckedChanged" />
</div> </div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom"> </div>
<div class="row" style="margin-right: 10px;" align="right"> <div class="row" id="DivRNCCargoDescTotal" runat="server" visible="false">
<input type="text" id="TxtBusquedaNCCargos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNCCargos','{0}')", GvDescNCCargos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <div class="col-md-12">
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNCCargos','{0}')", GvDescNCCargos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <div class="portlet light xspadding bordered">
</div> <div class="portlet-title">
<div class="row"> <div class="caption font-green">
<div class="col-md-12" style="max-height: 440px; overflow: auto"> <i class="icon-pin font-green"></i>
<asp:GridView ID="GvDescNCCargos" runat="server" AutoGenerateColumns="False" <span class="caption-subject bold uppercase">
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None"> <asp:Literal ID="LtlCargoDesc" runat="server" Text="Cargo"></asp:Literal></span></span>
<Columns> </div>
<asp:TemplateField> <div class="actions">
<ItemTemplate> <div class="btn-group">
<asp:CheckBox ID="ChkAplicar" runat="server" AutoPostBack="true" OnCheckedChanged="ChkAplicarRNC_CheckedChanged" /> </div>
</ItemTemplate> </div>
</asp:TemplateField> <div class="tools">
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" /> <a href="javascript:;" class="collapse"></a>
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" /> </div>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div> </div>
</div> <div class="portlet-body form-horizontal form-row-sepe formnombottom">
<div class="row"> <div class="row" style="margin-right: 10px;" align="right">
<div class="col-md-12"> <input type="text" id="TxtBusquedaNCCargos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNCCargos','{0}')", GvDescNCCargos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server"> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNCCargos','{0}')", GvDescNCCargos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
<tr align="right"> </div>
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td> <div class="row">
<td> <div class="col-md-12" style="max-height: 440px; overflow: auto">
<asp:Label ID="LblSaldoMaximoUsados" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td> <asp:GridView ID="GvDescNCCargos" runat="server" AutoGenerateColumns="False"
<td align="right">&nbsp; DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
</td> <Columns>
</tr> <asp:TemplateField>
</table> <ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row" id="DivRNCCargoDescDetalle" runat="server" visible="false">
<div class="col-md-12" style="max-height: 440px; overflow: auto">
<asp:GridView ID="GvDescNCCargosDetalle" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta,CveVentaDetalleRNC,CvePS,PU,PorcentajeIVA" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:TextBox ID="TxtCantidadRNC" runat="server" Text='<%#Eval("CantidadPendiente").ToString%>' MaxLength="12" Width="46px" Height="24px"></asp:TextBox>
<asp:RangeValidator ID="RVCantRNC" runat="server" Type="Double" MinimumValue="0" MaximumValue='<%#Eval("CantidadPendiente").ToString%>' ErrorMessage="Cantidad Excedida" ControlToValidate="TxtCantidadRNC" Display="None" ValidationGroup="VGAplicarRNC"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCECantidad3" runat="server" HighlightCssClass="vco" TargetControlID="RVCantRNC" Width="300px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="TtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
<tr align="right">
<td style="border: 1px none white"><b>Saldo Maximo Utilizable.:</b></td>
<td>
<asp:Label ID="LblSaldoMaximoUsados" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00"></asp:Label></td>
<td align="right">&nbsp;
</td>
</tr>
</table>
</div>
</div>
</div> </div>
</div> </div>
<div class="row" id="DivRNCBonificaciones" runat="server" visible="false"> <div class="row" id="DivRNCBonDesc" runat="server" visible="false">
<div class="col-md-12"> <div class="col-md-12">
<div class="portlet light xspadding bordered"> <div class="portlet light xspadding bordered">
<div class="portlet-title"> <div class="portlet-title">
@@ -7021,7 +7179,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" /> <asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCBon" runat="server" Width="75px" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
@@ -7046,6 +7204,7 @@
</div> </div>
</div> </div>
<asp:HiddenField ID="HdnSaldoMaximoUsados" runat="server" ClientIDMode="Static" Value="0" /> <asp:HiddenField ID="HdnSaldoMaximoUsados" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnSMUBonDesc" runat="server" ClientIDMode="Static" Value="0" />
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button id="CancelarAplicarDescNC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button> <button id="CancelarAplicarDescNC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
@@ -7344,13 +7503,66 @@
} }
function CalculaSaldoRNCBonChk(TxtImporte, Saldo, Chk) { function CalculaSaldoRNCBonChk(TxtImporte, Saldo, Chk) {
//if (Chk.checked) {
// TxtImporte.value = FormatoNumero(Saldo, 2);
//} else {
// TxtImporte.value = "";
//}
if (Chk.checked) { if (Chk.checked) {
TxtImporte.value = FormatoNumero(Saldo, 2); let SaldoMaximoUtilizable = ToDouble(HdnSMUBonDesc.value)
let ImportesAsignados = 0;
$('.ImportesRNCBon').each(function () {
if ($(this).context.id != TxtImporte.id) {
ImportesAsignados += ToDouble($(this).val());
}
});
let Importe = SaldoMaximoUtilizable - ImportesAsignados;
if (Importe > 0) {
if (Saldo > Importe) {
TxtImporte.value = FormatoNumero(Importe, 2);
} else {
TxtImporte.value = FormatoNumero(Saldo, 2);
}
} else {
if (SaldoMaximoUtilizable > 0) {
TxtImporte.value = "";
Chk.checked = false;
} else {
TxtImporte.value = FormatoNumero(Saldo, 2);
}
}
} else { } else {
TxtImporte.value = ""; TxtImporte.value = "";
} }
} }
function LimitaSaldoRNCBonChk(TxtImporte, Saldo) { function LimitaSaldoRNCBonChk(TxtImporte, Saldo) {
//var Importe = 0;
//if (TxtImporte.value.includes('.')) {
// return;
//}
//if (TxtImporte.value.includes(',')) {
// return;
//}
//var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$");
//if (regex.test(TxtImporte.value)) {
// if (TxtImporte.value != '') {
// Importe = parseFloat(TxtImporte.value);
// }
// if (Importe > Saldo) {
// TxtImporte.value = FormatoNumero(Saldo, 2);
// } else {
// TxtImporte.value = FormatoNumero(Importe, 2);;
// }
//}
var Importe = 0; var Importe = 0;
if (TxtImporte.value.includes('.')) { if (TxtImporte.value.includes('.')) {
@@ -7367,8 +7579,17 @@
Importe = parseFloat(TxtImporte.value); Importe = parseFloat(TxtImporte.value);
} }
if (Importe > Saldo) { let SaldoMaximoUtilizable = parseFloat(HdnSMUBonDesc.value)
TxtImporte.value = FormatoNumero(Saldo, 2); let ImportesAsignados = 0;
$('.ImportesRNCBon').each(function () {
if ($(this).context.id != TxtImporte.id) {
ImportesAsignados += ToDouble($(this).val());
}
});
let ImporteDiferencia = SaldoMaximoUtilizable - ImportesAsignados;
if (Importe > ImporteDiferencia) {
TxtImporte.value = FormatoNumero(ImporteDiferencia, 2);
} else { } else {
TxtImporte.value = FormatoNumero(Importe, 2);; TxtImporte.value = FormatoNumero(Importe, 2);;
} }
@@ -8402,99 +8623,99 @@
function ConvertirDolares(ChkConvertirDolares) { function ConvertirDolares(ChkConvertirDolares) {
//LIMPIA //LIMPIA
$('#<%= LblDolaresConvertidos.ClientID %>').text(''); $('#<%= LblDolaresConvertidos.ClientID %>').text('');
$("#TrConversionDolaresTexto").hide(); $("#TrConversionDolaresTexto").hide();
//CALCULA
if (ChkConvertirDolares.checked) {
ConvertirPesosDlls();
}
}
//FUNCIONES PARA MODAL "ModalAplicarNC"
function CalculaImporteNC() {
var ImporteReferencia = (($('#C_DdlNCNivelImporte').val() == "1") ? ToDouble($get('TxtTotal').value) : ToDouble($get('TxtSubTotal').value));
//var ImporteReferencia = ToDouble($get('TxtTotal').value);
$get('TxtNCImporte').value = FormatoNumero((ToDouble($get('TxtNCPorcentaje').value) * ImporteReferencia) / 100, 2);
}
function CalculaPorcentajeNC() {
var ImporteReferencia = (($('#C_DdlNCNivelImporte').val() == "1") ? ToDouble($get('TxtTotal').value) : ToDouble($get('TxtSubTotal').value));
//var ImporteReferencia = ToDouble($get('TxtTotal').value);
$get('TxtNCPorcentaje').value = FormatoNumero((ToDouble($get('TxtNCImporte').value) * 100) / ImporteReferencia, 4);
}
function CambioTipoMoneda(chk, saldo, txt, tipocambio, CveMoneda) {
debugger;
if (tipocambio.value.length > 0) {
if (CveMoneda == 1) {
txt.value = FormatoNumero(ToDouble(saldo / tipocambio.value), 2);
} else {
txt.value = FormatoNumero(ToDouble(saldo * tipocambio.value), 2);
//CALCULA
if (ChkConvertirDolares.checked) {
ConvertirPesosDlls();
} }
} }
}
function BuscarOCRegistrada() { //FUNCIONES PARA MODAL "ModalAplicarNC"
$('#btnBuscarOCRegistrada').click(); function CalculaImporteNC() {
} var ImporteReferencia = (($('#C_DdlNCNivelImporte').val() == "1") ? ToDouble($get('TxtTotal').value) : ToDouble($get('TxtSubTotal').value));
//var ImporteReferencia = ToDouble($get('TxtTotal').value);
function ValidaAnticipoBoton() { $get('TxtNCImporte').value = FormatoNumero((ToDouble($get('TxtNCPorcentaje').value) * ImporteReferencia) / 100, 2);
}
var Descuentototal = ToDouble($('#LblDescuentos').text()).toFixed(2); function CalculaPorcentajeNC() {
var TotalAnticipos = ToDouble($('#LblTotalAnticipos').text()).toFixed(2); var ImporteReferencia = (($('#C_DdlNCNivelImporte').val() == "1") ? ToDouble($get('TxtTotal').value) : ToDouble($get('TxtSubTotal').value));
//var ImporteReferencia = ToDouble($get('TxtTotal').value);
$get('TxtNCPorcentaje').value = FormatoNumero((ToDouble($get('TxtNCImporte').value) * 100) / ImporteReferencia, 4);
}
var IndexActualDdl = parseInt($('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').prop('selectedIndex')); function CambioTipoMoneda(chk, saldo, txt, tipocambio, CveMoneda) {
debugger;
if (tipocambio.value.length > 0) {
if (CveMoneda == 1) {
txt.value = FormatoNumero(ToDouble(saldo / tipocambio.value), 2);
} else {
txt.value = FormatoNumero(ToDouble(saldo * tipocambio.value), 2);
}
}
}
function BuscarOCRegistrada() {
$('#btnBuscarOCRegistrada').click();
}
function ValidaAnticipoBoton() {
var Descuentototal = ToDouble($('#LblDescuentos').text()).toFixed(2);
var TotalAnticipos = ToDouble($('#LblTotalAnticipos').text()).toFixed(2);
var IndexActualDdl = parseInt($('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').prop('selectedIndex'));
if (IndexActualDdl == 1 && IndexActualDd2 > 0 && TotalAnticipos > 0) { if (IndexActualDdl == 1 && IndexActualDd2 > 0 && TotalAnticipos > 0) {
if (TotalAnticipos > 0) { if (TotalAnticipos > 0) {
$('#<%= BtnAceptarAnticipos.ClientID %>').prop('disabled', false); $('#<%= BtnAceptarAnticipos.ClientID %>').prop('disabled', false);
} else {
$('#<%= BtnAceptarAnticipos.ClientID %>').prop('disabled', true);
}
} else { } else {
$('#<%= BtnAceptarAnticipos.ClientID %>').prop('disabled', true); $('#<%= BtnAceptarAnticipos.ClientID %>').prop('disabled', true);
} }
} else {
$('#<%= BtnAceptarAnticipos.ClientID %>').prop('disabled', true);
} }
} function showDivEC() {
$('#<%= TxtRFCCliente.ClientID %>').val('');
$('#<%= TxtNombreCliente.ClientID %>').val('');
$('#<%= TxtDireccionCliente.ClientID %>').val('');
$('#<%= TxtNumExtCliente.ClientID %>').val('');
$('#<%= TxtNumIntCliente.ClientID %>').val('');
$('#<%= TxtCPCliente.ClientID %>').val('');
$('#<%= TxtColoniaCliente.ClientID %>').val('');
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
$('#<%= TxtCiudadCliente.ClientID %>').val('');
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
$('#<%= DdlSATPais.ClientID %>').val('');
$('#<%= DdlEstadoSAT.ClientID %>').val('');
$('#<%= TxtCorreoCliente.ClientID %>').val('');
function showDivEC() { $('#divAgregarCliente').modal();
$('#<%= TxtRFCCliente.ClientID %>').val(''); }
$('#<%= TxtNombreCliente.ClientID %>').val('');
$('#<%= TxtDireccionCliente.ClientID %>').val('');
$('#<%= TxtNumExtCliente.ClientID %>').val('');
$('#<%= TxtNumIntCliente.ClientID %>').val('');
$('#<%= TxtCPCliente.ClientID %>').val('');
$('#<%= TxtColoniaCliente.ClientID %>').val('');
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
$('#<%= TxtCiudadCliente.ClientID %>').val('');
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
$('#<%= DdlSATPais.ClientID %>').val('');
$('#<%= DdlEstadoSAT.ClientID %>').val('');
$('#<%= TxtCorreoCliente.ClientID %>').val('');
$('#divAgregarCliente').modal(); function hideDivEC() {
} $('#divAgregarCliente').modal('hide');
}
function hideDivEC() { var ValidarRNC = false;
$('#divAgregarCliente').modal('hide'); function AplicarValidarRNC(Valor) {
} ValidarRNC = Valor;
}
function CompararNC() {
if (ValidarRNC) {
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value);
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value);
var ValidarRNC = false; if (TotalRem == TotalNC) {
function AplicarValidarRNC(Valor) { document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
ValidarRNC = Valor;
}
function CompararNC() {
if (ValidarRNC) {
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value);
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value);
if (TotalRem == TotalNC) {
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431"; document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = ""; document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = ""; document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
@@ -8519,22 +8740,22 @@
var verficaRNC = function () { var verficaRNC = function () {
var total = 0; var total = 0;
if ('<%= UsuarioActual.CveEmpresa %>' == '140') { if ('<%= UsuarioActual.CveEmpresa %>' == '140') {
$(".ChkAplicaRNC > input").each(function () { $(".ChkAplicaRNC > input").each(function () {
if (this.checked) { if (this.checked) {
total = total + 1; total = total + 1;
} }
if (total == 2) { if (total == 2) {
alert("No se puede seleccionar mas de una remisión de nota de crédito."); alert("No se puede seleccionar mas de una remisión de nota de crédito.");
this.checked = false; this.checked = false;
return false; return false;
} }
}); });
} }
}; };
function showDivAgregarSucursal() { function showDivAgregarSucursal() {
$('#<%= TxtNombreSucursal.ClientID %>').val(''); $('#<%= TxtNombreSucursal.ClientID %>').val('');
$('#<%= TxtDireccionSucursal.ClientID %>').val(''); $('#<%= TxtDireccionSucursal.ClientID %>').val('');
$('#<%= TxtNumExtSucursal.ClientID %>').val(''); $('#<%= TxtNumExtSucursal.ClientID %>').val('');
$('#<%= TxtNumIntSucursal.ClientID %>').val(''); $('#<%= TxtNumIntSucursal.ClientID %>').val('');

File diff suppressed because it is too large Load Diff