Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -18,9 +18,13 @@
|
||||
<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>
|
||||
</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>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||
<asp:PostBackTrigger ControlID="BtnExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -110,8 +110,31 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsadosClientes.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsadosClientes, params, "Entradas usados clientes", "PDF")
|
||||
|
||||
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)
|
||||
Dim tempLink As LinkButton = CType(sender, LinkButton)
|
||||
Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow)
|
||||
|
||||
@@ -1980,6 +1980,7 @@ Public Class ClsCompras
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
@@ -2023,6 +2024,7 @@ Public Class ClsCompras
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -996,14 +996,14 @@ Public Class ClsContabilidad
|
||||
' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "")
|
||||
'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)
|
||||
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))
|
||||
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
|
||||
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)
|
||||
Else
|
||||
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
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))
|
||||
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
|
||||
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)
|
||||
Else
|
||||
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If '
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("50015;") Then
|
||||
|
||||
@@ -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,
|
||||
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 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
|
||||
DataAdapter("PA_Inv_CamionesAdd")
|
||||
@@ -5593,6 +5593,7 @@ Public Class ClsInventarios
|
||||
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
|
||||
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
|
||||
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
End With
|
||||
Try
|
||||
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,
|
||||
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 = "",
|
||||
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
|
||||
DataAdapter("PA_Inv_CamionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5646,6 +5647,7 @@ Public Class ClsInventarios
|
||||
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
|
||||
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
|
||||
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -6956,7 +6956,22 @@ Public Class ClsPaginas
|
||||
RFCReceptor = Vta.RFCReceptor
|
||||
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 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)
|
||||
|
||||
|
||||
@@ -5548,7 +5548,7 @@ Public Class Timbrado
|
||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
|
||||
|
||||
EmisorRFC = "EKU9003173C9"
|
||||
UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE SA DE CV"
|
||||
UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE"
|
||||
ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key"
|
||||
ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer"
|
||||
|
||||
|
||||
@@ -122,8 +122,8 @@ Public Class Timbres
|
||||
Dim DtMovimientos As DataTable = Nothing
|
||||
Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
|
||||
|
||||
Timbre.Receptor.RFC = drT("DestinatarioRFC").ToString
|
||||
Timbre.Receptor.Nombre = drT("DestinatarioNombre").ToString
|
||||
Timbre.Receptor.RFC = drT("EmpresaRFC").ToString
|
||||
Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = drT("DirDesCP").ToString
|
||||
Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
|
||||
|
||||
@@ -166,8 +166,14 @@ Public Class Timbres
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").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.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
|
||||
@@ -204,104 +210,109 @@ Public Class Timbres
|
||||
.Municipio = drT("DirDesClaveSATMunicipio").ToString,
|
||||
.Localidad = drT("DirDesClaveSATLocalidad").ToString}
|
||||
|
||||
|
||||
Dim Ubica As New CFDICartaPorteUbicacion
|
||||
Ubica.TipoEstacion = ""
|
||||
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",
|
||||
.NombreRemitenteDestinatario = drT("RemitenteNombre").ToString,
|
||||
.Domicilio = DomOrigen}
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString,
|
||||
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
|
||||
.NombreRemitenteDestinatario = drT("DestinatarioNombre").ToString,
|
||||
.Domicilio = DomDestino,
|
||||
.DistanciaRecorrida = Distancia}
|
||||
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
CartaPorte.FiguraTransporte.ClaveTransporte = "01"
|
||||
|
||||
Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString,
|
||||
.NumeroExterior = drT("FiguraNumeroExterior").ToString,
|
||||
.NumeroInterior = drT("FiguraNumeroInterior").ToString,
|
||||
.Colonia = drT("FiguraClaveSATColonia").ToString,
|
||||
.Municipio = drT("FiguraClaveSATMunicipio").ToString,
|
||||
.Estado = drT("FiguraClaveSATEstado").ToString,
|
||||
.CP = drT("FiguraCP").ToString}
|
||||
|
||||
|
||||
|
||||
CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
|
||||
.RFCFigura = drT("FiguraRFC").ToString,
|
||||
.NombreFigura = drT("FiguraChofer").ToString,
|
||||
.NumLicencia = drT("FiguraLicencia").ToString,
|
||||
.NumRegidTribFigura = drT("FiguraNumRegidTribFigura").ToString,
|
||||
.ResidenciaFiscalFigura = drT("FiguraResidenciaFiscalFigura").ToString,
|
||||
.Domicilio = DomicilioOperador})
|
||||
|
||||
|
||||
'concepto único
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = 1,
|
||||
.Descripcion = "Traslado",
|
||||
.ValorUnitario = 0,
|
||||
.Importe = 0,
|
||||
.Descuento = 0,
|
||||
.Unidad = "Servicio",
|
||||
.ClaveUnidad = "E48",
|
||||
.ClaveProdServ = "78101802",
|
||||
.Noidentificacion = "",
|
||||
.CuentaPredial = ""}
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
Dim conceptoCarta As New CFDICartaPorteMercancia With {
|
||||
.BienesTransp = drr("SATClaveProdServ").ToString,
|
||||
.ClaveSTCC = "", 'para metodo ferroviario
|
||||
.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripción = tPS,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.Dimensiones = drr("Dimensiones").ToString,
|
||||
.PesoenKg = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal,
|
||||
.MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""),
|
||||
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
|
||||
.Embalaje = drr("ClaveEmbalaje").ToString,
|
||||
.DescripEmbalaje = drr("Embalaje").ToString,
|
||||
.ValorMercancia = drr("PU").ToString.ToDecimal,
|
||||
.Moneda = "MXN", 'temporal
|
||||
.FraccionArrancelaria = "",
|
||||
.UUIDComercioExt = ""
|
||||
}
|
||||
|
||||
Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal}
|
||||
conceptoCarta.DetalleMercancia = DetalleMercancia
|
||||
|
||||
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
|
||||
conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta)
|
||||
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
|
||||
|
||||
i += 1
|
||||
Next
|
||||
Timbre.Complementos.CartaPorte = CartaPorte
|
||||
|
||||
Else
|
||||
'' T R A S L A D O S
|
||||
|
||||
'DETALLES
|
||||
If Obj.DtDetalle IsNot Nothing Then
|
||||
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
|
||||
Ubica.TipoEstacion = ""
|
||||
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",
|
||||
.NombreRemitenteDestinatario = drT("RemitenteNombre").ToString,
|
||||
.Domicilio = DomOrigen}
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString,
|
||||
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
|
||||
.NombreRemitenteDestinatario = drT("DestinatarioNombre").ToString,
|
||||
.Domicilio = DomDestino,
|
||||
.DistanciaRecorrida = Distancia,
|
||||
.NumRegIdTrib = NumRegIdTrib}
|
||||
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
CartaPorte.FiguraTransporte.ClaveTransporte = "01"
|
||||
|
||||
Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString,
|
||||
.NumeroExterior = drT("FiguraNumeroExterior").ToString,
|
||||
.NumeroInterior = drT("FiguraNumeroInterior").ToString,
|
||||
.Colonia = drT("FiguraClaveSATColonia").ToString,
|
||||
.Municipio = drT("FiguraClaveSATMunicipio").ToString,
|
||||
.Estado = drT("FiguraClaveSATEstado").ToString,
|
||||
.CP = drT("FiguraCP").ToString}
|
||||
|
||||
|
||||
|
||||
CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
|
||||
.RFCFigura = drT("FiguraRFC").ToString,
|
||||
.NombreFigura = drT("FiguraChofer").ToString,
|
||||
.NumLicencia = drT("FiguraLicencia").ToString,
|
||||
.NumRegidTribFigura = drT("FiguraNumRegidTribFigura").ToString,
|
||||
.ResidenciaFiscalFigura = drT("FiguraResidenciaFiscalFigura").ToString,
|
||||
.Domicilio = DomicilioOperador})
|
||||
|
||||
|
||||
'concepto único
|
||||
Dim concepto As New CFDIConceptos With {.Cantidad = 1,
|
||||
.Descripcion = "Traslado",
|
||||
.ValorUnitario = 0,
|
||||
.Importe = 0,
|
||||
.Descuento = 0,
|
||||
.Unidad = "Servicio",
|
||||
.ClaveUnidad = "E48",
|
||||
.ClaveProdServ = "78101802",
|
||||
.Noidentificacion = "",
|
||||
.CuentaPredial = ""}
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
tPS = drr("Obs").ToString
|
||||
Else
|
||||
If drr("PS").ToString.Length = 0 Then
|
||||
tPS = ""
|
||||
Else
|
||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||
End If
|
||||
End If
|
||||
Dim conceptoCarta As New CFDICartaPorteMercancia With {
|
||||
.BienesTransp = drr("SATClaveProdServ").ToString,
|
||||
.ClaveSTCC = "", 'para metodo ferroviario
|
||||
.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||
.Descripción = tPS,
|
||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||
.Unidad = drr("UM").ToString,
|
||||
.Dimensiones = drr("Dimensiones").ToString,
|
||||
.PesoenKg = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal,
|
||||
.MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""),
|
||||
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
|
||||
.Embalaje = drr("ClaveEmbalaje").ToString,
|
||||
.DescripEmbalaje = drr("Embalaje").ToString,
|
||||
.ValorMercancia = drr("PU").ToString.ToDecimal,
|
||||
.Moneda = "MXN", 'temporal
|
||||
.FraccionArrancelaria = "",
|
||||
.UUIDComercioExt = ""
|
||||
}
|
||||
|
||||
Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal}
|
||||
conceptoCarta.DetalleMercancia = DetalleMercancia
|
||||
|
||||
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
|
||||
conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta)
|
||||
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
|
||||
|
||||
i += 1
|
||||
Next
|
||||
Timbre.Complementos.CartaPorte = CartaPorte
|
||||
|
||||
Else
|
||||
'' T R A S L A D O S
|
||||
|
||||
'DETALLES
|
||||
If Obj.DtDetalle IsNot Nothing Then
|
||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||
|
||||
If drr("PS").ToString.Length = 1 Then
|
||||
|
||||
@@ -4844,7 +4844,7 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
|
||||
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)
|
||||
Else
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))
|
||||
|
||||
@@ -1328,7 +1328,7 @@ Partial Class Compras_Compras
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
paneldevolucion.Visible = True
|
||||
Pnlalmaceninventarios.Visible = False
|
||||
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble)
|
||||
cargaddldevoluciones(CveProveedor, TxtSubTotal2.Text.ToDouble)
|
||||
InicializaAplicaNCFact()
|
||||
DivReembolso.Visible = 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 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 PorcentajeImpuesto As Decimal = 0
|
||||
@@ -5949,9 +5948,6 @@ Partial Class Compras_Compras
|
||||
|
||||
Select Case ConceptoContable
|
||||
|
||||
|
||||
|
||||
|
||||
Case 17 'Pago Proveedores
|
||||
|
||||
If CveTipoConcepto = 2 Then ConceptoContable = 308 'cuando es acreedor
|
||||
@@ -6976,7 +6972,7 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
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
|
||||
End If
|
||||
End If
|
||||
@@ -7278,11 +7274,6 @@ Partial Class Compras_Compras
|
||||
|
||||
Case 18 'NC - Notas de Credito
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
importeMovimiento = importeNC
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
@@ -7387,14 +7378,14 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
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
|
||||
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 importeMovimientoNC = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
|
||||
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 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 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, 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
|
||||
End If
|
||||
Else
|
||||
@@ -16985,7 +16976,7 @@ Partial Class Compras_Compras
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then
|
||||
DivAlmacenDev.Visible = True
|
||||
End If
|
||||
cargaddldevoluciones(CveProveedor, TxtSubTotal.Text.ToDouble)
|
||||
cargaddldevoluciones(CveProveedor, TxtSubTotal2.Text.ToDouble)
|
||||
InicializaAplicaNCFact()
|
||||
DivReembolso.Visible = False
|
||||
RBLPago.Items(2).Enabled = False
|
||||
@@ -17538,8 +17529,8 @@ Partial Class Compras_Compras
|
||||
|
||||
'RETENCIONES
|
||||
Dim Retenciones = 0D
|
||||
Retenciones = TxtRetIVA.Text.ToDecimal
|
||||
Retenciones += TxtRetISR.Text.ToDecimal
|
||||
Retenciones = RetIVA.ToDecimal
|
||||
Retenciones += RetISR.ToDecimal
|
||||
|
||||
|
||||
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
|
||||
|
||||
Next
|
||||
TmpDT.AcceptChanges()
|
||||
TmpDT.AcceptChanges()
|
||||
'Else
|
||||
' Retorno = False
|
||||
'End If
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<ContentTemplate>
|
||||
<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>
|
||||
<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>
|
||||
@@ -178,14 +178,7 @@
|
||||
<label for="<%= TxtConcepto.ClientID.ToString()%>">Concepto:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -226,9 +219,7 @@
|
||||
<label for="<%= DdlPlantilla.ClientID.ToString()%>">Movimiento:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -249,101 +240,22 @@
|
||||
<asp:DropDownList ID="DdlTipoGasto" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoGasto_SelectedIndexChanged" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar" DataTextField="TipoGasto" DataValueField="CveTipoGasto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="divMovtos" runat="server" visible="false" >
|
||||
<div id="DivConceptoPrePoliza" >
|
||||
|
||||
|
||||
<div class="chequesie22">
|
||||
<div class="row" id="DivAgregarConceptos" runat="server" visible="true">
|
||||
<div class="row" id="DivAgregarConceptos" runat="server" >
|
||||
<div class="col-md-12">
|
||||
<table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall">
|
||||
<tr class="Titulos TextTab">
|
||||
@@ -402,22 +314,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
|
||||
<tr class="Titulos">
|
||||
<th>Cuenta</th>
|
||||
@@ -434,7 +332,7 @@
|
||||
</tr>
|
||||
</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">
|
||||
@@ -546,6 +444,7 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -557,7 +456,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<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 class="tools">
|
||||
@@ -576,7 +475,7 @@
|
||||
<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"
|
||||
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>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
@@ -888,8 +787,7 @@
|
||||
<div class="col-xs-2" style="text-align: left">Cliente:</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -920,7 +818,7 @@
|
||||
|
||||
<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">
|
||||
|
||||
<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 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 />
|
||||
<div class="row">
|
||||
@@ -990,6 +898,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<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 class="row">
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
@@ -1010,16 +927,7 @@
|
||||
</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 class="col-md-6" runat="server" id="DvMoldalConceptoSeccion2" visible="false">
|
||||
|
||||
@@ -276,7 +276,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
ValidaCrearAPartirDe()
|
||||
DvPlantilla.Visible = False
|
||||
UPPDocumento.Visible = False
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
|
||||
@@ -318,9 +318,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtConcepto.Enabled = True
|
||||
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
|
||||
DvPlantilla.Visible = True
|
||||
LnkAddConcepto.Visible = False
|
||||
'LnkAddConcepto.Visible = False
|
||||
|
||||
UpPrePoliza.Visible = False
|
||||
'UpPrePoliza.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
@@ -366,7 +366,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("Concepto", Type.GetType("System.String"))
|
||||
.Add("Cargo", 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("CveConcepto", 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("ConceptoContable", Type.GetType("System.String"))
|
||||
.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("ContadoCuenta", Type.GetType("System.Int32"))
|
||||
@@ -396,6 +402,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("EsComplementaria", Type.GetType("System.Boolean"))
|
||||
.Add("TC", Type.GetType("System.Decimal"))
|
||||
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -547,9 +554,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DtMovimientos.Columns.Add("Abono", GetType(Decimal))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then
|
||||
@@ -584,9 +588,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
'divDatosPrincipales.Visible = False
|
||||
'divObservaciones.Visible = False
|
||||
UPMovs.Visible = False
|
||||
UPMovs.Update()
|
||||
UPPDocumento.Update()
|
||||
|
||||
UpPrePoliza.Update()
|
||||
|
||||
RegistraScript("comparar();")
|
||||
@@ -847,12 +849,25 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If DdlPlantilla.SelectedValue.ToEntero = 53 Then 'Plantilla Personalizada
|
||||
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
|
||||
DivAgregarConceptos.Visible = False
|
||||
divMovtos.Visible = True
|
||||
UPMovs.Update()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
|
||||
|
||||
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.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
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCargo").Visible = True
|
||||
@@ -957,8 +972,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
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") = "1" Then e.Row.FindControl("divAbonoME").Visible = True
|
||||
If e.Row.DBCampo("TipoMovto") = "False" Then e.Row.FindControl("divCargoME").Visible = True
|
||||
If e.Row.DBCampo("TipoMovto") = "True" Then e.Row.FindControl("divAbonoME").Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -1000,7 +1015,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim CvePrePolizaInsertada As Integer = -1
|
||||
|
||||
If CvePrePolizaOrigen > 0 Then
|
||||
CrarPrePolizaApartirDe()
|
||||
CrearPrePolizaApartirDe()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -1039,9 +1054,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'terminan validaciones
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
@@ -1102,7 +1114,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ImporteME = 0
|
||||
TipoCambio = 1
|
||||
|
||||
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
|
||||
If gvr.DataKey("TipoMovto") = "True" Then
|
||||
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
||||
TmpAbono = TmpAbono + Importe
|
||||
TipoMovto = True
|
||||
@@ -1173,9 +1185,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
@@ -1204,8 +1213,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ObjIE.Commit()
|
||||
If Conta IsNot Nothing Then Conta.Commit()
|
||||
|
||||
UPPDocumento.Update()
|
||||
|
||||
TxtConcepto.Text = ""
|
||||
'GvMov.DataBind()
|
||||
DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
|
||||
@@ -1331,7 +1338,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
||||
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"))
|
||||
DdlModalConceptoCuenta.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoCuenta"))
|
||||
TxtModalConceptoDocumentoFolio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoNumeroFolio")
|
||||
@@ -1341,16 +1348,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
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_SelectedIndexChanged(DdlProveedoresE, e)
|
||||
DdlComprasE.SelectedValueExist(CveCompra)
|
||||
@@ -1358,12 +1355,16 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlPersonalE.SelectedValueExist(CvePersonal)
|
||||
|
||||
If CveCliente > 0 Then
|
||||
DvModalconceptoCliente.Visible = True
|
||||
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)
|
||||
|
||||
End If
|
||||
DdlVentasE.SelectedValueExist(CveVenta)
|
||||
If CveVenta > 0 Then
|
||||
DdlVentasE.SelectedValueExist(CveVenta)
|
||||
End If
|
||||
|
||||
|
||||
If CveClasificacion > 0 Then
|
||||
DdlClasificacionesE.SelectedValue = CveClasificacion
|
||||
@@ -1391,10 +1392,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
CargaModalConceptoTipoTransaccion("Egs")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
UpModalConcepto.Update()
|
||||
|
||||
End Sub
|
||||
@@ -1457,6 +1454,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim AplicaSubProyecto As Boolean = False
|
||||
Dim AplicaTC As Boolean = False 'ok
|
||||
Dim AplicaVenta As Boolean = False
|
||||
Dim AplicaComplementaria As Boolean = False 'ok
|
||||
|
||||
AplicaActivoFijo = Boolean.Parse(DT_Concepto.Rows(0)("AplicaActivoFijo").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)
|
||||
AplicaTC = Boolean.Parse(DT_Concepto.Rows(0)("AplicaTC").ToString)
|
||||
AplicaVenta = Boolean.Parse(DT_Concepto.Rows(0)("AplicaVenta").ToString)
|
||||
|
||||
AplicaComplementaria = Boolean.Parse(DT_Concepto.Rows(0)("EsComplementaria").ToString)
|
||||
|
||||
|
||||
If AplicaImpuesto Then
|
||||
@@ -1514,26 +1512,19 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'DdlClasificacionesE.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaVenta Then
|
||||
DvModalconceptoVenta.Visible = True
|
||||
Else
|
||||
DvModalconceptoVenta.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaCliente Then
|
||||
CargaClientesE()
|
||||
|
||||
DvModalconceptoCliente.Visible = True
|
||||
DvModalconceptoVenta.Visible = True
|
||||
|
||||
|
||||
'DdlClientesE.Visible = True
|
||||
'DdlVentasE.Visible = True
|
||||
Else
|
||||
|
||||
DvModalconceptoCliente.Visible = False
|
||||
DvModalconceptoVenta.Visible = False
|
||||
|
||||
'DdlClientesE.Visible = False
|
||||
'DdlVentasE.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If AplicaBancos Then
|
||||
CargaModalConceptoTipoTransaccion("Egs")
|
||||
'DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
|
||||
@@ -1553,71 +1544,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DVmodalConceptoTipoCambio.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaComplementaria Then
|
||||
DivMonedaExtranjera.Visible = True
|
||||
Else
|
||||
DivMonedaExtranjera.Visible = False
|
||||
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()
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaProveedoresE()
|
||||
DdlProveedoresE.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
@@ -1648,12 +1583,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlClientesE.DataBind()
|
||||
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
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
|
||||
|
||||
DdlVentasE.ClearSelection()
|
||||
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.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
Else
|
||||
@@ -1678,7 +1619,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
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
|
||||
|
||||
|
||||
@@ -1691,181 +1633,121 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If DtMovimientos Is Nothing Then CreaDT()
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
dr("IdCtaContable") = IdCtaContable
|
||||
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||
'dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
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("Cargo") = TxtCargoE.Text.ToDouble
|
||||
dr("Abono") = TxtAbonoE.Text.ToDouble
|
||||
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
|
||||
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
||||
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
|
||||
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
dr("IdCtaContable") = IdCtaContable
|
||||
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||
'dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||
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("Cargo") = TxtCargoE.Text.ToDouble
|
||||
dr("Abono") = TxtAbonoE.Text.ToDouble
|
||||
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
|
||||
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
||||
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.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
|
||||
Dim CvePrePolizaDetalle As Integer = GvPrePoliza.DataKeys(IndiceGrid).Value.ToString.ToEntero
|
||||
|
||||
Dim Rows As DataRow() = DtMovimientos.Select("CvePrePolizaDetalle = " & CvePrePolizaDetalle)
|
||||
|
||||
If Rows.Count > 0 Then
|
||||
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, 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()
|
||||
|
||||
If CvePrePolizaDetalle <= 0 Then
|
||||
Dim IdMov As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("IdMov").ToEntero
|
||||
Rows = DtMovimientos.Select("IdMov = " & IdMov)
|
||||
End If
|
||||
RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
|
||||
End If
|
||||
If Rows.Count > 0 Then
|
||||
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
|
||||
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("Referencia") = TxtReferencia.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("CveConcepto") = DdlConceptosContables.SelectedValue
|
||||
dr("Cargo") = TxtCargo.Text.ToDouble
|
||||
@@ -1943,7 +1825,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
|
||||
dr("Concepto") = TxtDescripcion.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("Abono") = 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("Referencia") = TxtReferencia.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("CveConcepto") = DdlConceptosContables.SelectedValue
|
||||
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
|
||||
@@ -2006,12 +1888,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
|
||||
'If CvePrePoliza > 0 Then
|
||||
' GvPrePoliza.DataSource = DtMovimientos
|
||||
' GvPrePoliza.DataBind()
|
||||
' UpPrePoliza.Update()
|
||||
'End If
|
||||
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
@@ -2140,7 +2016,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Next
|
||||
UpPrePoliza.Update()
|
||||
End If
|
||||
If UPMovs.Visible Then
|
||||
If divMovtos.Visible Then
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue)
|
||||
Next
|
||||
@@ -2217,58 +2093,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
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
|
||||
|
||||
Private Sub LbCancelarEdicion_Click(sender As Object, e As EventArgs) Handles LbCancelarEdicion.Click
|
||||
@@ -2959,9 +2783,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
'divDatosPrincipales.Visible = False
|
||||
'divObservaciones.Visible = False
|
||||
UPMovs.Visible = False
|
||||
UPMovs.Update()
|
||||
UPPDocumento.Update()
|
||||
|
||||
UpPrePoliza.Update()
|
||||
|
||||
RegistraScript("comparar();")
|
||||
@@ -2991,7 +2813,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CrarPrePolizaApartirDe()
|
||||
Private Sub CrearPrePolizaApartirDe()
|
||||
Dim CvePrePoliza As Integer
|
||||
Dim FolioPoliza As Integer
|
||||
|
||||
@@ -3134,9 +2956,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
@@ -3160,8 +2979,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ObjIE.Commit()
|
||||
If Conta IsNot Nothing Then Conta.Commit()
|
||||
|
||||
UPPDocumento.Update()
|
||||
|
||||
TxtConcepto.Text = ""
|
||||
GvMov.DataBind()
|
||||
TxtFechaDocumento.Text = ""
|
||||
|
||||
87
Inicio.aspx
87
Inicio.aspx
@@ -492,9 +492,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-sm-6" runat="server" id="DVDescargasBDH" visible="false">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="portlet light ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
@@ -509,21 +507,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="font-style:normal;font-weight:bold">
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<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>
|
||||
@@ -531,12 +527,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<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>
|
||||
@@ -545,12 +541,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<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>
|
||||
@@ -558,12 +554,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<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>
|
||||
@@ -572,50 +568,66 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<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 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="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 class="col-md-6">
|
||||
<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 class="row">
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1399,8 +1411,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
</div>
|
||||
|
||||
@@ -231,7 +231,6 @@ Partial Class Inicio
|
||||
'Evaluacion del proveedor
|
||||
CargaEvaluacionProveedor()
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DVDescargasBDH.Visible = True
|
||||
End If
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<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 class="row rowpadding">
|
||||
@@ -232,7 +232,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
@@ -958,12 +958,12 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
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
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
@@ -1508,7 +1508,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
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}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<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">
|
||||
<Columns>
|
||||
<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="Aseguradora" DataField="NombreAseguradora" 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="Usuario" DataField="Usuario" />
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
@@ -249,7 +250,8 @@
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
@@ -258,6 +260,14 @@
|
||||
<i></i>
|
||||
</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>
|
||||
|
||||
<%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%>
|
||||
|
||||
@@ -37,10 +37,9 @@ Partial Class Inventarios_CatUnidades
|
||||
Public Sub CargaDatos()
|
||||
|
||||
|
||||
|
||||
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
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
@@ -110,6 +109,7 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtNumeroTrailer.Text = ""
|
||||
TxtSCAC.Text = ""
|
||||
TxtCAAT.Text = ""
|
||||
ChkEstatus.Checked = False
|
||||
|
||||
RdTipoUnidad.SelectedValue = "1"
|
||||
LtlTituloModal.Text = "Agregar Unidad"
|
||||
@@ -153,6 +153,7 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion")
|
||||
TxtSCAC.Text = GvRow.DataKey("SCAC")
|
||||
TxtCAAT.Text = GvRow.DataKey("CAAT")
|
||||
ChkEstatus.Checked = If(Boolean.Parse(GvRow.DataKey("Estatus")), True, False)
|
||||
|
||||
'ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2")
|
||||
|
||||
@@ -206,14 +207,14 @@ Partial Class Inventarios_CatUnidades
|
||||
|
||||
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,
|
||||
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")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
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,
|
||||
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")
|
||||
Using objbase = New ClsClaseBase()
|
||||
objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue))
|
||||
|
||||
@@ -36,6 +36,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ViewState("ValidaLoteCaducidad") = value
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
If ViewState("DtInv") Is Nothing Then
|
||||
@@ -557,18 +565,26 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaporAlmacenes()
|
||||
|
||||
CveTipoAlmacen = -1
|
||||
If DdlAlmacen.SelectedValue <> "-1" Then
|
||||
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
'RMF condición temporal
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyecto.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
||||
ValidaLoteCaducidad = True
|
||||
Else
|
||||
ValidaLoteCaducidad = False
|
||||
Dim drr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If drr IsNot Nothing Then
|
||||
'("CveSubProyecto").ToEntero
|
||||
Dim CveSubProyecto As Integer = drr("CveSubProyecto").ToString.ToEntero
|
||||
'RMF condición temporal
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyecto.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
||||
ValidaLoteCaducidad = True
|
||||
Else
|
||||
ValidaLoteCaducidad = False
|
||||
End If
|
||||
|
||||
CveTipoAlmacen = drr("CveTipoAlmacen").ToString.ToEntero
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
CargaGVInv()
|
||||
'For Each Gvr As GridViewRow In GvInv.Rows
|
||||
' If Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue = "-1" Then
|
||||
@@ -1421,6 +1437,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
|
||||
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
|
||||
' 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"))
|
||||
|
||||
@@ -279,7 +279,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -532,11 +532,16 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
//regenero el tmbre
|
||||
//regenero el timbre
|
||||
if (TimbreTipoDocto == "Tra")
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -829,7 +834,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
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()}");
|
||||
}
|
||||
try
|
||||
@@ -868,10 +873,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
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;
|
||||
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus: 1))
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados;
|
||||
}
|
||||
|
||||
|
||||
@@ -2255,6 +2255,27 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Exit For
|
||||
End If
|
||||
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
|
||||
|
||||
Else
|
||||
@@ -3023,12 +3044,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
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
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
@@ -3334,7 +3355,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
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}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -1068,7 +1068,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
'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
|
||||
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
|
||||
|
||||
|
||||
@@ -1450,7 +1450,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
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
|
||||
' 'rmf faltan las cuentas
|
||||
@@ -1684,7 +1684,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
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 = ""
|
||||
If CveMonedaPago = 2 Then
|
||||
'rmf faltan las cuentas
|
||||
@@ -1695,11 +1695,11 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
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
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
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"
|
||||
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"
|
||||
End If
|
||||
|
||||
|
||||
@@ -697,7 +697,7 @@ Partial Class PV
|
||||
Get
|
||||
Return New Dictionary(Of Integer, Decimal) From {
|
||||
{20516, 0.23D}, 'Descuento para lubricantes LTH
|
||||
{20515, 0.274D} 'Descuento para filtros LTH
|
||||
{20515, 0.25D} 'Descuento para filtros LTH
|
||||
}
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -12030,13 +12030,13 @@ Partial Class Ventas
|
||||
factura.Alfa3 = "DEV"
|
||||
factura.DevolucionImportePagado = ObjFacturaNC.Total / ObjFacturaNC.PagadoBancos 'falta tomar el dato
|
||||
End If
|
||||
Dim tCvePlantillaPoliza As Integer = factura.CvePlantillaPoliza
|
||||
Dim tCveTipoPoliza As Integer = -1
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
tCvePlantillaPoliza = 1 ' que sea siempre ingreso.
|
||||
tCveTipoPoliza = 1 ' que sea siempre ingreso.
|
||||
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 = ""
|
||||
|
||||
@@ -16800,84 +16800,14 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString().ToDouble
|
||||
Dim PrecioSugerido As Decimal = 0
|
||||
Dim tPrecioSugerido As Decimal = 0
|
||||
tPrecioSugerido = drPS("Precio").ToString().ToDecimal
|
||||
PrecioSugerido = CalculaPrecioSugerido(CvePSParametro, drPS("CveClasificacion").ToString().ToEntero())
|
||||
|
||||
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").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
|
||||
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
||||
|
||||
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
||||
|
||||
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
|
||||
@@ -16912,6 +16842,76 @@ Partial Class Ventas
|
||||
UpPS.Update()
|
||||
|
||||
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
|
||||
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS)
|
||||
End Sub
|
||||
@@ -18127,15 +18127,6 @@ Partial Class Ventas
|
||||
Row("Orden") = ConsecutivoActual + 1
|
||||
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
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||
@@ -18179,6 +18170,14 @@ Partial Class Ventas
|
||||
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
|
||||
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 TiempoEntrega As String = Row("Tiempo Entrega").ToString()
|
||||
Dim CvePS As Integer = 0
|
||||
Dim CveClasificacion As Integer = 0
|
||||
Dim CveUM As Integer = 0
|
||||
Dim CodigoPS As Integer = 0
|
||||
Dim DrProyecto As DataRow
|
||||
@@ -24311,7 +24311,7 @@ Partial Class Ventas
|
||||
If ObjPS.CvePS > 0 Then
|
||||
CvePS = ObjPS.CvePS
|
||||
CveUM = ObjPS.CveUnidadMedida
|
||||
|
||||
CveClasificacion = ObjPS.CveClasificacion
|
||||
Else
|
||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||
End If
|
||||
@@ -24320,14 +24320,6 @@ Partial Class Ventas
|
||||
End If
|
||||
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
|
||||
|
||||
Using ObjPS As New ClsProductosServicios
|
||||
@@ -24335,7 +24327,7 @@ Partial Class Ventas
|
||||
If ObjPS.CvePS > 0 Then
|
||||
CvePS = ObjPS.CvePS
|
||||
CveUM = ObjPS.CveUnidadMedida
|
||||
|
||||
CveClasificacion = ObjPS.CveClasificacion
|
||||
Else
|
||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||
End If
|
||||
@@ -24343,14 +24335,7 @@ Partial Class Ventas
|
||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||
End If
|
||||
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
|
||||
|
||||
Using ObjPS As New ClsProductosServicios
|
||||
@@ -24358,6 +24343,7 @@ Partial Class Ventas
|
||||
If ObjPS.CvePS > 0 Then
|
||||
CvePS = ObjPS.CvePS
|
||||
CveUM = ObjPS.CveUnidadMedida
|
||||
CveClasificacion = ObjPS.CveClasificacion
|
||||
Else
|
||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||
End If
|
||||
@@ -24365,50 +24351,23 @@ Partial Class Ventas
|
||||
RowNoEncontrados = String.Format("{3} - No se encontró {0} en la fila {1}, columna {2}<\BR>(NoBD)", Codigo, NumRow, "Codigo", RowNoEncontrados)
|
||||
End If
|
||||
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
|
||||
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||
End If
|
||||
|
||||
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, "",
|
||||
CvePS, HdnPS.Value, Observaciones, PrecioUnitario, HdnDescuento.Value.ToDecimal,
|
||||
CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
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
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
CalculaTotalesVenta()
|
||||
|
||||
If RowNoEncontrados.Length > 0 Then
|
||||
@@ -34126,12 +34085,12 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
@@ -34265,7 +34224,7 @@ Partial Class Ventas
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
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}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
Reference in New Issue
Block a user