This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-05-09 14:19:27 -07:00
24 changed files with 644 additions and 839 deletions

View File

@@ -18,9 +18,13 @@
<li> <li>
<asp:LinkButton runat="server" ID="BtnImprimir" OnClick="BtnImprimir_Click" data-toggle="tooltip" data-placement="left" title="PDF" Text="<i class='fa fa-file-pdf-o'></i> PDF"></asp:LinkButton> <asp:LinkButton runat="server" ID="BtnImprimir" OnClick="BtnImprimir_Click" data-toggle="tooltip" data-placement="left" title="PDF" Text="<i class='fa fa-file-pdf-o'></i> PDF"></asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton runat="server" ID="BtnExcel" OnClick="BtnExcel_Click" data-toggle="tooltip" data-placement="left" title="XLS" Text="<i class='fa fa-file-excel-o'></i> Excel"></asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="BtnImprimir" /> <asp:PostBackTrigger ControlID="BtnImprimir" />
<asp:PostBackTrigger ControlID="BtnExcel" />
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>

View File

@@ -112,6 +112,29 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
End Sub End Sub
Protected Sub BtnExcel_Click(sender As Object, e As EventArgs)
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Direccion", "Tamaulipas Esq. con Guadalupe Victoria"))
params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
params.Add(New ReportParameter("FechaInicial", TxtFechaI.Text))
params.Add(New ReportParameter("FechaFinal", TxtFechaF.Text))
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsadosClientes}
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsadosClientes.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsadosClientes, params, "Entradas usados clientes", "Excel")
End Sub
Public Sub CargarVentasGrupo(sender As Object, e As EventArgs) Public Sub CargarVentasGrupo(sender As Object, e As EventArgs)
Dim tempLink As LinkButton = CType(sender, LinkButton) Dim tempLink As LinkButton = CType(sender, LinkButton)
Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow) Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow)

View File

@@ -1980,6 +1980,7 @@ Public Class ClsCompras
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception
@@ -2023,6 +2024,7 @@ Public Class ClsCompras
End With End With
Try Try
SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception

View File

@@ -996,14 +996,14 @@ Public Class ClsContabilidad
' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "") ' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "")
'End If 'End If
OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", dr("ConceptoContable").ToString), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", dr("ConceptoContable").ToString), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else Else
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If ' End If '
Catch ex As Exception Catch ex As Exception
If ex.Message.Contains("50015;") Then If ex.Message.Contains("50015;") Then

View File

@@ -5567,7 +5567,7 @@ Public Class ClsInventarios
Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String, Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String, NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String,
Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "", Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "") As Boolean Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesAdd") DataAdapter("PA_Inv_CamionesAdd")
@@ -5593,6 +5593,7 @@ Public Class ClsInventarios
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC .Add("@SCAC", SqlDbType.VarChar).Value = SCAC
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT .Add("@CAAT", SqlDbType.VarChar).Value = CAAT
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer .Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -5620,7 +5621,7 @@ Public Class ClsInventarios
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String, Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String,
NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "", NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "") As Boolean Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesUpdate") DataAdapter("PA_Inv_CamionesUpdate")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -5646,6 +5647,7 @@ Public Class ClsInventarios
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC .Add("@SCAC", SqlDbType.VarChar).Value = SCAC
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT .Add("@CAAT", SqlDbType.VarChar).Value = CAAT
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer .Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -6956,7 +6956,22 @@ Public Class ClsPaginas
RFCReceptor = Vta.RFCReceptor RFCReceptor = Vta.RFCReceptor
End If End If
Dim RutaCarpetaCBB As String = String.Format("{0}CBB\", Ruta)
Dim FinfoCarpetaCBB As New IO.DirectoryInfo(RutaCarpetaCBB)
If Not FinfoCarpetaCBB.Exists Then
Try
IO.Directory.CreateDirectory(RutaCarpetaCBB)
Catch ex As Exception
GuardaLogAD($"CveEmpresa {UsuarioActual.CveEmpresa} Vta {Vta.SerieFolio} Error al crear directorio CBB {ex.Message}")
End Try
End If
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio) Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB) Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)

View File

@@ -5548,7 +5548,7 @@ Public Class Timbrado
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
EmisorRFC = "EKU9003173C9" EmisorRFC = "EKU9003173C9"
UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE SA DE CV" UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE"
ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key" ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key"
ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer" ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer"

View File

@@ -122,8 +122,8 @@ Public Class Timbres
Dim DtMovimientos As DataTable = Nothing Dim DtMovimientos As DataTable = Nothing
Dim drT As DataRow = ObjGrales.DtResultados.Rows(0) Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
Timbre.Receptor.RFC = drT("DestinatarioRFC").ToString Timbre.Receptor.RFC = drT("EmpresaRFC").ToString
Timbre.Receptor.Nombre = drT("DestinatarioNombre").ToString Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString
Timbre.Receptor.DomicilioFiscalReceptor = drT("DirDesCP").ToString Timbre.Receptor.DomicilioFiscalReceptor = drT("DirDesCP").ToString
Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
@@ -166,8 +166,14 @@ Public Class Timbres
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = drT("NumPolizaSeguroMedioAmbiente").ToString If Obj.DtDetalle IsNot Nothing AndAlso Obj.DtDetalle.Rows.Count > 0 Then
If Obj.DtDetalle.MAX("ClaveMaterialPeligroso") <> "" Then
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = drT("NumPolizaSeguroMedioAmbiente").ToString
End If
End If
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
@@ -204,104 +210,109 @@ Public Class Timbres
.Municipio = drT("DirDesClaveSATMunicipio").ToString, .Municipio = drT("DirDesClaveSATMunicipio").ToString,
.Localidad = drT("DirDesClaveSATLocalidad").ToString} .Localidad = drT("DirDesClaveSATLocalidad").ToString}
Dim NumRegIdTrib As String = ""
If drT("DestinatarioRFC").ToString.Contiene("XEXX010101000") Then ' cuando es Extranjero, debe de llevar un numregidtrib
NumRegIdTrib = "121585958"
End If
Dim Ubica As New CFDICartaPorteUbicacion Dim Ubica As New CFDICartaPorteUbicacion
Ubica.TipoEstacion = "" Ubica.TipoEstacion = ""
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = drT("RemitenteRFC").ToString, Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = drT("RemitenteRFC").ToString,
.FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01", .FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
.NombreRemitenteDestinatario = drT("RemitenteNombre").ToString, .NombreRemitenteDestinatario = drT("RemitenteNombre").ToString,
.Domicilio = DomOrigen} .Domicilio = DomOrigen}
CartaPorte.Ubicaciones.Add(Ubica) CartaPorte.Ubicaciones.Add(Ubica)
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString, Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString,
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"), .FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
.NombreRemitenteDestinatario = drT("DestinatarioNombre").ToString, .NombreRemitenteDestinatario = drT("DestinatarioNombre").ToString,
.Domicilio = DomDestino, .Domicilio = DomDestino,
.DistanciaRecorrida = Distancia} .DistanciaRecorrida = Distancia,
.NumRegIdTrib = NumRegIdTrib}
CartaPorte.Ubicaciones.Add(Ubica) CartaPorte.Ubicaciones.Add(Ubica)
CartaPorte.FiguraTransporte.ClaveTransporte = "01" CartaPorte.FiguraTransporte.ClaveTransporte = "01"
Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString, Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString,
.NumeroExterior = drT("FiguraNumeroExterior").ToString, .NumeroExterior = drT("FiguraNumeroExterior").ToString,
.NumeroInterior = drT("FiguraNumeroInterior").ToString, .NumeroInterior = drT("FiguraNumeroInterior").ToString,
.Colonia = drT("FiguraClaveSATColonia").ToString, .Colonia = drT("FiguraClaveSATColonia").ToString,
.Municipio = drT("FiguraClaveSATMunicipio").ToString, .Municipio = drT("FiguraClaveSATMunicipio").ToString,
.Estado = drT("FiguraClaveSATEstado").ToString, .Estado = drT("FiguraClaveSATEstado").ToString,
.CP = drT("FiguraCP").ToString} .CP = drT("FiguraCP").ToString}
CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With { CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
.RFCFigura = drT("FiguraRFC").ToString, .RFCFigura = drT("FiguraRFC").ToString,
.NombreFigura = drT("FiguraChofer").ToString, .NombreFigura = drT("FiguraChofer").ToString,
.NumLicencia = drT("FiguraLicencia").ToString, .NumLicencia = drT("FiguraLicencia").ToString,
.NumRegidTribFigura = drT("FiguraNumRegidTribFigura").ToString, .NumRegidTribFigura = drT("FiguraNumRegidTribFigura").ToString,
.ResidenciaFiscalFigura = drT("FiguraResidenciaFiscalFigura").ToString, .ResidenciaFiscalFigura = drT("FiguraResidenciaFiscalFigura").ToString,
.Domicilio = DomicilioOperador}) .Domicilio = DomicilioOperador})
'concepto único 'concepto único
Dim concepto As New CFDIConceptos With {.Cantidad = 1, Dim concepto As New CFDIConceptos With {.Cantidad = 1,
.Descripcion = "Traslado", .Descripcion = "Traslado",
.ValorUnitario = 0, .ValorUnitario = 0,
.Importe = 0, .Importe = 0,
.Descuento = 0, .Descuento = 0,
.Unidad = "Servicio", .Unidad = "Servicio",
.ClaveUnidad = "E48", .ClaveUnidad = "E48",
.ClaveProdServ = "78101802", .ClaveProdServ = "78101802",
.Noidentificacion = "", .Noidentificacion = "",
.CuentaPredial = ""} .CuentaPredial = ""}
Timbre.Conceptos.Add(concepto) Timbre.Conceptos.Add(concepto)
For Each drr As DataRow In Obj.DtDetalle.Rows For Each drr As DataRow In Obj.DtDetalle.Rows
If drr("PS").ToString.Length = 1 Then If drr("PS").ToString.Length = 1 Then
tPS = drr("Obs").ToString tPS = drr("Obs").ToString
Else
If drr("PS").ToString.Length = 0 Then
tPS = ""
Else Else
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) If drr("PS").ToString.Length = 0 Then
tPS = ""
Else
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
End If
End If End If
End If Dim conceptoCarta As New CFDICartaPorteMercancia With {
Dim conceptoCarta As New CFDICartaPorteMercancia With { .BienesTransp = drr("SATClaveProdServ").ToString,
.BienesTransp = drr("SATClaveProdServ").ToString, .ClaveSTCC = "", 'para metodo ferroviario
.ClaveSTCC = "", 'para metodo ferroviario .Cantidad = drr("Cantidad").ToString.ToDecimal,
.Cantidad = drr("Cantidad").ToString.ToDecimal, .Descripción = tPS,
.Descripción = tPS, .ClaveUnidad = drr("SATClaveUM").ToString,
.ClaveUnidad = drr("SATClaveUM").ToString, .Unidad = drr("UM").ToString,
.Unidad = drr("UM").ToString, .Dimensiones = drr("Dimensiones").ToString,
.Dimensiones = drr("Dimensiones").ToString, .PesoenKg = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal,
.PesoenKg = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""),
.MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""), .ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString, .Embalaje = drr("ClaveEmbalaje").ToString,
.Embalaje = drr("ClaveEmbalaje").ToString, .DescripEmbalaje = drr("Embalaje").ToString,
.DescripEmbalaje = drr("Embalaje").ToString, .ValorMercancia = drr("PU").ToString.ToDecimal,
.ValorMercancia = drr("PU").ToString.ToDecimal, .Moneda = "MXN", 'temporal
.Moneda = "MXN", 'temporal .FraccionArrancelaria = "",
.FraccionArrancelaria = "", .UUIDComercioExt = ""
.UUIDComercioExt = "" }
}
Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal} Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal}
conceptoCarta.DetalleMercancia = DetalleMercancia conceptoCarta.DetalleMercancia = DetalleMercancia
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"} Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta) conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta)
totSubTotal = totSubTotal - concepto.Importe totSubTotal = totSubTotal - concepto.Importe
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta) CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
i += 1 i += 1
Next Next
Timbre.Complementos.CartaPorte = CartaPorte Timbre.Complementos.CartaPorte = CartaPorte
Else Else
'' T R A S L A D O S '' T R A S L A D O S
'DETALLES 'DETALLES
If Obj.DtDetalle IsNot Nothing Then If Obj.DtDetalle IsNot Nothing Then
For Each drr As DataRow In Obj.DtDetalle.Rows For Each drr As DataRow In Obj.DtDetalle.Rows
If drr("PS").ToString.Length = 1 Then If drr("PS").ToString.Length = 1 Then

