This commit is contained in:
@@ -23,5 +23,7 @@ Public Class CalendarEvent
|
|||||||
Public Property CveTipoEvento As Integer
|
Public Property CveTipoEvento As Integer
|
||||||
Public Property Importe As Double
|
Public Property Importe As Double
|
||||||
Public Property EmpresaCRM As String
|
Public Property EmpresaCRM As String
|
||||||
|
Public Property SubProyecto As String
|
||||||
|
Public Property CveSubProyecto As Integer
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ Public Class ClsMovimientos
|
|||||||
'CveAplicaNC
|
'CveAplicaNC
|
||||||
Public Function GetCxPProveedor(CveProveedor As Integer, FechaI As String, FechaF As String, CveUsuarioProgramo As Integer, CveUsuarioRegistro As Integer,
|
Public Function GetCxPProveedor(CveProveedor As Integer, FechaI As String, FechaF As String, CveUsuarioProgramo As Integer, CveUsuarioRegistro As Integer,
|
||||||
CveUsuarioResponsable As Integer, CveClasificacionProveedor As Integer, CveMoneda As Integer, CveEstatus As Integer, CveProveedorSucursal As Integer, CveAplicaNC As Integer,
|
CveUsuarioResponsable As Integer, CveClasificacionProveedor As Integer, CveMoneda As Integer, CveEstatus As Integer, CveProveedorSucursal As Integer, CveAplicaNC As Integer,
|
||||||
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1") As Boolean
|
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ProveedorCxP")
|
DataAdapter("PA_Comp_ProveedorCxP")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -631,6 +631,7 @@ Public Class ClsMovimientos
|
|||||||
.Add("@FechaVI", SqlDbType.VarChar).Value = FechaVI
|
.Add("@FechaVI", SqlDbType.VarChar).Value = FechaVI
|
||||||
.Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF
|
.Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF
|
||||||
.Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion
|
.Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.SmallInt).Value = CveSubProyecto
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -3218,8 +3218,7 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer) As Boolean
|
Public Function SATSolicitudTimbreIngresosRep(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer, Vista As Integer) As Boolean
|
||||||
|
|
||||||
|
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
Try
|
Try
|
||||||
@@ -3229,6 +3228,7 @@ Public Class ClsNominas
|
|||||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
|
.Add("@Vista", SqlDbType.Int).Value = Vista
|
||||||
End With
|
End With
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
|||||||
@@ -1853,7 +1853,7 @@ Public Class ClsOIEventos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function FinalizaEvento(FechaFin As DateTime, CveEventoEstatus As Integer, Geom As String, CveEvento As Integer) As Boolean
|
Public Function FinalizaEvento(FechaFin As DateTime, CveEventoEstatus As Integer, Geom As String, CveEvento As Integer, Optional CveOS As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OI_EventoFinalizar")
|
DataAdapter("PA_OI_EventoFinalizar")
|
||||||
@@ -1863,6 +1863,8 @@ Public Class ClsOIEventos
|
|||||||
.Add("@Geom", SqlDbType.VarChar).Value = Geom
|
.Add("@Geom", SqlDbType.VarChar).Value = Geom
|
||||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||||
.Add("@CveEvento", SqlDbType.Int).Value = CveEvento
|
.Add("@CveEvento", SqlDbType.Int).Value = CveEvento
|
||||||
|
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -2432,12 +2434,13 @@ Public Class ClsOIEventos
|
|||||||
Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveEventoPadre As Integer = -1,
|
Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveEventoPadre As Integer = -1,
|
||||||
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
|
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
|
||||||
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
|
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
|
||||||
Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1) As Boolean
|
Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1,
|
||||||
|
Optional CveSubProyecto As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, -1, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
|
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, -1, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
|
||||||
CvePersonal, CvePersonal, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
|
CvePersonal, CvePersonal, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
|
||||||
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM)
|
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto)
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -5195,6 +5195,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/OS/PopUpOS_PS_Especificaciones.aspx".ToUpper(), 135)
|
PaginaDict.Add("/OS/PopUpOS_PS_Especificaciones.aspx".ToUpper(), 135)
|
||||||
PaginaDict.Add("/OS/PopUpMateriales.aspx".ToUpper(), 135)
|
PaginaDict.Add("/OS/PopUpMateriales.aspx".ToUpper(), 135)
|
||||||
PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
|
PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
|
||||||
|
PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), 1330)
|
||||||
#End Region
|
#End Region
|
||||||
'OC
|
'OC
|
||||||
#Region "OC"
|
#Region "OC"
|
||||||
@@ -5606,7 +5607,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
||||||
|
|
||||||
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
||||||
|
|
||||||
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)
|
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)
|
||||||
|
|
||||||
|
|
||||||
@@ -5643,6 +5644,9 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'ECOMMERCE
|
'ECOMMERCE
|
||||||
PaginaDict.Add("/Ecommerce/Insignias.aspx".ToUpper(), 7002)
|
PaginaDict.Add("/Ecommerce/Insignias.aspx".ToUpper(), 7002)
|
||||||
|
|
||||||
@@ -7041,6 +7045,54 @@ Public Class ClsPaginas
|
|||||||
Vta.SelloCFDi = "Sin Timbrar"
|
Vta.SelloCFDi = "Sin Timbrar"
|
||||||
Vta.SelloSAT = "Sin Timbrar"
|
Vta.SelloSAT = "Sin Timbrar"
|
||||||
|
|
||||||
|
|
||||||
|
#Region "COMERCIO EXTERIOR VARIABLES Y TABLAS"
|
||||||
|
|
||||||
|
Dim CETipoOperacion = "", CEClavePedimento As String = "", CEIncoterm As String = "", CEId As String = "", CEMotivoTraslado As String = "", CETipoCambio As String = ""
|
||||||
|
Dim RCETipoOperacion As String = "", RCEClavePedimento As String = "", RCEIncoterm As String = "", RCEMotivoTraslado As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
Dim CE_DT_Cabecera As New DataTable
|
||||||
|
|
||||||
|
|
||||||
|
CE_DT_Cabecera.Columns.Add("Version")
|
||||||
|
CE_DT_Cabecera.Columns.Add("MotivoTraslado")
|
||||||
|
CE_DT_Cabecera.Columns.Add("TipoOperacion")
|
||||||
|
CE_DT_Cabecera.Columns.Add("ClaveDePedimento")
|
||||||
|
CE_DT_Cabecera.Columns.Add("CertificadoOrigen")
|
||||||
|
CE_DT_Cabecera.Columns.Add("Incoterm")
|
||||||
|
CE_DT_Cabecera.Columns.Add("Subdivision")
|
||||||
|
CE_DT_Cabecera.Columns.Add("TipoCambioUSD", GetType(Decimal))
|
||||||
|
CE_DT_Cabecera.Columns.Add("TotalUSD", GetType(Decimal))
|
||||||
|
|
||||||
|
|
||||||
|
Dim CE_DT_Emisor As New DataTable
|
||||||
|
CE_DT_Emisor.Columns.Add("Calle")
|
||||||
|
CE_DT_Emisor.Columns.Add("NumeroExterior")
|
||||||
|
CE_DT_Emisor.Columns.Add("Colonia")
|
||||||
|
CE_DT_Emisor.Columns.Add("Municipio")
|
||||||
|
CE_DT_Emisor.Columns.Add("Estado")
|
||||||
|
CE_DT_Emisor.Columns.Add("Pais")
|
||||||
|
CE_DT_Emisor.Columns.Add("CodigoPostal")
|
||||||
|
CE_DT_Emisor.Columns.Add("Tipo", GetType(Integer))
|
||||||
|
|
||||||
|
Dim CE_DT_Receptor As New DataTable
|
||||||
|
Dim CE_DT_Destinatario As New DataTable
|
||||||
|
|
||||||
|
CE_DT_Receptor = CE_DT_Emisor.Copy
|
||||||
|
CE_DT_Destinatario = CE_DT_Emisor.Copy
|
||||||
|
|
||||||
|
|
||||||
|
Dim CE_DT_Mercancias As New DataTable
|
||||||
|
CE_DT_Mercancias.Columns.Add("NoIdentificacion")
|
||||||
|
CE_DT_Mercancias.Columns.Add("FraccionArancelaria")
|
||||||
|
CE_DT_Mercancias.Columns.Add("CantidadAduana")
|
||||||
|
CE_DT_Mercancias.Columns.Add("UnidadAduana")
|
||||||
|
CE_DT_Mercancias.Columns.Add("ValorUnitarioAduana", GetType(Decimal))
|
||||||
|
CE_DT_Mercancias.Columns.Add("ValorDolares", GetType(Decimal))
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
'SI ESTA TIMBRADA - CON XML
|
'SI ESTA TIMBRADA - CON XML
|
||||||
If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
|
If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales
|
||||||
Dim XmlDoc As New System.Xml.XmlDocument
|
Dim XmlDoc As New System.Xml.XmlDocument
|
||||||
@@ -7077,6 +7129,130 @@ Public Class ClsPaginas
|
|||||||
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
|
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
|
||||||
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
|
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
#Region "COMERCIO EXTERIOR LECTURA DATOS XML"
|
||||||
|
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "cce11:ComercioExterior" Then
|
||||||
|
|
||||||
|
Dim nRowCECabecera As DataRow = CE_DT_Cabecera.NewRow
|
||||||
|
|
||||||
|
CETipoOperacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText
|
||||||
|
CEClavePedimento = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText
|
||||||
|
CEIncoterm = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText
|
||||||
|
|
||||||
|
|
||||||
|
nRowCECabecera("Version") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Version").InnerText
|
||||||
|
nRowCECabecera("MotivoTraslado") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
|
||||||
|
nRowCECabecera("TipoOperacion") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText
|
||||||
|
nRowCECabecera("ClaveDePedimento") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText
|
||||||
|
nRowCECabecera("CertificadoOrigen") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("CertificadoOrigen").InnerText
|
||||||
|
nRowCECabecera("Incoterm") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText
|
||||||
|
nRowCECabecera("Subdivision") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Subdivision").InnerText
|
||||||
|
nRowCECabecera("TipoCambioUSD") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText.ToDecimal
|
||||||
|
nRowCECabecera("TotalUSD") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TotalUSD").InnerText.ToDecimal
|
||||||
|
|
||||||
|
CE_DT_Cabecera.Rows.Add(nRowCECabecera)
|
||||||
|
|
||||||
|
Dim nodo As XmlNode = XmlDoc.DocumentElement
|
||||||
|
Dim VersionCFDI As String = ValorXML(nodo, "version")
|
||||||
|
|
||||||
|
Dim cfdVer As String = ""
|
||||||
|
If VersionCFDI = "3.2" Then
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||||
|
ElseIf VersionCFDI = "3.3" Then
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
||||||
|
Else ' se considera que es la version 4.0
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/4"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim namespaces As XmlNamespaceManager = New XmlNamespaceManager(XmlDoc.NameTable)
|
||||||
|
|
||||||
|
namespaces.AddNamespace("cfdi", cfdVer)
|
||||||
|
namespaces.AddNamespace("cce11", "http://www.sat.gob.mx/ComercioExterior11")
|
||||||
|
|
||||||
|
CEId = ""
|
||||||
|
Try
|
||||||
|
CEId = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).SelectSingleNode("//cce11:Destinatario", namespaces).Attributes("NumRegIdTrib").InnerText 'XmlDoc.SelectNodes("//cfdi:Complemento/tfd:TimbreFiscalDigital/cce11:Destinatario")
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
|
||||||
|
CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText
|
||||||
|
|
||||||
|
|
||||||
|
RCETipoOperacion = GlobalDTTipoOperacion.FiltroPrimeroValor("Descripcion", $"ClaveSATTipoOperacion = '{CETipoOperacion}'")
|
||||||
|
RCEClavePedimento = GlobalDTClavePedimento.FiltroPrimeroValor("Descripcion", $"ClaveSATPedimento = '{CEClavePedimento}'")
|
||||||
|
RCEIncoterm = GlobalDTIncoterm.FiltroPrimeroValor("Descripcion", $"ClaveSATIncoterm = '{CEIncoterm}'")
|
||||||
|
RCEMotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("MotivoTraslado", $"ClaveSATMotivoTraslado = '{CEMotivoTraslado}'")
|
||||||
|
|
||||||
|
|
||||||
|
Dim CENodosEmisor As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Emisor", namespaces) 'XmlDoc.SelectNodes("cfdi:Complemento/{0}:Traslados", "")
|
||||||
|
Dim CENodosReceptor As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Receptor", namespaces)
|
||||||
|
Dim CEnodosDestinatario As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Destinatario", namespaces)
|
||||||
|
Dim CEnodosMercancias As XmlNodeList = XmlDoc.DocumentElement.SelectNodes("//cfdi:Complemento/cce11:ComercioExterior/cce11:Mercancias", namespaces)
|
||||||
|
|
||||||
|
|
||||||
|
For Each node As XmlNode In CENodosEmisor
|
||||||
|
Dim nRowEmisor As DataRow = CE_DT_Emisor.NewRow
|
||||||
|
nRowEmisor("Calle") = ValorNodoXML(node.FirstChild, "Calle")
|
||||||
|
nRowEmisor("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior")
|
||||||
|
nRowEmisor("Colonia") = ValorXML(node.FirstChild, "Colonia")
|
||||||
|
nRowEmisor("Municipio") = ValorXML(node.FirstChild, "Municipio")
|
||||||
|
nRowEmisor("Estado") = ValorXML(node.FirstChild, "Estado")
|
||||||
|
nRowEmisor("Pais") = ValorXML(node.FirstChild, "Pais")
|
||||||
|
nRowEmisor("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal")
|
||||||
|
nRowEmisor("Tipo") = 1
|
||||||
|
CE_DT_Emisor.Rows.Add(nRowEmisor)
|
||||||
|
Exit For
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each node As XmlNode In CENodosReceptor
|
||||||
|
Dim nRowReceptor As DataRow = CE_DT_Receptor.NewRow
|
||||||
|
nRowReceptor("Calle") = ValorXML(node.FirstChild, "Calle")
|
||||||
|
nRowReceptor("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior")
|
||||||
|
nRowReceptor("Colonia") = ValorXML(node.FirstChild, "Colonia")
|
||||||
|
nRowReceptor("Municipio") = ValorXML(node.FirstChild, "Municipio")
|
||||||
|
nRowReceptor("Estado") = ValorXML(node.FirstChild, "Estado")
|
||||||
|
nRowReceptor("Pais") = ValorXML(node.FirstChild, "Pais")
|
||||||
|
nRowReceptor("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal")
|
||||||
|
nRowReceptor("Tipo") = 2
|
||||||
|
CE_DT_Receptor.Rows.Add(nRowReceptor)
|
||||||
|
Exit For
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each node As XmlNode In CEnodosDestinatario
|
||||||
|
Dim nRowDestinatario As DataRow = CE_DT_Destinatario.NewRow
|
||||||
|
nRowDestinatario("Calle") = ValorXML(node.FirstChild, "Calle")
|
||||||
|
nRowDestinatario("NumeroExterior") = ValorXML(node.FirstChild, "NumeroExterior")
|
||||||
|
nRowDestinatario("Colonia") = ValorXML(node.FirstChild, "Colonia")
|
||||||
|
nRowDestinatario("Municipio") = ValorXML(node.FirstChild, "Municipio")
|
||||||
|
nRowDestinatario("Estado") = ValorXML(node.FirstChild, "Estado")
|
||||||
|
nRowDestinatario("Pais") = ValorXML(node.FirstChild, "Pais")
|
||||||
|
nRowDestinatario("CodigoPostal") = ValorXML(node.FirstChild, "CodigoPostal")
|
||||||
|
nRowDestinatario("Tipo") = 3
|
||||||
|
CE_DT_Destinatario.Rows.Add(nRowDestinatario)
|
||||||
|
Exit For
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each node As XmlNode In CEnodosMercancias
|
||||||
|
Dim nRowMercancias As DataRow = CE_DT_Mercancias.NewRow
|
||||||
|
nRowMercancias("NoIdentificacion") = ValorXML(node.FirstChild, "NoIdentificacion")
|
||||||
|
nRowMercancias("FraccionArancelaria") = ValorXML(node.FirstChild, "FraccionArancelaria")
|
||||||
|
nRowMercancias("CantidadAduana") = ValorXML(node.FirstChild, "CantidadAduana")
|
||||||
|
nRowMercancias("UnidadAduana") = ValorXML(node.FirstChild, "UnidadAduana")
|
||||||
|
nRowMercancias("ValorUnitarioAduana") = ValorXML(node.FirstChild, "ValorUnitarioAduana").ToDecimal
|
||||||
|
nRowMercancias("ValorDolares") = ValorXML(node.FirstChild, "ValorDolares").ToDecimal
|
||||||
|
CE_DT_Mercancias.Rows.Add(nRowMercancias)
|
||||||
|
Next
|
||||||
|
Dim asddd As String = ""
|
||||||
|
|
||||||
|
End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -7191,6 +7367,17 @@ Public Class ClsPaginas
|
|||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If RCETipoOperacion.Trim.Length > 0 Then
|
||||||
|
params.Add(New ReportParameter("CETipoOperacion", RCETipoOperacion))
|
||||||
|
params.Add(New ReportParameter("CEClavePedimento", RCEClavePedimento))
|
||||||
|
params.Add(New ReportParameter("CEIncoterm", RCEIncoterm))
|
||||||
|
params.Add(New ReportParameter("CEId", CEId))
|
||||||
|
params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado))
|
||||||
|
params.Add(New ReportParameter("CETipoCamvio", CETipoCambio))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||||
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
|
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
|
||||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||||
@@ -7776,6 +7963,26 @@ Public Class ClsPaginas
|
|||||||
Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||||
lrds.Add(rds5)
|
lrds.Add(rds5)
|
||||||
|
|
||||||
|
|
||||||
|
If RCETipoOperacion.Trim.Length > 0 Then
|
||||||
|
Dim rds6 As New ReportDataSource With {.Name = "CE_DT_Emisor", .Value = CE_DT_Emisor}
|
||||||
|
lrds.Add(rds6)
|
||||||
|
|
||||||
|
Dim rds7 As New ReportDataSource With {.Name = "CE_DT_Receptor", .Value = CE_DT_Receptor}
|
||||||
|
lrds.Add(rds7)
|
||||||
|
|
||||||
|
Dim rds8 As New ReportDataSource With {.Name = "CE_DT_Destinatario", .Value = CE_DT_Destinatario}
|
||||||
|
lrds.Add(rds8)
|
||||||
|
|
||||||
|
Dim rds9 As New ReportDataSource With {.Name = "CE_DT_Mercancias", .Value = CE_DT_Mercancias}
|
||||||
|
lrds.Add(rds9)
|
||||||
|
|
||||||
|
Dim rds10 As New ReportDataSource With {.Name = "CE_DT_Cabecera", .Value = CE_DT_Cabecera}
|
||||||
|
lrds.Add(rds10)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then
|
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then
|
||||||
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
|
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
|
||||||
End If
|
End If
|
||||||
@@ -7915,7 +8122,7 @@ Public Class ClsPaginas
|
|||||||
Dim payload As New JObject(
|
Dim payload As New JObject(
|
||||||
New JProperty("formato", Formato),
|
New JProperty("formato", Formato),
|
||||||
New JProperty("ruta", RutaReporte),
|
New JProperty("ruta", RutaReporte),
|
||||||
New JProperty("UsarFormatoCompilado", false),
|
New JProperty("UsarFormatoCompilado", False),
|
||||||
New JProperty("parametros", paramsArray),
|
New JProperty("parametros", paramsArray),
|
||||||
New JProperty("dataSource", dataSourceArray)
|
New JProperty("dataSource", dataSourceArray)
|
||||||
)
|
)
|
||||||
@@ -9363,8 +9570,7 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
#Region "P A G O D E C O M P R A S "
|
#Region "P A G O D E C O M P R A S "
|
||||||
|
|
||||||
|
Public Function AplicaPrePolizaPagoCompra(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
|
||||||
Public Function AplicaPrePolizaPago(CompraActual As Compra, Pago As CompraPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
|
|
||||||
Dim ErrorMovtos As Boolean = False
|
Dim ErrorMovtos As Boolean = False
|
||||||
Dim PorcentajePago As Decimal = Pago.ImportePago / CompraActual.Total
|
Dim PorcentajePago As Decimal = Pago.ImportePago / CompraActual.Total
|
||||||
Dim ImporteMovimiento As Decimal = 0
|
Dim ImporteMovimiento As Decimal = 0
|
||||||
@@ -9470,14 +9676,18 @@ Public Class ClsPaginas
|
|||||||
ImporteMovimiento = (PorcentajePago * CompraActual.RetISR).RoundSQL
|
ImporteMovimiento = (PorcentajePago * CompraActual.RetISR).RoundSQL
|
||||||
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
||||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||||
|
Dim ContabilizableISR As Boolean = False
|
||||||
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
ContabilizableISR = True
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR
|
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
|
||||||
|
|
||||||
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
|
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
|
||||||
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
|
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, Ret.CveConceptoAcreditable, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR) Then ErrorMovtos = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -9509,15 +9719,17 @@ Public Class ClsPaginas
|
|||||||
If Not ErrorMovtos AndAlso ImporteMovimiento <> 0 Then
|
If Not ErrorMovtos AndAlso ImporteMovimiento <> 0 Then
|
||||||
Dim tOtCveCon As Integer = 211
|
Dim tOtCveCon As Integer = 211
|
||||||
Dim tOtTipoMovto As Boolean = False
|
Dim tOtTipoMovto As Boolean = False
|
||||||
|
Dim IdCta As Integer = If(UsuarioActual.Empresa.TipoContabilidad = 2, UsuarioActual.Empresa.Funcionalidad(266).ToEntero(), 0)
|
||||||
If ImporteMovimiento < 0 Then
|
If ImporteMovimiento < 0 Then
|
||||||
tOtTipoMovto = True : tOtCveCon = 78
|
tOtTipoMovto = True : tOtCveCon = 78
|
||||||
ImporteMovimiento = Math.Abs(ImporteMovimiento)
|
ImporteMovimiento = Math.Abs(ImporteMovimiento)
|
||||||
|
IdCta = If(UsuarioActual.Empresa.TipoContabilidad = 2, UsuarioActual.Empresa.IdCuentaOtrosIngresos, 0)
|
||||||
End If
|
End If
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tOtTipoMovto, ImporteMovimiento, ImporteMovimiento, tOtCveCon, CompraActual.SerieFolio, Concepto, 0, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveSubProyecto:=CompraActual.CveSubProyecto, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tOtTipoMovto, ImporteMovimiento, ImporteMovimiento, tOtCveCon, CompraActual.SerieFolio, Concepto, IdCta, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveSubProyecto:=CompraActual.CveSubProyecto, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovtos AndAlso CompraActual.TC <> Pago.TCPago Then
|
If Not ErrorMovtos AndAlso TCValuacion <> Pago.TCPago Then
|
||||||
Dim ConceptoContable, IdCtaContable As Integer
|
Dim ConceptoContable, IdCtaContable As Integer
|
||||||
Dim TipoMovimiento As Boolean
|
Dim TipoMovimiento As Boolean
|
||||||
Dim Diferencia As Decimal = 0
|
Dim Diferencia As Decimal = 0
|
||||||
@@ -9625,50 +9837,52 @@ Public Class ClsPaginas
|
|||||||
Public ReadOnly Property ConceptoPrePolizaRetIVA As ConceptosRetenciones
|
Public ReadOnly Property ConceptoPrePolizaRetIVA As ConceptosRetenciones
|
||||||
Get
|
Get
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
Dim Funcionalidad As Integer
|
Dim Funcionalidad, FuncionalidadxAcred As Integer
|
||||||
If CveConceptoRetIVA = 1 Then
|
If CveConceptoRetIVA = 1 Then
|
||||||
Funcionalidad = 308
|
Funcionalidad = 308 : FuncionalidadxAcred = 307
|
||||||
Ret.CveConceptoAcreditable = 22
|
Ret.CveConceptoAcreditable = 22
|
||||||
Ret.CveConceptoxAcreditar = 15
|
Ret.CveConceptoxAcreditar = 15
|
||||||
ElseIf CveConceptoRetIVA = 2 Then
|
ElseIf CveConceptoRetIVA = 2 Then
|
||||||
Funcionalidad = 310
|
Funcionalidad = 310 : FuncionalidadxAcred = 309
|
||||||
Ret.CveConceptoAcreditable = 184
|
Ret.CveConceptoAcreditable = 184
|
||||||
Ret.CveConceptoxAcreditar = 183
|
Ret.CveConceptoxAcreditar = 183
|
||||||
ElseIf CveConceptoRetIVA = 3 Then
|
ElseIf CveConceptoRetIVA = 3 Then
|
||||||
Funcionalidad = 312
|
Funcionalidad = 312 : FuncionalidadxAcred = 311
|
||||||
Ret.CveConceptoAcreditable = 186
|
Ret.CveConceptoAcreditable = 186
|
||||||
Ret.CveConceptoxAcreditar = 185
|
Ret.CveConceptoxAcreditar = 185
|
||||||
ElseIf CveConceptoRetIVA = 4 Then
|
ElseIf CveConceptoRetIVA = 4 Then
|
||||||
Funcionalidad = 314
|
Funcionalidad = 314 : FuncionalidadxAcred = 313
|
||||||
Ret.CveConceptoAcreditable = 249
|
Ret.CveConceptoAcreditable = 249
|
||||||
Ret.CveConceptoxAcreditar = 248
|
Ret.CveConceptoxAcreditar = 248
|
||||||
ElseIf CveConceptoRetIVA = 5 Then
|
ElseIf CveConceptoRetIVA = 5 Then
|
||||||
Funcionalidad = 578
|
Funcionalidad = 578 : FuncionalidadxAcred = 578
|
||||||
Ret.CveConceptoAcreditable = 286
|
Ret.CveConceptoAcreditable = 286
|
||||||
Ret.CveConceptoxAcreditar = 285
|
Ret.CveConceptoxAcreditar = 285
|
||||||
ElseIf CveConceptoRetIVA = 6 Then
|
ElseIf CveConceptoRetIVA = 6 Then
|
||||||
Funcionalidad = 578
|
Funcionalidad = 578 : FuncionalidadxAcred = 578
|
||||||
Ret.CveConceptoAcreditable = 333
|
Ret.CveConceptoAcreditable = 333
|
||||||
Ret.CveConceptoxAcreditar = 334
|
Ret.CveConceptoxAcreditar = 334
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
|
|
||||||
Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then
|
||||||
|
Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero
|
||||||
Else
|
Else
|
||||||
Dim ObjConta As New ClsContabilidad
|
|
||||||
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
|
||||||
Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||||
Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
|
||||||
|
Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
|
||||||
|
Else
|
||||||
|
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Ret
|
Return Ret
|
||||||
@@ -9677,38 +9891,41 @@ Public Class ClsPaginas
|
|||||||
Public ReadOnly Property ConceptoPrePolizaRetISR As ConceptosRetenciones
|
Public ReadOnly Property ConceptoPrePolizaRetISR As ConceptosRetenciones
|
||||||
Get
|
Get
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
Dim Funcionalidad As Integer
|
Dim Funcionalidad, FuncionalidadxAcred As Integer
|
||||||
If CveConceptoRetISR = 1 Then
|
If CveConceptoRetISR = 1 Then
|
||||||
Funcionalidad = 316
|
Funcionalidad = 316 : FuncionalidadxAcred = 315
|
||||||
Ret.CveConceptoAcreditable = 23
|
Ret.CveConceptoAcreditable = 23
|
||||||
Ret.CveConceptoxAcreditar = 16
|
Ret.CveConceptoxAcreditar = 16
|
||||||
ElseIf CveConceptoRetISR = 2 Then
|
ElseIf CveConceptoRetISR = 2 Then
|
||||||
Funcionalidad = 318
|
Funcionalidad = 318 : FuncionalidadxAcred = 317
|
||||||
Ret.CveConceptoAcreditable = 244
|
Ret.CveConceptoAcreditable = 244
|
||||||
Ret.CveConceptoxAcreditar = 243
|
Ret.CveConceptoxAcreditar = 243
|
||||||
ElseIf CveConceptoRetISR = 3 Then
|
ElseIf CveConceptoRetISR = 3 Then
|
||||||
Funcionalidad = 348
|
Funcionalidad = 349 : FuncionalidadxAcred = 348
|
||||||
Ret.CveConceptoAcreditable = 328
|
Ret.CveConceptoAcreditable = 328
|
||||||
Ret.CveConceptoxAcreditar = 327
|
Ret.CveConceptoxAcreditar = 327
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero > 0 Then
|
||||||
|
Ret.IdCtaContablexAcreditar = UsuarioActual.Empresa.Funcionalidad(FuncionalidadxAcred).ToEntero
|
||||||
|
Else
|
||||||
|
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
|
||||||
Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
|
Ret.IdCtaContableAcreditable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero
|
||||||
Else
|
Else
|
||||||
Dim ObjConta As New ClsContabilidad
|
|
||||||
If ObjConta.GetRetCuenta(Ret.CveConceptoxAcreditar, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
|
||||||
Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetRetCuenta(Ret.CveConceptoAcreditable, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||||
Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
|
||||||
End If
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Ret
|
Return Ret
|
||||||
@@ -9751,7 +9968,9 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2
|
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2
|
||||||
|
|
||||||
If VentaActual.CveMoneda <> 1 Then Pago.CveConceptoPago = 292
|
If VentaActual.CveMoneda <> 1 Then
|
||||||
|
If Pago.TipoPago = "NC" Then Pago.CveConceptoPago = 301 : Pago.CveConceptoPago = 292
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio)
|
Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio)
|
||||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||||
|
|||||||
@@ -720,7 +720,7 @@ Public Class ClsSisUsuarios
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "U S U A R I O S"
|
#Region "U S U A R I O S"
|
||||||
Public Function GetUsuarios(CveUsuario As Integer, Optional CveRol As Integer = -1, Optional CveUsuarioControlado As Integer = -1) As Boolean
|
Public Function GetUsuarios(CveUsuario As Integer, Optional CveRol As Integer = -1, Optional CveUsuarioControlado As Integer = -1, Optional Estatus As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Sis_UsuariosGet")
|
DataAdapter("PA_Sis_UsuariosGet")
|
||||||
@@ -731,6 +731,9 @@ Public Class ClsSisUsuarios
|
|||||||
.Add("@Usuario", SqlDbType.VarChar).Value = "-1"
|
.Add("@Usuario", SqlDbType.VarChar).Value = "-1"
|
||||||
.Add("@Contraseña", SqlDbType.VarChar).Value = "-1"
|
.Add("@Contraseña", SqlDbType.VarChar).Value = "-1"
|
||||||
.Add("@EsLogIn", SqlDbType.Bit).Value = 0
|
.Add("@EsLogIn", SqlDbType.Bit).Value = 0
|
||||||
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -4832,7 +4832,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If ObjCFDITimbre.Conceptos IsNot Nothing AndAlso ObjCFDITimbre.Conceptos.Count > 0 Then
|
If ObjCFDITimbre.Conceptos IsNot Nothing AndAlso ObjCFDITimbre.Conceptos.Count > 0 Then
|
||||||
For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos
|
For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos
|
||||||
cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####").ToDouble(), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####").ToDouble(), concep.Importe, concep.Descuento, concep.ObjetoImpuesto)
|
cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad.ToString("0.00####"), concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario.ToString("0.00####"), concep.Importe, concep.Descuento, concep.ObjetoImpuesto)
|
||||||
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
|
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
|
||||||
If imp.TrasladooRetencion = "T" Then
|
If imp.TrasladooRetencion = "T" Then
|
||||||
cfdi.ConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
|
cfdi.ConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe)
|
||||||
@@ -4919,81 +4919,81 @@ Public Class Timbrado
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "Comercio Exterior"
|
#Region "Comercio Exterior"
|
||||||
|
|
||||||
'If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
|
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
|
||||||
' If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
|
If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
|
||||||
|
|
||||||
' 'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
' cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado,
|
cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion,
|
ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento,
|
ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen,
|
ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen,
|
ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable,
|
ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Incoterm,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Incoterm,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Subdivision,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Subdivision,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD,
|
ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD)
|
ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD)
|
||||||
' 'EMISOR
|
'EMISOR
|
||||||
' cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP))
|
cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP))
|
||||||
' cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle,
|
cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
|
||||||
' 'RECEPTOR
|
'RECEPTOR
|
||||||
' cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
|
cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
|
||||||
' cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
|
cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP)
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP)
|
||||||
' cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib,
|
cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais,
|
||||||
' ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP)
|
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP)
|
||||||
' 'MERCANCIAS
|
'MERCANCIAS
|
||||||
' If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
|
If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
|
||||||
' For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
|
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
|
||||||
' cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
|
cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
|
||||||
' If concep.DescripcionesEspecificas.Marca <> "" Then
|
If concep.DescripcionesEspecificas.Marca <> "" Then
|
||||||
' cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
|
cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
|
||||||
' concep.DescripcionesEspecificas.Modelo,
|
concep.DescripcionesEspecificas.Modelo,
|
||||||
' concep.DescripcionesEspecificas.SubModelo,
|
concep.DescripcionesEspecificas.SubModelo,
|
||||||
' concep.DescripcionesEspecificas.NumeroSerie)
|
concep.DescripcionesEspecificas.NumeroSerie)
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
|
|
||||||
' End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
' End If
|
End If
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,22 +22,60 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Dim FI As Date
|
Dim FI As Date
|
||||||
Dim FF As Date
|
Dim FF As Date
|
||||||
|
|
||||||
If context.Request("U").ToEntero > 0 Then
|
If context.Request("METODO") IsNot Nothing Then
|
||||||
CveUsuario = context.Request("U").ToEntero
|
|
||||||
CveEmpresa = context.Request("E").ToEntero
|
|
||||||
FI = context.Request("start").ToDate
|
|
||||||
|
|
||||||
FF = context.Request("end").ToDate
|
Select Case context.Request("METODO")
|
||||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then
|
Case "servicio_domicilio"
|
||||||
'Convierte el objeto de Eventos en JSON
|
|
||||||
'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
|
If context.Request("U").ToEntero > 0 Then
|
||||||
Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
|
|
||||||
|
CveUsuario = context.Request("U").ToEntero
|
||||||
|
CveEmpresa = context.Request("E").ToEntero
|
||||||
|
FI = context.Request("start").ToDate
|
||||||
|
FF = context.Request("end").ToDate
|
||||||
|
|
||||||
|
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2) Then
|
||||||
|
'Convierte el objeto de Eventos en JSON
|
||||||
|
'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
|
||||||
|
Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
|
||||||
|
|
||||||
|
context.Response.Write(sJSON)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Exit Select
|
||||||
|
Case Else
|
||||||
|
Exit Select
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
If context.Request("U").ToEntero > 0 Then
|
||||||
|
CveUsuario = context.Request("U").ToEntero
|
||||||
|
CveEmpresa = context.Request("E").ToEntero
|
||||||
|
FI = context.Request("start").ToDate
|
||||||
|
|
||||||
|
FF = context.Request("end").ToDate
|
||||||
|
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then
|
||||||
|
'Convierte el objeto de Eventos en JSON
|
||||||
|
'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
|
||||||
|
Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
|
||||||
|
|
||||||
|
context.Response.Write(sJSON)
|
||||||
|
End If
|
||||||
|
|
||||||
context.Response.Write(sJSON)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||||
@@ -47,14 +85,15 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date) As Boolean
|
Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1) As Boolean
|
||||||
Dim ObjEventos As New ClsOIEventos
|
Dim ObjEventos As New ClsOIEventos
|
||||||
Dim ErrorEventos = False
|
Dim ErrorEventos = False
|
||||||
Dim CveEmpresaCRM As Integer = 0
|
Dim CveEmpresaCRM As Integer = 0
|
||||||
If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then
|
If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then
|
||||||
|
|
||||||
If ObjEventos.DtResultados.Rows.Count > 0 Then
|
If ObjEventos.DtResultados.Rows.Count > 0 Then
|
||||||
events = New List(Of CalendarEvent)
|
events = New List(Of CalendarEvent)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
For Each dr As DataRow In ObjEventos.DtResultados.Rows
|
For Each dr As DataRow In ObjEventos.DtResultados.Rows
|
||||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||||
@@ -78,6 +117,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
cevent.Prospecto = dr("Prospecto").ToString
|
cevent.Prospecto = dr("Prospecto").ToString
|
||||||
cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero
|
cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero
|
||||||
cevent.EmpresaCRM = dr("EmpresaCRM").ToString
|
cevent.EmpresaCRM = dr("EmpresaCRM").ToString
|
||||||
|
cevent.SubProyecto = dr("SubProyecto").ToString
|
||||||
|
cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
'11/05/2018 - Evento Gasto Recurrente
|
'11/05/2018 - Evento Gasto Recurrente
|
||||||
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
|
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||||
}
|
}
|
||||||
s
|
|
||||||
// BANCOS
|
// BANCOS
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -203,6 +203,21 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property CveSubProyectoFiltro As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveSubProyectoFiltro") Is Nothing Then
|
||||||
|
ViewState("CveSubProyectoFiltro") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveSubProyectoFiltro").ToString.ToEntero
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveSubProyectoFiltro") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private Property DtDatos As DataTable
|
Private Property DtDatos As DataTable
|
||||||
Get
|
Get
|
||||||
Return DirectCast(ViewState("DtDatos"), DataTable)
|
Return DirectCast(ViewState("DtDatos"), DataTable)
|
||||||
@@ -278,6 +293,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CveAplicaNC = IfNull(Request("CveAplicaNC"), "-1").ToString.ToEntero
|
CveAplicaNC = IfNull(Request("CveAplicaNC"), "-1").ToString.ToEntero
|
||||||
CveProveedorSucursal = IfNull(Request("CveProveedorSucursal"), "-1").ToString.ToEntero
|
CveProveedorSucursal = IfNull(Request("CveProveedorSucursal"), "-1").ToString.ToEntero
|
||||||
CodigoProgramacion = IfNull(Request("CodigoProgramacion"), "-1").ToString
|
CodigoProgramacion = IfNull(Request("CodigoProgramacion"), "-1").ToString
|
||||||
|
CveSubProyectoFiltro = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||||
@@ -382,7 +398,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
TxtImporte.Text = ""
|
TxtImporte.Text = ""
|
||||||
TxtTotal.Text = ""
|
TxtTotal.Text = ""
|
||||||
|
|
||||||
If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion) Then
|
If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then
|
||||||
DtDatos = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
DtDatos = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||||
GvCxP.DataSource = DtDatos
|
GvCxP.DataSource = DtDatos
|
||||||
DtDatos.Columns.Add("Movimiento")
|
DtDatos.Columns.Add("Movimiento")
|
||||||
@@ -488,7 +504,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
|
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
|
||||||
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
|
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
|
||||||
If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
|
If e.Row.DBCampo("TotalOriginal").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
|
||||||
If e.Row.DBCampo("Abonado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = ""
|
If e.Row.DBCampo("Abonado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = ""
|
||||||
If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = ""
|
If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = ""
|
||||||
|
|
||||||
@@ -835,6 +851,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "True"
|
CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "True"
|
||||||
CompraActual.UsuarioActual = UsuarioActual
|
CompraActual.UsuarioActual = UsuarioActual
|
||||||
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
||||||
|
CompraActual.IdCtaContableProv = CtaProveedor
|
||||||
|
|
||||||
'Importe de pago
|
'Importe de pago
|
||||||
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
@@ -850,6 +867,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
|
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
|
||||||
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||||
|
Else
|
||||||
|
Pago.OtroGastoIngreso = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
If AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
||||||
@@ -867,7 +886,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145)
|
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145)
|
||||||
Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
|
Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
|
||||||
Dim Referencia As String = $"{HdnTipoTransaccionAbreviatura.Value}: {TxtFolio.Text.Trim}"
|
Dim Referencia As String = $"{HdnTipoTransaccionAbreviatura.Value}: {TxtFolio.Text.Trim}"
|
||||||
Dim tImporteMN As Decimal = Pago.ImportePago
|
Dim tImporteMN As Decimal = TxtImporte.Text.ToDecimal
|
||||||
|
Pago.ImportePago = tImporteMN
|
||||||
|
|
||||||
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
||||||
Dim ObjCreditos As New ClsBancos
|
Dim ObjCreditos As New ClsBancos
|
||||||
@@ -891,7 +911,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsaComplementariaBancos Then
|
If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then
|
||||||
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, IdCuentaBancariaComplementaria, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then
|
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, IdCuentaBancariaComplementaria, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
@@ -1001,7 +1021,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
For Each gvr As GridViewRow In GvCxP.Rows
|
For Each gvr As GridViewRow In GvCxP.Rows
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
'obtengo su poliza para ver que presupuestos afecto
|
'obtengo su poliza para ver que presupuestos afecto
|
||||||
If gvr.DataKey("Original").ToDouble > 0 Then PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDouble / gvr.DataKey("Original").ToDouble Else PorcentajePago = 1
|
If gvr.DataKey("TotalOriginal").ToDouble > 0 Then PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDouble / gvr.DataKey("TotalOriginal").ToDouble Else PorcentajePago = 1
|
||||||
|
|
||||||
If ObjComp.GetPresupuestosCompras(gvr.DataKey("CveCompra").ToEntero) Then
|
If ObjComp.GetPresupuestosCompras(gvr.DataKey("CveCompra").ToEntero) Then
|
||||||
dtAC.Merge(ObjComp.DtResultados)
|
dtAC.Merge(ObjComp.DtResultados)
|
||||||
@@ -1890,7 +1910,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
|
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("TotalOriginal").ToDecimal
|
||||||
|
|
||||||
If MsgError = "" AndAlso gr.DataKey("IVA").ToDecimal > 0 Then
|
If MsgError = "" AndAlso gr.DataKey("IVA").ToDecimal > 0 Then
|
||||||
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
|
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
|
||||||
|
|||||||
@@ -162,7 +162,8 @@ Partial Class Bancos_RepProveedoresPagos
|
|||||||
CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero
|
CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue)
|
e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -6246,7 +6246,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('input[name*=HdnOC1IVA]').each(function () {
|
$('input[name*=HdnOC1IVA]').each(function () {
|
||||||
SumaIVA += ToDouble($(this).val());
|
|
||||||
|
let tmpiva = (ToDouble($(this).val())).toFixed(2)
|
||||||
|
SumaIVA += ToDouble(tmpiva);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input[name*=HdnOC1RetIVA]').each(function () {
|
$('input[name*=HdnOC1RetIVA]').each(function () {
|
||||||
|
|||||||
@@ -5385,7 +5385,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'agregamos la salida gasto
|
'agregamos la salida
|
||||||
folio = ObjInventario.GetFolioSiguiente(3, UsuarioActual.CveEmpresa)
|
folio = ObjInventario.GetFolioSiguiente(3, UsuarioActual.CveEmpresa)
|
||||||
cvemovimientosalidagasto = ObjInventario.AddMovimiento(tcvealmacen, 3, DdlMoneda.SelectedValue.ToEntero, fecha.AddSeconds(1), folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G3")
|
cvemovimientosalidagasto = ObjInventario.AddMovimiento(tcvealmacen, 3, DdlMoneda.SelectedValue.ToEntero, fecha.AddSeconds(1), folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G3")
|
||||||
If cvemovimientosalidagasto <= 0 Then
|
If cvemovimientosalidagasto <= 0 Then
|
||||||
@@ -5965,7 +5965,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.CveCompraAmortizacion = -1
|
Pago.CveCompraAmortizacion = -1
|
||||||
Pago.CveCreditoDetalle = CveCreditoDetalle
|
Pago.CveCreditoDetalle = CveCreditoDetalle
|
||||||
|
|
||||||
ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -6036,7 +6036,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.CveCompraAmortizacion = -1
|
Pago.CveCompraAmortizacion = -1
|
||||||
'Pago.CveConceptoPago = CveConceptoPago
|
'Pago.CveConceptoPago = CveConceptoPago
|
||||||
|
|
||||||
ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 14 'IVA X Acreditar
|
Case 14 'IVA X Acreditar
|
||||||
@@ -6091,14 +6091,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Case 224 'Otros impuestos
|
|
||||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
|
||||||
' importeMovimiento = OtrosImpuestos
|
|
||||||
' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
|
||||||
' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
|
||||||
' IdCtaContable = If(UsuarioActual.CveEmpresa = 119, 1171, -1)
|
|
||||||
' End If
|
|
||||||
|
|
||||||
Case 15 'RetIVA X Acreditar Honorarios/Serv. Prof.
|
Case 15 'RetIVA X Acreditar Honorarios/Serv. Prof.
|
||||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||||
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero() > 0 Then
|
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero() > 0 Then
|
||||||
@@ -6157,7 +6149,7 @@ Partial Class Compras_Compras
|
|||||||
funcionalidad = 317
|
funcionalidad = 317
|
||||||
ConceptoContable = 243
|
ConceptoContable = 243
|
||||||
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then
|
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then
|
||||||
funcionalidad = 348
|
funcionalidad = 349
|
||||||
ConceptoContable = 327
|
ConceptoContable = 327
|
||||||
End If
|
End If
|
||||||
importeMovimiento = CompraActual.RetISR
|
importeMovimiento = CompraActual.RetISR
|
||||||
@@ -6269,10 +6261,12 @@ Partial Class Compras_Compras
|
|||||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
||||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||||
'SI LA COMPRA ES DE TIPO GASTO CON ALMACEN DEBE REGISTRAR MOVIMIENTO
|
'SI LA COMPRA ES DE TIPO GASTO CON ALMACEN DEBE REGISTRAR MOVIMIENTO
|
||||||
|
Dim AlmacenSoloExistencia As Boolean = False
|
||||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
If DdlTipoCompra.SelectedValue <> "10" Then
|
||||||
For Each Dr As DataRow In DT.Rows
|
For Each Dr As DataRow In DT.Rows
|
||||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||||
Dr("CveAlmacen") = 0
|
Dr("CveAlmacen") = 0
|
||||||
|
AlmacenSoloExistencia = True
|
||||||
End If
|
End If
|
||||||
Dr.AcceptChanges()
|
Dr.AcceptChanges()
|
||||||
Next
|
Next
|
||||||
@@ -6296,7 +6290,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If importeMN <> 0 Then
|
If importeMN <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual,
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual,
|
||||||
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
|
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then
|
||||||
@@ -6317,15 +6310,14 @@ Partial Class Compras_Compras
|
|||||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If importeMN <> 0 Then
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If IdCtaContable = 0 Then
|
If IdCtaContable = 0 Then
|
||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If importeMN <> 0 Then
|
||||||
|
|
||||||
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then
|
||||||
@@ -6349,9 +6341,6 @@ Partial Class Compras_Compras
|
|||||||
importeMovimiento = 0
|
importeMovimiento = 0
|
||||||
IdCtaContable = 0
|
IdCtaContable = 0
|
||||||
|
|
||||||
''FLETES
|
|
||||||
'If UsuarioActual.CveEmpresa.Contiene(119) And UsuarioActual.Empresa.UsaInventarios And DdlTipoComprobante.SelectedValue <> "NC" And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And CveConceptoContableAlmacen.Contiene(237, 240) Then
|
|
||||||
|
|
||||||
'End If
|
'End If
|
||||||
Dim CostoIndirectoAcum176 As Decimal = 0
|
Dim CostoIndirectoAcum176 As Decimal = 0
|
||||||
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
|
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
|
||||||
@@ -7047,7 +7036,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -7096,7 +7084,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.CveIE = -1
|
Pago.CveIE = -1
|
||||||
Pago.CvePersonal = CvePersonal
|
Pago.CvePersonal = CvePersonal
|
||||||
|
|
||||||
ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7250,7 +7238,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.CveIE = Ant.CveIE
|
Pago.CveIE = Ant.CveIE
|
||||||
Pago.CveMonedaPago = 1
|
Pago.CveMonedaPago = 1
|
||||||
|
|
||||||
ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7293,7 +7281,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.TCPago = Ant.TCCompra
|
Pago.TCPago = Ant.TCCompra
|
||||||
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
|
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
|
||||||
|
|
||||||
ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7405,9 +7393,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'' A N T I C I P O S
|
'' A N T I C I P O S
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
If ArrAnticipos.Count > 0 Then
|
If ArrAnticipos.Count > 0 Then
|
||||||
@@ -7475,7 +7460,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'' F U N C I O N A R I O S Y E M P L E A D O S
|
'' F U N C I O N A R I O S Y E M P L E A D O S
|
||||||
If RBLContado.SelectedValue = "2" AndAlso DdlFuncionarioEmpleado.SelectedValue.ToEntero > 0 Then
|
If RBLContado.SelectedValue = "2" AndAlso DdlFuncionarioEmpleado.SelectedValue.ToEntero > 0 Then
|
||||||
TxtDocumentoImporte.Text = TxtDocumentoImporteFE.Text
|
TxtDocumentoImporte.Text = TxtDocumentoImporteFE.Text
|
||||||
@@ -7489,25 +7473,20 @@ Partial Class Compras_Compras
|
|||||||
'se agrego un movimiento de pago
|
'se agrego un movimiento de pago
|
||||||
|
|
||||||
If CveIE > 0 Then
|
If CveIE > 0 Then
|
||||||
|
|
||||||
If ImporteCompra <> 0 Then
|
If ImporteCompra <> 0 Then
|
||||||
'inserto los movimientos de la conta para abonar al saldo
|
'inserto los movimientos de la conta para abonar al saldo
|
||||||
Dim Pago As New CompraPago
|
Dim Pago As New CompraPago
|
||||||
Pago.ImportePago = ImporteCompra
|
Pago.ImportePago = ImporteCompra
|
||||||
Pago.CveIE = CveIE
|
Pago.CveIE = CveIE
|
||||||
Pago.CveMonedaPago = 1
|
Pago.CveMonedaPago = 1
|
||||||
|
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorMovtosIE = True
|
ErrorMovtosIE = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'movimiento de compra
|
'movimiento de compra
|
||||||
'[IPP] PARCHE PROVISIONAL DE CLASIFICACION Y SUBPROYECTO [CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero] [CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero]
|
'[IPP] PARCHE PROVISIONAL DE CLASIFICACION Y SUBPROYECTO [CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero] [CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero]
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, TxtSubTotal2.Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero, CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtSubTotal2.Text.ToDecimal) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, TxtSubTotal2.Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveClasificacion:=TmpDT.FiltroPrimeroValor("CveClasificacion").ToString.ToEntero, CveSubProyecto:=TmpDT.FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=TxtSubTotal2.Text.ToDecimal) Then
|
||||||
@@ -7622,7 +7601,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.CveCompraAmortizacion = CveCompraNC
|
Pago.CveCompraAmortizacion = CveCompraNC
|
||||||
Pago.CveConceptoPago = CveConceptoPago
|
Pago.CveConceptoPago = CveConceptoPago
|
||||||
|
|
||||||
ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorMovtosCxP = True
|
ErrorMovtosCxP = True
|
||||||
@@ -7730,7 +7709,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.CveIE = CveIE
|
Pago.CveIE = CveIE
|
||||||
Pago.CveMonedaPago = 1
|
Pago.CveMonedaPago = 1
|
||||||
|
|
||||||
ErrorMovtosCxP = AplicaPrePolizaPago(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorMovtosCxP = True
|
ErrorMovtosCxP = True
|
||||||
@@ -8983,16 +8962,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'[IPP] COMENTADO PORQUE REUNIFICABA AMORTIZACIÓN NC 27/Agosto/2018
|
|
||||||
'If Not CompraUnificada Then
|
|
||||||
' 'Unificacion de PrePolizas
|
|
||||||
' If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
|
||||||
' If Not ObjConta.PrePolizaUnificacion(gvr.DataKey("CvePrePoliza").ToEntero, CvePrepolizaPadre) Then
|
|
||||||
' ErrorMovtosCxP = 1
|
|
||||||
' Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -9011,8 +8980,6 @@ Partial Class Compras_Compras
|
|||||||
ErrorMovtosCxP = 1
|
ErrorMovtosCxP = 1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10055,17 +10022,17 @@ Partial Class Compras_Compras
|
|||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then
|
||||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
||||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
|
||||||
For Each Dr As DataRow In DT.Rows
|
'For Each Dr As DataRow In DT.Rows
|
||||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
' If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||||
Dr("CveAlmacen") = 0
|
' Dr("CveAlmacen") = 0
|
||||||
End If
|
' End If
|
||||||
Dr.AcceptChanges()
|
' Dr.AcceptChanges()
|
||||||
Next
|
'Next
|
||||||
End If
|
|
||||||
DT.AcceptChanges()
|
DT.AcceptChanges()
|
||||||
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
||||||
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If (DT.Rows.Count > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
|
|
||||||
importeMovimiento = TmpDT.SUM("Total", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
|
importeMovimiento = TmpDT.SUM("Total", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
|
||||||
@@ -10186,17 +10153,10 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''SEGMENTO DE NEGOCIO
|
|
||||||
Dim IdSegmentoNegocio As Integer = -1
|
|
||||||
'Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero))
|
|
||||||
'If drT IsNot Nothing Then
|
|
||||||
' IdSegmentoNegocio = drT("IdSegNeg").ToString.ToEntero
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'AGREGA MOVIMIENTO
|
'AGREGA MOVIMIENTO
|
||||||
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -15027,7 +14987,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
For Each gvr As GridViewRow In GvOC1.Rows
|
For Each gvr As GridViewRow In GvOC1.Rows
|
||||||
RegistraScript($"CalculaTotalOCEdit('{gvr.DataKey("PS").Replace("'", "")}', {gvr.DataKey("Cantidad").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}")
|
RegistraScript($"CalculaTotalOCEdit('{ gvr.DataKey("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ") }', {gvr.DataKey("Cantidad").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}")
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -15043,7 +15003,7 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound
|
Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
|
Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});"
|
||||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}")
|
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}")
|
||||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript)
|
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript)
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
CveCuentaBancaria = -1
|
CveCuentaBancaria = -1
|
||||||
ViewState("CveMoneda") = 1
|
ViewState("CveMoneda") = 1
|
||||||
CveMonedaPago = 1
|
CveMonedaPago = 1
|
||||||
|
TipoCambioPago = 1
|
||||||
Folio = ""
|
Folio = ""
|
||||||
|
|
||||||
'Cargar Filtros
|
'Cargar Filtros
|
||||||
@@ -376,7 +377,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
ChkOtrosIngresosCheque.Visible = True
|
ChkOtrosIngresosCheque.Visible = True
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(113) Then TrChequeExcedente.Visible = True
|
'If UsuarioActual.TienePermisoProceso(113) Then TrChequeExcedente.Visible = True
|
||||||
|
|
||||||
CargaDatos(DDlCheques.SelectedValue.ToEntero)
|
CargaDatos(DDlCheques.SelectedValue.ToEntero)
|
||||||
|
|
||||||
@@ -392,7 +393,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
ChkOtrosIngresosCheque.Visible = False
|
ChkOtrosIngresosCheque.Visible = False
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(113) Then TableExpedirCheque.Visible = True
|
'If UsuarioActual.TienePermisoProceso(113) Then TableExpedirCheque.Visible = True
|
||||||
|
|
||||||
LimpiaDatos()
|
LimpiaDatos()
|
||||||
|
|
||||||
@@ -547,7 +548,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If drp IsNot Nothing Then
|
If drp IsNot Nothing Then
|
||||||
If drp("IdPoliza").ToString.ToEntero > 0 Then
|
If drp("FolioPoliza").ToString.ToEntero > 0 Then
|
||||||
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
IdPoliza = drp("IdPoliza").ToString.ToEntero
|
IdPoliza = drp("IdPoliza").ToString.ToEntero
|
||||||
Else
|
Else
|
||||||
@@ -749,7 +750,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If AplicaPrePolizaPago(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
|
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
|
||||||
MsgError = "Detalle"
|
MsgError = "Detalle"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -798,6 +799,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
CveIEPago = 0
|
CveIEPago = 0
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
||||||
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
|
TipoCambioPago = 1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -811,7 +813,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
MsgError = "no se pudo insertar el detalle de la poliza"
|
MsgError = "no se pudo insertar el detalle de la poliza"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not AplicaPrePolizaPago(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
|
If Not AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then
|
||||||
MsgError = "Detalle"
|
MsgError = "Detalle"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -210,11 +210,11 @@ Partial Class PopUpAuxiliar
|
|||||||
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
e.Row.FCLiteral("LtlConcepto").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("ConceptoContable"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("CveConceptoContable").Contiene("91", "251") Then 'desaplicar NC
|
If e.Row.DBCampo("CveConceptoContable").Contiene("91", "251", "301") Then 'desaplicar NC
|
||||||
|
|
||||||
e.Row.FCLinkButton("LnkDesAplicar").Visible = True
|
e.Row.FCLinkButton("LnkDesAplicar").Visible = True
|
||||||
e.Row.FCLinkButton("imgD").Visible = False
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
If e.Row.DBCampo("CveConceptoContable").Contiene("251") Then
|
If e.Row.DBCampo("CveConceptoContable").Contiene("251", "301") Then
|
||||||
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveVentaAmortizacion"))
|
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveVentaAmortizacion"))
|
||||||
Else
|
Else
|
||||||
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveVentaAmortizacion"), e.Row.DBCampo("CveVenta"))
|
e.Row.FCLinkButton("LnkDesAplicar").CommandArgument = String.Format("{0}|{1}|{2}", e.Row.DBCampo("CvePrePoliza"), e.Row.DBCampo("CveVentaAmortizacion"), e.Row.DBCampo("CveVenta"))
|
||||||
|
|||||||
@@ -434,6 +434,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
|
' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
|
||||||
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
|
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString
|
||||||
|
|
||||||
|
If UsuarioActual.CveRol = 1 Then
|
||||||
|
TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
||||||
'DivAgregarConceptos.Visible = True
|
'DivAgregarConceptos.Visible = True
|
||||||
LnkAddConcepto.Visible = True
|
LnkAddConcepto.Visible = True
|
||||||
@@ -2417,7 +2421,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
||||||
TipoNaturaleza = GlobalDTTipoTransacciones.FiltroPrimeroValor("Tipo", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
TipoNaturaleza = GlobalDTTipoTransacciones.FiltroPrimeroValor("Tipo", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia")))
|
||||||
|
|
||||||
FolioExcel = Row("Folio").ToString.ToEntero
|
FolioExcel = Row("Folio").ToString.ToEntero
|
||||||
CveTipoTransaccion = TipoMov
|
CveTipoTransaccion = TipoMov
|
||||||
@@ -2438,11 +2442,19 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Row("Abono").ToString.ToDecimal > 0 And TipoNaturaleza = "Ing" Or Row("Cargo").ToString.ToDecimal > 0 And TipoNaturaleza = "Egs" Then
|
|
||||||
|
If Not (TipoNaturaleza = "Ing" And ((TipoMovto = False And ImporteDocumento >= 0) Or (TipoMovto = True And ImporteDocumento <= 0)) Or
|
||||||
|
TipoNaturaleza = "Egs" And ((TipoMovto = True And ImporteDocumento >= 0) Or (TipoMovto = False And ImporteDocumento <= 0))) Then
|
||||||
Alert($"El movimiento con cuenta: {NombreCuenta} , importe: {ImporteDocumento.ToString("###,###,###.00")} (registro {ContadorRegistros}), no tiene la naturaleza correcta", TipoMensaje.MsgAdvertencia)
|
Alert($"El movimiento con cuenta: {NombreCuenta} , importe: {ImporteDocumento.ToString("###,###,###.00")} (registro {ContadorRegistros}), no tiene la naturaleza correcta", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'If Row("Abono").ToString.ToDecimal > 0 And TipoNaturaleza = "Ing" Or Row("Cargo").ToString.ToDecimal > 0 And TipoNaturaleza = "Egs" Then
|
||||||
|
' Alert($"El movimiento con cuenta: {NombreCuenta} , importe: {ImporteDocumento.ToString("###,###,###.00")} (registro {ContadorRegistros}), no tiene la naturaleza correcta", TipoMensaje.MsgAdvertencia)
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Row("Abono").ToString.ToDecimal > 0 And Row("Cargo").ToString.ToDecimal > 0 Then
|
If Row("Abono").ToString.ToDecimal > 0 And Row("Cargo").ToString.ToDecimal > 0 Then
|
||||||
|
|||||||
@@ -181,6 +181,11 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
|
|
||||||
|
If CveCuenta <= -1 Then
|
||||||
|
Alert("No hay una cuenta expecificada.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
DTHeaders = New DataTable
|
DTHeaders = New DataTable
|
||||||
DTDatos = New DataTable
|
DTDatos = New DataTable
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCerrar" runat="server"><i class="fa fa-print"></i> Cerrar Ejercicio</asp:LinkButton>
|
<asp:LinkButton ID="LnkCerrar" runat="server" visible="false"><i class="fa-solid fa-shield" ></i> Cerrar Ejercicio</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
@@ -603,8 +603,8 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
||||||
<div class="col-md-2" style="width: 125px;">
|
<div class="col-md-5">
|
||||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100px">
|
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||||
DdlSubproyecto.DataBind()
|
DdlSubproyecto.DataBind()
|
||||||
|
|
||||||
|
If UsuarioActual.TienePermisoProceso(346) Then LnkCerrar.Visible = True
|
||||||
|
|
||||||
'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||||
DdlPeriodo.SelectedValue = Now.Month.ToString
|
DdlPeriodo.SelectedValue = Now.Month.ToString
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -172,6 +172,10 @@
|
|||||||
<DataField>SATClaveUM</DataField>
|
<DataField>SATClaveUM</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="CodigoObjetoImpuesto">
|
||||||
|
<DataField>CodigoObjetoImpuesto</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
</Fields>
|
</Fields>
|
||||||
<rd:DataSetInfo>
|
<rd:DataSetInfo>
|
||||||
<rd:DataSetName>DsOC</rd:DataSetName>
|
<rd:DataSetName>DsOC</rd:DataSetName>
|
||||||
@@ -1411,16 +1415,19 @@
|
|||||||
<Width>2.0584cm</Width>
|
<Width>2.0584cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>4.44265cm</Width>
|
<Width>3.47821cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>6.28682cm</Width>
|
<Width>4.82589cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>2.5cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.6882cm</Width>
|
<Width>1.6882cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.43574cm</Width>
|
<Width>2.33651cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
</TablixColumns>
|
</TablixColumns>
|
||||||
<TablixRows>
|
<TablixRows>
|
||||||
@@ -1605,6 +1612,42 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox22">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Obj. Imp.</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox22</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>#c4d79b</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<BackgroundColor>#c4d79b</BackgroundColor>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Textbox84">
|
<Textbox Name="Textbox84">
|
||||||
@@ -1847,6 +1890,44 @@
|
|||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell />
|
<TablixCell />
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="CodigoObjetoImpuesto">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!CodigoObjetoImpuesto.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>CodigoObjetoImpuesto</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>#c4d79b</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</BottomBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="PU1">
|
<Textbox Name="PU1">
|
||||||
@@ -2049,7 +2130,7 @@
|
|||||||
<TablixBody>
|
<TablixBody>
|
||||||
<TablixColumns>
|
<TablixColumns>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>4.44265cm</Width>
|
<Width>3.47821cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
</TablixColumns>
|
</TablixColumns>
|
||||||
<TablixRows>
|
<TablixRows>
|
||||||
@@ -2195,7 +2276,7 @@
|
|||||||
<TablixBody>
|
<TablixBody>
|
||||||
<TablixColumns>
|
<TablixColumns>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>6.28682cm</Width>
|
<Width>4.82589cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
</TablixColumns>
|
</TablixColumns>
|
||||||
<TablixRows>
|
<TablixRows>
|
||||||
@@ -2337,6 +2418,44 @@
|
|||||||
</Tablix>
|
</Tablix>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox29">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value />
|
||||||
|
<Style>
|
||||||
|
<Color>#c4d79b</Color>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox29</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>#c4d79b</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</BottomBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Textbox15">
|
<Textbox Name="Textbox15">
|
||||||
@@ -2598,6 +2717,42 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox30">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value />
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox30</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>#c4d79b</Color>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<BottomBorder>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</BottomBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Textbox41">
|
<Textbox Name="Textbox41">
|
||||||
@@ -2683,6 +2838,7 @@
|
|||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixColumnHierarchy>
|
</TablixColumnHierarchy>
|
||||||
<TablixRowHierarchy>
|
<TablixRowHierarchy>
|
||||||
@@ -2708,7 +2864,7 @@
|
|||||||
<Top>4.14415cm</Top>
|
<Top>4.14415cm</Top>
|
||||||
<Left>0.11516cm</Left>
|
<Left>0.11516cm</Left>
|
||||||
<Height>2.29418cm</Height>
|
<Height>2.29418cm</Height>
|
||||||
<Width>19.97108cm</Width>
|
<Width>19.94648cm</Width>
|
||||||
<ZIndex>11</ZIndex>
|
<ZIndex>11</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -4235,7 +4391,11 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Version 3.3</Value>
|
<Value>Version </Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!CFDIVersion.Value</Value>
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -4246,7 +4406,7 @@
|
|||||||
<Top>19.66102cm</Top>
|
<Top>19.66102cm</Top>
|
||||||
<Left>0.07003cm</Left>
|
<Left>0.07003cm</Left>
|
||||||
<Height>1.01627cm</Height>
|
<Height>1.01627cm</Height>
|
||||||
<Width>5.45089cm</Width>
|
<Width>9.87342cm</Width>
|
||||||
<ZIndex>14</ZIndex>
|
<ZIndex>14</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -4862,7 +5022,7 @@
|
|||||||
<Height>23.58967cm</Height>
|
<Height>23.58967cm</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>20.16633cm</Width>
|
<Width>20.16087cm</Width>
|
||||||
<Page>
|
<Page>
|
||||||
<PageFooter>
|
<PageFooter>
|
||||||
<Height>0.74111cm</Height>
|
<Height>0.74111cm</Height>
|
||||||
@@ -5514,6 +5674,18 @@
|
|||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="CFDIVersion">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="RegimenFiscalCodigo">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="Logo2">
|
<EmbeddedImage Name="Logo2">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1559,38 +1559,42 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
|
|
||||||
For Each Row As DataRow In dt.Rows
|
For Each Row As DataRow In dt.Rows
|
||||||
NombreCuenta = Row("NombreCuenta").ToString
|
Dim Cuenta As String = Row("Cuenta").ToString.Trim
|
||||||
CuentaPadre = Row("CuentaPadre").ToString
|
If Cuenta <> "" Then
|
||||||
Dim Cuenta As String = Row("Cuenta").ToString
|
NombreCuenta = Row("NombreCuenta").ToString.Trim
|
||||||
Dim TipoCuenta As String = Row("TipoCuenta").ToString
|
CuentaPadre = Row("CuentaPadre").ToString.Trim
|
||||||
Dim AgrupadorSAT As String = Row("AgrupadorSAT").ToString
|
|
||||||
Dim CveCuentaPadre As Integer = -1
|
|
||||||
Dim CveAgrupadorSAT As Integer = If(AgrupadorSAT = "0", -1, AgrupadoresSAT.FiltroPrimeroValor("CveAgrupadorSAT", String.Format("CodigoNombre LIKE '%{0}%'", AgrupadorSAT)).ToEntero)
|
|
||||||
|
|
||||||
If Not CuentaPadre = "" Then
|
Dim TipoCuenta As String = Row("TipoCuenta").ToString.Trim
|
||||||
If ObjConta.GetCuentas(-1, CuentaPadre.Replace("-", ""), -1, UsuarioActual.CveEmpresa) Then
|
Dim AgrupadorSAT As String = Row("AgrupadorSAT").ToString.Trim
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
Dim CveCuentaPadre As Integer = -1
|
||||||
CveCuentaPadre = ObjConta.DtResultados().FiltroPrimeroValor("Id").ToEntero
|
Dim CveAgrupadorSAT As Integer = If(AgrupadorSAT = "0", -1, AgrupadoresSAT.FiltroPrimeroValor("CveAgrupadorSAT", String.Format("CodigoNombre LIKE '%{0}%'", AgrupadorSAT)).ToEntero)
|
||||||
|
|
||||||
|
If Not CuentaPadre = "" Then
|
||||||
|
If ObjConta.GetCuentas(-1, CuentaPadre.Replace("-", ""), -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
CveCuentaPadre = ObjConta.DtResultados().FiltroPrimeroValor("Id").ToEntero
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
CveCuentaPadre = -2
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim IdNew = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1, CveEmpresaParam:=UsuarioActual.CveEmpresa, CveAgrupadorSAT:=CveAgrupadorSAT)
|
||||||
|
If IdNew > 0 Then
|
||||||
|
ContadorUpdate = ContadorUpdate + 1
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
ContadorError = ContadorError + 1
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
CveCuentaPadre = -2
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim IdNew = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1, CveEmpresaParam:=UsuarioActual.CveEmpresa, CveAgrupadorSAT:=CveAgrupadorSAT)
|
|
||||||
If IdNew > 0 Then
|
|
||||||
ContadorUpdate = ContadorUpdate + 1
|
|
||||||
Else
|
|
||||||
TieneError = True
|
|
||||||
ContadorError = ContadorError + 1
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
Alert("No se tienen asociados Agrupadores para esta empresa")
|
Alert("No se tienen asociados Agrupadores para esta empresa")
|
||||||
@@ -1598,12 +1602,12 @@ Partial Class General_SaldosIniciales
|
|||||||
End If
|
End If
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjConta.Commit()
|
ObjConta.Commit()
|
||||||
|
Alert($"Se agregaron {ContadorUpdate} Cuentas Correctamente y se omitieron: {ContadorError} cuentas.")
|
||||||
Else
|
Else
|
||||||
Alert($"No pudimos agregar la cuenta en ContaSIG: {NombreCuenta} - Cuenta Padre: {CuentaPadre}", TipoMensaje.MsgError)
|
Alert($"No pudimos agregar la cuenta en ContaSIG: {NombreCuenta} - Cuenta Padre: {CuentaPadre}", TipoMensaje.MsgError)
|
||||||
ObjConta.RollBack()
|
ObjConta.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Alert($"Se agregaron {ContadorUpdate} Cuentas Correctamente y se omitieron: {ContadorError} cuentas.")
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ObjConta.RollBack()
|
ObjConta.RollBack()
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ Partial Class Inicio
|
|||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddDays(30), 1, UsuarioActual.CveEmpresa, True) Then
|
If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddYears(1), 1, UsuarioActual.CveEmpresa, -1, UsuarioActual.CveUsuario, True) Then
|
||||||
|
|
||||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||||
GvModalRSCOPorCaducar.DataSource = ObjInventarios.DtResultados
|
GvModalRSCOPorCaducar.DataSource = ObjInventarios.DtResultados
|
||||||
|
|||||||
@@ -1411,12 +1411,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
|
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso Not tCveSubProyecto.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
|
||||||
FechaCaducidadVal = MinFecha
|
|
||||||
FechaCaducidad = MinFecha
|
|
||||||
Lote = ""
|
|
||||||
End If
|
|
||||||
|
|
||||||
'salida
|
'salida
|
||||||
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
|
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
|
||||||
|
|
||||||
@@ -4682,11 +4676,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenInventarioFisico.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero
|
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenInventarioFisico.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso Not CveSubProyectoAlmacen.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
|
||||||
AplicaLote = False
|
|
||||||
AplicaCaducidad = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
'activa seccion
|
'activa seccion
|
||||||
ThSeccionEntrada.Visible = AplicaSeccion
|
ThSeccionEntrada.Visible = AplicaSeccion
|
||||||
TrSeccionEntrada.Visible = AplicaSeccion
|
TrSeccionEntrada.Visible = AplicaSeccion
|
||||||
@@ -4724,10 +4713,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenInventarioFisico.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero
|
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenInventarioFisico.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso Not CveSubProyectoAlmacen.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
|
||||||
AplicaLote = False
|
|
||||||
AplicaCaducidad = False
|
|
||||||
End If
|
|
||||||
'activa seccion
|
'activa seccion
|
||||||
ThSeccionSalida.Visible = AplicaSeccion
|
ThSeccionSalida.Visible = AplicaSeccion
|
||||||
TrSeccionSalida.Visible = AplicaSeccion
|
TrSeccionSalida.Visible = AplicaSeccion
|
||||||
|
|||||||
@@ -66,40 +66,10 @@
|
|||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li>Cliente:
|
<li>Cliente:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ADS:Dropdownlost ID="DdlClientes" CssClassDdl="select2me" runat="server" CssStyle="width: 350px;" DataTextField="NombreComercial" Onselectedindexchange="DdlCliente_SelectedIndexChanged" DataValueField="CveCliente"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="DdlClientes" CssClassDdl="select2me" runat="server" CssStyle="width: 350px;" DataTextField="NombreComercial" Onselectedindexchange="DdlCliente_SelectedIndexChanged" DataValueField="CveCliente"></ADS:Dropdownlost>
|
||||||
<%--<asp:DropDownList ID="DdlClientes" runat="server" DataValueField="CveCliente" DataTextField="Nombre" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="350px"></asp:DropDownList>--%>
|
<%--<asp:DropDownList ID="DdlClientes" runat="server" DataValueField="CveCliente" DataTextField="Nombre" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="350px"></asp:DropDownList>--%>
|
||||||
</li>
|
</li>
|
||||||
<li>Serie-Folio:
|
<li>Serie-Folio:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlFolio" runat="server" DataValueField="CveVenta" DataTextField="SerieFolio" CssClass="form-control input-sm select2me" Width="250px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlFolio" runat="server" DataValueField="CveVenta" DataTextField="SerieFolio" CssClass="form-control input-sm select2me" Width="250px"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="DdlFolio" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpBuscar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="DdlFolio" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpBuscar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEFolio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEFolio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -108,25 +78,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" OnClick="BtnBuscar_Click" ValidationGroup="GrpBuscar" class="btn btn-primary" />
|
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" OnClick="BtnBuscar_Click" ValidationGroup="GrpBuscar" class="btn btn-primary" />
|
||||||
<%--<a href="javascript:;" class="expand"></a>--%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" style="display: none;">
|
<div class="portlet-body" style="display: none;">
|
||||||
<%--<ul class="list-inline">
|
|
||||||
<li>Descripcion:
|
|
||||||
<asp:Label ID="lbDescripcion" runat="server"></asp:Label>
|
|
||||||
</li>
|
|
||||||
</ul>--%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row" style="margin-left: 0px; margin-right: 0px;">
|
<div class="row" style="margin-left: 0px; margin-right: 0px;">
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
<%--DATOS DE LA VENTA--%>
|
<%--DATOS DE LA VENTA--%>
|
||||||
@@ -556,7 +518,7 @@
|
|||||||
|
|
||||||
<%--GV DATOS--%>
|
<%--GV DATOS--%>
|
||||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||||
<HeaderStyle Height="30px" />
|
<HeaderStyle Height="30px" />
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -269,14 +269,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property ValidaLoteCaducidad As Boolean
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("ValidaLoteCaducidad"), Boolean)
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
ViewState("ValidaLoteCaducidad") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -606,7 +598,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CveContrato = drE("CveContrato").ToString().ToEntero()
|
CveContrato = drE("CveContrato").ToString().ToEntero()
|
||||||
CveVendedor = drE("CveVendedor").ToString().ToEntero()
|
CveVendedor = drE("CveVendedor").ToString().ToEntero()
|
||||||
CveCliente = drE("CveCliente").ToString().ToEntero()
|
CveCliente = drE("CveCliente").ToString().ToEntero()
|
||||||
ClienteEntregaPersonal(CveCliente)
|
'ClienteEntregaPersonal(CveCliente)
|
||||||
CveSubProyecto = drE("CveSubProyecto").ToString().ToEntero()
|
CveSubProyecto = drE("CveSubProyecto").ToString().ToEntero()
|
||||||
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString())
|
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString())
|
||||||
CveDireccionEnvio = drE("CveDireccionEnvio").ToString.ToEntero
|
CveDireccionEnvio = drE("CveDireccionEnvio").ToString.ToEntero
|
||||||
@@ -665,17 +657,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
|
||||||
|
|
||||||
If CveSubProyectoAlmacen.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
|
||||||
ValidaLoteCaducidad = True
|
|
||||||
Else
|
|
||||||
ValidaLoteCaducidad = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not DtDatos.Columns.Contains("Serie") Then DtDatos.Columns.Add("Serie", GetType(String))
|
If Not DtDatos.Columns.Contains("Serie") Then DtDatos.Columns.Add("Serie", GetType(String))
|
||||||
|
|
||||||
If Not DtDatos.Columns.Contains("Lote") Then DtDatos.Columns.Add("Lote", GetType(String))
|
If Not DtDatos.Columns.Contains("Lote") Then DtDatos.Columns.Add("Lote", GetType(String))
|
||||||
@@ -957,7 +938,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If TipoDocto = "DPe" Then
|
If TipoDocto = "DPe" Then
|
||||||
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
||||||
PSSerie = e.Row.DBCampo("PS").ToString()
|
PSSerie = e.Row.DBCampo("PS").ToString()
|
||||||
@@ -995,52 +975,41 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||||
If DdlAlmacen.SelectedValue.ToEntero() > 0 Then
|
If DdlAlmacen.SelectedValue.ToEntero() > 0 Then
|
||||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero(), e.Row.DBCampo("CvePS").ToEntero(), UsuarioActual.CveEmpresa, True)
|
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero(), e.Row.DBCampo("CvePS").ToEntero(), UsuarioActual.CveEmpresa, True)
|
||||||
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), e.Row.DBCampo("CvePS").ToEntero())
|
|
||||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
|
||||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
|
||||||
'If dtt.Rows.Count > 1 Then
|
|
||||||
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
'End If
|
|
||||||
'dtt.Dispose()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
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
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
|
||||||
|
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
|
||||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||||
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
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
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtLote").Text = "" Then
|
If e.Row.FCTextBox("TxtLote").Text = "" Then
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
||||||
e.Row.FCTextBox("TxtLote").Enabled = True
|
e.Row.FCTextBox("TxtLote").Enabled = True
|
||||||
Else
|
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
|
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
|
||||||
@@ -1049,19 +1018,27 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
|
|
||||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
If e.Row.DBCampo("CodigoBarras").Trim <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
|
||||||
'NO BLOQUEA PARA ROL AD
|
'NO BLOQUEA PARA ROL AD
|
||||||
If UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.CveRol = 1 Then
|
||||||
If AplicaSerie Then
|
If AplicaSerie Then
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
|
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######")
|
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'acumuladoras
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
If e.Row.DBCampo("CveCategoria") <> "249" Then
|
||||||
|
e.Row.FCTextBox("TbCantidadF").Enabled = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not UsuarioActual.CveRol = 1 Then
|
||||||
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
|
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1070,7 +1047,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1140,9 +1116,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DtDatosDetalle.Columns.Add("FueTraspaso", GetType(Integer))
|
DtDatosDetalle.Columns.Add("FueTraspaso", GetType(Integer))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaSerie(Optional CerrarCompletado As Boolean = False)
|
Private Sub CargaSerie(Optional CerrarCompletado As Boolean = False, Optional CargaMasivo As Boolean = False)
|
||||||
RegistraScript("$('#DivSerie').modal('show')", "show")
|
|
||||||
|
|
||||||
|
If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal('show')", "show")
|
||||||
|
|
||||||
Dim AplicaCaducidad = False
|
Dim AplicaCaducidad = False
|
||||||
If GlobalDTPS(UsuarioActual.CveEmpresa, ).FiltraParametros("").Rows(0) IsNot Nothing Then
|
If GlobalDTPS(UsuarioActual.CveEmpresa, ).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||||
@@ -1196,7 +1172,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim Mensaje As New StringBuilder
|
Dim Mensaje As New StringBuilder
|
||||||
Mensaje.AppendFormat("Serie Recomendado: <b>{0}</b>", DtSerie.Rows(0)("Serie"))
|
Mensaje.AppendFormat("Serie Recomendado: <b>{0}</b>", DtSerie.Rows(0)("Serie"))
|
||||||
|
|
||||||
If AplicaCaducidad Then Mensaje.AppendFormat(", Caducicdad: <b>{0}</b>", DtSerie.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
|
If AplicaCaducidad Then Mensaje.AppendFormat(", Caducidad: <b>{0}</b>", DtSerie.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
|
||||||
LbSerieRecomendado.Text = Mensaje.ToString() 'String.Format("Serie / Lote Recomendado: <b>{0}</b>, Caducicdad: <b>{1}</b>", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
|
LbSerieRecomendado.Text = Mensaje.ToString() 'String.Format("Serie / Lote Recomendado: <b>{0}</b>, Caducicdad: <b>{1}</b>", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
|
||||||
Else
|
Else
|
||||||
LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote."
|
LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote."
|
||||||
@@ -1250,7 +1226,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AgregaSerie(Serie As String, Tipo As Integer)
|
Private Sub AgregaSerie(Serie As String, Tipo As Integer, Optional CargaMasivo As Boolean = False)
|
||||||
|
|
||||||
If Serie.Trim = "" Then
|
If Serie.Trim = "" Then
|
||||||
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -1312,7 +1288,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Tipo < 3 Then
|
If Tipo < 3 Then
|
||||||
CargaSerie(True)
|
CargaSerie(True, cargaMasivo)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1570,8 +1546,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Gvr.DataKey("AplicaSerie") = "True" Then
|
||||||
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
|
||||||
TdSeriePS.Visible = True
|
TdSeriePS.Visible = True
|
||||||
TxtSeriePS.Focus()
|
TxtSeriePS.Focus()
|
||||||
|
|
||||||
@@ -1582,7 +1557,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033)
|
Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033)
|
||||||
|
|
||||||
If CantidadEspecial Then
|
If CantidadEspecial Then
|
||||||
@@ -1636,7 +1610,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
||||||
AgregaSerie(TxtSeriePS.Text.Trim, 2)
|
AgregaSerie(TxtSeriePS.Text.Trim, 2, True)
|
||||||
|
|
||||||
TdSeriePS.Visible = False
|
TdSeriePS.Visible = False
|
||||||
TxtSeriePS.Text = ""
|
TxtSeriePS.Text = ""
|
||||||
@@ -1719,11 +1693,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If (Not ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
ValidaSeccion = False
|
||||||
ValidaSeccion = False
|
ValidaCaducidad = False
|
||||||
ValidaCaducidad = False
|
ValidaLote = False
|
||||||
ValidaLote = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ValidaSeccion Then
|
If ValidaSeccion Then
|
||||||
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -1866,11 +1838,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha)
|
FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha)
|
||||||
Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString().Trim, "-1")
|
Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString().Trim, "-1")
|
||||||
|
|
||||||
If Not ValidaLoteCaducidad Then
|
|
||||||
FechaCaducidad = MinFecha
|
|
||||||
Lote = "-1"
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Dr("CantidadGV").ToString().ToDecimal > 0 Then
|
If Dr("CantidadGV").ToString().ToDecimal > 0 Then
|
||||||
If CBool(Dr("AplicaSerie")) Then
|
If CBool(Dr("AplicaSerie")) Then
|
||||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||||
@@ -2076,15 +2043,14 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 Then
|
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 AndAlso TipoDocto.Contiene("Rem") Then
|
||||||
Dim CvePrePolizaSinCosto As Integer = ObjConta.AddPrePolizas("EA/SinCost", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrega", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePolizaSinCosto As Integer = ObjConta.AddPrePolizas("EA/SinCost", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrega", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If CvePrePolizaSinCosto > 0 Then
|
If CvePrePolizaSinCosto > 0 Then
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSinCosto, True, 0, 0, 68, TxtObservaciones.Text, TxtObservaciones.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=False) Then
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSinCosto, True, 0, 0, 68, TxtObservaciones.Text, TxtObservaciones.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=False) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSinCosto, False, 0, 0, 68, TxtObservaciones.Text, TxtObservaciones.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntradaApartado, Contabilizable:=False) Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSinCosto, False, 0, 0, 68, TxtObservaciones.Text, TxtObservaciones.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=False) Then
|
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2152,12 +2118,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
|
|
||||||
CantidadPendiente = 1
|
CantidadPendiente = 1
|
||||||
'If CBool(Dr("AplicaSeccion")) Then
|
|
||||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero()).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero()
|
|
||||||
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
|
|
||||||
'Else
|
|
||||||
' CveSeccionAlmacen = -1
|
|
||||||
'End If
|
|
||||||
CveSeccionAlmacen = -3
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), 0, 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
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), 0, 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
|
||||||
@@ -2529,7 +2489,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
|
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
|
||||||
'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
|
'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
|
PU = DtExistencias.FiltroPrimeroValor("PU", $"ISNULL(CveTipoAlmacenDevolucion,-1) <> 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(), CveVentaDetalleRemision:=Dr("CveVentaDetalleRemision").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(), CveVentaDetalleRemision:=Dr("CveVentaDetalleRemision").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
|
||||||
|
|||||||
@@ -28,14 +28,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property ValidaLoteCaducidad As Boolean
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("ValidaLoteCaducidad"), Boolean)
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
ViewState("ValidaLoteCaducidad") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property CveTipoAlmacen As Integer
|
Private Property CveTipoAlmacen As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CveTipoAlmacen"), Integer)
|
Return CType(ViewState("CveTipoAlmacen"), Integer)
|
||||||
@@ -606,21 +598,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
Dim drr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim drr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
'("CveSubProyecto").ToEntero
|
|
||||||
Dim CveSubProyecto As Integer = drr("CveSubProyecto").ToString.ToEntero
|
|
||||||
'RMF condición temporal
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyecto.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
|
||||||
ValidaLoteCaducidad = True
|
|
||||||
Else
|
|
||||||
ValidaLoteCaducidad = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
CveTipoAlmacen = drr("CveTipoAlmacen").ToString.ToEntero
|
CveTipoAlmacen = drr("CveTipoAlmacen").ToString.ToEntero
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CargaGVInv()
|
CargaGVInv()
|
||||||
'For Each Gvr As GridViewRow In GvInv.Rows
|
'For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
' If Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue = "-1" Then
|
' If Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue = "-1" Then
|
||||||
@@ -1412,6 +1394,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If Not TmDT.Columns.Contains("CantidadSeleccionada") Then
|
If Not TmDT.Columns.Contains("CantidadSeleccionada") Then
|
||||||
TmDT.Columns.Add("CantidadSeleccionada", GetType(Decimal))
|
TmDT.Columns.Add("CantidadSeleccionada", GetType(Decimal))
|
||||||
End If
|
End If
|
||||||
|
If Not TmDT.Columns.Contains("CveCategoria") Then
|
||||||
|
TmDT.Columns.Add("CveCategoria", GetType(Integer))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
GvInv.Columns(2).Visible = False
|
GvInv.Columns(2).Visible = False
|
||||||
@@ -1490,6 +1475,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCButton("BtnSerie").Visible = False
|
e.Row.FCButton("BtnSerie").Visible = False
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = True
|
e.Row.FCTextBox("TbCantidadF").Enabled = True
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = True
|
e.Row.FCCheckBox("cbInv").Enabled = True
|
||||||
|
|
||||||
|
If UsuarioActual.TienePermisoProceso(345) Then 'carga la cantidad con el rol AD
|
||||||
|
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1517,7 +1506,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
End If
|
End If
|
||||||
If UsuarioActual.CveRol = 1 Then 'carga la cantidad con el rol AD
|
If UsuarioActual.TienePermisoProceso(345) Then 'carga la cantidad con el rol AD
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1547,23 +1536,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
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").Text = Now.ToShortDateString
|
||||||
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
|
e.Row.FCTextBox("TxtDividir").Visible = True
|
||||||
e.Row.FCTextBox("TxtDividir").Visible = 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
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
|
||||||
Else
|
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
|
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
|
||||||
@@ -1574,6 +1560,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" And Not UsuarioActual.TienePermisoProceso(174) Then
|
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" And Not UsuarioActual.TienePermisoProceso(174) Then
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'acumuladoras
|
||||||
|
If e.Row.DBCampo("CveCategoria") <> "249" Then
|
||||||
|
e.Row.FCTextBox("TbCantidadF").Enabled = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("CantidadF").ToDecimal = 0 Then
|
If e.Row.DBCampo("CantidadF").ToDecimal = 0 Then
|
||||||
@@ -1623,7 +1614,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim TxtCantidad = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
If Gvr.DataKey("AplicaSerie") = "True" Then
|
||||||
TdSeriePS.Visible = True
|
TdSeriePS.Visible = True
|
||||||
TxtSeriePS.Focus()
|
TxtSeriePS.Focus()
|
||||||
|
|
||||||
@@ -1690,11 +1681,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
||||||
AgregaSerie(TxtSeriePS.Text.Trim, 2)
|
AgregaSerie(TxtSeriePS.Text.Trim, 2, CargaMasivaSeries:=True)
|
||||||
TdSeriePS.Visible = False
|
TdSeriePS.Visible = False
|
||||||
TxtSeriePS.Text = ""
|
TxtSeriePS.Text = ""
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
TxtCodigoPS.Focus()
|
TxtCodigoPS.Focus()
|
||||||
|
UPInv.Update()
|
||||||
|
GvInv.DataSource = DtInv
|
||||||
|
GvInv.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnGuardarCantidadEspecial_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardarCantidadEspecial_Click(sender As Object, e As EventArgs)
|
||||||
AgregaCantidadEspecial()
|
AgregaCantidadEspecial()
|
||||||
@@ -1792,7 +1786,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
UPInv.Update()
|
UPInv.Update()
|
||||||
UpSerie.Update()
|
UpSerie.Update()
|
||||||
TxtSerie.Text = ""
|
TxtSerie.Text = ""
|
||||||
@@ -1831,7 +1824,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
|
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
|
||||||
If Serie.ToUpper = dr("Codigo").ToString.ToUpper Or Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper Then
|
If Serie.ToUpper = dr("Codigo").ToString.ToUpper OrElse Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper Then
|
||||||
MensajeAlert.Append($"<br/> El numero de Serie <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.")
|
MensajeAlert.Append($"<br/> El numero de Serie <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.")
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
@@ -1846,20 +1839,21 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim MensajeSinExistencias As New StringBuilder
|
Dim MensajeSinExistencias As New StringBuilder
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Index = 0
|
Dim Index = 0
|
||||||
|
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
|
||||||
|
|
||||||
|
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
||||||
|
'DtInv
|
||||||
|
|
||||||
For Each Serie In SeriesArreglo
|
For Each Serie In SeriesArreglo
|
||||||
If Serie <> "" Then
|
If Serie <> "" Then
|
||||||
|
|
||||||
Dim Row = DtDatosDetalle.NewRow
|
|
||||||
|
|
||||||
|
Dim Row = DtDatosDetalle.NewRow
|
||||||
Index = Index + 1
|
Index = Index + 1
|
||||||
If Index > LbCantidad.Text.ToEntero Then
|
If Index > Cantidad Then Exit For
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
'VALIDA QUE SIGA AGREGANDO
|
'VALIDA QUE SIGA AGREGANDO
|
||||||
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
|
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < Cantidad Then
|
||||||
Exit For
|
MensajeAlert.Append("series cargadas en su totalidad") : Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
@@ -2281,12 +2275,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Index += 1
|
Index += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If (Not ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
|
||||||
ValidaSeccion = False
|
|
||||||
ValidaCaducidad = False
|
|
||||||
ValidaLote = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ValidaSeccion Then
|
If ValidaSeccion Then
|
||||||
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Return False
|
||||||
@@ -2327,7 +2315,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:= (TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
||||||
If Existencia < ExistenciaActual Then
|
If Existencia < ExistenciaActual Then
|
||||||
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
||||||
Continue For
|
Continue For
|
||||||
@@ -3254,6 +3242,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveTipoAlmacen").ToEntero()
|
||||||
|
If CveTipoAlmacen = 21 Then 'tipo: devs a proveedore
|
||||||
|
RealizarMovimientoVirtual = False
|
||||||
|
End If
|
||||||
|
|
||||||
If RealizarMovimientoVirtual Then
|
If RealizarMovimientoVirtual Then
|
||||||
|
|
||||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||||
|
|||||||
@@ -1082,7 +1082,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
If Valido And AgregarUsado Then
|
If Valido And AgregarUsado Then
|
||||||
|
|
||||||
If ObjFactura IsNot Nothing AndAlso Me.CveRemisionRecibida > 0 Then
|
If ObjFactura IsNot Nothing AndAlso Me.CveRemisionRecibida > 0 Then
|
||||||
Dim RowDetalle As DataRow = ObjFactura.DtDetalle.FiltroPrimero($"CvePS={CvePS}")
|
Dim RowDetalle As DataRow = ObjFactura.DtDetalle.FiltroPrimero($"CveVentaDetalle={CveVentaDetalle}")
|
||||||
|
|
||||||
If RowDetalle IsNot Nothing Then
|
If RowDetalle IsNot Nothing Then
|
||||||
|
|
||||||
|
|||||||
@@ -57,11 +57,11 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
DTDatos = ObjInventarios.DtResultados;
|
DTDatos = ObjInventarios.DtResultados;
|
||||||
if (DdlOpcion.SelectedValue == "1")
|
if (DdlOpcion.SelectedValue == "1")
|
||||||
{
|
{
|
||||||
GvDatos.Columns[4].HeaderText = "F.Elaboración";
|
GvDatos.Columns[5].HeaderText = "F.Elaboración";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GvDatos.Columns[4].HeaderText = "F.Caducidad";
|
GvDatos.Columns[5].HeaderText = "F.Caducidad";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -230,11 +230,11 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (ChkTiempoCaducidad.Checked)
|
if (ChkTiempoCaducidad.Checked)
|
||||||
{
|
{
|
||||||
GvDatos.Columns[5].Visible = true;
|
GvDatos.Columns[6].Visible = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GvDatos.Columns[5].Visible = false;
|
GvDatos.Columns[6].Visible = false;
|
||||||
}
|
}
|
||||||
CargarDatos();//Si no se recarga no se muestran los valores dela la columna de tiempo caducindad laprimera vez que pasa de oculta a mostrarse
|
CargarDatos();//Si no se recarga no se muestran los valores dela la columna de tiempo caducindad laprimera vez que pasa de oculta a mostrarse
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
Rep RSCO
|
Reporte RSCO
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -657,7 +657,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:UpdatePanel runat="server" ID="UpDatosRecepcion" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpDatosRecepcion" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,CveMovimientoDetalleTransitorio,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
|
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,CveMovimientoDetalleTransitorio,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo,CveAlmacenTransitorioVirtual" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||||
<%--<HeaderTemplate>
|
<%--<HeaderTemplate>
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Private Sub CargaMovimientoGarantia(CveFolioGarantia As Integer)
|
Private Sub CargaMovimientoGarantia(CveFolioGarantia As Integer)
|
||||||
Using ObjAcum As New ClsAcumuladores
|
Using ObjAcum As New ClsAcumuladores
|
||||||
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
|
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia, CveEstatusConsecutivo:=1) Then
|
||||||
''carga
|
''carga
|
||||||
Dim dra As DataRow = ObjAcum.DtResultados(0)
|
Dim dra As DataRow = ObjAcum.DtResultados(0)
|
||||||
DivMov.Visible = True
|
DivMov.Visible = True
|
||||||
@@ -572,7 +572,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If TxtnSerie.Visible Then
|
If TxtnSerie.Visible Then
|
||||||
Cantidad = 1
|
Cantidad = 1
|
||||||
If String.IsNullOrEmpty(TxtnSerie.Text.Trim()) OrElse String.IsNullOrWhiteSpace(TxtnSerie.Text.Trim()) Then
|
If String.IsNullOrEmpty(TxtnSerie.Text.Trim()) OrElse String.IsNullOrWhiteSpace(TxtnSerie.Text.Trim()) Then
|
||||||
Alert("Serie es necesario", TipoMensaje.MsgAdvertencia)
|
Alert("Serie es necesario.", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -597,14 +597,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
'codigo provisional.
|
'codigo provisional.
|
||||||
Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||||
|
|
||||||
If DrPS("AplicaCaducidad").ToString = "True" AndAlso CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
If DrPS("AplicaCaducidad").ToString = "True" Then
|
||||||
If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then
|
If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then
|
||||||
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DrPS("AplicaCaducidad").ToString = "True" AndAlso ChkSugiereFechaCaducidad.Checked And CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
If DrPS("AplicaCaducidad").ToString = "True" AndAlso ChkSugiereFechaCaducidad.Checked Then
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
If ObjInventarios.GetExistenciasCaducidad(CveProducto, DdlAlmacenOrigen.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue) Then
|
If ObjInventarios.GetExistenciasCaducidad(CveProducto, DdlAlmacenOrigen.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue) Then
|
||||||
@@ -641,12 +641,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1")
|
tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1")
|
||||||
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
||||||
|
|
||||||
If Not CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1").Trim
|
||||||
tLote = "-1"
|
|
||||||
tCaducidad = MinFecha
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1")
|
|
||||||
|
|
||||||
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, tSerie, tLote, tCaducidad)
|
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, tSerie, tLote, tCaducidad)
|
||||||
|
|
||||||
@@ -725,14 +720,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
|
||||||
|
|
||||||
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
||||||
If Not ValidaPSSAT(DrPS) Then
|
If Not ValidaPSSAT(DrPS) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DrPS IsNot Nothing Then
|
If DrPS IsNot Nothing Then
|
||||||
CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
|
CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
|
||||||
Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}")
|
Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}")
|
||||||
@@ -745,7 +738,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
registro.Item("CvePS") = CvePS
|
registro.Item("CvePS") = CvePS
|
||||||
registro.Item("PS") = DrPS("PSCodigo")
|
registro.Item("PS") = DrPS("PSCodigo")
|
||||||
registro.Item("Observaciones") = Observaciones
|
registro.Item("Observaciones") = Observaciones
|
||||||
registro.Item("Serie") = Serie
|
registro.Item("Serie") = Serie.Trim
|
||||||
registro.Item("Lote") = Lote
|
registro.Item("Lote") = Lote
|
||||||
If FechaCaducidad > MinFecha Then registro.Item("FechaCaducidad") = FechaCaducidad
|
If FechaCaducidad > MinFecha Then registro.Item("FechaCaducidad") = FechaCaducidad
|
||||||
registro.Item("CveClasificacion") = CveClasificacion
|
registro.Item("CveClasificacion") = CveClasificacion
|
||||||
@@ -902,6 +895,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
RealizarMovimientoVirtual = True
|
RealizarMovimientoVirtual = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SI VA PASAR POR EL ALMACEN TRANSITORIO, DEBE TRASPASAR LOS VIRTUALES AHI PRIMERO
|
||||||
|
If ChkTransitorio.Checked Then
|
||||||
|
CveAlmacenVirtualEntrada = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenTransitorio.SelectedValue.ToEntero).FiltroPrimero("")("CveAlmacenVirtual").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
'VALIDA ALMACEN DISTINTA SUCURSAL DEBE SER TRANSITORIO
|
'VALIDA ALMACEN DISTINTA SUCURSAL DEBE SER TRANSITORIO
|
||||||
If Not UsuarioActual.CveEmpresa.Contiene(7, 140) Then '[IPP] EMPRESA VIGILANCIA NO OCUPA TRANSITORIOS - TIENEN MIL SUCURSALES Xd
|
If Not UsuarioActual.CveEmpresa.Contiene(7, 140) Then '[IPP] EMPRESA VIGILANCIA NO OCUPA TRANSITORIOS - TIENEN MIL SUCURSALES Xd
|
||||||
If Not ChkTransitorio.Checked Then
|
If Not ChkTransitorio.Checked Then
|
||||||
@@ -1129,6 +1127,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
dtvirtual = ObjInventario.DtResultados
|
dtvirtual = ObjInventario.DtResultados
|
||||||
|
|
||||||
If dtvirtual.Rows.Count > 0 Then
|
If dtvirtual.Rows.Count > 0 Then
|
||||||
|
'SALIDA VIRTUAL
|
||||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
||||||
FolioVirtualSalida = ObjInventario.Folio
|
FolioVirtualSalida = ObjInventario.Folio
|
||||||
Dim Contabilizable As Boolean = False
|
Dim Contabilizable As Boolean = False
|
||||||
@@ -1148,9 +1147,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'SALIDA VIRTUAL
|
'ENTRADA VIRTUAL
|
||||||
Dim importevirtual As Decimal = 0
|
Dim importevirtual As Decimal = 0
|
||||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 36, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S3", CveMovimientoRelacionado:=CveMovimientoEntrada, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualEntrada, 36, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S3", CveMovimientoRelacionado:=CveMovimientoEntrada, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
||||||
FolioVirtualEntrada = ObjInventario.Folio
|
FolioVirtualEntrada = ObjInventario.Folio
|
||||||
If CveMovimientoVirtualEntrada > 0 Then
|
If CveMovimientoVirtualEntrada > 0 Then
|
||||||
Dim DtCostosVirtual As DataTable
|
Dim DtCostosVirtual As DataTable
|
||||||
@@ -1487,7 +1486,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Private Sub CargaGvDatos()
|
Private Sub CargaGvDatos()
|
||||||
EscondeColumnasGVM(DtMovimientos)
|
EscondeColumnasGVM(DtMovimientos)
|
||||||
|
|
||||||
GvDatos.DataSource = DtMovimientos
|
GvDatos.DataSource = DtMovimientos.FiltraParametros("", "No desc")
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1799,13 +1798,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenRecepcion.SelectedValue.ToEntero > 0 Then
|
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenRecepcion.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
|
|
||||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
|
|
||||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
|
||||||
'If dtt.Rows.Count > 1 Then
|
|
||||||
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
'End If
|
|
||||||
'dtt.Dispose()
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1822,9 +1814,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||||
|
If e.Row.DBCampo("CveCategoria") <> "249" Then
|
||||||
|
e.Row.FCTextBox("TxtCantidad").Enabled = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
|
||||||
@@ -1839,6 +1834,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim TextoError As String = ""
|
Dim TextoError As String = ""
|
||||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||||
Dim CveMovimientoVirtualEntrada As Integer = 0
|
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||||
|
Dim CveMovimientoVirtualSalida As Integer = 0
|
||||||
|
|
||||||
Dim CveMovimientoSalidaTransitorio As Integer = 0
|
Dim CveMovimientoSalidaTransitorio As Integer = 0
|
||||||
Dim FolioVirtualEntrada As Integer = 0
|
Dim FolioVirtualEntrada As Integer = 0
|
||||||
|
|
||||||
@@ -1922,6 +1919,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||||
|
|
||||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||||
|
Dim CveAlmacenVirtualSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenTransitorio).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||||
|
|
||||||
'SI EL ALMACEN ORIGEN ES DE APOPYO LOGISTICO EL ALMACEN VIRTUAL DEBE SER DE APOYO LOGISTICO
|
'SI EL ALMACEN ORIGEN ES DE APOPYO LOGISTICO EL ALMACEN VIRTUAL DEBE SER DE APOYO LOGISTICO
|
||||||
'Dim CveAlmacenVirtual As Integer = -1
|
'Dim CveAlmacenVirtual As Integer = -1
|
||||||
@@ -1932,15 +1930,21 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
'VERIFICA SI TIENE ALMACEN VIRTUAL ASIGNADA
|
'VERIFICA SI TIENE ALMACEN VIRTUAL ASIGNADA
|
||||||
If CveAlmacenVirtual > 0 Then
|
If CveAlmacenVirtual > 0 And CveAlmacenVirtualSalida > 0 Then
|
||||||
|
|
||||||
Dim dtvirtual As DataTable = Nothing
|
Dim dtvirtual As DataTable = Nothing
|
||||||
|
Dim importePoliza As Decimal = 0
|
||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntrada, UsuarioActual.CveEmpresa, CveMovimientoRelacionado:=CveMovimientoSalida) Then
|
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntrada, UsuarioActual.CveEmpresa, CveMovimientoRelacionado:=CveMovimientoSalida) Then
|
||||||
dtvirtual = ObjInventario.DtResultados
|
dtvirtual = ObjInventario.DtResultados
|
||||||
If dtvirtual.Rows.Count > 0 Then
|
If dtvirtual.Rows.Count > 0 Then
|
||||||
|
|
||||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/C2")
|
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/C2")
|
||||||
|
|
||||||
|
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalidaTransitorio, Modulo:="TA/C3")
|
||||||
|
|
||||||
FolioVirtualEntrada = ObjInventario.Folio
|
FolioVirtualEntrada = ObjInventario.Folio
|
||||||
|
|
||||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||||
Dim CantidadUsado As Decimal = RowVirtual("Cantidad").ToString().ToDecimal()
|
Dim CantidadUsado As Decimal = RowVirtual("Cantidad").ToString().ToDecimal()
|
||||||
@@ -1948,21 +1952,54 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||||
Dim CostoIndirecto As Decimal = RowVirtual("CostoIndirecto").ToString().ToDecimal()
|
Dim CostoIndirecto As Decimal = RowVirtual("CostoIndirecto").ToString().ToDecimal()
|
||||||
|
|
||||||
|
|
||||||
|
importePoliza = importePoliza + (CantidadUsado * PU)
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
'Else
|
||||||
TextoError = "No se pudo registrar el movimiento virtual"
|
' TextoError = "No se pudo registrar el movimiento virtual"
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ErrorMovInv AndAlso (CveMovimientoSalida > 0 And CveMovimientoVirtualEntrada > 0) Then
|
||||||
|
|
||||||
|
Dim CvePrePolizaMovVirtual As Integer = ObjConta.AddPrePolizas("TA/C2|TA/C3", 53, importePoliza, importePoliza, 1, TxtFecha.Text.ToDate, "TA/C2|TA/C3", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CvePrePolizaMovVirtual > 0 Then
|
||||||
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaMovVirtual, True, importePoliza, importePoliza, 68, TxtObservacionesRecepcion.Text, TxtObservacionesRecepcion.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoVirtualSalida, Contabilizable:=False) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaMovVirtual, False, importePoliza, importePoliza, 68, TxtObservacionesRecepcion.Text, TxtObservacionesRecepcion.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoVirtualEntrada, Contabilizable:=False) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Else
|
'Else
|
||||||
' TextoError = "La Sucursal no tiene creado un almacen virtual"
|
' TextoError = "La Sucursal no tiene creado un almacen virtual"
|
||||||
' ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
@@ -2127,11 +2164,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim tSerie As String = gvr.FCTextBox("TxtSerie").Text 'gvr.DataKey("Serie").ToString
|
Dim tSerie As String = gvr.FCTextBox("TxtSerie").Text 'gvr.DataKey("Serie").ToString
|
||||||
Dim tFechaCaducidad As Date = gvr.DataKey("FechaCaducidad").ToDate
|
Dim tFechaCaducidad As Date = gvr.DataKey("FechaCaducidad").ToDate
|
||||||
|
|
||||||
If CveSubProyectoRecibe.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
|
||||||
tLote = gvr.FCTextBox("TxtLote").Text
|
|
||||||
tFechaCaducidad = gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=tSerie, Lote:=tLote, FechaCaducidad:=tFechaCaducidad, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=tSerie, Lote:=tLote, FechaCaducidad:=tFechaCaducidad, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
@@ -2324,44 +2356,39 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
#Region " AGREGA CON TXT | CODIGO - SERIE "
|
#Region " AGREGA CON TXT | CODIGO - SERIE "
|
||||||
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If TxtCodigoPS.Text = "" Then
|
If TxtCodigoPS.Text = "" Then Exit Sub
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
TdSeriePS.Visible = False
|
TdSeriePS.Visible = False
|
||||||
|
|
||||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'")
|
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text.Trim}'")
|
||||||
If DrPS Is Nothing Then
|
If DrPS Is Nothing Then
|
||||||
Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"No se ha encontrado un producto del Código: ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
If DrPS("AplicaSerie").ToString = "True" Then
|
||||||
TdSeriePS.Visible = True
|
TdSeriePS.Visible = True
|
||||||
TxtSeriePS.Focus()
|
TxtSeriePS.Focus()
|
||||||
CvePSSerie = DrPS("CvePS").ToString.ToEntero
|
CvePSSerie = DrPS("CvePS").ToString.ToEntero
|
||||||
CveUMSerie = DrPS("CveUnidadMedida").ToString.ToEntero
|
CveUMSerie = DrPS("CveUnidadMedida").ToString.ToEntero
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
Else
|
||||||
|
AgregarPS(1, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero)
|
||||||
|
|
||||||
|
TxtCodigoPS.Text = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AgregarPS(1, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero)
|
|
||||||
|
|
||||||
TxtCodigoPS.Text = ""
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
||||||
If TxtSeriePS.Text.Trim = "" Then
|
If TxtSeriePS.Text.Trim = "" Then Exit Sub
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
txtCantidad.Text = "1"
|
txtCantidad.Text = "1"
|
||||||
|
|
||||||
Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, -1, TxtSeriePS.Text.Trim, "-1", MinFecha)
|
Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, -1, TxtSeriePS.Text.Trim, "-1", MinFecha)
|
||||||
|
|
||||||
If Valido Then
|
If Valido Then
|
||||||
AgregarPS(1, CvePSSerie, CveUMSerie, TxtSeriePS.Text.Trim)
|
AgregarPS(1, CvePSSerie, CveUMSerie, Serie:=TxtSeriePS.Text.Trim.ToUpper)
|
||||||
Else
|
Else
|
||||||
TxtSeriePS.Text = ""
|
TxtSeriePS.Text = ""
|
||||||
TxtSeriePS.Focus()
|
TxtSeriePS.Focus()
|
||||||
@@ -2413,7 +2440,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If Existe Then
|
If Existe Then
|
||||||
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{PSTemp}</b>"" con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{PSTemp}</b>"" con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
||||||
Else
|
Else
|
||||||
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
Alert($"No se ha encontrado un producto para surtir con el Código: ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -2427,7 +2454,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatosRecepcion.Rows
|
For Each Gvr As GridViewRow In GvDatosRecepcion.Rows
|
||||||
If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("Serie") = TxtSeriePSRecepcion.Text.Trim Then
|
If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("Serie") = TxtSeriePSRecepcion.Text.Trim.ToUpper Then
|
||||||
Dim TxtCantidad = GvDatosRecepcion.Rows(Gvr.RowIndex).FCTextBox("TxtCantidad")
|
Dim TxtCantidad = GvDatosRecepcion.Rows(Gvr.RowIndex).FCTextBox("TxtCantidad")
|
||||||
If Gvr.DataKey("Cantidad").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("Cantidad").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
@@ -2439,15 +2466,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Código ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
||||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". Serie:{TxtSeriePSRecepcion.Text.Trim} ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
|
||||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||||
'Alert($"Ya se han cargado todos los productos o no se ha encontrado un producto de la Serie ""<b>{TxtSeriePSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus2,200);")
|
|
||||||
TxtSeriePSRecepcion.Text = ""
|
TxtSeriePSRecepcion.Text = ""
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
32
OC/OC.aspx
32
OC/OC.aspx
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OC.aspx.vb" EnableEventValidation="false" Inherits="OC" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OC.aspx.vb" EnableEventValidation="false" Inherits="OC_OC" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
<%--linea 5--%>
|
<%--linea 5--%>
|
||||||
<div class="row" style="padding-bottom: 0.6em;">
|
<div class="row" style="padding-bottom: 0.6em;">
|
||||||
<b>
|
<b>
|
||||||
<asp:Label runat="server" ID="LblFechaEstimada" Text="Fecha Estimada:" class="col-md-2" /></b>
|
<asp:Label runat="server" ID="LblFechaEstimada" Text="F. Estimada:" class="col-md-2" /></b>
|
||||||
<div class="col-md-4" id="DivFechaEstimada" runat="server">
|
<div class="col-md-4" id="DivFechaEstimada" runat="server">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtFechaEstimadaEntrega" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaEstimadaEntrega" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
@@ -284,25 +284,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%--linea 6--%>
|
<%--linea 6--%>
|
||||||
<asp:UpdatePanel ID="UPProv" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPProv" runat="server" UpdateMode="Conditional" RenderMode="Inline" style="class=Row">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div id="PnlProveedor" runat="server" style="padding-bottom: 0.6em;">
|
<div id="PnlProveedor" runat="server" style="padding-bottom: 0.6em;">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Proveedor:</label>
|
<label class="col-md-2">Proveedor:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<%--<asp:DropDownList ID="DdlProveedores" CssClass="select2me" AutoPostBack="True" Style="width: 100%;" runat="server" DataTextField="NombreCortoProveedor" DataValueField="CveProveedor">
|
<ADS:Dropdownlost runat="server" ID="DdlProveedores" CssStyle="width: 100%;" CssClassDdl="select2me " DataTextField="NombreCortoProveedor" DataValueField="CveProveedor" />
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>--%>
|
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlProveedores" CssStyle="width: 100%;" CssClassDdl="select2me " DataTextField="NombreCortoProveedor" DataValueField="CveProveedor" />
|
|
||||||
<%--<asp:RangeValidator ID="RVProveedores" CssClass="form-control" runat="server" ControlToValidate="DdlProveedores" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOProveedores" runat="server" HighlightCssClass="vco" TargetControlID="RVProveedores" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
|
||||||
<asp:ImageButton ID="ImgCambiaProv" Visible="false" ImageUrl="/Imagenes/accept.png" runat="server" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" style="padding-left: 0px;">
|
<div class="col-md-1" style="padding-left: 0px;">
|
||||||
|
<asp:LinkButton runat="server" Visible="false" ID="ImgCambiaProv" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar proveedor?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Proveedor" />
|
||||||
<asp:Label ID="LblLeyendaProveedorIVA" runat="server" Width="100%" Text="" Font-Italic="True"></asp:Label>
|
<asp:Label ID="LblLeyendaProveedorIVA" runat="server" Width="100%" Text="" Font-Italic="True"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -326,10 +320,7 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<label class="col-md-2"><b>IVA A Facturar:</b> </label>
|
<label class="col-md-2"><b>IVA A Facturar:</b> </label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:UpdatePanel ID="UpDdlIVA" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDdlIVA" runat="server" UpdateMode="Conditional">
|
||||||
@@ -438,16 +429,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr id="TrUsuarioAsignado" runat="server" visible="False">
|
<tr id="TrUsuarioAsignado" runat="server" visible="False">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<asp:Label ID="LblUsuarioAsignado" runat="server" Text=""></asp:Label></td>
|
<asp:Label ID="LblUsuarioAsignado" runat="server" Text=""></asp:Label>
|
||||||
</tr>
|
<asp:HiddenField ID="hdnCveSuperior" runat="server" Value="-1" />
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<asp:HiddenField ID="hdnCveSuperior" runat="server" Value="-1" />
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr id="trCfdi" style="display:none;" >
|
||||||
<tr>
|
|
||||||
<td>
|
<td>
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Imports Extensiones
|
|||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
Partial Class OC
|
Partial Class OC_OC
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||||
|
|
||||||
@@ -820,12 +820,11 @@ Partial Class OC
|
|||||||
DdlSubProyectoContrato.DataBind()
|
DdlSubProyectoContrato.DataBind()
|
||||||
DdlSubProyectoContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlSubProyectoContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
|
||||||
|
|
||||||
DVCultivosCuadro.Visible = True
|
DVCultivosCuadro.Visible = True
|
||||||
DdlSubProyecto.AutoPostBack = True
|
DdlSubProyecto.AutoPostBack = True
|
||||||
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue} AND Estatus =1")
|
DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue} And Estatus =1")
|
||||||
DdlCultivosCuadro.DataBind()
|
DdlCultivosCuadro.DataBind()
|
||||||
DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
|
||||||
@@ -896,17 +895,17 @@ Partial Class OC
|
|||||||
UPPDetalle.Update()
|
UPPDetalle.Update()
|
||||||
|
|
||||||
PermisosPagina()
|
PermisosPagina()
|
||||||
RegistraScript("$get('HdnWidth').value = $('#C_Tab_TabC_DivConceptosContenido').width();")
|
RegistraScript("$Get('HdnWidth').value = $('#C_Tab_TabC_DivConceptosContenido').width();")
|
||||||
|
|
||||||
'NO MOSTRAR LA OPCION DE ENTREGA DIRECTA (ECONOLLANTAS)
|
'NO MOSTRAR LA OPCION DE ENTREGA DIRECTA (ECONOLLANTAS)
|
||||||
If UsuarioActual.CveEmpresa = 141 Then
|
If UsuarioActual.CveEmpresa = 141 Then
|
||||||
DivEntregaDirecta.Visible = False
|
DivEntregaDirecta.Visible = False
|
||||||
ChkEntregaDirecta.Enabled = False
|
ChkEntregaDirecta.Enabled = False
|
||||||
ChkEntregaDirecta.Checked = False
|
ChkEntregaDirecta.Checked = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
MostrarUsuarioAsignado()
|
MostrarUsuarioAsignado()
|
||||||
Me.Form.DefaultButton = ""
|
Me.Form.DefaultButton = ""
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2219,9 +2218,18 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Si es Proveedor Extranjero el IVA es 0%
|
If DdlProveedores.SelectedValue.ToEntero > 0 Then
|
||||||
If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then
|
'Si es Proveedor Extranjero el IVA es 0%
|
||||||
IvaPS = 0
|
Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
|
|
||||||
|
If drProv IsNot Nothing Then
|
||||||
|
If drProv("RFC").ToString = "XEXX010101000" Then
|
||||||
|
IvaPS = 0
|
||||||
|
End If
|
||||||
|
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
|
||||||
|
RetISR = 0.0125
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS,
|
AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS,
|
||||||
@@ -4027,7 +4035,19 @@ Partial Class OC
|
|||||||
' IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
' IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DdlProveedores.SelectedValue.ToEntero > 0 Then
|
||||||
|
'Si es Proveedor Extranjero el IVA es 0%
|
||||||
|
Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
|
|
||||||
|
If drProv IsNot Nothing Then
|
||||||
|
If drProv("RFC").ToString = "XEXX010101000" Then
|
||||||
|
IvaPS = 0
|
||||||
|
End If
|
||||||
|
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
|
||||||
|
RetISR = 0.0125
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
CveSubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero
|
CveSubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero
|
||||||
SubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedItem.Text
|
SubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedItem.Text
|
||||||
@@ -4039,8 +4059,6 @@ Partial Class OC
|
|||||||
Cuadro = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedItem.Text
|
Cuadro = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedItem.Text
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||||
CveProyecto = -1
|
CveProyecto = -1
|
||||||
Proyecto = "Seleccione"
|
Proyecto = "Seleccione"
|
||||||
@@ -4083,9 +4101,6 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Agarra el nuevo AF si se modifico o deja el pasado
|
'Agarra el nuevo AF si se modifico o deja el pasado
|
||||||
CveActivoFijo = If(gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero > 0, gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero, HdnEditCveActivoFijo.Value.ToEntero)
|
CveActivoFijo = If(gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero > 0, gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero, HdnEditCveActivoFijo.Value.ToEntero)
|
||||||
Codigo = If(gvr.FCHiddenField("HdnCodigoAF").Value <> "-1", gvr.FCHiddenField("HdnCodigoAF").Value, HdnEditCodigo.Value)
|
Codigo = If(gvr.FCHiddenField("HdnCodigoAF").Value <> "-1", gvr.FCHiddenField("HdnCodigoAF").Value, HdnEditCodigo.Value)
|
||||||
@@ -6960,7 +6975,7 @@ Partial Class OC
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ACTUALIZA OC "
|
#Region " ACTUALIZA OC "
|
||||||
Protected Sub ImgCambiaProv_Click(sender As Object, e As ImageClickEventArgs) Handles ImgCambiaProv.Click
|
Private Sub ImgCambiaProv_Click(sender As Object, e As EventArgs) Handles ImgCambiaProv.Click
|
||||||
Dim OC As New ClsOC
|
Dim OC As New ClsOC
|
||||||
If OC.UpdateProveedorOrdenCompra(DdlProveedores.SelectedValue.ToEntero, CveOrdenCompra, UsuarioActual.CveUsuario, CveEmpresaActual) Then
|
If OC.UpdateProveedorOrdenCompra(DdlProveedores.SelectedValue.ToEntero, CveOrdenCompra, UsuarioActual.CveUsuario, CveEmpresaActual) Then
|
||||||
CargaHistorial()
|
CargaHistorial()
|
||||||
@@ -8728,35 +8743,20 @@ Partial Class OC
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Function ValidaNumRemision(NumRemision As String, TipoOC As String, CveProveedor As Integer, Optional OcTranasaccion As System.Data.SqlClient.SqlTransaction = Nothing, Optional CveOrdenCompraValida As Integer = -1) As Boolean
|
Private Function ValidaNumRemision(NumRemision As String, TipoOC As String, CveProveedor As Integer, Optional OcTransaccion As SqlClient.SqlTransaction = Nothing, Optional CveOrdenCompraValida As Integer = -1) As Boolean
|
||||||
Dim NumRemisionValida As Boolean = False
|
Dim NumRemisionValida As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If NumRemision.Trim.Length > 0 Then
|
If NumRemision.Trim.Length > 0 Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 AndAlso UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso UsuarioActual.CveRol = 1 Then
|
||||||
|
|
||||||
Dim ObjOC As ClsOC
|
|
||||||
|
|
||||||
If OcTranasaccion IsNot Nothing Then
|
|
||||||
ObjOC = New ClsOC(OcTranasaccion)
|
|
||||||
Else
|
|
||||||
ObjOC = New ClsOC
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjOC As New ClsOC(OcTransaccion)
|
||||||
If ObjOC.GetVerificaNumRemision(CveProveedor, TipoOC, NumRemision, UsuarioActual.CveEmpresa, CveOrdenCompraValida) Then
|
If ObjOC.GetVerificaNumRemision(CveProveedor, TipoOC, NumRemision, UsuarioActual.CveEmpresa, CveOrdenCompraValida) Then
|
||||||
|
|
||||||
If ObjOC.DtResultados.Rows.Count > 0 Then
|
If ObjOC.DtResultados.Rows.Count > 0 Then
|
||||||
Alert($"La remision ya se encuentra asiganada a la { If(TipoOC = "OC", "Orden de compra", "Requisición")} <a target='_blank' href='./OC.aspx?OC={ObjOC.DtResultados.Rows(0)("CveOrdenCompra").ToString()}' >{ObjOC.DtResultados.Rows(0)("Folio").ToString() }</a>", TipoMensaje.MsgAdvertencia)
|
Alert($"La remision ya se encuentra asignada a la { If(TipoOC = "OC", "Orden de compra", "Requisición")} <a target='_blank' href='./OC.aspx?OC={ObjOC.DtResultados.Rows(0)("CveOrdenCompra").ToString()}' >{ObjOC.DtResultados.Rows(0)("Folio").ToString() }</a>", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
NumRemisionValida = True
|
NumRemisionValida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
NumRemisionValida = True
|
NumRemisionValida = True
|
||||||
End If
|
End If
|
||||||
@@ -8764,10 +8764,6 @@ Partial Class OC
|
|||||||
NumRemisionValida = True
|
NumRemisionValida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return NumRemisionValida
|
Return NumRemisionValida
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto"
|
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio"
|
||||||
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
|
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="">
|
<asp:TemplateField HeaderText="">
|
||||||
|
|||||||
@@ -191,6 +191,9 @@ Partial Class OS_Asignaciones
|
|||||||
Dim time As DateTime
|
Dim time As DateTime
|
||||||
Dim contadorOrdenesAsignadas As Integer = 0
|
Dim contadorOrdenesAsignadas As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
|
ObjOS.IniciaTransacSQL()
|
||||||
|
|
||||||
For Each row As GridViewRow In GvNA.Rows
|
For Each row As GridViewRow In GvNA.Rows
|
||||||
If row.RowType = DataControlRowType.DataRow Then
|
If row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
@@ -215,20 +218,45 @@ Partial Class OS_Asignaciones
|
|||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
|
|
||||||
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveEstatusOS.ToEntero, UsuarioActual.CveUsuario, row.DataKey("CveOS").ToEntero) Then
|
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveEstatusOS.ToEntero, UsuarioActual.CveUsuario, row.DataKey("CveOS").ToEntero) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
|
||||||
|
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1"
|
||||||
|
Dim Fecha As DateTime = time
|
||||||
|
|
||||||
|
|
||||||
|
Dim OIDescripcion As String = $"{DdlTecnico.SelectedItem.Text} <b><a href='/OS/OrdenesServicios.aspx?CveOS={row.DataKey("CveOS")}' target='_blank' class='Texto' >Orden de servicio {row.DataKey("Folio")} </a></b>"
|
||||||
|
|
||||||
|
Dim ObjEventos As New ClsOIEventos(ObjOS.IniciaTransacSQL())
|
||||||
|
If Not ObjEventos.AddEventoAgenda(2, DdlTecnico.SelectedItem.Text, OIDescripcion, 2, time, time.AddHours(1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=2,
|
||||||
|
Importe:=0, CveOS:=row.DataKey("CveOS").ToEntero, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If contadorOrdenesAsignadas > 0 Then
|
If contadorOrdenesAsignadas > 0 Then
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
|
ObjOS.Commit()
|
||||||
Alert("Se asignaron las ordenes de servicio correctamente", TipoMensaje.MsgInformacion)
|
Alert("Se asignaron las ordenes de servicio correctamente", TipoMensaje.MsgInformacion)
|
||||||
CargaOrdenesServiciosAsignadasXPersona()
|
CargaOrdenesServiciosAsignadasXPersona()
|
||||||
CargaOrdenesServiciosNoAsignadas()
|
CargaOrdenesServiciosNoAsignadas()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
ObjOS.RollBack()
|
||||||
Alert("No se han seleccionado ordenes de servicio para asignar", TipoMensaje.MsgAdvertencia)
|
Alert("No se han seleccionado ordenes de servicio para asignar", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -359,6 +359,8 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
hdnEsThickbox.Value = "S"
|
hdnEsThickbox.Value = "S"
|
||||||
hdnClientIDLink.Value = "NoDefinido"
|
hdnClientIDLink.Value = "NoDefinido"
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1080,6 +1082,22 @@ Partial Class OS_OrdenesServicios
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'If Not Errores Then
|
||||||
|
|
||||||
|
' Dim TipoEstatusSeleccionado As Integer = EstatusOSDelUsuario.FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", DdlEstatusOS.SelectedValue), "Orden ASC").ToEntero
|
||||||
|
' If TipoEstatusSeleccionado = 3 Then
|
||||||
|
|
||||||
|
' Dim objEventos As New ClsOIEventos(ObjOrdenServicio.IniciaTransacSQL)
|
||||||
|
|
||||||
|
' If Not objEventos.FinalizaEvento(Now, 3, "", -1, CveOS) Then
|
||||||
|
' Errores = True
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
If Not Errores Then
|
If Not Errores Then
|
||||||
ViewState("CveOS") = ObjOrdenServicio.CveOS
|
ViewState("CveOS") = ObjOrdenServicio.CveOS
|
||||||
ViewState("Folio") = ObjOrdenServicio.Folio
|
ViewState("Folio") = ObjOrdenServicio.Folio
|
||||||
@@ -1098,8 +1116,8 @@ Partial Class OS_OrdenesServicios
|
|||||||
LimpiaDatos()
|
LimpiaDatos()
|
||||||
Else
|
Else
|
||||||
ObjOrdenServicio.RollBack()
|
ObjOrdenServicio.RollBack()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If CveTecnico = UsuarioActual.CveUsuario Then
|
If CveTecnico = UsuarioActual.CveUsuario Then
|
||||||
If ObjOrdenServicio.UpdateOrdenesServicios(TxtSolicito.Text, TxtFechaRecibido.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, CveOS, UsuarioActual.CveUsuario, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
|
If ObjOrdenServicio.UpdateOrdenesServicios(TxtSolicito.Text, TxtFechaRecibido.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario, DdlEstatusOS.SelectedValue.ToEntero, CveOS, UsuarioActual.CveUsuario, DdlTipoOrdenOS.SelectedValue.ToEntero, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
|
||||||
@@ -1185,6 +1203,24 @@ Partial Class OS_OrdenesServicios
|
|||||||
Errores = True
|
Errores = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not Errores Then
|
||||||
|
|
||||||
|
Dim TipoEstatusSeleccionado As Integer = EstatusOSDelUsuario.FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", DdlEstatusOS.SelectedValue), "Orden ASC").ToEntero
|
||||||
|
If TipoEstatusSeleccionado = 4 Then
|
||||||
|
|
||||||
|
Dim objEventos As New ClsOIEventos(ObjOrdenServicio.IniciaTransacSQL)
|
||||||
|
|
||||||
|
If Not objEventos.FinalizaEvento(Now, 3, "", -1, CveOS, UsuarioActual.CveUsuario) Then
|
||||||
|
Errores = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not Errores Then
|
If Not Errores Then
|
||||||
ObjOrdenServicio.Commit()
|
ObjOrdenServicio.Commit()
|
||||||
|
|
||||||
@@ -1335,6 +1371,8 @@ Partial Class OS_OrdenesServicios
|
|||||||
AddPS(Consecutivo, -1, DdlPSDetalle.SelectedValue.ToEntero, DdlPSDetalle.SelectedItem.Text, TxtCantidad.Text.ToEntero, TxtObservacionesServicioDetalle.Text, HdnEspecificaciones.Value.ToString, LtlPSEspecificaciones.Text, "",
|
AddPS(Consecutivo, -1, DdlPSDetalle.SelectedValue.ToEntero, DdlPSDetalle.SelectedItem.Text, TxtCantidad.Text.ToEntero, TxtObservacionesServicioDetalle.Text, HdnEspecificaciones.Value.ToString, LtlPSEspecificaciones.Text, "",
|
||||||
DdlIdentificador.SelectedValue.ToEntero, DdlIdentificador.SelectedItem.Text, "-1", -1, "-1", "-1", "-1", -1, "-1", ChkSeFacturara.Checked, ChkSeSuperviso.Checked, False, If(Filename <> "", Archivo.Name, "-1"), "", UsuarioActual.CveUsuario)
|
DdlIdentificador.SelectedValue.ToEntero, DdlIdentificador.SelectedItem.Text, "-1", -1, "-1", "-1", "-1", -1, "-1", ChkSeFacturara.Checked, ChkSeSuperviso.Checked, False, If(Filename <> "", Archivo.Name, "-1"), "", UsuarioActual.CveUsuario)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Dim Consecutivo As Integer = TmpDT.Rows.Count - 1
|
Dim Consecutivo As Integer = TmpDT.Rows.Count - 1
|
||||||
|
|
||||||
@@ -1425,6 +1463,10 @@ Partial Class OS_OrdenesServicios
|
|||||||
DivCuentaDetalle.Visible = True
|
DivCuentaDetalle.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
DivCuentaDetalle.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
UpBodyGv.Update()
|
UpBodyGv.Update()
|
||||||
UpFooterGv.Update()
|
UpFooterGv.Update()
|
||||||
RegistraScript("showDivGv();")
|
RegistraScript("showDivGv();")
|
||||||
|
|||||||
750
OS/RepServicioDomicilio.aspx
Normal file
750
OS/RepServicioDomicilio.aspx
Normal file
@@ -0,0 +1,750 @@
|
|||||||
|
<%@ Page Title="Reporte Servicio a Domicilio" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepServicioDomicilio.aspx.vb" Inherits="OS_RepServicioDomicilio" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.unoaunoold {
|
||||||
|
color: #999b9b;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Dia {
|
||||||
|
background-image: url(/Imagenes/FondoCal.jpg);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
height: 17px;
|
||||||
|
font-size: 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Hora {
|
||||||
|
background-color: #E3EFFF;
|
||||||
|
height: 30px;
|
||||||
|
font-size: 10px;
|
||||||
|
border-right: solid 1px #5D8CC9;
|
||||||
|
border-bottom: solid 1px #5D8CC9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Mes {
|
||||||
|
background-image: url(/Imagenes/Caption.jpg);
|
||||||
|
height: 27px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Link {
|
||||||
|
color: #0000b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendariopanel {
|
||||||
|
z-index: 999;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
border: 0px;
|
||||||
|
background-color: transparent;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendarioback {
|
||||||
|
background-color: #000;
|
||||||
|
z-index: -90;
|
||||||
|
top: 0px;
|
||||||
|
opacity: 0.3;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendariobody {
|
||||||
|
width: 520px;
|
||||||
|
display: table;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-top: 7%;
|
||||||
|
margin-left: 28%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendariobody label {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tareasinicio tr td:nth-child(1) {
|
||||||
|
}
|
||||||
|
|
||||||
|
.portlet.light > .portlet-title > .caption > .caption-subject {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fix > div {
|
||||||
|
height: inherit !important;
|
||||||
|
width: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.fix > div > .ajax__html_editor_extender_texteditor {
|
||||||
|
height: 150px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*#overlay a:hover {
|
||||||
|
position: fixed;
|
||||||
|
display: none;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
z-index: 2;
|
||||||
|
cursor: pointer;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
#moopio a {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#moopio a:hover {
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
transform: scale(1.2);
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.MultiLineTextBox {
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.select2-container--open {
|
||||||
|
z-index: 1000 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte Servicios a Domicilio
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 col-sm-12">
|
||||||
|
|
||||||
|
<div class="portlet light calendar ">
|
||||||
|
<div class="portlet-title ">
|
||||||
|
<div class="caption">
|
||||||
|
<i class="icon-calendar font-green-sharp"></i>
|
||||||
|
<span class="caption-subject font-green-sharp bold uppercase">Servicios a Domicilio</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
|
||||||
|
<div id="calendar">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button Text="" runat="server" ID="BtnActualizaAdd" ClientIDMode="Static" Style="display: none;" OnClick="BtnActualizaAdd_Click" />
|
||||||
|
<asp:HiddenField runat="server" ID="HdnU" ClientIDMode="Static" />
|
||||||
|
<asp:HiddenField runat="server" ID="HdnE" ClientIDMode="Static" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div id="ModalAgenda" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAgenda" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title"><span id="SpanTituloAgenda">Servicios a Domicilio</span></h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="text-align: center;">
|
||||||
|
<asp:Label ID="LblEmpresaCRM" runat="server" Text="" Style="font-size: 16px; display: none; text-align: center;"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="display:none!important">
|
||||||
|
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
|
||||||
|
<asp:DropDownList ID="DdlAgedaTipo" ClientIDMode="Static" Width="100%" Enabled="false" DataTextField="AgendaTipo" DataValueField="CveAgendaTipo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVAgendaTipo" InitialValue="-1" runat="server" ControlToValidate="DdlAgedaTipo" CssClass="help-block errorimput" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de agenda''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||||
|
<label style="width: 90%;" for="<%=DdlAgedaTipo.ClientID.ToString()%>">Tipo de Asunto:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
|
||||||
|
<asp:DropDownList ID="DdlPrioridad" ClientIDMode="Static" Width="100%" runat="server" CssClass="form-control input-sm select2me" Enabled="false">
|
||||||
|
<asp:ListItem Selected="True" Text="Baja" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Media" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Alta" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%=DdlPrioridad.ClientID.ToString()%>">Prioridad:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtAsuntoAgenda" ClientIDMode="Static" MaxLength="100" CssClass="form-control" runat="server" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVAsuntoAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAsuntoAgenda" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Asunto''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtAsuntoAgenda.ClientID.ToString()%>">Asunto:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<div id="DivDescripcionUpdate" style="width: 400px; height: 75px; padding-top: 10px; font-size: 14px; display: none;"></div>
|
||||||
|
<asp:TextBox ID="TxtDescripcionAgenda" ClientIDMode="Static" MaxLength="5000" runat="server" TextMode="MultiLine" Rows="2" CausesValidation="true" Width="100%" CssClass="form-control MultiLineTextBox"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDescripcionAgenda" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcionAgenda" ErrorMessage="<span style='font-size: 11px;'><b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Descripción''</b> es necesario.</span>" ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtDescripcionAgenda.ClientID.ToString()%>" style="height: 60px;">Descripción:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:Label runat="server" ClientIDMode="Static" ID="LblSubProyecto" CssClass="form-control"></asp:Label>
|
||||||
|
<label for="<%= LblSubProyecto.ClientID.ToString()%>" style="height: 60px;"><asp:Label runat="server" ID="LblSubProyectoEtiqueta"></asp:Label>:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
|
||||||
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;">
|
||||||
|
<asp:TextBox ID="TxtFechaInicioAgenda" Enabled="false" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm " CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||||
|
<label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtFechaInicioAgenda.ClientID.ToString()%>">Fecha de Inicio:</label>
|
||||||
|
</div>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaInicioAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtFechaInicioAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>:<br>El campo <b>''Fecha de Inicio''</b> es necesario." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
|
||||||
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy hh:mm" style="width: 70%;">
|
||||||
|
<asp:TextBox ID="TxtFechaFinAgenda" Enabled="false" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm " CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||||
|
<label style="margin-left: -3px; padding-bottom: 30px; width: 70%;" for="<%= TxtFechaFinAgenda.ClientID.ToString()%>">Fecha de Fin:</label>
|
||||||
|
</div>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaFinAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtFechaFinAgenda" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>: El campo <b>''Fecha de Fin''</b> es necesario." ValidationGroup="VGGuardarAgenda"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:none">
|
||||||
|
<asp:CheckBox Text="Recurrencia" ClientIDMode="Static" runat="server" ID="CheckRecurrencia" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ClientIDMode="Static" UpdateMode="Conditional" ID="UpRecurrencia">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;">
|
||||||
|
<hr style="margin-top: 0px; margin-bottom: 15px;" />
|
||||||
|
<div style="float: left; width: 20%; height: 130px;">
|
||||||
|
<asp:RadioButtonList runat="server" CssClass="tablenopadding" RepeatDirection="Vertical" ID="RBLRecurrencia" AutoPostBack="true" OnSelectedIndexChanged="RBLRecurrencia_SelectedIndexChanged">
|
||||||
|
<asp:ListItem Text="1- Hora" Value="1" Selected="True" />
|
||||||
|
<asp:ListItem Text="2- Diario" Value="2" />
|
||||||
|
<asp:ListItem Text="3- Semanal" Value="3" />
|
||||||
|
<asp:ListItem Text="4- Mensual" Value="4" />
|
||||||
|
<asp:ListItem Text="5- Anual" Value="5" />
|
||||||
|
</asp:RadioButtonList>
|
||||||
|
</div>
|
||||||
|
<div style="float: left; width: 80%; height: 130px;">
|
||||||
|
<div runat="server" id="DivRecurrencia" visible="true" style="width: 100%; height: 100%;">
|
||||||
|
<asp:HiddenField runat="server" ID="HdnDiasSemanaAgendar" ClientIDMode="Static" Value="" />
|
||||||
|
<div class="col-md-12"></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2" style="padding-right: 0px; text-align: right;">Cada:</div>
|
||||||
|
<div class="form-group col-md-1 form-md-line-input input-iconright" style="padding-left: 0px !important; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; margin-top: -6px;">
|
||||||
|
<div class="input-group input-sm" style="padding-top: 0px;">
|
||||||
|
<asp:TextBox ID="TxtFrecuencia" ClientIDMode="Static" Text="1" runat="server" Style="padding-top: 0px; padding-bottom: 0px;" Width="20px" CssClass="form-control input-sm" CausesValidation="true" TextMode="Number"></asp:TextBox>
|
||||||
|
<label style="margin-top: -3px; margin-left: -5px; width: 20px;" for="<%= TxtFechaFinAgenda.ClientID.ToString()%>"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%--<td>
|
||||||
|
<asp:TextBox runat="server" ClientIDMode="Static" ID="TxtFrecuencia" Text="1" Width="20px" />
|
||||||
|
</td>--%>
|
||||||
|
<div class="col-md-2" style="padding-left: 0px;">
|
||||||
|
<asp:Label Text="Hora(s)" runat="server" ID="LblTextoFrecuencia" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="TrDiasSemanaAdd" runat="server" style="display: none;">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:CheckBoxList runat="server" ID="CheckDiasSemana" ClientIDMode="Static" RepeatColumns="5" RepeatDirection="Horizontal">
|
||||||
|
<asp:ListItem Text="Lunes" Value="2" />
|
||||||
|
<asp:ListItem Text="Martes" Value="3" />
|
||||||
|
<asp:ListItem Text="Miercoles" Value="4" />
|
||||||
|
<asp:ListItem Text="Jueves" Value="5" />
|
||||||
|
<asp:ListItem Text="Viernes" Value="6" />
|
||||||
|
<asp:ListItem Text="Sabado" Value="7" />
|
||||||
|
<asp:ListItem Text="Domingo" Value="1" />
|
||||||
|
</asp:CheckBoxList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row" style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;display:none"">
|
||||||
|
<hr style="margin-top: 0px; margin-bottom: 15px;" />
|
||||||
|
<div class="col-md-6" style="padding-left: 0px !important;">
|
||||||
|
<div class="col-md-8" style="padding-left: 0px; padding-right: 0px;">
|
||||||
|
<asp:RadioButton Text="Terminar despues de:" ID="RBNumeroOcurrencias" ClientIDMode="Static" GroupName="GNFrecuenciaFinAdd" runat="server" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-1 form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: -10px">
|
||||||
|
<div class="input-group input-sm" style="padding-top: 0px; padding-left: 0px; padding-right: 0px;">
|
||||||
|
<asp:TextBox runat="server" onclick="FechaFinSet('RBNumeroOcurrencias','TxtFechaFinRecurrencia');" ClientIDMode="Static" CssClass="form-control" TextMode="Number" ID="TxtNumeroOcurrencias" Width="20px" />
|
||||||
|
<label style="margin-top: 5px; margin-left: -15px; width: 20px;" for="<%= TxtNumeroOcurrencias.ClientID.ToString()%>"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2" style="margin-top: 5px; padding-left: 5px;">Veces</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-5" style="padding-left: 0px !important;">
|
||||||
|
<asp:RadioButton Text="Terminar en:" ID="RBFechaFin" ClientIDMode="Static" GroupName="GNFrecuenciaFinAdd" runat="server" Width="85px" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6" style="padding-left: 0px !important;">
|
||||||
|
<div class="form-group form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: -10px">
|
||||||
|
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 108px!important; padding-top: 0px;">
|
||||||
|
<asp:TextBox ID="TxtFechaFinRecurrencia" ClientIDMode="Static" runat="server" CssClass="form-control" Height="28px" Width="80px" Font-Size="13px"></asp:TextBox>
|
||||||
|
<label style="margin-left: 10px; width: 85%;" for="<%= TxtFechaFinRecurrencia.ClientID.ToString()%>"></label>
|
||||||
|
<span class="input-group-btn " style="width: 28px">
|
||||||
|
<asp:LinkButton ID="imgFechaFinRecurrenciaAdd" class="btn default" runat="server" Style="padding-left: 8px; padding-top: 5px;" Height="28px" Width="28px"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaFinRecurrenciaAdd" runat="server" TargetControlID="TxtFechaFinRecurrencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CalendarioFechaFinRecurrenciaAdd" TargetControlID="TxtFechaFinRecurrencia" PopupButtonID="ImgFechaFinRecurrenciaAdd" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<%--<asp:RequiredFieldValidator ID="RFVFechaFinRecurrenciaAdd" runat="server" ControlToValidate="TxtFechaFinRecurrencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEFechaFinRecurrenciaAdd" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFinRecurrenciaAdd" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="width: 100%; float: left; margin-bottom: 10px; margin-left: 0px;display:none">
|
||||||
|
<hr style="margin-top: 5px; margin-bottom: 10px;" />
|
||||||
|
<div class="col-md-3" style="padding-left: 0px; padding-right: 0px;">
|
||||||
|
<asp:CheckBox Text="Gasto Recurrente:" ClientIDMode="Static" runat="server" ID="ChkGastoRecurrente" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4 form-md-line-input input-iconright" style="padding: 0px !important; margin-top: -5px; margin-left: 0px">
|
||||||
|
<div class="input-group input-sm" style="padding-top: 0px; padding-left: 0px; padding-right: 0px;">
|
||||||
|
<asp:TextBox runat="server" ClientIDMode="Static" CssClass="form-control" ID="TxtImporteGastoRecurrente" Width="100px" onkeyup="FormatoMoneda(this)" />
|
||||||
|
<label style="margin-top: 5px; margin-left: -15px;" for="<%= TxtImporteGastoRecurrente.ClientID.ToString()%>"></label>
|
||||||
|
<%--<ajax:MaskedEditExtender ID="MEEgastoRecurrente" runat="server" TargetControlID="TxtImporteGastoRecurrente" Mask="999,999.99" MaskType="Number" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:HiddenField runat="server" ID="HdnCveEvento" ClientIDMode="Static" Value="-1" />
|
||||||
|
|
||||||
|
<%--<div style="display:none">
|
||||||
|
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VGGuardarAgenda" />
|
||||||
|
<asp:Button ID="BtnEliminar" runat="server" CssClass="btn btn-danger" OnClick="BtnEliminar_Click" Text="Eliminar" Style="display: none" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea continuar?" data-btn-ok-label="si" />
|
||||||
|
</div>--%>
|
||||||
|
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function FechaFinSet(RB, TXT) {
|
||||||
|
RB = "#" + RB
|
||||||
|
TXT = "#" + TXT
|
||||||
|
$(RB).prop('checked', true);
|
||||||
|
$(TXT).val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function AyudaHora(txt) {
|
||||||
|
Hora = txt;
|
||||||
|
var opt = $get("HdnHora").value;
|
||||||
|
|
||||||
|
if (opt == "1") {
|
||||||
|
$("#TxtHoraInicioAdd").val(txt);
|
||||||
|
$("#TxtHoraFinAdd").val(txt);
|
||||||
|
} else if (opt == "2") {
|
||||||
|
$("#TxtHoraFinAdd").val(txt);
|
||||||
|
} else if (opt == "3") {
|
||||||
|
$("#TxtHoraInicioUpdate").val(txt);
|
||||||
|
$("#TxtHoraFinUpdate").val(txt);
|
||||||
|
} else if (opt == "4") {
|
||||||
|
$("#TxtHoraFinUpdate").val(txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
$get('DivHora').style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
var currentUpdateEvent;
|
||||||
|
var addStartDate;
|
||||||
|
var addEndDate;
|
||||||
|
var globalAllDay;
|
||||||
|
|
||||||
|
|
||||||
|
function selectDate(start, end, allDay) {
|
||||||
|
$('#ModalAgenda').modal('show');
|
||||||
|
$("#SpanTituloAgenda").html("Agregar Evento");;
|
||||||
|
|
||||||
|
//$("#< %=BtnGuardar.ClientID%>").val('Guardar');
|
||||||
|
//$("#< %=BtnEliminar.ClientID%>").css("display", "none");
|
||||||
|
|
||||||
|
$("#HdnCveEvento").val(-1);
|
||||||
|
|
||||||
|
$("#DdlAgedaTipo").val("-1");
|
||||||
|
$("#DdlPrioridad").val("1");
|
||||||
|
|
||||||
|
$("#TxtAsuntoAgenda").val("");
|
||||||
|
$("#TxtDescripcionAgenda").val("");
|
||||||
|
$("#TxtFechaInicioAgenda").val("" + start.format("DD/MM/YYYY 08:00"));
|
||||||
|
$("#TxtFechaFinAgenda").val("" + start.format("DD/MM/YYYY 09:00"));
|
||||||
|
|
||||||
|
$("#UpRecurrencia").hide();
|
||||||
|
$("#CheckRecurrencia").prop('checked', false);
|
||||||
|
|
||||||
|
$get("HdnDiasSemanaAgendar").value = -1;
|
||||||
|
|
||||||
|
$('#<%=RBLRecurrencia.ClientID %>').find("input[value='1']").prop("checked", true);
|
||||||
|
$('#<%=TrDiasSemanaAdd.ClientID %>').css("display", "none");
|
||||||
|
$("#DivDescripcionUpdate").css("display", "none");
|
||||||
|
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "block");
|
||||||
|
$('#<%=LblTextoFrecuencia.ClientID%>').html("Hora(s)");
|
||||||
|
|
||||||
|
$("#TxtFrecuencia").val("1");
|
||||||
|
$("#TxtNumeroOcurrencias").val("");
|
||||||
|
$("#TxtFechaFinRecurrencia").val("");
|
||||||
|
|
||||||
|
$("#ChkGastoRecurrente").prop('checked', false);
|
||||||
|
$("#TxtImporteGastoRecurrente").val("");
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateEvent(event, element) {
|
||||||
|
$('#ModalAgenda').modal('show');
|
||||||
|
//$("#SpanTituloAgenda").html("Actualizar Evento");;
|
||||||
|
//$("#< %=BtnGuardar.ClientID%>").val('Actualizar');
|
||||||
|
//$("#< %=BtnEliminar.ClientID%>").css("display", "");
|
||||||
|
|
||||||
|
$("#DivDescripcionUpdate").css("display", "block");
|
||||||
|
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "none");
|
||||||
|
$("#HdnCveEvento").val(event.id);
|
||||||
|
|
||||||
|
$("#TxtNumeroOcurrencias").val('');
|
||||||
|
$("#TxtFechaFinRecurrencia").val('');
|
||||||
|
$("#TxtFrecuencia").val('');
|
||||||
|
|
||||||
|
$("#TxtAsuntoAgenda").val(event.title);
|
||||||
|
//SE MUESTRA EL TEXTO HTML EN EL DIV DE LA DESCRIPCION SIN PERMITIR EDITAR,
|
||||||
|
//SE ASIGNA -1 EN EL TEXBOX PARA QUE NO REALICE CAMBIOS EN BD
|
||||||
|
$("#DivDescripcionUpdate").html(event.description);
|
||||||
|
$("#TxtDescripcionAgenda").val("-1");
|
||||||
|
|
||||||
|
$("#DdlAgedaTipo").val(event.cveagendatipo);
|
||||||
|
$("#DdlPrioridad").val(event.prioridad);
|
||||||
|
$('#LblSubProyecto').text(event.SubProyecto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$("#TxtFechaInicioAgenda").val("" + event.start.format("DD/MM/YYYY HH:mm"));
|
||||||
|
|
||||||
|
$("#TxtFechaFinAgenda").val("" + event.end.format("DD/MM/YYYY HH:mm"));
|
||||||
|
|
||||||
|
//Identifica el tipo de Fecha Termino de la Recurrencia
|
||||||
|
if (event.recurrenciafin == 0) {
|
||||||
|
//$("#RBSinFechaFinUpdate").prop('checked', true);
|
||||||
|
$("#TxtFrecuencia").val('0');
|
||||||
|
} else if (!isNaN(event.recurrenciafin)) {
|
||||||
|
$("#RBNumeroOcurrencias").prop('checked', true);
|
||||||
|
$("#TxtNumeroOcurrencias").val(event.recurrenciafin);
|
||||||
|
} else {
|
||||||
|
$("#RBFechaFin").prop('checked', true);
|
||||||
|
$("#TxtFechaFinRecurrencia").val("" + event.recurrenciafin);
|
||||||
|
}
|
||||||
|
|
||||||
|
//GASTO RECURRENTE
|
||||||
|
//Si el evento es tipo 10 = Gasto Mes, activa gasto recurrente
|
||||||
|
if (event.CveTipoEvento == 10) {
|
||||||
|
$("#ChkGastoRecurrente").prop('checked', true);
|
||||||
|
$("#TxtImporteGastoRecurrente").val(event.Importe);
|
||||||
|
} else {
|
||||||
|
$("#ChkGastoRecurrente").prop('checked', false);
|
||||||
|
$("#TxtImporteGastoRecurrente").val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
//Verifica que hay Recurrencia para activar los campos y poner sus valores respectivos
|
||||||
|
if (event.recurrenciatipo > 0) {
|
||||||
|
$("#CheckRecurrencia").prop('checked', true);
|
||||||
|
|
||||||
|
// CHECKEA EL TIPO DE RECURRENCIA QUE TENGA EL EVENTO
|
||||||
|
var text = event.recurrenciatipo;
|
||||||
|
var radio = $("[id*=RBLRecurrencia] label:contains('" + text + "')").closest("td").find("input");
|
||||||
|
radio.attr("checked", "checked");
|
||||||
|
|
||||||
|
// CHECKEA LOS DIAS SELECCIONADOS DE LA RECURRENCIA DE SEMANA
|
||||||
|
$get("HdnDiasSemanaAgendar").value = event.diassemana;
|
||||||
|
|
||||||
|
//LLENA TEXTO DE FRECUENCIA DE RECURRENCIA
|
||||||
|
$("#TxtFrecuencia").val("" + event.frecuencia);
|
||||||
|
} else {
|
||||||
|
$("#CheckRecurrencia").prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//ESCONDE O MUESTRA EL DIV DE LAS OPCIONES DE RECURRENCIA
|
||||||
|
if ($get('CheckRecurrencia').checked) {
|
||||||
|
$("#UpRecurrencia").show();
|
||||||
|
} else {
|
||||||
|
$("#UpRecurrencia").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
//LLAMA EL INDEXCHANGED DEL RADIOBUTTONLIST DE LOS TIPOS DE RECURRENCIA
|
||||||
|
$("#BtnActualizaAdd").click();
|
||||||
|
|
||||||
|
//Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM
|
||||||
|
if (event.EmpresaCRM != "") {
|
||||||
|
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "")
|
||||||
|
$("#<%=LblEmpresaCRM.ClientID%>").text(event.EmpresaCRM);
|
||||||
|
} else {
|
||||||
|
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "none")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||||
|
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function CheckUpdate(check) {
|
||||||
|
if (check.checked) {
|
||||||
|
$("#UpRecurrenciaUpdate").show("slow");
|
||||||
|
} else {
|
||||||
|
$("#UpRecurrenciaUpdate").hide("slow");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function CheckAdd(check) {
|
||||||
|
if (check.checked) {
|
||||||
|
$("#UpRecurrencia").show("slow");
|
||||||
|
} else {
|
||||||
|
$("#UpRecurrencia").hide("slow");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function deleteEvent() {
|
||||||
|
//var id = $get('HdnId').val;
|
||||||
|
//PageMethods.EliminaEvento(id, deleteSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSuccess(updateResult) {
|
||||||
|
//alert(updateResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteSuccess(deleteResult) {
|
||||||
|
//alert("eliminado exitosamente: " + deleteResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addSuccess(addResult) {
|
||||||
|
// if addresult is -1, means event was not added
|
||||||
|
// alert("added key: " + addResult);
|
||||||
|
|
||||||
|
if (addResult != -1) {
|
||||||
|
$('#calendar').fullCalendar('renderEvent',
|
||||||
|
{
|
||||||
|
title: $("#addEventName").val(),
|
||||||
|
start: addStartDate,
|
||||||
|
end: addEndDate,
|
||||||
|
id: addResult,
|
||||||
|
description: $("#addEventDesc").val(),
|
||||||
|
allDay: globalAllDay
|
||||||
|
},
|
||||||
|
true // make the event "stick"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$('#calendar').fullCalendar('unselect');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function UpdateTimeSuccess(updateResult, userContext, methodName) {
|
||||||
|
//alert(userContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateEventOnDropResize(event, allDay) {
|
||||||
|
|
||||||
|
//alert("allday: " + allDay);
|
||||||
|
var eventToUpdate = {
|
||||||
|
id: event.id,
|
||||||
|
start: event.start
|
||||||
|
};
|
||||||
|
|
||||||
|
// FullCalendar 1.x
|
||||||
|
//if (allDay) {
|
||||||
|
// eventToUpdate.start.setHours(0, 0, 0);
|
||||||
|
//}
|
||||||
|
|
||||||
|
if (event.end === null) {
|
||||||
|
eventToUpdate.end = eventToUpdate.start;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eventToUpdate.end = event.end;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FullCalendar 2.x
|
||||||
|
var endDate;
|
||||||
|
if (!event.allDay) {
|
||||||
|
endDate = new Date(eventToUpdate.end + 60 * 60000);
|
||||||
|
endDate = endDate.toJSON();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
endDate = eventToUpdate.end.toJSON();
|
||||||
|
}
|
||||||
|
|
||||||
|
eventToUpdate.start = eventToUpdate.start.toJSON();
|
||||||
|
eventToUpdate.end = eventToUpdate.end.toJSON(); //endDate;
|
||||||
|
eventToUpdate.allDay = event.allDay;
|
||||||
|
|
||||||
|
PageMethods.ActualizaEvento(eventToUpdate, UpdateTimeSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
function eventDropped(event, dayDelta, minuteDelta, allDay, revertFunc) {
|
||||||
|
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||||
|
|
||||||
|
updateEventOnDropResize(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
function eventResized(event, dayDelta, minuteDelta, revertFunc) {
|
||||||
|
if ($(this).data("qtip")) $(this).qtip("destroy");
|
||||||
|
|
||||||
|
updateEventOnDropResize(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkForSpecialChars(stringToCheck) {
|
||||||
|
var pattern = /[^A-Za-z0-9 ]/;
|
||||||
|
return pattern.test(stringToCheck);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isAllDay(startDate, endDate) {
|
||||||
|
var allDay;
|
||||||
|
|
||||||
|
if (startDate.format("HH:mm:ss") == "00:00:00" && endDate.format("HH:mm:ss") == "00:00:00") {
|
||||||
|
allDay = true;
|
||||||
|
globalAllDay = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allDay = false;
|
||||||
|
globalAllDay = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return allDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
var view = null;
|
||||||
|
var date = null;
|
||||||
|
function GetView() {
|
||||||
|
view = $('#calendar').fullCalendar('getView');
|
||||||
|
date = $('#calendar').fullCalendar('getDate');
|
||||||
|
}
|
||||||
|
|
||||||
|
function SetView() {
|
||||||
|
$('#calendar').fullCalendar('gotoDate', date.format());
|
||||||
|
$('#calendar').fullCalendar('changeView', view.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
function Calendario() {
|
||||||
|
//$get('DivActualizarEvento').style.display = 'none';
|
||||||
|
//$get('DivAgregarEvento').style.display = 'none';
|
||||||
|
|
||||||
|
var date = new Date();
|
||||||
|
var d = date.getDate();
|
||||||
|
var m = date.getMonth();
|
||||||
|
var y = date.getFullYear();
|
||||||
|
|
||||||
|
var h = {};
|
||||||
|
|
||||||
|
if ($('#calendar').width() <= 400) {
|
||||||
|
$('#calendar').addClass("mobile");
|
||||||
|
h = {
|
||||||
|
left: 'title, prev, next',
|
||||||
|
center: '',
|
||||||
|
right: 'today,month,agendaWeek,agendaDay'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
$('#calendar').removeClass("mobile");
|
||||||
|
|
||||||
|
h = {
|
||||||
|
left: 'title',
|
||||||
|
center: '',
|
||||||
|
right: 'prev,next,today,month,agendaWeek,agendaDay'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#calendar').fullCalendar('destroy'); // destroy the calendar
|
||||||
|
$('#calendar').fullCalendar({ //re-initialize the calendar
|
||||||
|
header: h,
|
||||||
|
monthNames: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
||||||
|
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
||||||
|
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
|
||||||
|
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'],
|
||||||
|
buttonText: {
|
||||||
|
today: 'Hoy',
|
||||||
|
week: 'Semana',
|
||||||
|
month: 'Mes',
|
||||||
|
day: 'Día'
|
||||||
|
},
|
||||||
|
eventClick: updateEvent,
|
||||||
|
selectable: true,
|
||||||
|
selectHelper: true,
|
||||||
|
select: selectDate,
|
||||||
|
editable: true,
|
||||||
|
events: {
|
||||||
|
url: '/Ashx/CargaEventos.ashx',
|
||||||
|
type: 'GET',
|
||||||
|
data: {
|
||||||
|
U: ' <%= UsuarioActual.CveUsuario %>',
|
||||||
|
E: '<%= UsuarioActual.CveEmpresa %>',
|
||||||
|
METODO:'servicio_domicilio'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
eventDrop: eventDropped,
|
||||||
|
eventResize: eventResized
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function InitCalendar() {
|
||||||
|
$(document).ready(function () {
|
||||||
|
Calendario();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
273
OS/RepServicioDomicilio.aspx.vb
Normal file
273
OS/RepServicioDomicilio.aspx.vb
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports Extensiones
|
||||||
|
Imports System.Data
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports System.Web.Services
|
||||||
|
|
||||||
|
Partial Class OS_RepServicioDomicilio
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
#Region "PROPIEDADES"
|
||||||
|
|
||||||
|
|
||||||
|
Private Property DtDatos As DataTable
|
||||||
|
Get
|
||||||
|
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtDatos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property DtColor As DataTable
|
||||||
|
Get
|
||||||
|
Return DirectCast(ViewState("DtColor"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtColor") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property Agrupador As String
|
||||||
|
Get
|
||||||
|
Return ViewState("Agrupador").ToString
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Agrupador") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property TCEspecifico As Double
|
||||||
|
Get
|
||||||
|
Return ViewState("TCEspecifico").ToString.ToDouble
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Double)
|
||||||
|
ViewState("TCEspecifico") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property TipoCambio As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("TipoCambio").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("TipoCambio") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoEtiqueta)
|
||||||
|
InicializaCalendar()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "CARGAS"
|
||||||
|
|
||||||
|
Private Sub SetValues()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region " FULL CALENDAR "
|
||||||
|
Private Sub InicializaCalendar()
|
||||||
|
RegistraScript("InitCalendar();")
|
||||||
|
|
||||||
|
HdnU.Value = UsuarioActual.CveUsuario.ToString
|
||||||
|
HdnE.Value = UsuarioActual.CveEmpresa.ToString
|
||||||
|
|
||||||
|
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||||
|
CargaTiposAgenda()
|
||||||
|
CheckRecurrencia.Attributes.Add("onclick", "CheckAdd(this);")
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaTiposAgenda()
|
||||||
|
Dim ObjEventos As New ClsOIEventos
|
||||||
|
|
||||||
|
If ObjEventos.GetAgendaTipo() Then
|
||||||
|
DdlAgedaTipo.DataSource = ObjEventos.DtResultados
|
||||||
|
DdlAgedaTipo.DataBind()
|
||||||
|
DdlAgedaTipo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al obtener los tipos de agenda. Por favor recargue la página", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjEventos.Dispose()
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim ObjEventos As New ClsOIEventos
|
||||||
|
|
||||||
|
Dim FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime()
|
||||||
|
Dim FechaFin = TxtFechaFinAgenda.Text.ToDateTime()
|
||||||
|
|
||||||
|
RegistraScript("GetView();")
|
||||||
|
|
||||||
|
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1"
|
||||||
|
If CheckRecurrencia.Checked Then
|
||||||
|
RecurrenciaTipo = RBLRecurrencia.SelectedValue.ToEntero
|
||||||
|
Frecuencia = TxtFrecuencia.Text.ToEntero
|
||||||
|
|
||||||
|
'OBTENEMOS LOS DIAS SELECCIONADOS EN LA OPCION DE RECURRENCIA POR SEMANA
|
||||||
|
Select Case RecurrenciaTipo
|
||||||
|
Case 3
|
||||||
|
Dim StringDias = ""
|
||||||
|
For Each item As ListItem In CheckDiasSemana.Items
|
||||||
|
If item.Selected Then
|
||||||
|
If StringDias.Length > 0 Then
|
||||||
|
StringDias += ","
|
||||||
|
End If
|
||||||
|
StringDias += item.Value
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If StringDias.Length > 0 Then
|
||||||
|
DiasSemana = StringDias
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
'If RBSinFechaFinAdd.Checked Then
|
||||||
|
' RecurrenciaFin = "-1"
|
||||||
|
'Else
|
||||||
|
If RBNumeroOcurrencias.Checked Then
|
||||||
|
RecurrenciaFin = TxtNumeroOcurrencias.Text
|
||||||
|
ElseIf RBFechaFin.Checked Then
|
||||||
|
RecurrenciaFin = TxtFechaFinRecurrencia.Text
|
||||||
|
Else
|
||||||
|
RecurrenciaFin = "-1"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If HdnCveEvento.Value.ToEntero > 0 Then
|
||||||
|
Frecuencia = -2 : DiasSemana = "-2" : Dias = -2 : Mes = -2 : RecurrenciaFin = "-2"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'11/05/2018 - GASTO RECURRENTE
|
||||||
|
Dim CveTipoEvento As Integer = IIf(ChkGastoRecurrente.Checked, 10, 2).ToString().ToEntero()
|
||||||
|
Dim Importe As Double = Convert.ToDouble(IIf(ChkGastoRecurrente.Checked, TxtImporteGastoRecurrente.Text, "-1"))
|
||||||
|
|
||||||
|
If HdnCveEvento.Value.ToEntero > 0 Then
|
||||||
|
If ObjEventos.UpdateEvento(TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, DdlAgedaTipo.SelectedValue.ToEntero, -1, FechaInicio, FechaFin, -1, "-1", HdnCveEvento.Value.ToEntero, "-1",
|
||||||
|
RecurrenciaTipo, Frecuencia, DiasSemana, Dias, Mes, RecurrenciaFin, Importe:=Importe) Then
|
||||||
|
Alert("El Evento se actualizó correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al actualizar el evento", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If ObjEventos.AddEventoAgenda(DdlAgedaTipo.SelectedValue.ToEntero, TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, FechaInicio, FechaFin, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=CveTipoEvento, Importe:=Importe) Then
|
||||||
|
|
||||||
|
Alert("El Evento se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al Guardar el evento", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjEventos.Dispose()
|
||||||
|
RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234")
|
||||||
|
LimpiaModalAgenda()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Private Sub LimpiaModalAgenda()
|
||||||
|
TxtDescripcionAgenda.Text = ""
|
||||||
|
TxtAsuntoAgenda.Text = ""
|
||||||
|
DdlPrioridad.SelectedValue = "1"
|
||||||
|
TxtNumeroOcurrencias.Text = ""
|
||||||
|
TxtFechaFinRecurrencia.Text = ""
|
||||||
|
RBFechaFin.Checked = False
|
||||||
|
RBNumeroOcurrencias.Checked = False
|
||||||
|
RBLRecurrencia.SelectedValue = "1"
|
||||||
|
CheckDiasSemana.ClearSelection()
|
||||||
|
RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty)
|
||||||
|
TxtFrecuencia.Text = "1"
|
||||||
|
LblEmpresaCRM.Text = ""
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim ObjEventos As New ClsOIEventos
|
||||||
|
RegistraScript("GetView();")
|
||||||
|
|
||||||
|
If ObjEventos.RemoveEvento(HdnCveEvento.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234")
|
||||||
|
Alert("El evento se eliminó correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al eliminar el evento, por favor intente de nuevo.", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjEventos.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
<WebMethod()> <Script.Services.ScriptMethodAttribute()>
|
||||||
|
Public Shared Function EliminaEvento(CveEvento As Integer, CveEmpresa As Integer) As String
|
||||||
|
Dim ObjEventos As New ClsOIEventos
|
||||||
|
|
||||||
|
ObjEventos.RemoveEvento(CveEvento, CveEmpresa)
|
||||||
|
|
||||||
|
ObjEventos.Dispose()
|
||||||
|
Return CveEvento.ToString
|
||||||
|
End Function
|
||||||
|
|
||||||
|
<WebMethod()> <Script.Services.ScriptMethodAttribute()>
|
||||||
|
Public Shared Function ActualizaEvento(ClsEvent As CalendarEvent) As String
|
||||||
|
Dim ObjEventos As New ClsOIEventos
|
||||||
|
|
||||||
|
Dim FechaInicio = DateTimeOffset.Parse(ClsEvent.start).DateTime
|
||||||
|
Dim FechaFin = DateTimeOffset.Parse(ClsEvent.end).DateTime
|
||||||
|
|
||||||
|
If ObjEventos.UpdateEvento("-1", "-1", -1, -1, -1, FechaInicio, FechaFin, -1, "-1", ClsEvent.id) Then
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjEventos.Dispose()
|
||||||
|
Return "a"
|
||||||
|
End Function
|
||||||
|
Protected Sub RBLRecurrencia_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
Select Case RBLRecurrencia.SelectedValue.ToEntero
|
||||||
|
Case 1
|
||||||
|
LblTextoFrecuencia.Text = "Hora(s)"
|
||||||
|
TrDiasSemanaAdd.Style("display") = "none"
|
||||||
|
Case 2
|
||||||
|
LblTextoFrecuencia.Text = "Dia(s)"
|
||||||
|
TrDiasSemanaAdd.Style("display") = "none"
|
||||||
|
Case 3
|
||||||
|
LblTextoFrecuencia.Text = "Semana(s)"
|
||||||
|
TrDiasSemanaAdd.Style("display") = "block"
|
||||||
|
|
||||||
|
'Chequea los dias seleccionados en la recurrencia
|
||||||
|
For Each item As ListItem In CheckDiasSemana.Items
|
||||||
|
If HdnDiasSemanaAgendar.Value.Contains(item.Value) Then
|
||||||
|
item.Selected = True
|
||||||
|
Else
|
||||||
|
item.Selected = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Case 4
|
||||||
|
LblTextoFrecuencia.Text = "Mes(es)"
|
||||||
|
TrDiasSemanaAdd.Style("display") = "none"
|
||||||
|
Case 5
|
||||||
|
LblTextoFrecuencia.Text = "Año(s)"
|
||||||
|
TrDiasSemanaAdd.Style("display") = "none"
|
||||||
|
Case Else
|
||||||
|
End Select
|
||||||
|
UpRecurrencia.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnActualizaAdd_Click(sender As Object, e As EventArgs)
|
||||||
|
RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty)
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -42,16 +42,34 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-1">
|
||||||
|
Empresa:
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
|
||||||
<tr class="SubTotales">
|
<tr class="SubTotales">
|
||||||
<td>Empresa:
|
<td style="width:500px!important">Empresa:
|
||||||
<asp:DropDownList ID="DdlEmpresa" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresa" Class="form-control input-sm select2me " Style="width: 400px !important;" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlEmpresa" runat="server" AppendDataBoundItems="true" DataTextField="Empresa" DataValueField="CveEmpresa" Class="form-control input-sm select2me " Style="width: 400px !important;" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="width:200px!important">Estatus:
|
||||||
|
<asp:DropDownList ID="DdlEsatus" runat="server" AppendDataBoundItems="true" Class="form-control input-sm select2me " Style="width: 100px !important;">
|
||||||
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Activos" Value="1" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Inactivos" Value="0"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:right!important">
|
||||||
<asp:Button ID="consultar" runat="server" Text="Consultar" OnClick="consultar_Click" class="btn btn-primary" />
|
<asp:Button ID="consultar" runat="server" Text="Consultar" OnClick="consultar_Click" class="btn btn-primary" />
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ Partial Class Sistemas_Usuarios
|
|||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
Dim Usuario As New ClsSisUsuarios
|
Dim Usuario As New ClsSisUsuarios
|
||||||
If Usuario.GetUsuarios(-1, -1) Then
|
If Usuario.GetUsuarios(-1, -1, Estatus:=DdlEsatus.SelectedValue.ToEntero) Then
|
||||||
If UsuarioActual.CveRol <> 1 Then
|
If UsuarioActual.CveRol <> 1 Then
|
||||||
DtUsuarios = Usuario.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0} AND CveRol <> 1", DdlEmpresa.SelectedValue))
|
DtUsuarios = Usuario.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0} AND CveRol <> 1", DdlEmpresa.SelectedValue))
|
||||||
'DtUsuarios = Usuario.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
'DtUsuarios = Usuario.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -319,7 +319,10 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
Private Sub CargaCuentas()
|
Private Sub CargaCuentas()
|
||||||
DdlCuenta.Items.Clear()
|
DdlCuenta.Items.Clear()
|
||||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=2)
|
Dim CveTipoCuenta As Integer = 2
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then CveTipoCuenta = -1 'que se muestren todas, para empresa acumuladores
|
||||||
|
|
||||||
|
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=CveTipoCuenta)
|
||||||
|
|
||||||
If ChkPagarPesos.Checked Then
|
If ChkPagarPesos.Checked Then
|
||||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||||
@@ -783,7 +786,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim SeriesPago As New List(Of String)
|
Dim SeriesPago As New List(Of String)
|
||||||
|
|
||||||
Dim MsgError As String = ""
|
Dim MsgError As String = ""
|
||||||
Dim NCGeneradas As New List(Of Modelos.Factura.MMensajeFactura)
|
Dim NCGeneradas As New List(Of RespuestaNotaCredrito)
|
||||||
Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura)
|
Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura)
|
||||||
|
|
||||||
Dim ImporteSeleccionado As Decimal = 0
|
Dim ImporteSeleccionado As Decimal = 0
|
||||||
@@ -1560,13 +1563,14 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso MsgError = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso MsgError = "" Then
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
If ListaFacturasGenerarNC.Count > 0 Then
|
If ListaFacturasGenerarNC.Count > 0 Then
|
||||||
|
|
||||||
For Each Fac As Modelos.Factura In ListaFacturasGenerarNC
|
For Each Fac As Modelos.Factura In ListaFacturasGenerarNC
|
||||||
Dim ListaNC As New List(Of Modelos.Factura)
|
Dim ListaNC As New List(Of Modelos.Factura)
|
||||||
ListaNC.Add(Fac)
|
ListaNC.Add(Fac)
|
||||||
|
|
||||||
Dim Resp As Modelos.Factura.MMensajeFactura = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaNC)
|
Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaNC)
|
||||||
|
|
||||||
If Resp.CveVenta > 0 Then
|
If Resp IsNot Nothing AndAlso Resp.Respuesta IsNot Nothing AndAlso Resp.Respuesta.CveVenta > 0 Then
|
||||||
NCGeneradas.Add(Resp)
|
NCGeneradas.Add(Resp)
|
||||||
Else
|
Else
|
||||||
MsgError = "No se pudo generar la nota de crédito"
|
MsgError = "No se pudo generar la nota de crédito"
|
||||||
@@ -1688,8 +1692,20 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
|
Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
|
||||||
|
|
||||||
For Each NC In NCGeneradas
|
For Each RespuestaNotaCredito In NCGeneradas
|
||||||
StrMsg.AppendFormat("Nota de crédito generada correctamente.<br/><br/> Folio: <a href='/Ventas/Ventas.aspx?CveVenta={0}' target='_blank' class='Texto'>{1}</a><br/>", NC.CveVenta, NC.SerieFolio)
|
If RespuestaNotaCredito IsNot Nothing AndAlso RespuestaNotaCredito.Respuesta IsNot Nothing Then
|
||||||
|
Try
|
||||||
|
Dim ObjTimbradoNC As New Timbrado
|
||||||
|
Dim TimbroNC = ObjTimbradoNC.TimbrarFactura(UsuarioActual, RespuestaNotaCredito.ObjFacturaNC)
|
||||||
|
If Not TimbroNC Then
|
||||||
|
Alert(ObjTimbradoNC.MensajeErrorCFDI, TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
ObjTimbradoNC = Nothing
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al timbrar la NC.", ex)
|
||||||
|
End Try
|
||||||
|
StrMsg.AppendFormat("Nota de crédito generada correctamente.<br/><br/> Folio: <a href='/Ventas/Ventas.aspx?CveVenta={0}' target='_blank' class='Texto'>{1}</a><br/>", RespuestaNotaCredito.Respuesta.CveVenta, RespuestaNotaCredito.Respuesta.SerieFolio)
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
|
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
|
||||||
@@ -1738,177 +1754,335 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
#Region " N O T A - D E - C R E D I T O"
|
#Region " N O T A - D E - C R E D I T O"
|
||||||
|
Private Class RespuestaNotaCredrito
|
||||||
|
Public Property ObjFacturaNC As Modelos.Factura
|
||||||
|
Public Property Respuesta As Modelos.Factura.MMensajeFactura
|
||||||
|
End Class
|
||||||
|
|
||||||
Private Function GenerarNC(SqlTransaccion As SqlClient.SqlTransaction, ObjConta As ClsContPAQi, ListaVentasGenerarNC As List(Of Modelos.Factura)) As Modelos.Factura.MMensajeFactura
|
Private Function GenerarNC(SqlTransaccion As SqlClient.SqlTransaction, ObjConta As ClsContPAQi, ListaVentasGenerarNC As List(Of Modelos.Factura)) As RespuestaNotaCredrito
|
||||||
Dim ObjFacturaDevolucion = New Modelos.Factura(UsuarioActual)
|
Dim Retorno As New RespuestaNotaCredrito()
|
||||||
ObjFacturaDevolucion.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML
|
Try
|
||||||
ObjFacturaDevolucion.CveUsuario = UsuarioActual.CveUsuario
|
|
||||||
ObjFacturaDevolucion.UsuarioCreo = UsuarioActual.Usuario
|
|
||||||
|
|
||||||
Dim CveSubProyecto As Integer = Me.CveSubProyecto
|
Dim ObjFacturaDevolucion = New Modelos.Factura(UsuarioActual)
|
||||||
Dim CveMoneda As Integer = Me.CveMoneda
|
ObjFacturaDevolucion.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML
|
||||||
Dim CveCliente As Integer = Me.CveCliente
|
ObjFacturaDevolucion.CveUsuario = UsuarioActual.CveUsuario
|
||||||
|
ObjFacturaDevolucion.UsuarioCreo = UsuarioActual.Usuario
|
||||||
|
|
||||||
If CveSubProyecto <= 0 Then
|
Dim CveSubProyecto As Integer = Me.CveSubProyecto
|
||||||
CveSubProyecto = ListaVentasGenerarNC(0).CveSubProyecto
|
Dim CveMoneda As Integer = Me.CveMoneda
|
||||||
End If
|
Dim CveCliente As Integer = Me.CveCliente
|
||||||
|
|
||||||
If CveMoneda <= 0 Then
|
|
||||||
CveMoneda = ListaVentasGenerarNC(0).CveMoneda
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveCliente <= 0 Then
|
|
||||||
CveCliente = ListaVentasGenerarNC(0).CveCliente
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim Folio As Integer = -1
|
|
||||||
Dim Serie As String = "-1"
|
|
||||||
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveEmpresa = UsuarioActual.CveEmpresa
|
|
||||||
ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal())
|
|
||||||
ObjFacturaDevolucion.ConvertirPesos = False
|
|
||||||
ObjFacturaDevolucion.CveMoneda = CveMoneda
|
|
||||||
ObjFacturaDevolucion.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda}")
|
|
||||||
ObjFacturaDevolucion.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}")
|
|
||||||
ObjFacturaDevolucion.Serie = Serie
|
|
||||||
ObjFacturaDevolucion.Folio = Folio
|
|
||||||
ObjFacturaDevolucion.Fecha = Now
|
|
||||||
ObjFacturaDevolucion.CvePrePoliza = -1
|
|
||||||
ObjFacturaDevolucion.CveMetodoPago = 0
|
|
||||||
ObjFacturaDevolucion.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR)
|
|
||||||
ObjFacturaDevolucion.FormaPago = 0
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.TipoDocto = "Egs"
|
|
||||||
ObjFacturaDevolucion.Fecha = Now
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.Version = "3.3"
|
|
||||||
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
|
||||||
ObjFacturaDevolucion.MetodoPago33 = "Pago en una sola exhibición"
|
|
||||||
ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE"
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveFormaPago33 = 21
|
|
||||||
ObjFacturaDevolucion.FormaPago33 = "Aplicación de anticipos"
|
|
||||||
ObjFacturaDevolucion.FormaPagoSAT33 = "30"
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.MetodoPago = ""
|
|
||||||
ObjFacturaDevolucion.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {ObjFacturaDevolucion.CveMetodoPago33}")
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveSubProyecto = CveSubProyecto
|
|
||||||
ObjFacturaDevolucion.SetSubProyecto()
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveCliente = CveCliente
|
|
||||||
ObjFacturaDevolucion.SetCliente()
|
|
||||||
|
|
||||||
Dim ObjCliente As New ClsClientes
|
|
||||||
If ObjCliente.GetClientes(ObjFacturaDevolucion.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveUsoCFDI = ObjCliente.CveUsoCFDI
|
|
||||||
ObjFacturaDevolucion.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
|
||||||
ObjFacturaDevolucion.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.DtDetalle = CreaDTDetalleNC()
|
|
||||||
|
|
||||||
CargaImpuestos(ObjFacturaDevolucion, ListaVentasGenerarNC, ObjCliente.DesglosaIEPS, ObjCliente.RetIVA, ObjCliente.RetISR)
|
|
||||||
|
|
||||||
|
If CveSubProyecto <= 0 Then
|
||||||
|
CveSubProyecto = ListaVentasGenerarNC(0).CveSubProyecto
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjCliente.GetSucursales(CveCliente) Then
|
If CveMoneda <= 0 Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
CveMoneda = ListaVentasGenerarNC(0).CveMoneda
|
||||||
ObjFacturaDevolucion.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
|
End If
|
||||||
|
|
||||||
|
If CveCliente <= 0 Then
|
||||||
|
CveCliente = ListaVentasGenerarNC(0).CveCliente
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Folio As Integer = -1
|
||||||
|
Dim Serie As String = "-1"
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
|
ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal())
|
||||||
|
ObjFacturaDevolucion.ConvertirPesos = False
|
||||||
|
ObjFacturaDevolucion.CveMoneda = CveMoneda
|
||||||
|
ObjFacturaDevolucion.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda}")
|
||||||
|
ObjFacturaDevolucion.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}")
|
||||||
|
ObjFacturaDevolucion.Serie = Serie
|
||||||
|
ObjFacturaDevolucion.Folio = Folio
|
||||||
|
ObjFacturaDevolucion.Fecha = Now
|
||||||
|
ObjFacturaDevolucion.CvePrePoliza = -1
|
||||||
|
ObjFacturaDevolucion.CveMetodoPago = 0
|
||||||
|
ObjFacturaDevolucion.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR)
|
||||||
|
ObjFacturaDevolucion.FormaPago = 0
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.TipoDocto = "Egs"
|
||||||
|
ObjFacturaDevolucion.Fecha = Now
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||||
|
ObjFacturaDevolucion.Version = "4.0"
|
||||||
|
|
||||||
|
'If ObjFacturaDevolucion.Cliente Is Nothing Then
|
||||||
|
' ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||||
|
'ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||||
Else
|
Else
|
||||||
ObjFacturaDevolucion.CveClienteSucursal = -1
|
ObjFacturaDevolucion.Version = "3.3"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveMetodoPago33 = 1
|
||||||
|
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
|
||||||
|
ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE"
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveFormaPago33 = 21
|
||||||
|
ObjFacturaDevolucion.FormaPago33 = "30 - Aplicación de anticipos"
|
||||||
|
ObjFacturaDevolucion.FormaPagoSAT33 = "30"
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveSubProyecto = CveSubProyecto
|
||||||
|
ObjFacturaDevolucion.SetSubProyecto()
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveCliente = CveCliente
|
||||||
|
ObjFacturaDevolucion.SetCliente()
|
||||||
|
|
||||||
|
Dim ObjCliente As New ClsClientes
|
||||||
|
If ObjCliente.GetClientes(ObjFacturaDevolucion.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveUsoCFDI = ObjCliente.CveUsoCFDI
|
||||||
|
ObjFacturaDevolucion.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||||
|
ObjFacturaDevolucion.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.DtDetalle = CreaDTDetalleNC()
|
||||||
|
|
||||||
|
CargaImpuestos(ObjFacturaDevolucion, ListaVentasGenerarNC, ObjCliente.DesglosaIEPS, ObjCliente.RetIVA, ObjCliente.RetISR)
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjCliente.GetSucursales(CveCliente) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
ObjFacturaDevolucion.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
|
||||||
|
Else
|
||||||
|
ObjFacturaDevolucion.CveClienteSucursal = -1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveTipoRelacion = 1
|
||||||
|
ObjFacturaDevolucion.TipoRelacion = "01"
|
||||||
|
ObjFacturaDevolucion.DtVentasRelacionadas = New DataTable
|
||||||
|
ObjFacturaDevolucion.DtVentasRelacionadas.Columns.Add("CveVenta", GetType(Integer))
|
||||||
|
|
||||||
|
Dim Fol As New List(Of String)
|
||||||
|
For Each Fac In ListaVentasGenerarNC
|
||||||
|
Fol.Add(Fac.FolioFiscal)
|
||||||
|
|
||||||
|
Dim RowVenta As DataRow = ObjFacturaDevolucion.DtVentasRelacionadas.NewRow
|
||||||
|
RowVenta("CveVenta") = Fac.CveVenta
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.DtVentasRelacionadas.Rows.Add(RowVenta)
|
||||||
|
Next
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.UUIDRelacionados = Fol
|
||||||
|
|
||||||
|
Select Case ObjFacturaDevolucion.TipoDocto
|
||||||
|
Case "Ing"
|
||||||
|
ObjFacturaDevolucion.TipoDocumento = "Factura"
|
||||||
|
Case "REM"
|
||||||
|
ObjFacturaDevolucion.TipoDocumento = "Remision"
|
||||||
|
Case "Cot"
|
||||||
|
ObjFacturaDevolucion.TipoDocumento = "Cotizacion"
|
||||||
|
Case "Egs"
|
||||||
|
ObjFacturaDevolucion.TipoDocumento = "Nota de Crédito"
|
||||||
|
Case "Dev"
|
||||||
|
ObjFacturaDevolucion.TipoDocumento = "Nota de Devolución"
|
||||||
|
Case Else
|
||||||
|
ObjFacturaDevolucion.TipoDocumento = ""
|
||||||
|
End Select
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.FechaPago = Now
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.CveCorte = -1
|
||||||
|
ObjFacturaDevolucion.CveMesa = -1
|
||||||
|
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||||
|
ObjFacturaDevolucion.CveContrato = -1
|
||||||
|
ObjFacturaDevolucion.DescripcionContrato = ""
|
||||||
|
ObjFacturaDevolucion.CveClienteSucursal = -1
|
||||||
|
ObjFacturaDevolucion.Entrega = ""
|
||||||
|
ObjFacturaDevolucion.CveAlmacen = -1
|
||||||
|
|
||||||
|
Dim DtVentasNC = InicializaDTVentasNC()
|
||||||
|
|
||||||
|
Dim TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("TotalImporte")
|
||||||
|
Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIVA")
|
||||||
|
Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetIVA")
|
||||||
|
Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetISR")
|
||||||
|
Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIEPS")
|
||||||
|
Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("Descuento")
|
||||||
|
Dim Amortizacion As Decimal = 0
|
||||||
|
|
||||||
|
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
||||||
|
|
||||||
|
'DETALLES
|
||||||
|
ObjFacturaDevolucion.SubTotal = TotalImporte
|
||||||
|
ObjFacturaDevolucion.Descuento = Descuento
|
||||||
|
ObjFacturaDevolucion.Amortizacion = Amortizacion
|
||||||
|
ObjFacturaDevolucion.IVA = ImporteIVA
|
||||||
|
ObjFacturaDevolucion.RetIVA = ImporteRetIVA
|
||||||
|
ObjFacturaDevolucion.RetISR = ImporteRetISR
|
||||||
|
ObjFacturaDevolucion.IEPS = ImporteIEPS
|
||||||
|
ObjFacturaDevolucion.Total = Total
|
||||||
|
ObjFacturaDevolucion.TotalOtrosConceptos = 0
|
||||||
|
|
||||||
|
For Each Fac In ListaVentasGenerarNC
|
||||||
|
Dim Drt = DtVentasNC.NewRow
|
||||||
|
Drt("CveVenta") = Fac.CveVenta
|
||||||
|
Drt("Importe") = Fac.DescuentoProntoPago
|
||||||
|
Drt("FolioFiscal") = Fac.FolioFiscal
|
||||||
|
DtVentasNC.Rows.Add(Drt)
|
||||||
|
Next
|
||||||
|
|
||||||
|
DtVentasNC.AcceptChanges()
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
||||||
|
|
||||||
|
ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion, ListaVentasGenerarNC)
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta)
|
||||||
|
Retorno.Respuesta = Resp
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al guardar la NC de pronto pago", ex)
|
||||||
|
Retorno.Respuesta = Nothing
|
||||||
|
End Try
|
||||||
|
Retorno.ObjFacturaNC = ObjFacturaDevolucion
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al generar la NC de pronto pago", ex)
|
||||||
|
Retorno = Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function PreParaTimbre(Obj As Modelos.Factura, ListaVentasGenerarNC As List(Of Modelos.Factura)) As CFDITimbre
|
||||||
|
Dim Timbre As New CFDITimbre
|
||||||
|
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
|
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
||||||
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
|
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
|
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
|
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||||
|
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
||||||
|
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||||
|
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||||
|
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString())
|
||||||
|
Timbre.Comprobante.Total = Obj.Total
|
||||||
|
|
||||||
|
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||||
|
If Timbre.Comprobante.LugarExpedicion = "" Then
|
||||||
|
Dim aa As String = "no se guardo lugar de expedicion"
|
||||||
|
aa.GuardaLog()
|
||||||
End If
|
End If
|
||||||
ObjCliente.Dispose()
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveTipoRelacion = 7
|
Timbre.Comprobante.Confirmacion = ""
|
||||||
ObjFacturaDevolucion.TipoRelacion = "07"
|
|
||||||
ObjFacturaDevolucion.DtVentasRelacionadas = New DataTable
|
|
||||||
ObjFacturaDevolucion.DtVentasRelacionadas.Columns.Add("CveVenta", GetType(Integer))
|
|
||||||
|
|
||||||
Dim Fol As New List(Of String)
|
If Obj.FacturarSucursal Then
|
||||||
For Each Fac In ListaVentasGenerarNC
|
Timbre.Receptor.RFC = Obj.ClienteSucursal.RFC
|
||||||
Fol.Add(Fac.FolioFiscal)
|
Timbre.Receptor.Nombre = Obj.ClienteSucursal.Nombre
|
||||||
|
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
||||||
|
Else
|
||||||
|
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||||
|
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||||
|
Else
|
||||||
|
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
|
||||||
|
End If
|
||||||
|
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||||
|
End If
|
||||||
|
|
||||||
Dim RowVenta As DataRow = ObjFacturaDevolucion.DtVentasRelacionadas.NewRow
|
Timbre.Receptor.RegimenFiscalReceptor = Obj.Cliente.CodigoRegimenFiscal
|
||||||
RowVenta("CveVenta") = Fac.CveVenta
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.DtVentasRelacionadas.Rows.Add(RowVenta)
|
Timbre.Receptor.ResidenciaFiscal = ""
|
||||||
|
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||||
|
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||||
|
|
||||||
|
If ListaVentasGenerarNC IsNot Nothing Then
|
||||||
|
Timbre.CFDIRelacionados.UUID.Clear()
|
||||||
|
|
||||||
|
Dim RowTipoRelacion As DataRow = GlobalDTVtaTiposRelacion().FiltroPrimero($"CveTipoRelacion = {Obj.CveTipoRelacion}")
|
||||||
|
|
||||||
|
Timbre.CFDIRelacionados.TipoRelacion = RowTipoRelacion("SATClaveTipoRelacion").ToString()
|
||||||
|
Timbre.CFDIRelacionados.TipoRelacionTexto = RowTipoRelacion("SATTipoRelacion").ToString()
|
||||||
|
|
||||||
|
For Each Fac In ListaVentasGenerarNC
|
||||||
|
Timbre.CFDIRelacionados.UUID.Add(Fac.FolioFiscal)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim totSubTotal As Decimal = If(UsuarioActual.Empresa.CvePAC = 3, Obj.DtDetalle.SUMD("Total"), Obj.SubTotal) 'Obj.SubTotal
|
||||||
|
Dim totIVA As Decimal = Obj.IVA
|
||||||
|
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||||
|
Dim totRetISR As Decimal = Obj.RetISR
|
||||||
|
|
||||||
|
Dim i As Integer = 1
|
||||||
|
|
||||||
|
'detalles
|
||||||
|
Dim tPS As String = ""
|
||||||
|
|
||||||
|
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||||
|
If drr("PS").ToString().Length = 1 Then
|
||||||
|
tPS = drr("Obs").ToString()
|
||||||
|
Else
|
||||||
|
If drr("PS").ToString().Length = 0 Then
|
||||||
|
tPS = ""
|
||||||
|
Else
|
||||||
|
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
tPS = tPS.Replace("|", " ")
|
||||||
|
|
||||||
|
If tPS.Length >= 1000 Then
|
||||||
|
Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999)
|
||||||
|
tPS = tPSRecortado
|
||||||
|
End If
|
||||||
|
|
||||||
|
'condicionante, especial
|
||||||
|
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
||||||
|
|
||||||
|
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal,
|
||||||
|
.Descripcion = tPS,
|
||||||
|
.ValorUnitario = drr("PU").ToString().ToDecimal,
|
||||||
|
.Importe = If(UsuarioActual.Empresa.CvePAC = 3, drr("Total").ToString().ToDecimal.RoundSQL(2), drr("TotalImporte").ToString().ToDecimal),
|
||||||
|
.Descuento = drr("Descuento").ToString().ToDecimal.RoundSQL(2),
|
||||||
|
.Unidad = drr("UM").ToString(),
|
||||||
|
.ClaveUnidad = drr("SATClaveUM").ToString(),
|
||||||
|
.ClaveProdServ = drr("SATClaveProdServ").ToString(),
|
||||||
|
.Noidentificacion = drr("Noidentificacion").ToString(),
|
||||||
|
.CuentaPredial = drr("CuentaPredial").ToString(),
|
||||||
|
.ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal,
|
||||||
|
.ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString()}
|
||||||
|
'verifica suma subtotales
|
||||||
|
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales
|
||||||
|
concepto.Importe = totSubTotal
|
||||||
|
End If
|
||||||
|
totSubTotal = totSubTotal - concepto.Importe
|
||||||
|
|
||||||
|
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||||
|
' If drr("ImporteIVA").ToString().ToDouble > 0 Then
|
||||||
|
|
||||||
|
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero
|
||||||
|
If Timbre.Comprobante.Total > 0 AndAlso concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0 Then
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(6), .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If drr("ImporteIEPS").ToString().ToDouble > 0 Then
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR
|
||||||
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal})
|
||||||
|
End If
|
||||||
|
|
||||||
|
Timbre.Conceptos.Add(concepto)
|
||||||
|
i += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
ObjFacturaDevolucion.UUIDRelacionados = Fol
|
Return Timbre
|
||||||
|
|
||||||
Select Case ObjFacturaDevolucion.TipoDocto
|
|
||||||
Case "Ing"
|
|
||||||
ObjFacturaDevolucion.TipoDocumento = "Factura"
|
|
||||||
Case "REM"
|
|
||||||
ObjFacturaDevolucion.TipoDocumento = "Remision"
|
|
||||||
Case "Cot"
|
|
||||||
ObjFacturaDevolucion.TipoDocumento = "Cotizacion"
|
|
||||||
Case "Egs"
|
|
||||||
ObjFacturaDevolucion.TipoDocumento = "Nota de Crédito"
|
|
||||||
Case "Dev"
|
|
||||||
ObjFacturaDevolucion.TipoDocumento = "Nota de Devolución"
|
|
||||||
Case Else
|
|
||||||
ObjFacturaDevolucion.TipoDocumento = ""
|
|
||||||
End Select
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.FechaPago = Now
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.CveCorte = -1
|
|
||||||
ObjFacturaDevolucion.CveMesa = -1
|
|
||||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
|
||||||
ObjFacturaDevolucion.CveContrato = -1
|
|
||||||
ObjFacturaDevolucion.DescripcionContrato = ""
|
|
||||||
ObjFacturaDevolucion.CveClienteSucursal = -1
|
|
||||||
ObjFacturaDevolucion.Entrega = ""
|
|
||||||
ObjFacturaDevolucion.CveAlmacen = -1
|
|
||||||
|
|
||||||
Dim DtVentasNC = InicializaDTVentasNC()
|
|
||||||
|
|
||||||
Dim TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("TotalImporte")
|
|
||||||
Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIVA")
|
|
||||||
Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetIVA")
|
|
||||||
Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetISR")
|
|
||||||
Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIEPS")
|
|
||||||
Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("Descuento")
|
|
||||||
Dim Amortizacion As Decimal = 0
|
|
||||||
|
|
||||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
|
||||||
|
|
||||||
'DETALLES
|
|
||||||
ObjFacturaDevolucion.SubTotal = TotalImporte
|
|
||||||
ObjFacturaDevolucion.Descuento = Descuento
|
|
||||||
ObjFacturaDevolucion.Amortizacion = Amortizacion
|
|
||||||
ObjFacturaDevolucion.IVA = ImporteIVA
|
|
||||||
ObjFacturaDevolucion.RetIVA = ImporteRetIVA
|
|
||||||
ObjFacturaDevolucion.RetISR = ImporteRetISR
|
|
||||||
ObjFacturaDevolucion.IEPS = ImporteIEPS
|
|
||||||
ObjFacturaDevolucion.Total = Total
|
|
||||||
ObjFacturaDevolucion.TotalOtrosConceptos = 0
|
|
||||||
|
|
||||||
For Each Fac In ListaVentasGenerarNC
|
|
||||||
Dim Drt = DtVentasNC.NewRow
|
|
||||||
Drt("CveVenta") = Fac.CveVenta
|
|
||||||
Drt("Importe") = Fac.DescuentoProntoPago
|
|
||||||
Drt("FolioFiscal") = Fac.FolioFiscal
|
|
||||||
DtVentasNC.Rows.Add(Drt)
|
|
||||||
Next
|
|
||||||
|
|
||||||
DtVentasNC.AcceptChanges()
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
|
||||||
|
|
||||||
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta)
|
|
||||||
|
|
||||||
ObjFacturaDevolucion.Dispose()
|
|
||||||
|
|
||||||
|
|
||||||
Return Resp
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
@@ -1975,7 +2149,10 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
||||||
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
||||||
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
||||||
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
If DrPS IsNot Nothing Then
|
||||||
|
Row("CodigoObjetoImpuesto") = DrPS("CodigoObjetoImpuesto")
|
||||||
|
End If
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2193,6 +2370,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
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))
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
|
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -5211,7 +5211,12 @@ Partial Class PV
|
|||||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119, 140))) Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119, 140))) Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
Dim CveTipoAlmacen As Integer = 1
|
||||||
|
If ChkServicioDomicilio.Checked Then
|
||||||
|
CveTipoAlmacen = 29
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, CveTipoAlmacen:=CveTipoAlmacen, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
||||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
Dim PrecioMinimo As Decimal = 0
|
Dim PrecioMinimo As Decimal = 0
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
ObjVentas.Dispose();
|
ObjVentas.Dispose();
|
||||||
GvDatos.DataSource = DtVentas.FiltraParametros("(CveEstatusFactura = 20 AND CveEstatusRefacturacion IN (0,4))");
|
GvDatos.DataSource = DtVentas.FiltraParametros("(CveEstatusFactura IN (20,23) AND CveEstatusRefacturacion IN (0,4))");
|
||||||
|
|
||||||
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3) OR (CveEstatusFactura = 20 AND CveEstatusRefacturacion IN (1,2,3)) OR CveEstatusFactura = 23");
|
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3) OR (CveEstatusFactura IN (20,23) AND CveEstatusRefacturacion IN (1,2,3))");
|
||||||
if (DtRefacturar != null && DtRefacturar.Rows.Count > 0)
|
if (DtRefacturar != null && DtRefacturar.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DivRefacturar.Visible = true;
|
DivRefacturar.Visible = true;
|
||||||
@@ -595,15 +595,10 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||||
//{
|
|
||||||
// e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (e.Row.DBCampo("CveEstatusFactura").ToEntero() == 23)
|
|
||||||
{
|
{
|
||||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Row.DBCampo("PuedeRefacturar") == "0" && e.Row.DBCampo("CveEstatusFactura") == "23" && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0)
|
if (e.Row.DBCampo("PuedeRefacturar") == "0" && e.Row.DBCampo("CveEstatusFactura") == "23" && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2406,8 +2406,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> </div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%;">
|
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%;">
|
||||||
@@ -2418,10 +2417,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
|
Emitir <asp:CheckBox ID="ChkEmitirComercioExterior" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirComercioExterior_CheckedChanged" AutoPostBack="true" />
|
||||||
<a href="javascript:;" onclick="CargaComercioExterior()" class="expand"></a>
|
<a href="javascript:;" onclick="CargaComercioExterior()" class="expand"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2429,6 +2430,16 @@
|
|||||||
<asp:UpdatePanel ID="UpComercioExterior" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpComercioExterior" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="form-body">
|
<div class="form-body">
|
||||||
|
|
||||||
|
|
||||||
|
<%-- <div class="row rowpadding">
|
||||||
|
<label class="col-md-2">Emitir:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br /> --%>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 form-group form-md-line-input">Tipo Operación:</label>
|
<label class="col-md-2 form-group form-md-line-input">Tipo Operación:</label>
|
||||||
<div class="col-md-3 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
<div class="col-md-3 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
||||||
|
|||||||
@@ -5148,7 +5148,6 @@ Partial Class Ventas
|
|||||||
'ESTATUS FACTURA
|
'ESTATUS FACTURA
|
||||||
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
|
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
|
||||||
CveEstatus = DbRowVenta("CveEstatusFactura").ToString().ToEntero()
|
CveEstatus = DbRowVenta("CveEstatusFactura").ToString().ToEntero()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtTipoCambio.Text = DbRowVenta("TipoCambio").ToString()
|
TxtTipoCambio.Text = DbRowVenta("TipoCambio").ToString()
|
||||||
@@ -6334,6 +6333,10 @@ Partial Class Ventas
|
|||||||
LblTipoOperacion.Text = ObjCliente.ClaveSATTipoOperacionDescripcion
|
LblTipoOperacion.Text = ObjCliente.ClaveSATTipoOperacionDescripcion
|
||||||
LblClavePedimento.Text = ObjCliente.ClaveSATPedimentoDescripcion
|
LblClavePedimento.Text = ObjCliente.ClaveSATPedimentoDescripcion
|
||||||
|
|
||||||
|
If ObjCliente.AplicaComercioExterior Then
|
||||||
|
ChkEmitirComercioExterior.Checked = True
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjCliente.AplicaComercioExterior Then
|
If ObjCliente.AplicaComercioExterior Then
|
||||||
DdlSATMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado
|
DdlSATMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado
|
||||||
DdlSATMotivoTraslado.DataBind()
|
DdlSATMotivoTraslado.DataBind()
|
||||||
@@ -6365,6 +6368,8 @@ Partial Class Ventas
|
|||||||
TxtComExtCalle.Text = ObjCliente.Direccion
|
TxtComExtCalle.Text = ObjCliente.Direccion
|
||||||
TxtComExtNumero.Text = ObjCliente.NoExt
|
TxtComExtNumero.Text = ObjCliente.NoExt
|
||||||
TxtComExtCP.Text = ObjCliente.CP
|
TxtComExtCP.Text = ObjCliente.CP
|
||||||
|
'en comercio exterior como regla de timbrado se utiliza el TC del día anterior
|
||||||
|
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate.AddDays(-1)).ToString()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7772,6 +7777,11 @@ Partial Class Ventas
|
|||||||
e.Row.FCLiteral("LtCantidadFacturada").Text = e.Row.DBCampo("CantidadFacturadaPed2").ToDecimal.ToString("#,##0.##")
|
e.Row.FCLiteral("LtCantidadFacturada").Text = e.Row.DBCampo("CantidadFacturadaPed2").ToDecimal.ToString("#,##0.##")
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
If EsCreaApartirDe Then
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = True
|
||||||
|
e.Row.FCLinkButton("imgE").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
||||||
' e.Row.FCLinkButton("imgE").Enabled = False
|
' e.Row.FCLinkButton("imgE").Enabled = False
|
||||||
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
|
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
|
||||||
@@ -8624,17 +8634,41 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If TipoDocumentoAutorizacion = "Ing" Then
|
If TipoDocumentoAutorizacion = "Ing" Then
|
||||||
If TipoAutorizacion = 1 Then
|
If TipoAutorizacion = 1 Then
|
||||||
If ImporteAutorizacion < TxtTotal.Text.ToDecimal() Then
|
|
||||||
CveAutorizacion = -1
|
|
||||||
Alert($"El crédito autorizado es insuficiente. Crédito Disponible:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TieneDiasVencidos Then
|
If TieneDiasVencidos Then
|
||||||
CveAutorizacion = -1
|
CveAutorizacion = -1
|
||||||
Alert($"El crédito no esta autorizado. El cliente tiene días vencidos", TipoMensaje.MsgAdvertencia)
|
Alert($"El crédito no esta autorizado. El cliente tiene días vencidos", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ImporteAutorizacion < TxtTotal.Text.ToDecimal() Then
|
||||||
|
Dim BloquearCredito As Boolean = True
|
||||||
|
CveAutorizacion = -1
|
||||||
|
|
||||||
|
'VERIFICA SI TIENE CREDITO DISPONIBLE DENTRO DEL CLIENTE
|
||||||
|
Dim ObjCred As New ClsVentas
|
||||||
|
If ObjCred.ObtenerCreditoRestante(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero()) AndAlso ObjCred.DtResultados.Rows.Count > 0 Then
|
||||||
|
'SI TIENE CREDITO DISPONIBLE NO BLOQUEAR AUNQUE LA AUTORIZACION NO TENGA EL IMPORTE DEL DOCUMENTO
|
||||||
|
If DdlSucursalCliente.SelectedValue.ToEntero() > 0 Then
|
||||||
|
If (ObjCred.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal - If(TxtTipoCambio.Visible, TxtTotal.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal, TxtTotal.Text.ToDecimal)) > 0 Then
|
||||||
|
BloquearCredito = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If (ObjCred.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal - If(TxtTipoCambio.Visible, TxtTotal.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal, TxtTotal.Text.ToDecimal)) > 0 Then
|
||||||
|
BloquearCredito = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjCred.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
If BloquearCredito Then
|
||||||
|
Alert($"El crédito autorizado es insuficiente. Crédito Disponible:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If TipoAutorizacion = 2 Then
|
'If TipoAutorizacion = 2 Then
|
||||||
@@ -11735,6 +11769,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||||
Dim Timbre As New CFDITimbre
|
Dim Timbre As New CFDITimbre
|
||||||
|
|
||||||
|
|
||||||
|
Timbre.Comprobante.Version = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3")
|
||||||
|
|
||||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
@@ -11943,104 +11981,121 @@ Partial Class Ventas
|
|||||||
i += 1
|
i += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim AplicaComercioExteriorSubProyecto As Boolean = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa)(0)("AplicaComercioExterior").ToString() = "True", True, False)
|
Dim AplicaComercioExteriorSubProyecto As Boolean
|
||||||
Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto
|
|
||||||
If Obj.Cliente.AplicaComercioExterior And AplicaComercioExteriorSubProyecto Then
|
If ChkEmitirComercioExterior.Checked Then
|
||||||
'DATOS GENERALES
|
AplicaComercioExteriorSubProyecto = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa)(0)("AplicaComercioExterior").ToString() = "True", True, False)
|
||||||
Timbre.Complementos.ComercioExterior11.TipoOperacion = GlobalDTTipoOperacion().FiltraParametros($"CveTipoOperacion={CveTipoOperacion}")(0)("ClaveSATTipoOperacion").ToString()
|
Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto
|
||||||
Timbre.Complementos.ComercioExterior11.ClavedePedimento = GlobalDTClavePedimento().FiltraParametros($"CvePedimento={CvePedimento}")(0)("ClaveSATPedimento").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.CertificadoOrigen = "0"
|
If Obj.Cliente.AplicaComercioExterior And AplicaComercioExteriorSubProyecto Then
|
||||||
Timbre.Complementos.ComercioExterior11.Incoterm = GlobalDTIncoterm.FiltroPrimeroValor("ClaveSATIncoterm", $"CveIncoterm={DdlIncoterm.SelectedValue}")
|
'DATOS GENERALES
|
||||||
Timbre.Complementos.ComercioExterior11.Subdivision = "0"
|
|
||||||
Timbre.Complementos.ComercioExterior11.TipoCambioUSD = If(Obj.CveMoneda = 1, 1, Obj.TipoCambio.ToString().ToDecimal)
|
Timbre.Comprobante.Exportacion = "02"
|
||||||
Timbre.Complementos.ComercioExterior11.MotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("ClaveSATMotivoTraslado", $"CveMotivoTraslado={DdlSATMotivoTraslado.SelectedValue}")
|
Timbre.Complementos.ComercioExterior11.TipoOperacion = GlobalDTTipoOperacion().FiltraParametros($"CveTipoOperacion={CveTipoOperacion}")(0)("ClaveSATTipoOperacion").ToString()
|
||||||
|
Timbre.Complementos.ComercioExterior11.ClavedePedimento = GlobalDTClavePedimento().FiltraParametros($"CvePedimento={CvePedimento}")(0)("ClaveSATPedimento").ToString()
|
||||||
|
Timbre.Complementos.ComercioExterior11.CertificadoOrigen = "0"
|
||||||
|
Timbre.Complementos.ComercioExterior11.Incoterm = GlobalDTIncoterm.FiltroPrimeroValor("ClaveSATIncoterm", $"CveIncoterm={DdlIncoterm.SelectedValue}")
|
||||||
|
Timbre.Complementos.ComercioExterior11.Subdivision = "0"
|
||||||
|
Timbre.Complementos.ComercioExterior11.TipoCambioUSD = If(Obj.CveMoneda = 1, 1, Obj.TipoCambio.ToString().ToDecimal)
|
||||||
|
Timbre.Complementos.ComercioExterior11.MotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("ClaveSATMotivoTraslado", $"CveMotivoTraslado={DdlSATMotivoTraslado.SelectedValue}")
|
||||||
|
|
||||||
|
|
||||||
'EMISOR
|
|
||||||
Dim Dr As DataRow
|
|
||||||
Dr = Nothing
|
|
||||||
If GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
|
||||||
Dr = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa)(0)
|
|
||||||
End If
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.CURP = UsuarioActual.Empresa.CURP
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Calle = Dr("Calle").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.NumeroExterior = Dr("NoExt").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.NumeroInterior = Dr("NoInt").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Colonia = Dr("ClaveSATColonia").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Localidad = ""
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Municipio = Dr("ClaveSATMunicipio").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Estado = Dr("ClaveSATEstado").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Pais = Dr("ClaveSATPais").ToString()
|
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.CP = Dr("ClaveSATCP").ToString()
|
|
||||||
|
|
||||||
'RECEPTOR
|
'EMISOR
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib = "" ' EN LA VERSION 3.3 NO DEBE DE REGISTRARSE ESTE VALOR
|
Dim Dr As DataRow
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Calle = Obj.Cliente.Direccion
|
Dr = Nothing
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.NumeroExterior = Obj.Cliente.NoExt
|
If GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.NumeroInterior = Obj.Cliente.NoInt
|
Dr = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa)(0)
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Colonia = Obj.Cliente.ClaveSATColonia
|
End If
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Localidad = ""
|
Timbre.Complementos.ComercioExterior11.Emisor.CURP = UsuarioActual.Empresa.CURP
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Referencia = Obj.Cliente.ReferenciaFiscal
|
Timbre.Complementos.ComercioExterior11.Emisor.Calle = Dr("Calle").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Municipio = Obj.Cliente.Ciudad
|
Timbre.Complementos.ComercioExterior11.Emisor.NumeroExterior = Dr("NoExt").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.CP = Obj.Cliente.CP
|
Timbre.Complementos.ComercioExterior11.Emisor.NumeroInterior = Dr("NoInt").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Estado = Obj.Cliente.ClaveSATEstado
|
Timbre.Complementos.ComercioExterior11.Emisor.Colonia = Dr("ClaveSATColonia").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Pais = Obj.Cliente.ClaveSATPais
|
Timbre.Complementos.ComercioExterior11.Emisor.Localidad = ""
|
||||||
Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais
|
Timbre.Complementos.ComercioExterior11.Emisor.Municipio = Dr("ClaveSATMunicipio").ToString()
|
||||||
Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib
|
Timbre.Complementos.ComercioExterior11.Emisor.Estado = Dr("ClaveSATEstado").ToString()
|
||||||
|
Timbre.Complementos.ComercioExterior11.Emisor.Pais = Dr("ClaveSATPais").ToString()
|
||||||
|
Timbre.Complementos.ComercioExterior11.Emisor.CP = Dr("ClaveSATCP").ToString()
|
||||||
|
|
||||||
Dim ComExtPais, ComExtEstado, ComExtMunicipio, ComExtColonia, ComExtCalle, ComExtNumero, ComExtCP As String
|
|
||||||
ComExtColonia = "" : ComExtMunicipio = ""
|
|
||||||
ComExtPais = GlobalDTGralPaises.FiltroPrimeroValor("ClaveSATPais", $"CvePais={DdlComExtPais.SelectedValue}")
|
|
||||||
ComExtCalle = TxtComExtCalle.Text.Trim
|
|
||||||
ComExtNumero = TxtComExtNumero.Text.Trim
|
|
||||||
ComExtCP = TxtComExtCP.Text.Trim
|
|
||||||
|
|
||||||
If ComExtPais = "MEX" Then
|
'RECEPTOR
|
||||||
ComExtEstado = GlobalDTGralEstados(ComExtPais).FiltroPrimeroValor("ClaveSATEstado", $"CveEstado={DdlComExtEstado.SelectedValue}")
|
Timbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib = If(Timbre.Comprobante.Version = "4.0", Obj.Cliente.NumRegIdTrib, "") ' EN LA VERSION 3.3 NO DEBE DE REGISTRARSE ESTE VALOR
|
||||||
ComExtMunicipio = GlobalDTGralMunicipios(ComExtEstado).FiltroPrimeroValor("ClaveSATMunicipio", $"CveMunicipio={DdlComExtMunicipio.SelectedValue}")
|
Timbre.Complementos.ComercioExterior11.Receptor.Calle = Obj.Cliente.Direccion
|
||||||
ComExtColonia = GlobalDTGralColonias("-1", "-1", "-1", CveColonia:=DdlComExtColonia.SelectedValue.ToEntero).FiltroPrimeroValor("ClaveSATColonia", "")
|
Timbre.Complementos.ComercioExterior11.Receptor.NumeroExterior = Obj.Cliente.NoExt
|
||||||
Else
|
Timbre.Complementos.ComercioExterior11.Receptor.NumeroInterior = Obj.Cliente.NoInt
|
||||||
If ComExtPais.Contiene("USA", "CAN") Then
|
Timbre.Complementos.ComercioExterior11.Receptor.Colonia = Obj.Cliente.ClaveSATColonia
|
||||||
|
Timbre.Complementos.ComercioExterior11.Receptor.Localidad = ""
|
||||||
|
Timbre.Complementos.ComercioExterior11.Receptor.Referencia = Obj.Cliente.ReferenciaFiscal
|
||||||
|
Timbre.Complementos.ComercioExterior11.Receptor.Municipio = Obj.Cliente.Ciudad
|
||||||
|
Timbre.Complementos.ComercioExterior11.Receptor.CP = Obj.Cliente.CP
|
||||||
|
Timbre.Complementos.ComercioExterior11.Receptor.Estado = Obj.Cliente.ClaveSATEstado
|
||||||
|
Timbre.Complementos.ComercioExterior11.Receptor.Pais = Obj.Cliente.ClaveSATPais
|
||||||
|
Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais
|
||||||
|
Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib
|
||||||
|
|
||||||
|
Dim ComExtPais, ComExtEstado, ComExtMunicipio, ComExtColonia, ComExtCalle, ComExtNumero, ComExtCP As String
|
||||||
|
ComExtColonia = "" : ComExtMunicipio = ""
|
||||||
|
ComExtPais = GlobalDTGralPaises.FiltroPrimeroValor("ClaveSATPais", $"CvePais={DdlComExtPais.SelectedValue}")
|
||||||
|
ComExtCalle = TxtComExtCalle.Text.Trim
|
||||||
|
ComExtNumero = TxtComExtNumero.Text.Trim
|
||||||
|
ComExtCP = TxtComExtCP.Text.Trim
|
||||||
|
|
||||||
|
If ComExtPais = "MEX" Then
|
||||||
ComExtEstado = GlobalDTGralEstados(ComExtPais).FiltroPrimeroValor("ClaveSATEstado", $"CveEstado={DdlComExtEstado.SelectedValue}")
|
ComExtEstado = GlobalDTGralEstados(ComExtPais).FiltroPrimeroValor("ClaveSATEstado", $"CveEstado={DdlComExtEstado.SelectedValue}")
|
||||||
|
ComExtMunicipio = GlobalDTGralMunicipios(ComExtEstado).FiltroPrimeroValor("ClaveSATMunicipio", $"CveMunicipio={DdlComExtMunicipio.SelectedValue}")
|
||||||
|
ComExtColonia = GlobalDTGralColonias("-1", "-1", "-1", CveColonia:=DdlComExtColonia.SelectedValue.ToEntero).FiltroPrimeroValor("ClaveSATColonia", "")
|
||||||
Else
|
Else
|
||||||
ComExtEstado = TxtComExtEstado.Text.Trim
|
If ComExtPais.Contiene("USA", "CAN") Then
|
||||||
|
ComExtEstado = GlobalDTGralEstados(ComExtPais).FiltroPrimeroValor("ClaveSATEstado", $"CveEstado={DdlComExtEstado.SelectedValue}")
|
||||||
|
Else
|
||||||
|
ComExtEstado = TxtComExtEstado.Text.Trim
|
||||||
|
End If
|
||||||
|
ComExtMunicipio = TxtComExtMunicipio.Text.Trim
|
||||||
|
ComExtColonia = TxtComExtColonia.Text.Trim
|
||||||
End If
|
End If
|
||||||
ComExtMunicipio = TxtComExtMunicipio.Text.Trim
|
|
||||||
ComExtColonia = TxtComExtColonia.Text.Trim
|
'DESTINATARIO
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Nombre = TxtDestinatarioNombre.Text.Trim
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Calle = ComExtCalle
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior = ComExtNumero
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior = ""
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Colonia = ComExtColonia
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Localidad = ""
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Referencia = Obj.Cliente.ReferenciaFiscal
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Municipio = ComExtMunicipio
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.CP = ComExtCP
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Estado = ComExtEstado
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.Pais = ComExtPais
|
||||||
|
Timbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib = TxtNumRegIdTrib.Text.Trim
|
||||||
|
|
||||||
|
|
||||||
|
'MERCANCIAS
|
||||||
|
For Each Gvr As GridViewRow In GvComercioExterior.Rows
|
||||||
|
Dim mercancia As New CFDIComercioExterior11Mercancias With {.CantidadAduana = Gvr.FCTextBox("TxtCantidad").Text.ToDecimal,
|
||||||
|
.FraccionArancelaria = Gvr.DataKey("ClaveSATFraccionArancelaria").ToString(),
|
||||||
|
.UnidadAduana = Gvr.DataKey("ClaveSATUnidadAduana").ToString(),
|
||||||
|
.ValorDolares = Math.Round(Gvr.FCTextBox("TxtCantidad").Text.ToDecimal * Gvr.FCTextBox("TxtValorUnitario").Text.ToDecimal, 2),
|
||||||
|
.ValorUnitarioAduana = Gvr.FCTextBox("TxtValorUnitario").Text.ToDecimal,
|
||||||
|
.NoIdentificacion = Gvr.DataKey("Codigo")}
|
||||||
|
If Gvr.FCTextBox("TxtMarca").Text <> "" Then
|
||||||
|
mercancia.DescripcionesEspecificas.Marca = Gvr.FCTextBox("TxtMarca").Text
|
||||||
|
End If
|
||||||
|
|
||||||
|
Timbre.Complementos.ComercioExterior11.Mercancias.Add(mercancia)
|
||||||
|
i += 1
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'DESTINATARIO
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Nombre = TxtDestinatarioNombre.Text.Trim
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Calle = ComExtCalle
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior = ComExtNumero
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior = ""
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Colonia = ComExtColonia
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Localidad = ""
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Referencia = Obj.Cliente.ReferenciaFiscal
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Municipio = ComExtMunicipio
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.CP = ComExtCP
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Estado = ComExtEstado
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Pais = ComExtPais
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib = TxtNumRegIdTrib.Text.Trim
|
|
||||||
|
|
||||||
|
Else
|
||||||
'MERCANCIAS
|
Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = False
|
||||||
For Each Gvr As GridViewRow In GvComercioExterior.Rows
|
|
||||||
Dim mercancia As New CFDIComercioExterior11Mercancias With {.CantidadAduana = Gvr.FCTextBox("TxtCantidad").Text.ToDecimal,
|
|
||||||
.FraccionArancelaria = Gvr.DataKey("ClaveSATFraccionArancelaria").ToString(),
|
|
||||||
.UnidadAduana = Gvr.DataKey("ClaveSATUnidadAduana").ToString(),
|
|
||||||
.ValorDolares = Math.Round(Gvr.FCTextBox("TxtCantidad").Text.ToDecimal * Gvr.FCTextBox("TxtValorUnitario").Text.ToDecimal, 2),
|
|
||||||
.ValorUnitarioAduana = Gvr.FCTextBox("TxtValorUnitario").Text.ToDecimal,
|
|
||||||
.NoIdentificacion = Gvr.DataKey("Codigo")}
|
|
||||||
If Gvr.FCTextBox("TxtMarca").Text <> "" Then
|
|
||||||
mercancia.DescripcionesEspecificas.Marca = Gvr.FCTextBox("TxtMarca").Text
|
|
||||||
End If
|
|
||||||
|
|
||||||
Timbre.Complementos.ComercioExterior11.Mercancias.Add(mercancia)
|
|
||||||
i += 1
|
|
||||||
Next
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return Timbre
|
Return Timbre
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -15615,16 +15670,12 @@ Partial Class Ventas
|
|||||||
Dim TipoMovimiento As Boolean = True
|
Dim TipoMovimiento As Boolean = True
|
||||||
Dim Concepto As String = VentaActual.SerieFolio
|
Dim Concepto As String = VentaActual.SerieFolio
|
||||||
Dim Referencia As String = VentaActual.SerieFolio
|
Dim Referencia As String = VentaActual.SerieFolio
|
||||||
|
CveIEAnticipo = gvr.DataKey("CveIE").ToEntero()
|
||||||
|
|
||||||
Select Case gvr.DataKey("CveConceptoContable").ToString()
|
Select Case gvr.DataKey("CveConceptoContable").ToString()
|
||||||
Case "3"
|
Case "3"
|
||||||
CveIEAnticipo = gvr.DataKey("CveIE").ToEntero()
|
|
||||||
|
|
||||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||||
|
|
||||||
' TipoCambioGeneral = tipoCambioPago
|
|
||||||
' IdCtaContable = IdCtaContAnticipos
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
Dim Pago As New VentaPago
|
Dim Pago As New VentaPago
|
||||||
@@ -15682,6 +15733,8 @@ Partial Class Ventas
|
|||||||
Pago.TipoPago = "NC"
|
Pago.TipoPago = "NC"
|
||||||
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
||||||
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
||||||
|
Pago.Referencia = gvr.DataKey("Folio")
|
||||||
|
Pago.CveConceptoPago = 251
|
||||||
|
|
||||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||||
SimplificaPrePoliza = False
|
SimplificaPrePoliza = False
|
||||||
@@ -15689,7 +15742,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Case "66"
|
Case "66"
|
||||||
If gvr.DataKey("CveIE").ToEntero() > 0 Then
|
If gvr.DataKey("CveIE").ToEntero() > 0 Then
|
||||||
CveIEAnticipo = gvr.DataKey("CveIE").ToEntero()
|
|
||||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||||
IdCtaContable = IdCtaContClientes
|
IdCtaContable = IdCtaContClientes
|
||||||
|
|
||||||
@@ -15702,6 +15755,7 @@ Partial Class Ventas
|
|||||||
Pago.TipoPago = "A"
|
Pago.TipoPago = "A"
|
||||||
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
||||||
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
||||||
|
Pago.Referencia = gvr.DataKey("Folio")
|
||||||
|
|
||||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
@@ -29293,8 +29347,9 @@ Partial Class Ventas
|
|||||||
Private Sub CargaEstado()
|
Private Sub CargaEstado()
|
||||||
DdlComExtEstado.Items.Clear()
|
DdlComExtEstado.Items.Clear()
|
||||||
If DdlComExtPais.SelectedValue.ToEntero() > 0 Then
|
If DdlComExtPais.SelectedValue.ToEntero() > 0 Then
|
||||||
DdlComExtEstado.DataSource = GlobalDTGralEstados("-1", CvePais:=DdlComExtPais.SelectedValue.ToEntero)(0)("ClaveSATPais").ToString()
|
DdlComExtEstado.DataSource = GlobalDTGralEstados("-1", CvePais:=DdlComExtPais.SelectedValue.ToEntero) '(0)("ClaveSATPais").ToString()
|
||||||
End If
|
End If
|
||||||
|
DdlComExtEstado.Visible = True
|
||||||
DdlComExtEstado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlComExtEstado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlComExtEstado.DataBind()
|
DdlComExtEstado.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -33151,6 +33206,15 @@ Partial Class Ventas
|
|||||||
UpFacturar.Update()
|
UpFacturar.Update()
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
'REGENERAR EL PDF
|
||||||
|
Try
|
||||||
|
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||||
|
Dim Hilo As New System.Threading.Thread(Sub() RegenerarPDF(CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, strURLHOST))
|
||||||
|
Hilo.Start()
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function DeshabilitarAplicarNotaDeCredito(RFC As String) As Boolean
|
Private Function DeshabilitarAplicarNotaDeCredito(RFC As String) As Boolean
|
||||||
@@ -34981,5 +35045,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Protected Sub ChkEmitirComercioExterior_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user