View File

@@ -4844,7 +4844,7 @@ Partial Class Bancos_IE
End Sub End Sub
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs) Handles LnkEliminar.Click Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs) Handles LnkEliminar.Click
If CveIECancelado > 0 Or CveIECancelacion > 0 Then If CveIECancelado > 0 Then
Alert("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación", TipoMensaje.MsgAdvertencia) Alert("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación", TipoMensaje.MsgAdvertencia)
Else Else
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion")) RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))

View File

@@ -1328,7 +1328,7 @@ Partial Class Compras_Compras
If DdlTipoComprobante.SelectedValue = "NC" Then If DdlTipoComprobante.SelectedValue = "NC" Then
paneldevolucion.Visible = True paneldevolucion.Visible = True
Pnlalmaceninventarios.Visible = False Pnlalmaceninventarios.Visible = False
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble) cargaddldevoluciones(CveProveedor, TxtSubTotal2.Text.ToDouble)
InicializaAplicaNCFact() InicializaAplicaNCFact()
DivReembolso.Visible = False DivReembolso.Visible = False
RBLPago.Items(2).Enabled = False RBLPago.Items(2).Enabled = False
@@ -5940,8 +5940,7 @@ Partial Class Compras_Compras
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal))) Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
Dim importeMN As Decimal = 0 Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1) Dim Multiplicador As Integer = Row("Multiplicador").ToString.ToEntero ' If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
Dim PorcentajeImpuesto As Decimal = 0 Dim PorcentajeImpuesto As Decimal = 0
@@ -5949,9 +5948,6 @@ Partial Class Compras_Compras
Select Case ConceptoContable Select Case ConceptoContable
Case 17 'Pago Proveedores Case 17 'Pago Proveedores
If CveTipoConcepto = 2 Then ConceptoContable = 308 'cuando es acreedor If CveTipoConcepto = 2 Then ConceptoContable = 308 'cuando es acreedor
@@ -6976,7 +6972,7 @@ Partial Class Compras_Compras
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
Else Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
End If End If
@@ -7278,11 +7274,6 @@ Partial Class Compras_Compras
Case 18 'NC - Notas de Credito Case 18 'NC - Notas de Credito
importeMovimiento = importeNC importeMovimiento = importeNC
importeMN = importeMovimiento * tipoCambioActual * Multiplicador importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
@@ -7387,14 +7378,14 @@ Partial Class Compras_Compras
Else Else
IdCtaContable = CtaProveedor IdCtaContable = CtaProveedor
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
For Each Gvr As GridViewRow In GvFacturaNC.Rows For Each Gvr As GridViewRow In GvFacturaNC.Rows
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
'Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa)) 'Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal Dim importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador Dim importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimientoNC, Referencia, 60, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
Else Else
@@ -16985,7 +16976,7 @@ Partial Class Compras_Compras
If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then
DivAlmacenDev.Visible = True DivAlmacenDev.Visible = True
End If End If
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble) cargaddldevoluciones(CveProveedor, TxtSubTotal2.Text.ToDouble)
InicializaAplicaNCFact() InicializaAplicaNCFact()
DivReembolso.Visible = False DivReembolso.Visible = False
RBLPago.Items(2).Enabled = False RBLPago.Items(2).Enabled = False
@@ -17538,8 +17529,8 @@ Partial Class Compras_Compras
'RETENCIONES 'RETENCIONES
Dim Retenciones = 0D Dim Retenciones = 0D
Retenciones = TxtRetIVA.Text.ToDecimal Retenciones = RetIVA.ToDecimal
Retenciones += TxtRetISR.Text.ToDecimal Retenciones += RetISR.ToDecimal
SubTotal2 = SubTotal - Descuentos ' - Amortizacion '[IPP] COMENTADO CASO JAM 12653 CON NC 27122 | 23/MAYO/2018 SubTotal2 = SubTotal - Descuentos ' - Amortizacion '[IPP] COMENTADO CASO JAM 12653 CON NC 27122 | 23/MAYO/2018
@@ -18430,7 +18421,7 @@ Partial Class Compras_Compras
End If End If
Next Next
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
'Else 'Else
' Retorno = False ' Retorno = False
'End If 'End If

View File

@@ -86,7 +86,7 @@
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton> <asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" ><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton> <asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
@@ -180,13 +180,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -227,8 +220,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -250,100 +241,21 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</td>
</tr>
</table>
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<div id="divMovtos" runat="server" visible="false" >
<div id="DivConceptoPrePoliza" >
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivConceptoPrePoliza" runat="server" class="chequesie22">
<%-- <div class="chequesie12" runat="server" id="divDatosPrincipales">
<div class="row">
<label class="col-md-2 control-label text-left">Fecha: </label>
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1" style="width: 5px;">
<asp:CheckBox ID="ChkAutoConta" runat="server"></asp:CheckBox>
</div>
<label class="col-md-2">AutoContabilizar</label>
</div>
<div class="row" runat="server" id="divTipoPolAdd">
<label class="col-md-2">Tipo Póliza:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlTipoPolizaAdd" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="150px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>--%>
<%-- <div class="chequesie22" runat="server" id="divObservaciones">
<div class="row">
<label class="col-md-2">Observaciones:</label>
<div class="col-md-5">
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="2" TextMode="MultiLine"></asp:TextBox>
</div>
<label class="col-md-1">Movimiento:</label>
<div class="col-md-4">
</div>
</div>
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
<label class="col-md-2">Cuenta Depósito:</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>--%>
<div class="chequesie22"> <div class="chequesie22">
<div class="row" id="DivAgregarConceptos" runat="server" visible="true"> <div class="row" id="DivAgregarConceptos" runat="server" >
<div class="col-md-12"> <div class="col-md-12">
<table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall"> <table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall">
<tr class="Titulos TextTab"> <tr class="Titulos TextTab">
@@ -402,22 +314,8 @@
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate>
</asp:UpdatePanel>
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
</td>
</tr>
</table>
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover"> <table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
<tr class="Titulos"> <tr class="Titulos">
<th>Cuenta</th> <th>Cuenta</th>
@@ -434,7 +332,7 @@
</tr> </tr>
</table> </table>
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;"> <div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
<div class="portlet light xspadding bordered " id="pnldl2"> <div class="portlet light xspadding bordered " id="pnldl2">
@@ -546,6 +444,7 @@
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
</div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -557,7 +456,7 @@
<div class="portlet-title"> <div class="portlet-title">
<div class="caption "> <div class="caption ">
<i class="fa fa-bookmark font-green"></i> <i class="fa fa-bookmark font-green"></i>
<span class="caption-subject font-green bold uppercase">Movimientos</span> <span class="caption-subject font-green bold uppercase">Movimientos2</span>
</div> </div>
<div class="tools"> <div class="tools">
@@ -576,7 +475,7 @@
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom "> <div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None" <asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC" Width="100%" > DataKeyNames="CvePrePolizaDetalle,IdMov, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,EsComplementaria" Width="100%" >
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Movimiento</HeaderTemplate> <HeaderTemplate>Movimiento</HeaderTemplate>
@@ -888,8 +787,7 @@
<div class="col-xs-2" style="text-align: left">Cliente:</div> <div class="col-xs-2" style="text-align: left">Cliente:</div>
<div class="col-xs-4" style="text-align: left"> <div class="col-xs-4" style="text-align: left">
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="405px" AutoPostBack="true"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="405px" AutoPostBack="true"></ADS:Dropdownlost>
<asp:RequiredFieldValidator ID="RfvDdlClientesE" InitialValue="-1" runat="server" ControlToValidate="DdlClientesE" Display="None" ErrorMessage="El campo <b>''Cliente''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CeRfvDdlClientesE" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlClientesE" Width="350px"></ajax:ValidatorCalloutExtender>
<i></i> <i></i>
</div> </div>
</div> </div>
@@ -920,7 +818,7 @@
<div class="row" runat="server" id="DvModalconceptoProcentajeIVA" visible="false"> <div class="row" runat="server" id="DvModalconceptoProcentajeIVA" visible="false">
<div class="col-xs-2" style="text-align: left">Procentaje IVA:</div> <div class="col-xs-2" style="text-align: left">Porcentaje IVA:</div>
<div class="col-xs-4" style="text-align: left"> <div class="col-xs-4" style="text-align: left">
<asp:DropDownList ID="DdlPorcentajeIVAE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Visible="false" Width="160px"> <asp:DropDownList ID="DdlPorcentajeIVAE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Visible="false" Width="160px">
@@ -934,6 +832,16 @@
</div> </div>
</div> </div>
<div class="row" runat="server" visible="false" id="DVmodalConceptoTipoCambio">
<div class="col-xs-2" style="text-align: left">
TC:
</div>
<div class="col-xs-3">
<asp:TextBox ID="TxtTipoCambio" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
<asp:CompareValidator ID="RfvTxtModalConceptoTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpMocalConceptoGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VceRfvTxtModalConceptoTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtModalConceptoTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<br /> <br />
<div class="row"> <div class="row">
@@ -990,6 +898,15 @@
</div> </div>
</div> </div>
<br /> <br />
</div>
<div class="row" runat="server" visible="false" id="DivMonedaExtranjera">
<div class="col-xs-2" style="text-align: left">
Mon Extrajera:
</div>
<div class="col-xs-3">
<asp:TextBox ID="TxtME" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-2" style="text-align: left"> <div class="col-xs-2" style="text-align: left">
@@ -1010,16 +927,7 @@
</div> </div>
</div> </div>
<div class="row" runat="server" visible="false" id="DVmodalConceptoTipoCambio">
<div class="col-xs-2" style="text-align: left">
Tipo de Cambio:
</div>
<div class="col-xs-3">
<asp:TextBox ID="TxtModalConceptoTipoCambio" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
<asp:CompareValidator ID="RfvTxtModalConceptoTipoCambio" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpMocalConceptoGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VceRfvTxtModalConceptoTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtModalConceptoTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div> </div>
<div class="col-md-6" runat="server" id="DvMoldalConceptoSeccion2" visible="false"> <div class="col-md-6" runat="server" id="DvMoldalConceptoSeccion2" visible="false">

View File

@@ -276,7 +276,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
ValidaCrearAPartirDe() ValidaCrearAPartirDe()
DvPlantilla.Visible = False DvPlantilla.Visible = False
UPPDocumento.Visible = False
If UsuarioActual.Empresa.TipoContabilidad = 1 Then If UsuarioActual.Empresa.TipoContabilidad = 1 Then
@@ -318,9 +318,9 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtConcepto.Enabled = True TxtConcepto.Enabled = True
TxtUsuarioElaboro.Text = UsuarioActual.Usuario TxtUsuarioElaboro.Text = UsuarioActual.Usuario
DvPlantilla.Visible = True DvPlantilla.Visible = True
LnkAddConcepto.Visible = False 'LnkAddConcepto.Visible = False
UpPrePoliza.Visible = False 'UpPrePoliza.Visible = False
End If End If
@@ -366,7 +366,9 @@ Partial Class ContabilidadC_RegPrePolizaS
.Add("Concepto", Type.GetType("System.String")) .Add("Concepto", Type.GetType("System.String"))
.Add("Cargo", Type.GetType("System.Double")) .Add("Cargo", Type.GetType("System.Double"))
.Add("Abono", Type.GetType("System.Double")) .Add("Abono", Type.GetType("System.Double"))
.Add("TipoMovto", Type.GetType("System.Int32")) .Add("TipoMovto", Type.GetType("System.Boolean"))
.Add("ImporteMN", Type.GetType("System.Decimal"))
.Add("ImporteME", Type.GetType("System.Decimal"))
.Add("EsComodin", Type.GetType("System.Int32")) .Add("EsComodin", Type.GetType("System.Int32"))
.Add("CveConcepto", Type.GetType("System.Int32")) .Add("CveConcepto", Type.GetType("System.Int32"))
.Add("CveSubProyecto", Type.GetType("System.Int32")) .Add("CveSubProyecto", Type.GetType("System.Int32"))
@@ -384,6 +386,10 @@ Partial Class ContabilidadC_RegPrePolizaS
.Add("IdCtaContable", Type.GetType("System.Int32")) .Add("IdCtaContable", Type.GetType("System.Int32"))
.Add("ConceptoContable", Type.GetType("System.String")) .Add("ConceptoContable", Type.GetType("System.String"))
.Add("CveCuenta", Type.GetType("System.Int32")) .Add("CveCuenta", Type.GetType("System.Int32"))
.Add("CodigoNombreCuenta", Type.GetType("System.String"))
.Add("SubProyecto", Type.GetType("System.String"))
.Add("FolioFactura", Type.GetType("System.String"))
.Add("TipoGasto", Type.GetType("System.String"))
.Add("ContadoTipoTransaccion", Type.GetType("System.Int32")) .Add("ContadoTipoTransaccion", Type.GetType("System.Int32"))
.Add("ContadoCuenta", Type.GetType("System.Int32")) .Add("ContadoCuenta", Type.GetType("System.Int32"))
@@ -396,6 +402,7 @@ Partial Class ContabilidadC_RegPrePolizaS
.Add("EsComplementaria", Type.GetType("System.Boolean")) .Add("EsComplementaria", Type.GetType("System.Boolean"))
.Add("TC", Type.GetType("System.Decimal")) .Add("TC", Type.GetType("System.Decimal"))
End With End With
@@ -547,9 +554,6 @@ Partial Class ContabilidadC_RegPrePolizaS
DtMovimientos.Columns.Add("Abono", GetType(Decimal)) DtMovimientos.Columns.Add("Abono", GetType(Decimal))
End If End If
GvPrePoliza.DataBind() GvPrePoliza.DataBind()
If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
@@ -584,9 +588,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'divDatosPrincipales.Visible = False 'divDatosPrincipales.Visible = False
'divObservaciones.Visible = False 'divObservaciones.Visible = False
UPMovs.Visible = False
UPMovs.Update()
UPPDocumento.Update()
UpPrePoliza.Update() UpPrePoliza.Update()
RegistraScript("comparar();") RegistraScript("comparar();")
@@ -847,12 +849,25 @@ Partial Class ContabilidadC_RegPrePolizaS
If DdlPlantilla.SelectedValue.ToEntero = 53 Then 'Plantilla Personalizada If DdlPlantilla.SelectedValue.ToEntero = 53 Then 'Plantilla Personalizada
DivAgregarConceptos.Visible = True DivAgregarConceptos.Visible = True
LnkAddConcepto.Visible = True
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
'DivAgregarConceptos.Visible = True
LnkAddConcepto.Visible = True
CargaConceptos()
CargaSubProyectos()
CargaCuentasContables()
End If
GvPrePoliza.Visible = True
DivAgregarConceptos.Visible = False
divMovtos.Visible = False
UPMovs.Update()
Else Else
DivAgregarConceptos.Visible = False DivAgregarConceptos.Visible = False
divMovtos.Visible = True
UPMovs.Update()
End If End If
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden") Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
@@ -919,7 +934,7 @@ Partial Class ContabilidadC_RegPrePolizaS
e.Row.Height = Unit.Pixel(1) e.Row.Height = Unit.Pixel(1)
e.Row.Cells(0).ToolTip = e.Row.DBCampo("CveCuenta") e.Row.Cells(0).ToolTip = e.Row.DBCampo("CveCuenta")
If e.Row.DBCampo("TipoMovto") = "1" Then If e.Row.DBCampo("TipoMovto") = "True" Then
e.Row.FCTextBox("TxtAbono").Visible = True e.Row.FCTextBox("TxtAbono").Visible = True
Else Else
e.Row.FCTextBox("TxtCargo").Visible = True e.Row.FCTextBox("TxtCargo").Visible = True
@@ -957,8 +972,8 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
If e.Row.DBCampo("EsComplementaria") = "True" Then If e.Row.DBCampo("EsComplementaria") = "True" Then
If e.Row.DBCampo("TipoMovto") = "0" Then e.Row.FindControl("divCargoME").Visible = True If e.Row.DBCampo("TipoMovto") = "False" Then e.Row.FindControl("divCargoME").Visible = True
If e.Row.DBCampo("TipoMovto") = "1" Then e.Row.FindControl("divAbonoME").Visible = True If e.Row.DBCampo("TipoMovto") = "True" Then e.Row.FindControl("divAbonoME").Visible = True
End If End If
@@ -1000,7 +1015,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CvePrePolizaInsertada As Integer = -1 Dim CvePrePolizaInsertada As Integer = -1
If CvePrePolizaOrigen > 0 Then If CvePrePolizaOrigen > 0 Then
CrarPrePolizaApartirDe() CrearPrePolizaApartirDe()
Exit Sub Exit Sub
End If End If
@@ -1039,9 +1054,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
'terminan validaciones 'terminan validaciones
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
@@ -1102,7 +1114,7 @@ Partial Class ContabilidadC_RegPrePolizaS
ImporteME = 0 ImporteME = 0
TipoCambio = 1 TipoCambio = 1
If gvr.DataKey("TipoMovto").ToDouble > 0 Then If gvr.DataKey("TipoMovto") = "True" Then
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
TmpAbono = TmpAbono + Importe TmpAbono = TmpAbono + Importe
TipoMovto = True TipoMovto = True
@@ -1173,9 +1185,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
End If End If
Else Else
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
@@ -1204,8 +1213,6 @@ Partial Class ContabilidadC_RegPrePolizaS
ObjIE.Commit() ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit() If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = "" TxtConcepto.Text = ""
'GvMov.DataBind() 'GvMov.DataBind()
DdlPlantilla_SelectedIndexChanged(Nothing, Nothing) DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
@@ -1331,7 +1338,7 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable) DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e) DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e)
TxtModalConceptoTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDouble.ToString("###,###,###.00") TxtTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDouble.ToString("###,###,###.00")
DdlModalConceptoTipoTransaccion.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoTipoTransaccion")) DdlModalConceptoTipoTransaccion.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoTipoTransaccion"))
DdlModalConceptoCuenta.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoCuenta")) DdlModalConceptoCuenta.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoCuenta"))
TxtModalConceptoDocumentoFolio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoNumeroFolio") TxtModalConceptoDocumentoFolio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoNumeroFolio")
@@ -1341,16 +1348,6 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto) DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto)
'GvPrePoliza.Rows(IndiceGrid).DataKey("")
'dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
'dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
'dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
'dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
'dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
'dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
DdlProveedoresE.SelectedValueExist(CveProveedor) DdlProveedoresE.SelectedValueExist(CveProveedor)
DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e) DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e)
DdlComprasE.SelectedValueExist(CveCompra) DdlComprasE.SelectedValueExist(CveCompra)
@@ -1358,12 +1355,16 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlPersonalE.SelectedValueExist(CvePersonal) DdlPersonalE.SelectedValueExist(CvePersonal)
If CveCliente > 0 Then If CveCliente > 0 Then
DvModalconceptoCliente.Visible = True
DdlClientesE.SelectedValue = CveCliente DdlClientesE.SelectedValue = CveCliente
DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("NombreComercial", $"CveCliente={CveCliente}") DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
DdlClientesE_SelectedIndexChanged(DdlClientesE, e) DdlClientesE_SelectedIndexChanged(DdlClientesE, e)
End If End If
DdlVentasE.SelectedValueExist(CveVenta) If CveVenta > 0 Then
DdlVentasE.SelectedValueExist(CveVenta)
End If
If CveClasificacion > 0 Then If CveClasificacion > 0 Then
DdlClasificacionesE.SelectedValue = CveClasificacion DdlClasificacionesE.SelectedValue = CveClasificacion
@@ -1391,10 +1392,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Else Else
CargaModalConceptoTipoTransaccion("Egs") CargaModalConceptoTipoTransaccion("Egs")
End If End If
UpModalConcepto.Update() UpModalConcepto.Update()
End Sub End Sub
@@ -1457,6 +1454,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim AplicaSubProyecto As Boolean = False Dim AplicaSubProyecto As Boolean = False
Dim AplicaTC As Boolean = False 'ok Dim AplicaTC As Boolean = False 'ok
Dim AplicaVenta As Boolean = False Dim AplicaVenta As Boolean = False
Dim AplicaComplementaria As Boolean = False 'ok
AplicaActivoFijo = Boolean.Parse(DT_Concepto.Rows(0)("AplicaActivoFijo").ToString) AplicaActivoFijo = Boolean.Parse(DT_Concepto.Rows(0)("AplicaActivoFijo").ToString)
AplicaAlmacen = Boolean.Parse(DT_Concepto.Rows(0)("AplicaAlmacen").ToString) AplicaAlmacen = Boolean.Parse(DT_Concepto.Rows(0)("AplicaAlmacen").ToString)
@@ -1473,7 +1471,7 @@ Partial Class ContabilidadC_RegPrePolizaS
AplicaSubProyecto = Boolean.Parse(DT_Concepto.Rows(0)("AplicaSubProyecto").ToString) AplicaSubProyecto = Boolean.Parse(DT_Concepto.Rows(0)("AplicaSubProyecto").ToString)
AplicaTC = Boolean.Parse(DT_Concepto.Rows(0)("AplicaTC").ToString) AplicaTC = Boolean.Parse(DT_Concepto.Rows(0)("AplicaTC").ToString)
AplicaVenta = Boolean.Parse(DT_Concepto.Rows(0)("AplicaVenta").ToString) AplicaVenta = Boolean.Parse(DT_Concepto.Rows(0)("AplicaVenta").ToString)
AplicaComplementaria = Boolean.Parse(DT_Concepto.Rows(0)("EsComplementaria").ToString)
If AplicaImpuesto Then If AplicaImpuesto Then
@@ -1514,26 +1512,19 @@ Partial Class ContabilidadC_RegPrePolizaS
'DdlClasificacionesE.Visible = False 'DdlClasificacionesE.Visible = False
End If End If
If AplicaVenta Then
DvModalconceptoVenta.Visible = True
Else
DvModalconceptoVenta.Visible = False
End If
If AplicaCliente Then If AplicaCliente Then
CargaClientesE() CargaClientesE()
DvModalconceptoCliente.Visible = True DvModalconceptoCliente.Visible = True
DvModalconceptoVenta.Visible = True
'DdlClientesE.Visible = True
'DdlVentasE.Visible = True
Else Else
DvModalconceptoCliente.Visible = False DvModalconceptoCliente.Visible = False
DvModalconceptoVenta.Visible = False
'DdlClientesE.Visible = False
'DdlVentasE.Visible = False
End If End If
If AplicaBancos Then If AplicaBancos Then
CargaModalConceptoTipoTransaccion("Egs") CargaModalConceptoTipoTransaccion("Egs")
'DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px") 'DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
@@ -1553,71 +1544,15 @@ Partial Class ContabilidadC_RegPrePolizaS
DVmodalConceptoTipoCambio.Visible = False DVmodalConceptoTipoCambio.Visible = False
End If End If
If AplicaComplementaria Then
DivMonedaExtranjera.Visible = True
Else
DivMonedaExtranjera.Visible = False
End If
End If End If
'Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
'If dr IsNot Nothing Then
' DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
'End If
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
' CargaProveedoresE()
' DdlProveedoresE.Visible = True
' DdlComprasE.Visible = True
'Else
' DdlProveedoresE.Visible = False
' DdlComprasE.Visible = False
'End If
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(28, 29) Then
' CargaPersonalE()
' DdlPersonalE.Visible = True
'Else
' DdlPersonalE.Visible = False
'End If
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(51) Then
' CargaClasificacionesE()
' DdlClasificacionesE.Visible = True
'Else
' DdlClasificacionesE.Visible = False
'End If
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
' CargaClientesE()
' DdlClientesE.Visible = True
' DdlVentasE.Visible = True
'Else
' DdlClientesE.Visible = False
' DdlVentasE.Visible = False
'End If
'If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(30) Then
' DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
' DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6")
' DvMoldalConceptoSeccion2.Visible = True
'Else
' DvMoldalConceptoAncho.Attributes.Add("style", "width:450px")
' DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12")
' DvMoldalConceptoSeccion2.Visible = False
'End If
UpModalConcepto.Update() UpModalConcepto.Update()
End Sub End Sub
Private Sub CargaProveedoresE() Private Sub CargaProveedoresE()
DdlProveedoresE.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedoresE.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
@@ -1648,12 +1583,18 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlClientesE.DataBind() DdlClientesE.DataBind()
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1")) ' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub End Sub
Private Sub CargaVentasE(CveCliente As Integer) Private Sub CargaVentasE(CveCliente As Integer, Optional CveMoneda As Integer = -1)
DvModalconceptoVenta.Visible = True
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
DdlVentasE.ClearSelection() DdlVentasE.ClearSelection()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DdlVentasE.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0") If CveMoneda = 2 Then
DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 2")
Else
DdlVentasE.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
End If
DdlVentasE.DataBind() DdlVentasE.DataBind()
DdlVentasE.Items.Insert(0, New ListItem(" - ", "-1")) DdlVentasE.Items.Insert(0, New ListItem(" - ", "-1"))
Else Else
@@ -1678,7 +1619,8 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero) CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero)
End Sub End Sub
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange
CargaVentasE(DdlClientesE.SelectedValue.ToEntero)
CargaVentasE(DdlClientesE.SelectedValue.ToEntero, IIf(DdlConceptosContablesE.SelectedValue.Contiene("291", "292"), 2, -1))
End Sub End Sub
@@ -1691,181 +1633,121 @@ Partial Class ContabilidadC_RegPrePolizaS
If DtMovimientos Is Nothing Then CreaDT() If DtMovimientos Is Nothing Then CreaDT()
If CvePrePoliza > 0 Then Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
Dim dr As DataRow = DtMovimientos.NewRow
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero) dr("IdCtaContable") = IdCtaContable
Dim dr As DataRow = DtMovimientos.NewRow dr("CveCuenta") = DdlCuentaContableE.SelectedValue
dr("IdCtaContable") = IdCtaContable 'dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
dr("CveCuenta") = DdlCuentaContableE.SelectedValue dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
'dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("Concepto") = TxtConceptoE.Text
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("Referencia") = TxtReferenciaE.Text
dr("Concepto") = TxtConceptoE.Text dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, False, True)
dr("Referencia") = TxtReferenciaE.Text dr("Cargo") = TxtCargoE.Text.ToDouble
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, 0, 1) dr("Abono") = TxtAbonoE.Text.ToDouble
dr("Cargo") = TxtCargoE.Text.ToDouble dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, TxtCargoE.Text.ToDouble, TxtAbonoE.Text.ToDouble)
dr("Abono") = TxtAbonoE.Text.ToDouble dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, TxtCargoE.Text.ToDouble, TxtAbonoE.Text.ToDouble) dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text dr("CveCompra") = DdlComprasE.SelectedValue.ToEntero
dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
dr("CveCompra") = DdlComprasE.SelectedValue.ToEntero dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString() dr("Modificado") = True
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
dr("Modificado") = True
If DdlPorcentajeIVAE.Visible Then
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
End If
DtMovimientos.Rows.Add(dr)
DtMovimientos.AcceptChanges()
If CvePrePoliza > 0 Or CvePrePolizaOrigen Then
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
End If
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
UpTotalCargo.Update()
UpTotalAbono.Update()
Else
'Dim dr As DataRow = DtMovimientos.NewRow
'Dim CodigoCuenta As String = ""
'Dim NombreCuenta As String = ""
'dr("IdCuenta") = DdlCtaContableE.SelectedValue
'If DdlCtaContableE.SelectedValue.ToEntero > 0 Then
' Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", DdlCtaContableE.SelectedValue))
' If drr IsNot Nothing Then
' CodigoCuenta = drr("CuentaFormato").ToString()
' NombreCuenta = drr("Nombre").ToString()
' End If
'End If
'dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
'dr("Cuenta") = DdlConceptosContablesE.SelectedItem.Text
'dr("Referencia") = TxtReferenciaE.Text
'dr("Concepto") = TxtConceptoE.Text
'dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, 0, 1)
'dr("EsComodin") = 0
'dr("CveConcepto") = DdlConceptosContablesE.SelectedValue
'dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
'dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
'dr("Cargo") = TxtCargoE.Text.ToDouble
'dr("Abono") = TxtAbonoE.Text.ToDouble
''dr("Descripcion") = TxtDescripcionE.Text
'dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
'dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero
'dr("CveCompra") = DdlComprasE.SelectedValue.ToEntero
'dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
'dr("CveClasificacion") = -1
'dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
'dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
'TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbonoE.Text.ToDouble).ToString.FormatoNumero
'TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargoE.Text.ToDouble).ToString.FormatoNumero
'DtMovimientos.Rows.Add(dr)
'DtMovimientos.AcceptChanges()
'GvMov.DataSource = DtMovimientos
'GvMov.DataBind()
'UPMovs.Update()
'Actualizar = False
If DdlPorcentajeIVAE.Visible Then
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
End If End If
DtMovimientos.Rows.Add(dr)
DtMovimientos.AcceptChanges()
If CvePrePoliza > 0 Or CvePrePolizaOrigen Then
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Visible = True
End If
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
UpTotalCargo.Update()
UpTotalAbono.Update()
RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
Else Else
Dim CvePrePolizaDetalle As Integer = GvPrePoliza.DataKeys(IndiceGrid).Value.ToString.ToEntero Dim CvePrePolizaDetalle As Integer = GvPrePoliza.DataKeys(IndiceGrid).Value.ToString.ToEntero
Dim Rows As DataRow() = DtMovimientos.Select("CvePrePolizaDetalle = " & CvePrePolizaDetalle) Dim Rows As DataRow() = DtMovimientos.Select("CvePrePolizaDetalle = " & CvePrePolizaDetalle)
If CvePrePolizaDetalle <= 0 Then
If Rows.Count > 0 Then Dim IdMov As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("IdMov").ToEntero
Dim dr As DataRow = Rows(0) Rows = DtMovimientos.Select("IdMov = " & IdMov)
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
dr("IdCtaContable") = IdCtaContable
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
dr("Concepto") = TxtConceptoE.Text
dr("Referencia") = TxtReferenciaE.Text
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, 0, 1)
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, TxtCargoE.Text.ToDouble, TxtAbonoE.Text.ToDouble)
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero
dr("CveCompra") = DdlComprasE.SelectedValue.ToEntero
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
dr("Modificado") = True
dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
dr("TC") = TxtModalConceptoTipoCambio.Text.ToDecimal
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToString.ToDecimal
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnConceptoContable").Value = DdlConceptosContablesE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnProveedor").Value = DdlProveedoresE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnCompra").Value = DdlComprasE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnPersonal").Value = DdlPersonalE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnCliente").Value = DdlClientesE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnVenta").Value = DdlVentasE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnSubProyecto").Value = DdlSubProyectoE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnTipoGasto").Value = DdlTipoGastoE.SelectedValue.ToEntero
'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnCtaContable").Value = DdlCtaContableE.SelectedValue.ToEntero
If TxtCargoE.Text <> "" Then
dr("Cargo") = TxtCargoE.Text.ToDouble
dr("Abono") = "".ToDouble
Else
dr("Abono") = TxtAbonoE.Text.ToDouble
dr("Cargo") = "".ToDouble
End If
DtMovimientos.AcceptChanges()
GvPrePoliza.EditIndex = -1
If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
End If
GvPrePoliza.Columns(11).Visible = True
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
UpTotalCargo.Update()
UpTotalAbono.Update()
End If End If
RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal") If Rows.Count > 0 Then
End If Dim dr As DataRow = Rows(0)
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
dr("IdCtaContable") = IdCtaContable
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
dr("Concepto") = TxtConceptoE.Text
dr("Referencia") = TxtReferenciaE.Text
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, False, True)
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, TxtCargoE.Text.ToDouble, TxtAbonoE.Text.ToDouble)
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero
dr("CveCompra") = DdlComprasE.SelectedValue.ToEntero
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
dr("Modificado") = True
dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
UpPrePoliza.Update() dr("TC") = TxtTipoCambio.Text.ToDecimal
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
If TxtCargoE.Text <> "" Then
dr("Cargo") = TxtCargoE.Text.ToDouble
dr("Abono") = "".ToDouble
Else
dr("Abono") = TxtAbonoE.Text.ToDouble
dr("Cargo") = "".ToDouble
End If
DtMovimientos.AcceptChanges()
GvPrePoliza.EditIndex = -1
'If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
GvPrePoliza.Visible = True
'End If
GvPrePoliza.Columns(11).Visible = True
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
UpTotalCargo.Update()
UpTotalAbono.Update()
End If
RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
End If
UpPrePoliza.Update()
End Sub End Sub
Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting
@@ -1913,7 +1795,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("Cuenta") = DdlConceptosContables.SelectedItem dr("Cuenta") = DdlConceptosContables.SelectedItem
dr("Referencia") = TxtReferencia.Text dr("Referencia") = TxtReferencia.Text
dr("Concepto") = TxtConcepto.Text dr("Concepto") = TxtConcepto.Text
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, False, True)
dr("EsComodin") = 0 dr("EsComodin") = 0
dr("CveConcepto") = DdlConceptosContables.SelectedValue dr("CveConcepto") = DdlConceptosContables.SelectedValue
dr("Cargo") = TxtCargo.Text.ToDouble dr("Cargo") = TxtCargo.Text.ToDouble
@@ -1943,7 +1825,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
dr("Concepto") = TxtDescripcion.Text dr("Concepto") = TxtDescripcion.Text
dr("Referencia") = TxtReferencia.Text dr("Referencia") = TxtReferencia.Text
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, False, True)
dr("Cargo") = TxtCargo.Text.ToDouble dr("Cargo") = TxtCargo.Text.ToDouble
dr("Abono") = TxtAbono.Text.ToDouble dr("Abono") = TxtAbono.Text.ToDouble
dr("ImporteMN") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, TxtCargo.Text.ToDouble, TxtAbono.Text.ToDouble) dr("ImporteMN") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, TxtCargo.Text.ToDouble, TxtAbono.Text.ToDouble)
@@ -1985,7 +1867,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("Cuenta") = DdlConceptosContables.SelectedItem.Text dr("Cuenta") = DdlConceptosContables.SelectedItem.Text
dr("Referencia") = TxtReferencia.Text dr("Referencia") = TxtReferencia.Text
dr("Concepto") = TxtConcepto.Text dr("Concepto") = TxtConcepto.Text
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, False, True)
dr("EsComodin") = 0 dr("EsComodin") = 0
dr("CveConcepto") = DdlConceptosContables.SelectedValue dr("CveConcepto") = DdlConceptosContables.SelectedValue
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
@@ -2006,12 +1888,6 @@ Partial Class ContabilidadC_RegPrePolizaS
DtMovimientos.Rows.Add(dr) DtMovimientos.Rows.Add(dr)
DtMovimientos.AcceptChanges() DtMovimientos.AcceptChanges()
'If CvePrePoliza > 0 Then
' GvPrePoliza.DataSource = DtMovimientos
' GvPrePoliza.DataBind()
' UpPrePoliza.Update()
'End If
GvMov.DataSource = DtMovimientos GvMov.DataSource = DtMovimientos
GvMov.DataBind() GvMov.DataBind()
UPMovs.Update() UPMovs.Update()
@@ -2140,7 +2016,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Next Next
UpPrePoliza.Update() UpPrePoliza.Update()
End If End If
If UPMovs.Visible Then If divMovtos.Visible Then
For Each Gvr As GridViewRow In GvMov.Rows For Each Gvr As GridViewRow In GvMov.Rows
Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue) Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue)
Next Next
@@ -2217,58 +2093,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
UPPDocumento.Update()
DivAgregarConceptos.Visible = True
'If DtMovimientos Is Nothing Then CreaDT()
'Dim dr As DataRow = DtMovimientos.NewRow
'Dim CodigoCuenta As String = ""
'Dim NombreCuenta As String = ""
'dr("IdCuenta") = DdlCtaContable.SelectedValue
'If DdlCtaContable.SelectedValue.ToEntero > 0 Then
' Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", DdlCtaContable.SelectedValue))
' If drr IsNot Nothing Then
' CodigoCuenta = drr("CuentaFormato").ToString()
' NombreCuenta = drr("Nombre").ToString()
' End If
'End If
'dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
'dr("Cuenta") = DdlConceptosContables.SelectedItem
'dr("Referencia") = TxtReferencia.Text
'dr("Concepto") = TxtObservaciones.Text
'dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1)
'dr("EsComodin") = 0
'dr("CveConcepto") = DdlConceptosContables.SelectedValue
'dr("Cargo") = TxtCargo.Text.ToDouble
'dr("Abono") = TxtAbono.Text.ToDouble
'dr("Descripcion") = TxtDescripcion.Text
'dr("CveSubProyecto") = DdlSubProyecto.SelectedValue
'dr("CveProveedor") = DdlProveedores.SelectedValue.ToEntero
'dr("CveCompra") = DdlCompras.SelectedValue.ToEntero
'dr("CvePersonal") = DdlPersonal.SelectedValue.ToEntero
'dr("CveClasificacion") = -1
'dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
'dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
'TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbono.Text.ToDouble).ToString.FormatoNumero
'TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargo.Text.ToDouble).ToString.FormatoNumero
'DtMovimientos.Rows.Add(dr)
'If CvePrePoliza > 0 Then
' GvPrePoliza.DataSource = DtMovimientos
' GvPrePoliza.DataBind()
'End If
'GvMov.DataSource = DtMovimientos
'GvMov.DataBind()
'UPMovs.Update()
End Sub End Sub
Private Sub LbCancelarEdicion_Click(sender As Object, e As EventArgs) Handles LbCancelarEdicion.Click Private Sub LbCancelarEdicion_Click(sender As Object, e As EventArgs) Handles LbCancelarEdicion.Click
@@ -2959,9 +2783,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'divDatosPrincipales.Visible = False 'divDatosPrincipales.Visible = False
'divObservaciones.Visible = False 'divObservaciones.Visible = False
UPMovs.Visible = False
UPMovs.Update()
UPPDocumento.Update()
UpPrePoliza.Update() UpPrePoliza.Update()
RegistraScript("comparar();") RegistraScript("comparar();")
@@ -2991,7 +2813,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub End Sub
Private Sub CrarPrePolizaApartirDe() Private Sub CrearPrePolizaApartirDe()
Dim CvePrePoliza As Integer Dim CvePrePoliza As Integer
Dim FolioPoliza As Integer Dim FolioPoliza As Integer
@@ -3134,9 +2956,6 @@ Partial Class ContabilidadC_RegPrePolizaS
MsgError = ObjMov.MensajePolizaDescuadre MsgError = ObjMov.MensajePolizaDescuadre
End If End If
End If End If
Else Else
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
@@ -3160,8 +2979,6 @@ Partial Class ContabilidadC_RegPrePolizaS
ObjIE.Commit() ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit() If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = "" TxtConcepto.Text = ""
GvMov.DataBind() GvMov.DataBind()
TxtFechaDocumento.Text = "" TxtFechaDocumento.Text = ""

View File

@@ -493,8 +493,6 @@
<div class="col-md-6 col-sm-6" runat="server" id="DVDescargasBDH" visible="false"> <div class="col-md-6 col-sm-6" runat="server" id="DVDescargasBDH" visible="false">
<div class="portlet light "> <div class="portlet light ">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption"> <div class="caption">
@@ -510,20 +508,18 @@
</div> </div>
<div class="portlet-body" style="font-style:normal;font-weight:bold"> <div class="portlet-body" style="font-style:normal;font-weight:bold">
<asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc1" NavigateUrl="~/Documentacion/140/AMERICA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> AMERICA</asp:HyperLink> <asp:HyperLink ID="LnkDoc1" NavigateUrl="Empresas\140\DocElectronica\Precios\AMERICA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> AMERICA</asp:HyperLink>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc2" NavigateUrl="~/Documentacion/140/CRONOS.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> CRONOS</asp:HyperLink> <asp:HyperLink ID="LnkDoc2" NavigateUrl="Empresas\140\DocElectronica\Precios\CRONOS.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> CRONOS</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
@@ -531,12 +527,12 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc3" NavigateUrl="~/Documentacion/140/DIENER.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> DIENER</asp:HyperLink> <asp:HyperLink ID="LnkDoc3" NavigateUrl="Empresas\140\DocElectronica\Precios\DIENER.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> DIENER</asp:HyperLink>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc4" NavigateUrl="~/Documentacion/140/FULLPOWER.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> FULL POWER</asp:HyperLink> <asp:HyperLink ID="LnkDoc4" NavigateUrl="Empresas\140\DocElectronica\Precios\FULLPOWER.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> FULL POWER</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
@@ -545,12 +541,12 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc5" NavigateUrl="~/Documentacion/140/LTHAGM.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH AGM</asp:HyperLink> <asp:HyperLink ID="LnkDoc5" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHAGM.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH AGM</asp:HyperLink>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc6" NavigateUrl="~/Documentacion/140/LTHESPECIALES.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH ESPECIALES</asp:HyperLink> <asp:HyperLink ID="LnkDoc6" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHESPECIALES.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH ESPECIALES</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
@@ -558,12 +554,12 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc7" NavigateUrl="~/Documentacion/140/LTHHEAVYDUTY.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH HEAVY DUTY</asp:HyperLink> <asp:HyperLink ID="LnkDoc7" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHHEAVYDUTY.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH HEAVY DUTY</asp:HyperLink>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc8" NavigateUrl="~/Documentacion/140/LTHHI-TEC.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH HI-TEC</asp:HyperLink> <asp:HyperLink ID="LnkDoc8" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHHI-TEC.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH HI-TEC</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
@@ -572,50 +568,66 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc9" NavigateUrl="~/Documentacion/140/LTHSUV-VAN-MINIVAN.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH SUV-VAN-MINIVAN</asp:HyperLink> <asp:HyperLink ID="LnkDoc9" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHSUV-VAN-MINIVAN.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH SUV-VAN-MINIVAN</asp:HyperLink>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc10" NavigateUrl="~/Documentacion/140/LTHTAXI.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH TAXI</asp:HyperLink> <asp:HyperLink ID="LnkDoc10" NavigateUrl="Empresas\140\DocElectronica\Precios\LTHTAXI.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH TAXI</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc11" NavigateUrl="Empresas\140\DocElectronica\Precios\LTH.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH</asp:HyperLink>
</div>
</div>
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc12" NavigateUrl="Empresas\140\DocElectronica\Precios\OPTIMA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> OPTIMA</asp:HyperLink>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc14" NavigateUrl="Empresas\140\DocElectronica\Precios\FiltrosPisos.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> FILTROS PISOS
</asp:HyperLink>
</div>
</div>
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc15" NavigateUrl="Empresas\140\DocElectronica\Precios\FiltrosMayoreo.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> FILTROS MAYOREO
</asp:HyperLink>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc11" NavigateUrl="~/Documentacion/140/LTH.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTH</asp:HyperLink> <asp:HyperLink ID="LnkDoc16" NavigateUrl="Empresas\140\DocElectronica\Precios\MOTOBATERIASLTH.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> MOTOBATERIAS LTH
</asp:HyperLink>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc12" NavigateUrl="~/Documentacion/140/OPTIMA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> OPTIMA</asp:HyperLink> <asp:HyperLink ID="LnkDoc17" NavigateUrl="Empresas\140\DocElectronica\Precios\MOTOBATERIASOPTIMA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> MOTOBATERIAS AMERICA
</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc13" NavigateUrl="~/Documentacion/140/CatAPSAGM-HT-LTH-CR 2021.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> Cat APS AGM-HT-LTH-CR 2021</asp:HyperLink> <asp:HyperLink ID="LnkDoc13" NavigateUrl="Empresas\140\DocElectronica\Precios\CatAPSAGM-HT-LTH-CR 2021.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> Cat APS AGM-HT-LTH-CR 2021</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>
</div> </div>
@@ -1401,7 +1413,6 @@
</Columns> </Columns>
</asp:GridView> </asp:GridView>
<br /> <br />
<br />
<div class="text-center"> <div class="text-center">
</div> </div>
</asp:Panel> </asp:Panel>

View File

@@ -231,7 +231,6 @@ Partial Class Inicio
'Evaluacion del proveedor 'Evaluacion del proveedor
CargaEvaluacionProveedor() CargaEvaluacionProveedor()
If UsuarioActual.CveEmpresa = 140 Then If UsuarioActual.CveEmpresa = 140 Then
DVDescargasBDH.Visible = True DVDescargasBDH.Visible = True
End If End If

View File

@@ -221,7 +221,7 @@
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-1" style="text-align:left!important"> <div class="col-md-1" style="text-align:left!important">
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" /> <asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" Visible="false" />
</div> </div>
</div> </div>
<div class="row rowpadding"> <div class="row rowpadding">
@@ -232,7 +232,7 @@
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-1" style="text-align:left!important"> <div class="col-md-1" style="text-align:left!important">
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" /> <asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" visible="false" />
</div> </div>
</div> </div>

View File

@@ -958,12 +958,12 @@ Partial Class Inventarios_CartaPorteManual
Using ObjInv As New ClsInventarios Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus:=1) Then
DdlUnidadCamion.DataSource = ObjInv.DtResultados DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados DdlRemolque1.DataSource = ObjInv.DtResultados
End If End If
@@ -1508,7 +1508,7 @@ Partial Class Inventarios_CartaPorteManual
DvRemolque2.Visible = True DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}") DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If End If
End Using End Using

View File

@@ -31,7 +31,8 @@
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer,Estatus"
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None"> EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
@@ -41,7 +42,7 @@
<asp:BoundField HeaderText="Permiso SCT" DataField="NumPermisoSCT" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Permiso SCT" DataField="NumPermisoSCT" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Aseguradora" DataField="NombreAseguradora" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Aseguradora" DataField="NombreAseguradora" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Estatus" DataField="EstatuStr" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" /> <asp:BoundField HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Usuario" DataField="Usuario" /> <asp:BoundField HeaderText="Usuario" DataField="Usuario" />
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar"> <asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
@@ -249,7 +250,8 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" id="Div1"> <div class="form-group form-md-line-input input-iconright" runat="server" id="Div1">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveProveedor" DataTextField="RazonSocial" Style="padding: 0px"> <asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveProveedor" DataTextField="RazonSocial" Style="padding: 0px">
</asp:DropDownList> </asp:DropDownList>
@@ -258,6 +260,14 @@
<i></i> <i></i>
</div> </div>
</div> </div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server">
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
</div>
</div>
</div> </div>
<%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%> <%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%>

View File

@@ -37,10 +37,9 @@ Partial Class Inventarios_CatUnidades
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) Then If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus:=-1) Then
GvDatos.DataSource = ObjInventarios.DtResultados GvDatos.DataSource = ObjInventarios.DtResultados
Else Else
GvDatos.DataSource = Nothing GvDatos.DataSource = Nothing
@@ -110,6 +109,7 @@ Partial Class Inventarios_CatUnidades
TxtNumeroTrailer.Text = "" TxtNumeroTrailer.Text = ""
TxtSCAC.Text = "" TxtSCAC.Text = ""
TxtCAAT.Text = "" TxtCAAT.Text = ""
ChkEstatus.Checked = False
RdTipoUnidad.SelectedValue = "1" RdTipoUnidad.SelectedValue = "1"
LtlTituloModal.Text = "Agregar Unidad" LtlTituloModal.Text = "Agregar Unidad"
@@ -153,6 +153,7 @@ Partial Class Inventarios_CatUnidades
TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion") TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion")
TxtSCAC.Text = GvRow.DataKey("SCAC") TxtSCAC.Text = GvRow.DataKey("SCAC")
TxtCAAT.Text = GvRow.DataKey("CAAT") TxtCAAT.Text = GvRow.DataKey("CAAT")
ChkEstatus.Checked = If(Boolean.Parse(GvRow.DataKey("Estatus")), True, False)
'ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2") 'ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2")
@@ -206,14 +207,14 @@ Partial Class Inventarios_CatUnidades
If CveCamion <= 0 Then If CveCamion <= 0 Then
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
Alert("Unidad agregada correctamente") Alert("Unidad agregada correctamente")
Else Else
ErrorPrceso = True ErrorPrceso = True
End If End If
Else Else
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
Alert("Unidad actualizada correctamente") Alert("Unidad actualizada correctamente")
Using objbase = New ClsClaseBase() Using objbase = New ClsClaseBase()
objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue)) objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue))

View File

@@ -36,6 +36,14 @@ Partial Class Inventarios_RecepcionAlmacen
ViewState("ValidaLoteCaducidad") = value ViewState("ValidaLoteCaducidad") = value
End Set End Set
End Property End Property
Private Property CveTipoAlmacen As Integer
Get
Return CType(ViewState("CveTipoAlmacen"), Integer)
End Get
Set(value As Integer)
ViewState("CveTipoAlmacen") = value
End Set
End Property
Private Property DtInv As DataTable Private Property DtInv As DataTable
Get Get
If ViewState("DtInv") Is Nothing Then If ViewState("DtInv") Is Nothing Then
@@ -557,18 +565,26 @@ Partial Class Inventarios_RecepcionAlmacen
End Sub End Sub
Private Sub RecargaporAlmacenes() Private Sub RecargaporAlmacenes()
CveTipoAlmacen = -1
If DdlAlmacen.SelectedValue <> "-1" Then If DdlAlmacen.SelectedValue <> "-1" Then
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero Dim drr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
'RMF condición temporal If drr IsNot Nothing Then
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyecto.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then '("CveSubProyecto").ToEntero
ValidaLoteCaducidad = True Dim CveSubProyecto As Integer = drr("CveSubProyecto").ToString.ToEntero
Else 'RMF condición temporal
ValidaLoteCaducidad = False 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
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
@@ -1421,6 +1437,16 @@ Partial Class Inventarios_RecepcionAlmacen
e.Row.FCCheckBox("cbInv").Enabled = False e.Row.FCCheckBox("cbInv").Enabled = False
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
'' Empresa Acumuladores
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If CveTipoAlmacen = 21 Then
e.Row.FCButton("BtnSerie").Visible = False
e.Row.FCTextBox("TbCantidadF").Enabled = True
e.Row.FCCheckBox("cbInv").Enabled = True
End If
End If
'ElseIf e.Row.DBCampo("CveMetodoInventario").ToString = "6" Then 'ElseIf e.Row.DBCampo("CveMetodoInventario").ToString = "6" Then
' e.Row.FCButton("BtnLote").Visible = True ' e.Row.FCButton("BtnLote").Visible = True
' e.Row.FCButton("BtnLote").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PU"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec")) ' e.Row.FCButton("BtnLote").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PU"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec"))

View File

@@ -279,7 +279,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{ {
ClsInventarios ObjInventarios = new ClsInventarios(); ClsInventarios ObjInventarios = new ClsInventarios();
if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) && ObjInventarios.DtResultados.Rows.Count > 0) if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa,Estatus:1) && ObjInventarios.DtResultados.Rows.Count > 0)
{ {
DdlModalCamion.DataSource = ObjInventarios.DtResultados; DdlModalCamion.DataSource = ObjInventarios.DtResultados;
} }
@@ -532,11 +532,16 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{ {
//regenero el tmbre //regenero el timbre
if (TimbreTipoDocto == "Tra") if (TimbreTipoDocto == "Tra")
{ {
CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true); CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
} }
//regenero el timbre
if (TimbreTipoDocto == "Ent")
{
CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
}
ProcesoOK = true; ProcesoOK = true;
} }
} }
@@ -829,7 +834,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
using (ClsInventarios ObjInv = new ClsInventarios()) using (ClsInventarios ObjInv = new ClsInventarios())
{ {
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2)) if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2,Estatus:1))
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}"); DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
} }
try try
@@ -868,10 +873,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
using (ClsInventarios ObjInv = new ClsInventarios()) using (ClsInventarios ObjInv = new ClsInventarios())
{ {
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1)) if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus : 1))
DdlModalCamion.DataSource = ObjInv.DtResultados; DdlModalCamion.DataSource = ObjInv.DtResultados;
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2)) if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1))
DdlRemolque1.DataSource = ObjInv.DtResultados; DdlRemolque1.DataSource = ObjInv.DtResultados;
} }

View File

@@ -2255,6 +2255,27 @@ Partial Class Inventarios_TraspasoAlmacen
Exit For Exit For
End If End If
Next Next
If Not ErrorMovInv Then
Dim Concepto As String = TxtObservaciones.Text
If Concepto = "" Then Concepto = "Traspaso"
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TA22", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtualEntrada, UsuarioActual.CveEmpresa) Then
Dim resultado As DataTable = ObjInventario.DtResultados
Dim importe As Decimal = resultado.SUMD("Total").RoundAD
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoVirtualEntrada, ImporteMX:=importe, Contabilizable:=False) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoVirtualEntrada, ImporteMX:=importe, Contabilizable:=False) Then
ErrorMovInv = True
End If
End If
End If
End If End If
Else Else
@@ -3023,12 +3044,12 @@ Partial Class Inventarios_TraspasoAlmacen
Using ObjInv As New ClsInventarios Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
DdlUnidadCamion.DataSource = ObjInv.DtResultados DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados DdlRemolque1.DataSource = ObjInv.DtResultados
End If End If
@@ -3334,7 +3355,7 @@ Partial Class Inventarios_TraspasoAlmacen
DvRemolque2.Visible = True DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}") DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If End If
End Using End Using

View File

@@ -1068,7 +1068,7 @@ Partial Class Ventas_ClientesAbonar
End If End If
'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo
FluctuacionAnticipo = ((TCP - tipoCambioVenta) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL FluctuacionAnticipo = ((TCP - tipoCambioVenta) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVenta) MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVenta, gvr.DataKey("SerieFolio").ToString)
End If End If
@@ -1450,7 +1450,7 @@ Partial Class Ventas_ClientesAbonar
If RblTipoPago.SelectedValue = "3" AndAlso MsgError = "" Then If RblTipoPago.SelectedValue = "3" AndAlso MsgError = "" Then
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, CveIE, TxtImporte.Text.ToDecimal, tipoCambioPago, tipoCambioVenta) MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, CveIE, TxtImporte.Text.ToDecimal, tipoCambioPago, tipoCambioVenta, TxtObservaciones.Text)
'If CveMonedaPago = 2 Then 'If CveMonedaPago = 2 Then
' 'rmf faltan las cuentas ' 'rmf faltan las cuentas
@@ -1684,7 +1684,7 @@ Partial Class Ventas_ClientesAbonar
End Sub End Sub
Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, tipoCambioVenta As Decimal) As String Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, tipoCambioVenta As Decimal, Referencia As String) As String
Dim MsgError As String = "" Dim MsgError As String = ""
If CveMonedaPago = 2 Then If CveMonedaPago = 2 Then
'rmf faltan las cuentas 'rmf faltan las cuentas
@@ -1695,11 +1695,11 @@ Partial Class Ventas_ClientesAbonar
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, CveCliente, ImporteMX:=Importe, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe, TxtObservaciones.Text, 92, Referencia, TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, CveCliente, ImporteMX:=Importe, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), TxtObservaciones.Text, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), Referencia, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If

View File

@@ -697,7 +697,7 @@ Partial Class PV
Get Get
Return New Dictionary(Of Integer, Decimal) From { Return New Dictionary(Of Integer, Decimal) From {
{20516, 0.23D}, 'Descuento para lubricantes LTH {20516, 0.23D}, 'Descuento para lubricantes LTH
{20515, 0.274D} 'Descuento para filtros LTH {20515, 0.25D} 'Descuento para filtros LTH
} }
End Get End Get
End Property End Property

View File

@@ -12030,13 +12030,13 @@ Partial Class Ventas
factura.Alfa3 = "DEV" factura.Alfa3 = "DEV"
factura.DevolucionImportePagado = ObjFacturaNC.Total / ObjFacturaNC.PagadoBancos 'falta tomar el dato factura.DevolucionImportePagado = ObjFacturaNC.Total / ObjFacturaNC.PagadoBancos 'falta tomar el dato
End If End If
Dim tCvePlantillaPoliza As Integer = factura.CvePlantillaPoliza Dim tCveTipoPoliza As Integer = -1
If UsuarioActual.CveEmpresa = 140 Then If UsuarioActual.CveEmpresa = 140 Then
tCvePlantillaPoliza = 1 ' que sea siempre ingreso. tCveTipoPoliza = 1 ' que sea siempre ingreso.
End If End If
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", tCvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa, CveTipoPoliza:=tCveTipoPoliza)
Dim RFCReceptor As String = "" Dim RFCReceptor As String = ""
@@ -16800,84 +16800,14 @@ Partial Class Ventas
End If End If
'SUGIERE PRECIO 'SUGIERE PRECIO
Dim PrecioSugerido = 0.0 Dim PrecioSugerido As Decimal = 0
PrecioSugerido = drPS("Precio").ToString().ToDouble Dim tPrecioSugerido As Decimal = 0
tPrecioSugerido = drPS("Precio").ToString().ToDecimal
PrecioSugerido = CalculaPrecioSugerido(CvePSParametro, drPS("CveClasificacion").ToString().ToEntero())
If UsuarioActual.CveEmpresa.Contiene(1) Then If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPorcentajeProductos(CveCliente) Then
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
If PrecioAplicado > 0 Then
PrecioSugerido = PrecioAplicado
End If
End If
ObjPS.Dispose()
End If
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
' si es 10. primero el cliente
Dim CvePrecioListaPS As Integer
Dim PorcentajePrecio As Double = 0
If TipoPrecioLista = 10 Then
CvePrecioListaPS = Me.CvePrecioListaCliente 'GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
End If
Else
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = Me.CvePrecioListaCliente 'GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
End If
End If
If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
End If
ObjPS.Dispose()
End If
If PrecioSugerido = 0 Then
Dim ObjInventarios As New ClsInventarios
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
ObjInventarios.Dispose()
If CostoPS > 0 And PorcentajePrecio > 0 Then
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
End If
End If
CvePrecioLista = CvePrecioListaPS
End If
'Dim ObjClasificaciones As New ClsClasificaciones
'If ObjClasificaciones.GetClasificaciones() Then
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
'End If
If PrecioSugerido > 0 Then
Dim PrecioBaseCosto As Decimal = 0
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
If PrecioBaseCosto > 0 Then
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
End If
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
If IsNumeric(TxtCantidad.Text.Trim) Then If IsNumeric(TxtCantidad.Text.Trim) Then
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2) LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
@@ -16912,6 +16842,76 @@ Partial Class Ventas
UpPS.Update() UpPS.Update()
End Sub End Sub
Private Function CalculaPrecioSugerido(CvePSParametro As Integer, CveClasificacion As Integer) As Decimal
Dim PrecioSugerido As Decimal = 0
If UsuarioActual.CveEmpresa.Contiene(1) Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPorcentajeProductos(CveCliente) Then
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDecimal
If PrecioAplicado > 0 Then
PrecioSugerido = PrecioAplicado
End If
End If
ObjPS.Dispose()
End If
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
' si es 10. primero el cliente
Dim CvePrecioListaPS As Integer
Dim PorcentajePrecio As Decimal = 0
If TipoPrecioLista = 10 Then
CvePrecioListaPS = Me.CvePrecioListaCliente
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
End If
Else
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = Me.CvePrecioListaCliente 'GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
End If
End If
If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
End If
ObjPS.Dispose()
End If
If PrecioSugerido = 0 Then
Dim ObjInventarios As New ClsInventarios
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
ObjInventarios.Dispose()
If CostoPS > 0 And PorcentajePrecio > 0 Then
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
End If
End If
CvePrecioLista = CvePrecioListaPS
End If
If PrecioSugerido > 0 Then
Dim PrecioBaseCosto As Decimal = 0
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
If PrecioBaseCosto > 0 Then
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If
End If
Return PrecioSugerido
End Function
Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS) DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS)
End Sub End Sub
@@ -18127,15 +18127,6 @@ Partial Class Ventas
Row("Orden") = ConsecutivoActual + 1 Row("Orden") = ConsecutivoActual + 1
End If End If
Row("Cantidad") = Cantidad
Row("CveUM") = CveUM
Row("UM") = UM
Row("CveClasificacion") = CveClasificacion
Row("Clasificacion") = Clasificacion
Row("CvePS") = CvePS
Row("Obs") = Obs
Dim DrPS As DataRow = Nothing Dim DrPS As DataRow = Nothing
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1 DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
@@ -18179,6 +18170,14 @@ Partial Class Ventas
End If End If
End If End If
Row("Cantidad") = Cantidad
Row("CveUM") = CveUM
Row("UM") = DrPS("UnidadMedida")
Row("CveClasificacion") = DrPS("CveClasificacion")
Row("Clasificacion") = DrPS("Clasificacion")
Row("CvePS") = CvePS
Row("Obs") = Obs
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS 'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS)) Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
@@ -24284,6 +24283,7 @@ Partial Class Ventas
Dim Observaciones As String = Row("Observaciones").ToString().Trim.ToUpper Dim Observaciones As String = Row("Observaciones").ToString().Trim.ToUpper
Dim TiempoEntrega As String = Row("Tiempo Entrega").ToString() Dim TiempoEntrega As String = Row("Tiempo Entrega").ToString()
Dim CvePS As Integer = 0 Dim CvePS As Integer = 0
Dim CveClasificacion As Integer = 0
Dim CveUM As Integer = 0 Dim CveUM As Integer = 0
Dim CodigoPS As Integer = 0 Dim CodigoPS As Integer = 0
Dim DrProyecto As DataRow Dim DrProyecto As DataRow
@@ -24311,7 +24311,7 @@ Partial Class Ventas
If ObjPS.CvePS > 0 Then If ObjPS.CvePS > 0 Then
CvePS = ObjPS.CvePS CvePS = ObjPS.CvePS
CveUM = ObjPS.CveUnidadMedida CveUM = ObjPS.CveUnidadMedida
CveClasificacion = ObjPS.CveClasificacion
Else Else
RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados) RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
End If End If
@@ -24320,14 +24320,6 @@ Partial Class Ventas
End If End If
End Using End Using
'Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
'If StrArray.Length > 0 Then
' If CBool(StrArray(0)) = True Then
' CvePS = StrArray(1).ToEntero()
' Else
' RowNoEncontrados &= StrArray(1) & "<\BR>"
' End If
'End If
ElseIf CodigoBarras <> "" Then ElseIf CodigoBarras <> "" Then
Using ObjPS As New ClsProductosServicios Using ObjPS As New ClsProductosServicios
@@ -24335,7 +24327,7 @@ Partial Class Ventas
If ObjPS.CvePS > 0 Then If ObjPS.CvePS > 0 Then
CvePS = ObjPS.CvePS CvePS = ObjPS.CvePS
CveUM = ObjPS.CveUnidadMedida CveUM = ObjPS.CveUnidadMedida
CveClasificacion = ObjPS.CveClasificacion
Else Else
RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados) RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
End If End If
@@ -24343,14 +24335,7 @@ Partial Class Ventas
RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados) RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
End If End If
End Using End Using
'Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c)
'If StrArray.Length > 0 Then
' If CBool(StrArray(0)) = True Then
' CvePS = StrArray(1).ToEntero()
' Else
' RowNoEncontrados &= StrArray(1) & "<\BR>"
' End If
'End If
ElseIf ProductoServicio <> "" Then ElseIf ProductoServicio <> "" Then
Using ObjPS As New ClsProductosServicios Using ObjPS As New ClsProductosServicios
@@ -24358,6 +24343,7 @@ Partial Class Ventas
If ObjPS.CvePS > 0 Then If ObjPS.CvePS > 0 Then
CvePS = ObjPS.CvePS CvePS = ObjPS.CvePS
CveUM = ObjPS.CveUnidadMedida CveUM = ObjPS.CveUnidadMedida
CveClasificacion = ObjPS.CveClasificacion
Else Else
RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados) RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
End If End If
@@ -24365,50 +24351,23 @@ Partial Class Ventas
RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados) RowNoEncontrados = String.Format("{3}&nbsp;&nbsp;&nbsp;&nbsp;- No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
End If End If
End Using End Using
'Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c)
'If StrArray.Length > 0 Then
' If CBool(StrArray(0)) = True Then
' CvePS = StrArray(1).ToEntero()
' Else
' RowNoEncontrados &= StrArray(1) & "<\BR>"
' End If
'End If
Else Else
RowNoEncontrados &= "<\BR>&nbsp;&nbsp;&nbsp;&nbsp;- En la fila " & NumRow & " no se especificó código, código de barras ó descripción." RowNoEncontrados &= "<\BR>&nbsp;&nbsp;&nbsp;&nbsp;- En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
End If End If
If CvePS > 0 Then If CvePS > 0 Then
'CveUM = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"CvePS = '{CvePS}'").ToString().ToEntero()
If PrecioUnitario <= 0 Then
PrecioUnitario = CalculaPrecioSugerido(CvePS, CveClasificacion)
End If
AgregarProductoServicio(Cantidad, CveUM, UM, -1, "", AgregarProductoServicio(Cantidad, CveUM, UM, -1, "",
CvePS, HdnPS.Value, Observaciones, PrecioUnitario, HdnDescuento.Value.ToDecimal, CvePS, HdnPS.Value, Observaciones, PrecioUnitario, HdnDescuento.Value.ToDecimal,
CveProyecto, Proyecto, CveSubProyecto, SubProyecto, CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
TiempoEntrega:=TiempoEntrega) TiempoEntrega:=TiempoEntrega)
'If TmpDT IsNot Nothing Then
' Dim dr As DataRow = TmpDT.NewRow
' TxtCantidad.Text = Cantidad.ToString()
' DdlPS.SelectedValue = CvePS.ToString()
' DdlPS_SelectedIndexChanged(Nothing, Nothing)
' DdlUnidadMedida.SelectedValueExist(CveUM.ToString())
' TxtObsPS.Text = Observaciones
' DdlProyecto.SelectedValue = CveProyecto.ToString()
' DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
' DdlSubProyecto.SelectedValue = CveSubProyecto.ToString()
' TxtPrecio.Text = PrecioUnitario.ToString()
' TxtTiempoEntrega.Text = TiempoEntrega.ToString()
' RegistraScript("Recalcula();")
' LbAgregar_Click(Nothing, Nothing)
' NumAgregados = NumAgregados + 1
'End If
End If End If
Next Next
CalculaTotalesVenta() CalculaTotalesVenta()
If RowNoEncontrados.Length > 0 Then If RowNoEncontrados.Length > 0 Then
@@ -34126,12 +34085,12 @@ Partial Class Ventas
Using ObjInv As New ClsInventarios Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
DdlUnidadCamion.DataSource = ObjInv.DtResultados DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados DdlRemolque1.DataSource = ObjInv.DtResultados
End If End If
@@ -34265,7 +34224,7 @@ Partial Class Ventas
DvRemolque2.Visible = True DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}") DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If End If
End Using End Using