Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1898,7 +1898,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function RepNotasSinAlmacen(Opcion As Integer, CveClienteProveedor As Integer, FechaIni As Date, FechaFin As Date, TipoDocumento As String, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
Public Function RepNotasSinAlmacen(Opcion As Integer, CveClienteProveedor As Integer, FechaIni As Date, FechaFin As Date, TipoDocumento As String, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_RepNotasSinAlmacen")
|
DataAdapter("PA_Inv_RepNotasSinAlmacen")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -2213,7 +2213,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetExistenciasPSXML(XML As String, CveAlmacen As Integer, Fecha As String, CveSubProyecto As Integer, CveVendedor As Integer, CveCliente As Integer, ExcluyeApartados As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetExistenciasPSXML(XML As String, CveAlmacen As Integer, Fecha As String, CveSubProyecto As Integer, CveVendedor As Integer, CveCliente As Integer, ExcluyeApartados As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
If Fecha = "-1" Then
|
If Fecha = "-1" Then
|
||||||
Fecha = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd"))
|
Fecha = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd"))
|
||||||
@@ -3440,7 +3440,7 @@ Public Class ClsInventarios
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function VentaDetallePadreGet(CveVentaDetallePadre As Integer) As Integer
|
Public Function VentaDetallePadreGet(CveVentaDetallePadre As Integer) As Integer
|
||||||
Dim Retorno = -1
|
Dim Retorno As Integer = -1
|
||||||
DataAdapter("PA_Inv_VentaDetallePadreGet")
|
DataAdapter("PA_Inv_VentaDetallePadreGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveVentaDetallePadre", SqlDbType.Int).Value = CveVentaDetallePadre
|
.Add("@CveVentaDetallePadre", SqlDbType.Int).Value = CveVentaDetallePadre
|
||||||
@@ -3455,7 +3455,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetPendietePorSurtirVenta(CvePS As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional Tipo As Integer = -1) As Boolean
|
Public Function GetPendientePorSurtirVenta(CvePS As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional Tipo As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_VentasPendientesPorSurtirGet")
|
DataAdapter("PA_Inv_VentasPendientesPorSurtirGet")
|
||||||
@@ -4387,7 +4387,7 @@ Public Class ClsInventarios
|
|||||||
#Region " INVENTARIOS - SOLICITUD DE TRASPASOS "
|
#Region " INVENTARIOS - SOLICITUD DE TRASPASOS "
|
||||||
Public Function AddTrasladoSolicitud(Observaciones As String, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, CveTrasladoEstatus As Integer, CveMovimientoAlmacen As Integer, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
|
Public Function AddTrasladoSolicitud(Observaciones As String, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, CveTrasladoEstatus As Integer, CveMovimientoAlmacen As Integer, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
|
||||||
Optional CveContrato As Integer = -1, Optional Guia As String = "", Optional CvePaqueteria As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional CveOS As Integer = -1, Optional EstatusAlmacen As Integer = -1) As Integer
|
Optional CveContrato As Integer = -1, Optional Guia As String = "", Optional CvePaqueteria As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional CveOS As Integer = -1, Optional EstatusAlmacen As Integer = -1) As Integer
|
||||||
Dim Retorno = -1
|
Dim Retorno As Integer = -1
|
||||||
DataAdapter("PA_Inv_TraspasoSolicitudAdd")
|
DataAdapter("PA_Inv_TraspasoSolicitudAdd")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -5985,12 +5985,13 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetJAM_APIs(Optional Opcion As Integer = 1) As Boolean
|
Public Function GetJAM_APIs(Optional Opcion As Integer = 1, Optional CveClasificacion As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Dataset = New DataSet()
|
Dataset = New DataSet()
|
||||||
DataAdapter("PA_JAM_APIs")
|
DataAdapter("PA_JAM_APIs")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -6063,6 +6064,45 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetVentasPedimento(CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Inv_VentasPedimentosGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al consultar los productos por serie.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateVentasDetalleNumeroPedimento(CveVenta As Integer, CveVentaDetalle As Integer, NumeroPedimento As String) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_VentasDetalleNumeroPedimentoUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
||||||
|
.Add("@NumeroPedimento", SqlDbType.VarChar).Value = NumeroPedimento
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el pedimento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region " IDisposable Support "
|
#Region " IDisposable Support "
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
|||||||
@@ -7521,7 +7521,7 @@ Public Class ClsPaginas
|
|||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
@@ -7533,7 +7533,7 @@ Public Class ClsPaginas
|
|||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ Public Class ClsSisEmpresas
|
|||||||
_Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero
|
_Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero
|
||||||
_Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero
|
_Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero
|
||||||
_Empresa.TipoContabilidad = Data.Rows(0)("Conta_TipoContabilidad").ToString.ToEntero '0 - Sin Conta, 1- Contabilidad SIG, 2- Contabilidad Contpaq
|
_Empresa.TipoContabilidad = Data.Rows(0)("Conta_TipoContabilidad").ToString.ToEntero '0 - Sin Conta, 1- Contabilidad SIG, 2- Contabilidad Contpaq
|
||||||
|
_Empresa.ContaFormatoCuenta = Data.Rows(0)("Conta_FormatoCuenta").ToString
|
||||||
_Empresa.DefaultAsistencias = If(Data.Rows(0)("RH_DefaultAsistencias").ToString = "", False, CBool(Data.Rows(0)("RH_DefaultAsistencias").ToString))
|
_Empresa.DefaultAsistencias = If(Data.Rows(0)("RH_DefaultAsistencias").ToString = "", False, CBool(Data.Rows(0)("RH_DefaultAsistencias").ToString))
|
||||||
_Empresa.CIEC = Data.Rows(0)("CIEC").ToString
|
_Empresa.CIEC = Data.Rows(0)("CIEC").ToString
|
||||||
_Empresa.Localidad = Data.Rows(0)("Localidad").ToString
|
_Empresa.Localidad = Data.Rows(0)("Localidad").ToString
|
||||||
|
|||||||
@@ -1476,11 +1476,14 @@ Public Class ClsVentas
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar el documento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al eliminar el detalle de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "V E N T A - P R E S U P U E S T O"
|
#Region "V E N T A - P R E S U P U E S T O"
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ Public Class Empresa
|
|||||||
Public Property Soporte_Tipo As String
|
Public Property Soporte_Tipo As String
|
||||||
Public Property Timbres As Integer
|
Public Property Timbres As Integer
|
||||||
Public Property _RutaArchivos As String
|
Public Property _RutaArchivos As String
|
||||||
|
Public Property ContaFormatoCuenta As String
|
||||||
|
|
||||||
Public ReadOnly Property Ruta As String
|
Public ReadOnly Property Ruta As String
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ Namespace Modelos
|
|||||||
Timbre = New CFDITimbre
|
Timbre = New CFDITimbre
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub SetTotales(dtVentas As DataTable, ObjVentas As ClsVentas)
|
Private Sub SetTotales(dtVentas As DataTable, ObjVentas As ClsVentas)
|
||||||
Dim TmpDTImpuestos = New DataTable
|
Dim TmpDTImpuestos As New DataTable
|
||||||
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||||
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||||
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||||
@@ -530,7 +530,7 @@ Namespace Modelos
|
|||||||
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||||
If dtImpuesto.Rows.Count > 0 Then
|
If dtImpuesto.Rows.Count > 0 Then
|
||||||
For Each Row As DataRow In dtImpuesto.Rows
|
For Each Row As DataRow In dtImpuesto.Rows
|
||||||
Dim Orden = 80
|
Dim Orden As Integer = 80
|
||||||
If Row("Importe").ToString.ToDouble <> 0 Then
|
If Row("Importe").ToString.ToDouble <> 0 Then
|
||||||
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
||||||
DR("Importe") = Row("Importe").ToString.ToDouble
|
DR("Importe") = Row("Importe").ToString.ToDouble
|
||||||
@@ -819,7 +819,7 @@ Namespace Modelos
|
|||||||
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
|
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
|
||||||
Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL())
|
Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL())
|
||||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||||
Dim MensajeAlert = New StringBuilder
|
Dim MensajeAlert As New StringBuilder
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
@@ -1031,7 +1031,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Dim SeTimbro As Boolean = False
|
Dim SeTimbro As Boolean = False
|
||||||
Dim SeTimbroNC As Boolean = False
|
Dim SeTimbroNC As Boolean = False
|
||||||
Dim EstatusSMS = 0
|
Dim EstatusSMS As Integer = 0
|
||||||
|
|
||||||
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
|
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
|
||||||
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
|
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
|
||||||
@@ -1054,7 +1054,7 @@ Namespace Modelos
|
|||||||
'DOCUMENTO ACTUAL
|
'DOCUMENTO ACTUAL
|
||||||
If DebeTimbrar Then
|
If DebeTimbrar Then
|
||||||
If Me.EmitirCartaPorte AndAlso CveTimbreCartaPorte > 0 Then
|
If Me.EmitirCartaPorte AndAlso CveTimbreCartaPorte > 0 Then
|
||||||
Dim RespCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorte, UsuarioActual)
|
Dim RespCartaPorte As Timbres.MMensajeCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorte, UsuarioActual)
|
||||||
If Not RespCartaPorte.TieneError Then
|
If Not RespCartaPorte.TieneError Then
|
||||||
Me.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
Me.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
||||||
Else
|
Else
|
||||||
@@ -1129,7 +1129,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
' DESCARGA XML - SI SE TIMBRA MANDA CORREO CON FACTURA
|
' DESCARGA XML - SI SE TIMBRA MANDA CORREO CON FACTURA
|
||||||
If SeTimbro Then
|
If SeTimbro Then
|
||||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, Me.TipoDocto, Me.SerieFolio)
|
Dim ArchivoXML As String = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, Me.TipoDocto, Me.SerieFolio)
|
||||||
If File.Exists(ArchivoXML) Then
|
If File.Exists(ArchivoXML) Then
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", Me.SerieFolio, Me.TipoDocto)))
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", Me.SerieFolio, Me.TipoDocto)))
|
||||||
End If
|
End If
|
||||||
@@ -1775,7 +1775,7 @@ Namespace Modelos
|
|||||||
tPS = tPS.Replace("|", " ")
|
tPS = tPS.Replace("|", " ")
|
||||||
|
|
||||||
If tPS.Length >= 1000 Then
|
If tPS.Length >= 1000 Then
|
||||||
Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999)
|
Dim tPSRecortado As String = tPS.Remove(999, tPS.Length - 999)
|
||||||
tPS = tPSRecortado
|
tPS = tPSRecortado
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1840,14 +1840,14 @@ Namespace Modelos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
||||||
Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
Dim Url As New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
Try
|
Try
|
||||||
Using httpClient = New HttpClient()
|
Using httpClient As New HttpClient()
|
||||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
Using request As New HttpRequestMessage(HttpMethod.Get, Url)
|
||||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}", CveEmpresa, DateTime.UtcNow.Ticks)))
|
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||||
Dim response = httpClient.SendAsync(request).Result
|
Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result
|
||||||
If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then
|
If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then
|
||||||
File = response.Content.ReadAsByteArrayAsync().Result
|
File = response.Content.ReadAsByteArrayAsync().Result
|
||||||
End If
|
End If
|
||||||
@@ -2023,10 +2023,10 @@ Namespace Modelos
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Function EnviarSMSTimbrado(ByRef ObjEventos As ClsOIEventos) As Integer
|
Private Function EnviarSMSTimbrado(ByRef ObjEventos As ClsOIEventos) As Integer
|
||||||
Dim Mensaje = UsuarioActual.Empresa.Funcionalidad(152)
|
Dim Mensaje As String = UsuarioActual.Empresa.Funcionalidad(152)
|
||||||
If Mensaje = "" Then Return 0
|
If Mensaje = "" Then Return 0
|
||||||
|
|
||||||
Dim Celular = Me.Cliente.CobranzaTelefono
|
Dim Celular As String = Me.Cliente.CobranzaTelefono
|
||||||
If Celular.Length <> 10 Then Return 3
|
If Celular.Length <> 10 Then Return 3
|
||||||
|
|
||||||
'ARMA MENSAJE
|
'ARMA MENSAJE
|
||||||
@@ -2315,7 +2315,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
'BONIFICACION USADOS
|
'BONIFICACION USADOS
|
||||||
If UsadosBonificacion IsNot Nothing AndAlso UsadosBonificacion.Count > 0 AndAlso TipoBonificacion > 0 Then
|
If UsadosBonificacion IsNot Nothing AndAlso UsadosBonificacion.Count > 0 AndAlso TipoBonificacion > 0 Then
|
||||||
For Each CveMovto In UsadosBonificacion
|
For Each CveMovto As Integer In UsadosBonificacion
|
||||||
If Not ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, TipoBonificacion, CveVenta) Then
|
If Not ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, TipoBonificacion, CveVenta) Then
|
||||||
ErrorList.Add("Ocurrió un error al actualizar el distribuidor.")
|
ErrorList.Add("Ocurrió un error al actualizar el distribuidor.")
|
||||||
End If
|
End If
|
||||||
@@ -2765,7 +2765,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Dr = DtVentasNC.NewRow
|
Dim Dr As DataRow = DtVentasNC.NewRow
|
||||||
Dr("CveVenta") = pCveVenta
|
Dr("CveVenta") = pCveVenta
|
||||||
Dr("Importe") = Importe
|
Dr("Importe") = Importe
|
||||||
Dr("FolioFiscal") = FolioFiscal
|
Dr("FolioFiscal") = FolioFiscal
|
||||||
@@ -2963,8 +2963,8 @@ Namespace Modelos
|
|||||||
|
|
||||||
If GenerarPrePoliza AndAlso CveMovimiento > 0 Then
|
If GenerarPrePoliza AndAlso CveMovimiento > 0 Then
|
||||||
Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio
|
Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio
|
||||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
Dim tCveSubProyecto As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||||
Dim tCveConcepto As Integer = 278
|
Dim tCveConcepto As Integer = 278
|
||||||
Dim ValorInventario As Decimal = 0
|
Dim ValorInventario As Decimal = 0
|
||||||
Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo
|
Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo
|
||||||
@@ -3647,7 +3647,7 @@ Namespace Modelos
|
|||||||
importeMovimiento = 0
|
importeMovimiento = 0
|
||||||
|
|
||||||
Case 91 'Amortizacion Nota de Credito
|
Case 91 'Amortizacion Nota de Credito
|
||||||
Dim Contabilizable = If(UsuarioActual.CveEmpresa = 119, False, True)
|
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
||||||
|
|
||||||
If ValorMultiplicador = -1 Then
|
If ValorMultiplicador = -1 Then
|
||||||
Dim TipoCambioNC As Decimal = 1
|
Dim TipoCambioNC As Decimal = 1
|
||||||
@@ -3834,9 +3834,9 @@ Namespace Modelos
|
|||||||
Else
|
Else
|
||||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev", "RNC") Then
|
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev", "RNC") Then
|
||||||
|
|
||||||
Dim ConceptoContableAplicar = 4
|
Dim ConceptoContableAplicar As Integer = 4
|
||||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
Dim CveVentaAplicar As Integer = ObjFactura.CveVenta
|
||||||
Dim CveVentaAmortizacionAplicar = -1
|
Dim CveVentaAmortizacionAplicar As Integer = -1
|
||||||
|
|
||||||
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.TipoDocto = "Ant" And CveDevolucion > 0 And NuevaFactura = 1 Then
|
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.TipoDocto = "Ant" And CveDevolucion > 0 And NuevaFactura = 1 Then
|
||||||
ConceptoContableAplicar = 11
|
ConceptoContableAplicar = 11
|
||||||
@@ -3871,9 +3871,9 @@ Namespace Modelos
|
|||||||
Case 150 'Descuento sobre ventas
|
Case 150 'Descuento sobre ventas
|
||||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
|
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
|
||||||
|
|
||||||
Dim ConceptoContableAplicar = 150
|
Dim ConceptoContableAplicar As Integer = 150
|
||||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
Dim CveVentaAplicar As Integer = ObjFactura.CveVenta
|
||||||
Dim CveVentaAmortizacionAplicar = -1
|
Dim CveVentaAmortizacionAplicar As Integer = -1
|
||||||
|
|
||||||
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.CveAnticipo > 0 Then
|
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.CveAnticipo > 0 Then
|
||||||
ConceptoContableAplicar = 11
|
ConceptoContableAplicar = 11
|
||||||
@@ -4162,14 +4162,6 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
|
||||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorList.Add("No se pudo simplificar los movimientos")
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ContPAQ El movimiento 1 es el de Venta
|
'ContPAQ El movimiento 1 es el de Venta
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
|
|
||||||
@@ -4547,9 +4539,9 @@ Namespace Modelos
|
|||||||
'Agregamos los detalles
|
'Agregamos los detalles
|
||||||
For Each MovDet As DataRow In DtMovDetalle.Rows
|
For Each MovDet As DataRow In DtMovDetalle.Rows
|
||||||
|
|
||||||
Dim Cantidad = 0.0
|
Dim Cantidad As Decimal = 0
|
||||||
Dim CantidadRemision = DtRemisiones.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString}").ToDouble
|
Dim CantidadRemision As Decimal = DtRemisiones.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString}").ToDecimal
|
||||||
Dim CantidadInventario = MovDet("Cantidad").ToString.ToDecimal
|
Dim CantidadInventario As Decimal = MovDet("Cantidad").ToString.ToDecimal
|
||||||
|
|
||||||
If RemisionesLista.Count > 0 AndAlso CantidadInventario >= CantidadRemision Then
|
If RemisionesLista.Count > 0 AndAlso CantidadInventario >= CantidadRemision Then
|
||||||
Cantidad = CantidadRemision
|
Cantidad = CantidadRemision
|
||||||
@@ -4596,12 +4588,12 @@ Namespace Modelos
|
|||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then
|
If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DtCostos = ObjInventario.DtResultados.Copy
|
Dim DtCostos As DataTable = ObjInventario.DtResultados.Copy
|
||||||
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
|
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
|
||||||
Dim ValorInventario As Decimal
|
Dim ValorInventario As Decimal
|
||||||
|
|
||||||
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
||||||
ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal
|
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion")))
|
||||||
Try
|
Try
|
||||||
If ValorInventario <> 0 Then
|
If ValorInventario <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, ValorInventario, 69, Me.SerieFolio, Me.SerieFolio, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=Me.CveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, ValorInventario, 69, Me.SerieFolio, Me.SerieFolio, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=Me.CveSubProyecto) Then
|
||||||
@@ -5309,7 +5301,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'CUANDO SE CANCELA, Y TIENE RELACIONADA UNA REMISIÓN, Y ESTA NO SE CANCELARÁ. DEBE DE HACER EN AUTOMÁTICO LOS MOVIMIENTOS AL ALMACEN DE ENTREGA POR ADELANTADO
|
'CUANDO SE CANCELA, Y TIENE RELACIONADA UNA REMISIÓN, Y ESTA NO SE CANCELARÁ. DEBE DE HACER EN AUTOMÁTICO LOS MOVIMIENTOS AL ALMACEN DE ENTREGA POR ADELANTADO
|
||||||
Dim RevivirRemisiones = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count))
|
Dim RevivirRemisiones As Boolean = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count))
|
||||||
|
|
||||||
'REMISION YA SE DEBE HACER POR EL PROCESO DE DEVOLUCION DE ALMACEN
|
'REMISION YA SE DEBE HACER POR EL PROCESO DE DEVOLUCION DE ALMACEN
|
||||||
If Not EsRefacturacion AndAlso (ObjFactura.SaldoAlmacen <> 0 AndAlso ObjFactura.EsDevolucionVenta.Contiene(0, 1)) AndAlso Not RealizarDevolucionAlmacen And RevivirRemisiones = False Then
|
If Not EsRefacturacion AndAlso (ObjFactura.SaldoAlmacen <> 0 AndAlso ObjFactura.EsDevolucionVenta.Contiene(0, 1)) AndAlso Not RealizarDevolucionAlmacen And RevivirRemisiones = False Then
|
||||||
@@ -5418,11 +5410,11 @@ Namespace Modelos
|
|||||||
|
|
||||||
'VERIFICA EN EL SERVICIO SI SE CANCELO
|
'VERIFICA EN EL SERVICIO SI SE CANCELO
|
||||||
Try
|
Try
|
||||||
Dim solicitud = New WSGF.Service1SoapClient()
|
Dim solicitud As New WSGF.Service1SoapClient()
|
||||||
Dim acuse = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
Dim acuse As WSGF.StructXml = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
||||||
|
|
||||||
If acuse.Estado = 0 Then
|
If acuse.Estado = 0 Then
|
||||||
Dim xmlAcuse = New System.Xml.XmlDocument()
|
Dim xmlAcuse As New System.Xml.XmlDocument()
|
||||||
xmlAcuse.LoadXml(DecodeBase64(acuse.CfdiB64))
|
xmlAcuse.LoadXml(DecodeBase64(acuse.CfdiB64))
|
||||||
CancelacionAcuse = xmlAcuse.GetElementsByTagName("SignatureValue")(0).InnerText
|
CancelacionAcuse = xmlAcuse.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
||||||
@@ -5685,7 +5677,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
'CUANDO SE VAYA A REALIZAR LA DEVOLUCION AQUI DEBE MARCALA PARA NO SOLICITARLA DE NUEVO, SI NO LA SOLICITARA
|
'CUANDO SE VAYA A REALIZAR LA DEVOLUCION AQUI DEBE MARCALA PARA NO SOLICITARLA DE NUEVO, SI NO LA SOLICITARA
|
||||||
If ObjFactura.EsDevolucionVenta = 0 Then
|
If ObjFactura.EsDevolucionVenta = 0 Then
|
||||||
Dim EstatusDevolucion = 1
|
Dim EstatusDevolucion As Integer = 1
|
||||||
If Not ObjVentas.UpdateVentasDevolucionAlmacen(EstatusDevolucion, CveVenta) Then
|
If Not ObjVentas.UpdateVentasDevolucionAlmacen(EstatusDevolucion, CveVenta) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Ocurrió un error al solicitar la devolución de almacen."
|
MensajeError = "Ocurrió un error al solicitar la devolución de almacen."
|
||||||
@@ -5907,7 +5899,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
'AGREGA BITACORA A VENTA
|
'AGREGA BITACORA A VENTA
|
||||||
If Not ErrorCancelar AndAlso RealizarDevolucionAlmacen AndAlso CveMovimientoDevolucion > 0 Then
|
If Not ErrorCancelar AndAlso RealizarDevolucionAlmacen AndAlso CveMovimientoDevolucion > 0 Then
|
||||||
Dim MensajeBitacora = "Devuelta"
|
Dim MensajeBitacora As String = "Devuelta"
|
||||||
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoDevolucion, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
|
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoDevolucion, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
|
||||||
MensajeError = "Ocurrió un error al agregar la bitacora."
|
MensajeError = "Ocurrió un error al agregar la bitacora."
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
@@ -6316,7 +6308,7 @@ Namespace Modelos
|
|||||||
If SeCancelaRemisionProceso Then
|
If SeCancelaRemisionProceso Then
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
For Each CveRemisionCancelar In ListaRemisionesCancelar
|
For Each CveRemisionCancelar As Integer In ListaRemisionesCancelar
|
||||||
If Not ObjVentas.AddRemisionesXCancelar(CveVenta, CveRemisionCancelar) Then
|
If Not ObjVentas.AddRemisionesXCancelar(CveVenta, CveRemisionCancelar) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Ocurrió un error al guardar la remisión x cancelar."
|
MensajeError = "Ocurrió un error al guardar la remisión x cancelar."
|
||||||
@@ -6332,7 +6324,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
For Each CveRemisionCancelar In ListaRemisionesCancelar
|
For Each CveRemisionCancelar As Integer In ListaRemisionesCancelar
|
||||||
If Not ObjVentas.UpdateEstatusFactura(12, "", "", CancelacionFecha, CveRemisionCancelar) Then
|
If Not ObjVentas.UpdateEstatusFactura(12, "", "", CancelacionFecha, CveRemisionCancelar) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación de la remisión."
|
MensajeError = "Ocurrió un error al guardar el estatus de cancelación de la remisión."
|
||||||
@@ -7335,7 +7327,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Public ReadOnly Property FormaPagoText As String
|
Public ReadOnly Property FormaPagoText As String
|
||||||
Get
|
Get
|
||||||
Dim retorno = ""
|
Dim retorno As String = ""
|
||||||
Select Case FormaPago
|
Select Case FormaPago
|
||||||
Case 0
|
Case 0
|
||||||
retorno = "PAGO EN UNA SOLA EXHIBICIÓN"
|
retorno = "PAGO EN UNA SOLA EXHIBICIÓN"
|
||||||
@@ -7350,7 +7342,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Public ReadOnly Property CondicionesPagoText As String
|
Public ReadOnly Property CondicionesPagoText As String
|
||||||
Get
|
Get
|
||||||
Dim retorno = ""
|
Dim retorno As String = ""
|
||||||
Select Case CondicionesPago
|
Select Case CondicionesPago
|
||||||
Case 0
|
Case 0
|
||||||
retorno = "contado"
|
retorno = "contado"
|
||||||
@@ -7793,7 +7785,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Public ReadOnly Property LugarExp As String
|
Public ReadOnly Property LugarExp As String
|
||||||
Get
|
Get
|
||||||
Dim arr = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP}
|
Dim arr As Array = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP}
|
||||||
Return String.Join(",", arr)
|
Return String.Join(",", arr)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
@@ -7862,7 +7854,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Public ReadOnly Property LugarExp As String
|
Public ReadOnly Property LugarExp As String
|
||||||
Get
|
Get
|
||||||
Dim arr = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP, SubProyecto}
|
Dim arr As Array = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP, SubProyecto}
|
||||||
Return String.Join(",", arr)
|
Return String.Join(",", arr)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
@@ -8036,7 +8028,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Public ReadOnly Property LugarExp As String
|
Public ReadOnly Property LugarExp As String
|
||||||
Get
|
Get
|
||||||
Dim arr = {EnvioDireccion, EnvioColonia, EnvioCiudad, EnvioEstado, EnvioCP, EnvioTel}
|
Dim arr As Array = {EnvioDireccion, EnvioColonia, EnvioCiudad, EnvioEstado, EnvioCP, EnvioTel}
|
||||||
Return String.Join(",", arr)
|
Return String.Join(",", arr)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|||||||
@@ -851,7 +851,7 @@ Public Class Timbrado
|
|||||||
Private Function EnviarInformacionCancelacionPADESOAP(ByVal url As String, UsuarioServicio As String, PassServicio As String, contrato As String, rfcEmisor As String, rfcReceptor As String,
|
Private Function EnviarInformacionCancelacionPADESOAP(ByVal url As String, UsuarioServicio As String, PassServicio As String, contrato As String, rfcEmisor As String, rfcReceptor As String,
|
||||||
certBase64 As String, keyBase64 As String, keyPass As String, arregloUUID As String, Total As Decimal, TimbraProduccion As Boolean,
|
certBase64 As String, keyBase64 As String, keyPass As String, arregloUUID As String, Total As Decimal, TimbraProduccion As Boolean,
|
||||||
Optional MotivoCancelacion As String = "", Optional FolioSustitucion As String = "") As String
|
Optional MotivoCancelacion As String = "", Optional FolioSustitucion As String = "") As String
|
||||||
Dim retorno = ""
|
Dim retorno As String = ""
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim request As HttpWebRequest = CType(WebRequest.Create($"{url}"), HttpWebRequest)
|
Dim request As HttpWebRequest = CType(WebRequest.Create($"{url}"), HttpWebRequest)
|
||||||
@@ -895,7 +895,7 @@ Public Class Timbrado
|
|||||||
End Using
|
End Using
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(response) Then
|
If Not String.IsNullOrEmpty(response) Then
|
||||||
Dim xmlRetorno = New XmlDocument()
|
Dim xmlRetorno As New XmlDocument()
|
||||||
xmlRetorno.LoadXml(response)
|
xmlRetorno.LoadXml(response)
|
||||||
Dim elemList As XmlNodeList = xmlRetorno.GetElementsByTagName("return")
|
Dim elemList As XmlNodeList = xmlRetorno.GetElementsByTagName("return")
|
||||||
|
|
||||||
@@ -1270,13 +1270,13 @@ Public Class Timbrado
|
|||||||
Private Function EnviarInformacionPADE(url As String, payload As String, tokenAuth As String) As String
|
Private Function EnviarInformacionPADE(url As String, payload As String, tokenAuth As String) As String
|
||||||
Dim Retorno As String = ""
|
Dim Retorno As String = ""
|
||||||
Try
|
Try
|
||||||
Using httpClient = New HttpClient()
|
Using httpClient As New HttpClient()
|
||||||
httpClient.Timeout = New TimeSpan(0, 1, 0)
|
httpClient.Timeout = New TimeSpan(0, 1, 0)
|
||||||
Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
Using request As New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
||||||
request.Headers.Add("Authorization", $"Basic {tokenAuth}")
|
request.Headers.Add("Authorization", $"Basic {tokenAuth}")
|
||||||
Using content = New StringContent(payload, Encoding.UTF8, "application/json")
|
Using content As New StringContent(payload, Encoding.UTF8, "application/json")
|
||||||
request.Content = content
|
request.Content = content
|
||||||
Dim response = httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result
|
Dim response As HttpResponseMessage = httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result
|
||||||
|
|
||||||
Retorno = response.Content.ReadAsStringAsync().Result
|
Retorno = response.Content.ReadAsStringAsync().Result
|
||||||
End Using
|
End Using
|
||||||
@@ -1569,7 +1569,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
Dim w As Integer = 0
|
Dim w As Integer = 0
|
||||||
|
|
||||||
For Each Ret In ObjCFDITimbre.Retenciones
|
For Each Ret As CFDIRetenciones In ObjCFDITimbre.Retenciones
|
||||||
comprobante.Impuestos.Retenciones(w) = New Profact.TimbraCFDI40.ComprobanteImpuestosRetencion()
|
comprobante.Impuestos.Retenciones(w) = New Profact.TimbraCFDI40.ComprobanteImpuestosRetencion()
|
||||||
comprobante.Impuestos.Retenciones(w).Impuesto = Ret.Impuesto
|
comprobante.Impuestos.Retenciones(w).Impuesto = Ret.Impuesto
|
||||||
comprobante.Impuestos.Retenciones(w).Importe = Ret.Importe
|
comprobante.Impuestos.Retenciones(w).Importe = Ret.Importe
|
||||||
@@ -1624,7 +1624,7 @@ Public Class Timbrado
|
|||||||
If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
|
If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
|
||||||
|
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
Dim ComExt = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExterior()
|
Dim ComExt As New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExterior()
|
||||||
ComExt.Version = "1.1"
|
ComExt.Version = "1.1"
|
||||||
ComExt.MotivoTrasladoSpecified = True
|
ComExt.MotivoTrasladoSpecified = True
|
||||||
ComExt.MotivoTraslado = ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado
|
ComExt.MotivoTraslado = ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado
|
||||||
|
|||||||
@@ -114,6 +114,18 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Metodo = "ConsultarClasificaciones" Then
|
||||||
|
context.Response.ContentType = "application/json"
|
||||||
|
Dim Auth = ValidarSolicitud(context)
|
||||||
|
|
||||||
|
If Auth.IsSucces Then
|
||||||
|
retorno = ConsultaClasificaciones(context)
|
||||||
|
Else
|
||||||
|
context.Response.StatusCode = Auth.StatusCode
|
||||||
|
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
context.Response.Write(retorno)
|
context.Response.Write(retorno)
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -226,10 +238,16 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim RespuestaError As New ResponseMsgError
|
Dim RespuestaError As New ResponseMsgError
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
Dim CveClasificacion = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(CveClasificacion) Then
|
||||||
|
CveClasificacion = "-1"
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Productos As JArray = Nothing
|
Dim Productos As JArray = Nothing
|
||||||
|
|
||||||
Using ObjInventario As New ClsInventarios
|
Using ObjInventario As New ClsInventarios
|
||||||
If ObjInventario.GetJAM_APIs(1) AndAlso ObjInventario.DtResultados IsNot Nothing Then
|
If ObjInventario.GetJAM_APIs(1, CveClasificacion:=CveClasificacion.ToEntero()) AndAlso ObjInventario.DtResultados IsNot Nothing Then
|
||||||
Productos = JArray.Parse(ObjInventario.DtResultados.DataTableToJSONIPP())
|
Productos = JArray.Parse(ObjInventario.DtResultados.DataTableToJSONIPP())
|
||||||
Else
|
Else
|
||||||
RespuestaError.message = "no se pudo obtener los datos"
|
RespuestaError.message = "no se pudo obtener los datos"
|
||||||
@@ -256,6 +274,39 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function ConsultaClasificaciones(ByVal context As HttpContext) As String
|
||||||
|
Dim Respuesta As New ResponseMsg
|
||||||
|
Dim RespuestaError As New ResponseMsgError
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
Dim Clasificaciones As JArray = Nothing
|
||||||
|
|
||||||
|
Try
|
||||||
|
Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP())
|
||||||
|
Catch ex As Exception
|
||||||
|
RespuestaError.message = "no se pudo obtener los datos"
|
||||||
|
TieneError = True
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "")
|
||||||
|
Msg.GuardaLogAD("LogE119")
|
||||||
|
|
||||||
|
If TieneError Then
|
||||||
|
context.Response.StatusCode = 200
|
||||||
|
Return JsonConvert.SerializeObject(RespuestaError)
|
||||||
|
Else
|
||||||
|
context.Response.StatusCode = 200
|
||||||
|
Try
|
||||||
|
Respuesta.data = New JObject(New JProperty("Clasificaciones", Clasificaciones))
|
||||||
|
Respuesta.message = "Los datos se obtuvieron correctamente"
|
||||||
|
Return JsonConvert.SerializeObject(Respuesta)
|
||||||
|
Catch ex As Exception
|
||||||
|
RespuestaError.message = "Ocurrió un error al generar la petición"
|
||||||
|
Return JsonConvert.SerializeObject(RespuestaError)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Class ResponseMsg
|
Private Class ResponseMsg
|
||||||
Sub New()
|
Sub New()
|
||||||
status = "success"
|
status = "success"
|
||||||
|
|||||||
@@ -222,7 +222,8 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||||
|
|
||||||
|
Dim IntermediarioFactura As Boolean = False
|
||||||
|
If UsuarioActual.CveEmpresa = 145 Then IntermediarioFactura = True
|
||||||
If ChkIntermediario.Checked Then
|
If ChkIntermediario.Checked Then
|
||||||
|
|
||||||
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
||||||
@@ -238,8 +239,10 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then
|
If Not IntermediarioFactura Then ' si factura no se manda al gasto sino se disminuye solo lo depositado
|
||||||
OcurrioError = True
|
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IVA <> 0 Then
|
If IVA <> 0 Then
|
||||||
@@ -306,6 +309,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
|
Dim i As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||||
|
|
||||||
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
||||||
@@ -315,6 +319,12 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
||||||
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
|
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
|
||||||
|
|
||||||
|
'si es el primero, se descuenta la "comisión"
|
||||||
|
If i = 0 AndAlso IntermediarioFactura Then
|
||||||
|
Importe = Importe - ImporteInter
|
||||||
|
i += 1
|
||||||
|
End If
|
||||||
|
|
||||||
'Datos de las Prepolizas A Cancelar
|
'Datos de las Prepolizas A Cancelar
|
||||||
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
||||||
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
||||||
@@ -328,7 +338,6 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then
|
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
If dtc IsNot Nothing Then
|
If dtc IsNot Nothing Then
|
||||||
Dim Row = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
Dim Row As DataRow = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||||
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
||||||
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -804,9 +804,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
|
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
|
||||||
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL
|
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTCDolaresDolares.Text.ToDecimal
|
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
||||||
|
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTCDolares.Text.ToDecimal)
|
||||||
End If
|
End If
|
||||||
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
|
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
|
||||||
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTCDolares.Text.ToDecimal
|
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTCDolares.Text.ToDecimal
|
||||||
@@ -819,6 +820,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'DESPROGRAMA LO PROGRAMADO DESPUES DE HACERLE UN PAGO
|
'DESPROGRAMA LO PROGRAMADO DESPUES DE HACERLE UN PAGO
|
||||||
@@ -875,16 +877,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||||
|
|
||||||
'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
|
'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
|
||||||
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
|
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
|
||||||
IDPoliza = ObjMov.ContaIdPoliza
|
IDPoliza = ObjMov.ContaIdPoliza
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<%-- <li>
|
||||||
<asp:LinkButton ID="LnkAcarreo" runat="server" Text="Verificar Acarreos" Visible="False"></asp:LinkButton>
|
<asp:LinkButton ID="LnkAcarreo" runat="server" Text="Verificar Acarreos" Visible="False"></asp:LinkButton>
|
||||||
</li>
|
</li>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
|
||||||
@@ -62,9 +62,9 @@
|
|||||||
<asp:PostBackTrigger ControlID="BtnDescontabilizar" />
|
<asp:PostBackTrigger ControlID="BtnDescontabilizar" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<li>
|
<%--<li>
|
||||||
<asp:LinkButton ID="LBContabilizarAC" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea contabilizar la compra?" data-btn-ok-label="si" Text="Contabilizar" runat="server" OnClick="LBContabilizarAC_Click" Visible="false"> <i class="fa fa-check"></i> Contabilizar</asp:LinkButton>
|
<asp:LinkButton ID="LBContabilizarAC" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea contabilizar la compra?" data-btn-ok-label="si" Text="Contabilizar" runat="server" OnClick="LBContabilizarAC_Click" Visible="false"> <i class="fa fa-check"></i> Contabilizar</asp:LinkButton>
|
||||||
</li>
|
</li>--%>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HLPagar" CssClass="thickbox" Visible="false" runat="server"><i class='fa fa-money'></i> Pagar</asp:HyperLink>
|
<asp:HyperLink ID="HLPagar" CssClass="thickbox" Visible="false" runat="server"><i class='fa fa-money'></i> Pagar</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
@@ -2516,13 +2516,13 @@
|
|||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:UpdatePanel ID="UPObservaciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPObservaciones" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table border="0" width="250px">
|
<table border="0" width="100%">
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td><b>Observaciones Generales:</b> </td>
|
<td><b>Observaciones Generales:</b> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="250px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -3434,56 +3434,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div id="divAddAcarreo" class="modal ADS fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<asp:UpdatePanel ID="UpAddAcarreo" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="myModalLabel" runat="server">Asociación de Acarreos</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:UpdatePanel ID="UpBodyAcarreo" UpdateMode="Conditional" runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:GridView ID="GvAcarreo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Acarreos con los filtros especificados"
|
|
||||||
DataKeyNames="CvePreEstimacion,Importe,CveUnidadMedida,UnidadMedida,CveSubProyectoOrigen,SubProyectoOrigen,CveSubProyectoDestino,SubProyectoDestino" ToolTip="Listado de Acarreos"
|
|
||||||
CssClass="table table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="NumContrato" HeaderText="Contrato" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="Transportista" HeaderText="Transportista" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="NumPreEstimacion" HeaderText="Número de Pre-Estimación" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:BoundField DataField="FechaPreEstimacion" HeaderText="Fecha Pre-Estimación" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:CheckBox ID="ChkRow" runat="server" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:LinkButton ID="BtnAgregarAcarreo" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Aceptar</asp:LinkButton>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="ModalPesos" class="modal ADS fade" role="dialog">
|
<div id="ModalPesos" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
@@ -5295,6 +5245,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="DivPedimento" runat="server">
|
<div class="form-group form-md-line-input input-iconright" id="DivPedimento" runat="server">
|
||||||
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
||||||
|
ClearMaskOnLostFocus="false"
|
||||||
|
TargetControlID="TxtPedimento"
|
||||||
|
Mask="99--99--9999--9999999"
|
||||||
|
MaskType="Number"
|
||||||
|
InputDirection="LeftToRight"
|
||||||
|
AcceptNegative="None"
|
||||||
|
ErrorTooltipEnabled="True" />
|
||||||
|
|
||||||
|
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="VGMCrearFleteImportacion" ErrorMessage="Formato no valido, el formato correcto es 99--99--9999--9999999" ForeColor="Red"
|
||||||
|
ValidationExpression="^[0-9 ]{2}--[0-9 ]{2}--[0-9 ]{4}--[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
||||||
|
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator ID="RFVPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="VGMCrearFleteImportacion"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="VGMCrearFleteImportacion"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPedimento" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPedimento" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento"></ajax:ValidatorCalloutExtender>
|
||||||
<label for="<%= TxtPedimento.ClientID.ToString()%>">Pedimento:</label>
|
<label for="<%= TxtPedimento.ClientID.ToString()%>">Pedimento:</label>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -42,20 +42,20 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">Pedimento:</div>
|
<div class="col-md-2">Pedimento:</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server" MaxLength="18" Width="300px" ClientIDMode="Static" ></asp:TextBox>
|
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server" MaxLength="21" Width="300px" ClientIDMode="Static" ></asp:TextBox>
|
||||||
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
||||||
ClearMaskOnLostFocus="false"
|
ClearMaskOnLostFocus="false"
|
||||||
TargetControlID="TxtPedimento"
|
TargetControlID="TxtPedimento"
|
||||||
Mask="99-99-9999-9999999"
|
Mask="99--99--9999--9999999"
|
||||||
MaskType="Number"
|
MaskType="Number"
|
||||||
InputDirection="LeftToRight"
|
InputDirection="LeftToRight"
|
||||||
AcceptNegative="None"
|
AcceptNegative="None"
|
||||||
ErrorTooltipEnabled="True" />
|
ErrorTooltipEnabled="True" />
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="GrpGuardar" ErrorMessage="Formato no valido, el formato correcto es 99-99-9999-9999999" ForeColor="Red"
|
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="GrpGuardar" ErrorMessage="Formato no valido, el formato correcto es 99--99--9999--9999999" ForeColor="Red"
|
||||||
ValidationExpression="^[0-9 ]{2}-[0-9 ]{2}-[0-9 ]{4}-[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
ValidationExpression="^[0-9 ]{2}--[0-9 ]{2}--[0-9 ]{4}--[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|||||||
@@ -95,17 +95,10 @@ Partial Class Compras_Importaciones
|
|||||||
DdlProveedores.txtValue.Value = ObjImportaciones.DtResultados.Rows(0)("CveAduanal").ToString
|
DdlProveedores.txtValue.Value = ObjImportaciones.DtResultados.Rows(0)("CveAduanal").ToString
|
||||||
DdlProveedores.txtText.Value = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
DdlProveedores.txtText.Value = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
||||||
|
|
||||||
'HdnCveCompra.Value = ObjImportaciones.DtResultados.Rows(0)("CveCompra").ToString
|
|
||||||
'LbCompraProveedor.Text = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
|
||||||
'HLCompraSerieFolio.Text = ObjImportaciones.DtResultados.Rows(0)("SerieFolio").ToString
|
|
||||||
'HLCompraSerieFolio.NavigateUrl = $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}"
|
|
||||||
'LbCompraImporte.Text = ObjImportaciones.DtResultados.Rows(0)("Total").ToString
|
|
||||||
|
|
||||||
If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
|
If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
|
||||||
LnkCerrarImportacion.Visible = True
|
LnkCerrarImportacion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
|
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||||
VincularAF()
|
VincularAF()
|
||||||
|
|
||||||
@@ -149,7 +142,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
Dim ObjImp As New ClsCompras
|
Dim ObjImp As New ClsCompras
|
||||||
ObjImp.IniciaTransacSQL()
|
ObjImp.IniciaTransacSQL()
|
||||||
Dim ErrorImportacion = False
|
Dim ErrorImportacion As Boolean = False
|
||||||
|
|
||||||
If CveImportacion < 0 Then
|
If CveImportacion < 0 Then
|
||||||
CveImportacion = ObjImp.AddImportacion(Pedimento, TxtDescripcion.Text.Trim, DdlProveedores.SelectedValue.ToEntero, HdnCveAF.Value.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveImportacion = ObjImp.AddImportacion(Pedimento, TxtDescripcion.Text.Trim, DdlProveedores.SelectedValue.ToEntero, HdnCveAF.Value.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
@@ -197,7 +190,7 @@ Partial Class Compras_Importaciones
|
|||||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjImp As New ClsCompras
|
Dim ObjImp As New ClsCompras
|
||||||
ObjImp.IniciaTransacSQL()
|
ObjImp.IniciaTransacSQL()
|
||||||
Dim ErrorEliminar = False
|
Dim ErrorEliminar As Boolean = False
|
||||||
|
|
||||||
For Each dr As DataRow In DtCompras.Rows
|
For Each dr As DataRow In DtCompras.Rows
|
||||||
If Not ObjImp.RemoveImportacionDetalle(dr("CveImportacionDetalle").ToString.ToEntero) Then
|
If Not ObjImp.RemoveImportacionDetalle(dr("CveImportacionDetalle").ToString.ToEntero) Then
|
||||||
@@ -265,7 +258,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
Protected Sub LnkEliminaCompraVinculada_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEliminaCompraVinculada_Click(sender As Object, e As EventArgs)
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
If CveImportacion > 0 AndAlso GvComprasVinculadas.Rows(gvRow.RowIndex).DataKey("CveImportacionCompra").ToEntero > 0 Then
|
If CveImportacion > 0 AndAlso GvComprasVinculadas.Rows(gvRow.RowIndex).DataKey("CveImportacionCompra").ToEntero > 0 Then
|
||||||
Dim ObjImportaciones As New ClsCompras
|
Dim ObjImportaciones As New ClsCompras
|
||||||
|
|
||||||
@@ -295,7 +288,7 @@ Partial Class Compras_Importaciones
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ErrorAgregar = False
|
Dim ErrorAgregar As Boolean = False
|
||||||
Dim RowCompra As DataRow = Nothing
|
Dim RowCompra As DataRow = Nothing
|
||||||
|
|
||||||
If ObjCompras.GetCompras(HdnCveCompra.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.GetCompras(HdnCveCompra.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -414,7 +407,7 @@ Partial Class Compras_Importaciones
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ErrorAgregar = False
|
Dim ErrorAgregar As Boolean = False
|
||||||
Dim RowCompra As DataRow = Nothing
|
Dim RowCompra As DataRow = Nothing
|
||||||
|
|
||||||
If ObjCompras.GetCompras(HdnCveCompraGasto.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.GetCompras(HdnCveCompraGasto.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -471,7 +464,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
If CveImportacion > 0 AndAlso GvDatos.Rows(e.RowIndex).DataKey("CveImportacionDetalle").ToEntero > 0 Then
|
If CveImportacion > 0 AndAlso GvDatos.Rows(e.RowIndex).DataKey("CveImportacionDetalle").ToEntero > 0 Then
|
||||||
Dim ObjImportaciones As New ClsCompras
|
Dim ObjImportaciones As New ClsCompras
|
||||||
|
|
||||||
@@ -501,18 +494,12 @@ Partial Class Compras_Importaciones
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
Dim ObjInv As New ClsInventarios
|
||||||
|
|
||||||
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
|
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim CveEmpresaToken As Integer = UserParams("CVEEMPRESA").ToString().ToEntero()
|
Dim CveEmpresaToken As Integer = UserParams("CVEEMPRESA").ToString().ToEntero()
|
||||||
Dim CveUsuario As Integer = IfNull(UserParams("CVEUSUARIO"), 100, UserParams("CVEUSUARIO").ToString().ToEntero()).ToString().ToEntero()
|
Dim CveUsuario As Integer = IfNull(UserParams("CVEUSUARIO"), 100, UserParams("CVEUSUARIO").ToString().ToEntero()).ToString().ToEntero()
|
||||||
|
|
||||||
Dim UsuarioToken = ValidaUsuarioSistema(CveEmpresaToken, CveUsuario)
|
Dim UsuarioToken As Usuario = ValidaUsuarioSistema(CveEmpresaToken, CveUsuario)
|
||||||
|
|
||||||
If UsuarioToken IsNot Nothing AndAlso Context.Session("UsuarioSIG") Is Nothing Then
|
If UsuarioToken IsNot Nothing AndAlso Context.Session("UsuarioSIG") Is Nothing Then
|
||||||
Context.Session("UsuarioSIG") = UsuarioToken
|
Context.Session("UsuarioSIG") = UsuarioToken
|
||||||
@@ -319,7 +319,7 @@ Partial Class PopUpVerFactura
|
|||||||
cvePersonal = Request("cvePersonal").ToString.ToEntero()
|
cvePersonal = Request("cvePersonal").ToString.ToEntero()
|
||||||
End If
|
End If
|
||||||
Dim RFCs As New StringBuilder
|
Dim RFCs As New StringBuilder
|
||||||
Dim contador = 0
|
Dim contador As Integer = 0
|
||||||
Using objnom As New ClsNominas
|
Using objnom As New ClsNominas
|
||||||
If objnom.PreNominaTotalSemana(numeroPeriodo, UsuarioActual.CveEmpresa, cveSubProyecto, cveTipoNomina, tipoTrabajador, ejercicio, facturado) Then
|
If objnom.PreNominaTotalSemana(numeroPeriodo, UsuarioActual.CveEmpresa, cveSubProyecto, cveTipoNomina, tipoTrabajador, ejercicio, facturado) Then
|
||||||
For Each item As DataRow In objnom.DtResultados.Select("CvePersonal > 0")
|
For Each item As DataRow In objnom.DtResultados.Select("CvePersonal > 0")
|
||||||
@@ -384,7 +384,7 @@ Partial Class PopUpVerFactura
|
|||||||
lrds.Add(rds2)
|
lrds.Add(rds2)
|
||||||
|
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim rutardlc = "Formatos\RepAgroInventarioDiario.rdlc"
|
Dim rutardlc As String = "Formatos\RepAgroInventarioDiario.rdlc"
|
||||||
If EnviarCorrreo Then
|
If EnviarCorrreo Then
|
||||||
Dim para As String = ""
|
Dim para As String = ""
|
||||||
Dim dtCorreos As DataTable = New DataTable()
|
Dim dtCorreos As DataTable = New DataTable()
|
||||||
@@ -539,7 +539,7 @@ Partial Class PopUpVerFactura
|
|||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
|
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim rutardlc = "Formatos\Agro\EmbarqueManifiesto.rdlc"
|
Dim rutardlc As String = "Formatos\Agro\EmbarqueManifiesto.rdlc"
|
||||||
If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then
|
If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then
|
||||||
rutardlc = "Formatos\Agro\EmbarqueManifiesto2.rdlc"
|
rutardlc = "Formatos\Agro\EmbarqueManifiesto2.rdlc"
|
||||||
End If
|
End If
|
||||||
@@ -849,7 +849,7 @@ Partial Class PopUpVerFactura
|
|||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim pdf = StreamPDF("Formatos\Agro\EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
Dim pdf As Byte() = StreamPDF("Formatos\Agro\EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
||||||
|
|
||||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = pdf, .NombreArchivo = String.Format("{0}.pdf", "DatosCartaPorte")})
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = pdf, .NombreArchivo = String.Format("{0}.pdf", "DatosCartaPorte")})
|
||||||
@@ -915,9 +915,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
Dim bcode As New BarcodeLib.Barcode()
|
Dim bcode As New BarcodeLib.Barcode()
|
||||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
Dim img As Drawing.Image = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
||||||
Dim barcodebyte As Byte()
|
Dim barcodebyte As Byte()
|
||||||
Using ms = New MemoryStream()
|
Using ms As New MemoryStream()
|
||||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||||
barcodebyte = ms.ToArray()
|
barcodebyte = ms.ToArray()
|
||||||
End Using
|
End Using
|
||||||
@@ -1023,9 +1023,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
Dim bcode As New BarcodeLib.Barcode()
|
Dim bcode As New BarcodeLib.Barcode()
|
||||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTIN), 500, 200)
|
Dim img As Drawing.Image = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTIN), 500, 200)
|
||||||
Dim barcodebyte As Byte()
|
Dim barcodebyte As Byte()
|
||||||
Using ms = New MemoryStream()
|
Using ms As New MemoryStream()
|
||||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||||
barcodebyte = ms.ToArray()
|
barcodebyte = ms.ToArray()
|
||||||
End Using
|
End Using
|
||||||
@@ -1037,14 +1037,12 @@ Partial Class PopUpVerFactura
|
|||||||
rds2.Value = dtqr
|
rds2.Value = dtqr
|
||||||
lrds.Add(rds2)
|
lrds.Add(rds2)
|
||||||
'endimg
|
'endimg
|
||||||
|
|
||||||
|
|
||||||
Dim dtqr2 As DataTable = dtqr.Clone()
|
Dim dtqr2 As DataTable = dtqr.Clone()
|
||||||
|
|
||||||
Dim bcode2 As New BarcodeLib.Barcode()
|
Dim bcode2 As New BarcodeLib.Barcode()
|
||||||
Dim img2 = bcode2.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTINAll.Replace("(", "").Replace(")", "")), 900, 100)
|
Dim img2 As Drawing.Image = bcode2.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTINAll.Replace("(", "").Replace(")", "")), 900, 100)
|
||||||
Dim barcodebyte2 As Byte()
|
Dim barcodebyte2 As Byte()
|
||||||
Using ms = New MemoryStream()
|
Using ms As New MemoryStream()
|
||||||
img2.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
img2.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||||
barcodebyte2 = ms.ToArray()
|
barcodebyte2 = ms.ToArray()
|
||||||
End Using
|
End Using
|
||||||
@@ -1054,8 +1052,6 @@ Partial Class PopUpVerFactura
|
|||||||
Dim rds22 As New ReportDataSource With {.Name = "dsImagenesGTIN", .Value = dtqr2}
|
Dim rds22 As New ReportDataSource With {.Name = "dsImagenesGTIN", .Value = dtqr2}
|
||||||
lrds.Add(rds22)
|
lrds.Add(rds22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
|
|
||||||
@@ -1139,9 +1135,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
Dim bcode As New BarcodeLib.Barcode()
|
Dim bcode As New BarcodeLib.Barcode()
|
||||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
Dim img As Drawing.Image = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
||||||
Dim barcodebyte As Byte()
|
Dim barcodebyte As Byte()
|
||||||
Using ms = New MemoryStream()
|
Using ms As New MemoryStream()
|
||||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||||
barcodebyte = ms.ToArray()
|
barcodebyte = ms.ToArray()
|
||||||
End Using
|
End Using
|
||||||
@@ -1173,8 +1169,8 @@ Partial Class PopUpVerFactura
|
|||||||
Dim ObjUsuarios As New ClsSisUsuarios
|
Dim ObjUsuarios As New ClsSisUsuarios
|
||||||
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
||||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||||
UsuarioToken = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
UsuarioToken = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||||
UsuarioToken.CveEmpresa = CveEmpresa
|
UsuarioToken.CveEmpresa = CveEmpresa
|
||||||
CreaObjetoEmpresa(UsuarioToken)
|
CreaObjetoEmpresa(UsuarioToken)
|
||||||
@@ -1559,10 +1555,9 @@ Partial Class PopUpVerFactura
|
|||||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||||
Dim DtCortesVentasResumen As DataTable = Nothing
|
Dim DtCortesVentasResumen As DataTable = Nothing
|
||||||
Dim DtCortesVentas As DataTable = Nothing
|
Dim DtCortesVentas As DataTable = Nothing
|
||||||
Dim Fecha = "", Nombre = ""
|
Dim Fecha As String = "", Nombre As String = ""
|
||||||
If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||||
DtCortesVentasResumen = ObjVenta.DtResultados
|
DtCortesVentasResumen = ObjVenta.DtResultados
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -1969,7 +1964,7 @@ Partial Class PopUpVerFactura
|
|||||||
XmlDoc.Load(PathXML)
|
XmlDoc.Load(PathXML)
|
||||||
|
|
||||||
Dim nodo As XmlNode = XmlDoc.DocumentElement
|
Dim nodo As XmlNode = XmlDoc.DocumentElement
|
||||||
Dim Version = ValorXML(nodo, "version")
|
Dim Version As String = ValorXML(nodo, "version")
|
||||||
|
|
||||||
Dim namespaces As New XmlNamespaceManager(XmlDoc.NameTable)
|
Dim namespaces As New XmlNamespaceManager(XmlDoc.NameTable)
|
||||||
Dim Prefijo As String = If(XmlDoc.DocumentElement.Prefix = "", "cfd", XmlDoc.DocumentElement.Prefix)
|
Dim Prefijo As String = If(XmlDoc.DocumentElement.Prefix = "", "cfd", XmlDoc.DocumentElement.Prefix)
|
||||||
@@ -2124,7 +2119,7 @@ Partial Class PopUpVerFactura
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer)
|
Private Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer)
|
||||||
Dim resp = PreParaImpresionCartaPorte(CveTimbre)
|
Dim resp As Modelos.MSubReportData = PreParaImpresionCartaPorte(CveTimbre)
|
||||||
If resp.DataSources.Count > 0 AndAlso resp.Parametros.Count > 0 Then
|
If resp.DataSources.Count > 0 AndAlso resp.Parametros.Count > 0 Then
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", resp.DataSources, resp.Parametros, resp.SerieFolio)
|
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", resp.DataSources, resp.Parametros, resp.SerieFolio)
|
||||||
End If
|
End If
|
||||||
@@ -2262,7 +2257,7 @@ Partial Class PopUpVerFactura
|
|||||||
XMLDoc.Load(Path)
|
XMLDoc.Load(Path)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Try
|
Try
|
||||||
Dim oReader = New StreamReader(Path, Encoding.GetEncoding("ISO-8859-1"))
|
Dim oReader As New StreamReader(Path, Encoding.GetEncoding("ISO-8859-1"))
|
||||||
XMLDoc.Load(oReader)
|
XMLDoc.Load(oReader)
|
||||||
oReader.Dispose()
|
oReader.Dispose()
|
||||||
Catch ex2 As Exception
|
Catch ex2 As Exception
|
||||||
@@ -2279,7 +2274,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||||
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||||
Dim Version = ValorXML(XMLDoc.DocumentElement, "version")
|
Dim Version As String = ValorXML(XMLDoc.DocumentElement, "version")
|
||||||
If Version = "3.3" Then
|
If Version = "3.3" Then
|
||||||
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
||||||
Else ' se considera que es la version 4.0
|
Else ' se considera que es la version 4.0
|
||||||
@@ -2306,7 +2301,7 @@ Partial Class PopUpVerFactura
|
|||||||
If nodeCliente IsNot Nothing Then
|
If nodeCliente IsNot Nothing Then
|
||||||
ClienteRFC = ValorXML(nodeCliente, "RFC")
|
ClienteRFC = ValorXML(nodeCliente, "RFC")
|
||||||
ClienteNombre = ValorXML(nodeCliente, "Nombre")
|
ClienteNombre = ValorXML(nodeCliente, "Nombre")
|
||||||
Dim UsoCFDI = ValorXML(nodeCliente, "UsoCFDI")
|
Dim UsoCFDI As String = ValorXML(nodeCliente, "UsoCFDI")
|
||||||
ClienteUsoCFDi = String.Format("{0} - {1}", UsoCFDI, GlobalDTSATUsosCFDI().FiltroPrimeroValor("Descripcion", String.Format("UsoCFDI = '{0}'", UsoCFDI)))
|
ClienteUsoCFDi = String.Format("{0} - {1}", UsoCFDI, GlobalDTSATUsosCFDI().FiltroPrimeroValor("Descripcion", String.Format("UsoCFDI = '{0}'", UsoCFDI)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2393,9 +2388,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", "cartaporte20"), namespaces)
|
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", "cartaporte20"), namespaces)
|
||||||
If UsuarioActual.CveEmpresa = 13 AndAlso nodeMercanciaPadre IsNot Nothing Then
|
If UsuarioActual.CveEmpresa = 13 AndAlso nodeMercanciaPadre IsNot Nothing Then
|
||||||
Dim PesoNetoTotal = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
|
Dim PesoNetoTotal As String = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
|
||||||
Dim UnidadPeso = ValorXML(nodeMercanciaPadre(0), "UnidadPeso", "")
|
Dim UnidadPeso As String = ValorXML(nodeMercanciaPadre(0), "UnidadPeso", "")
|
||||||
Dim NumTotalMercancias = ValorXML(nodeMercanciaPadre(0), "NumTotalMercancias", "")
|
Dim NumTotalMercancias As String = ValorXML(nodeMercanciaPadre(0), "NumTotalMercancias", "")
|
||||||
|
|
||||||
params.Add(New ReportParameter("PesoNetoTotal", PesoNetoTotal))
|
params.Add(New ReportParameter("PesoNetoTotal", PesoNetoTotal))
|
||||||
params.Add(New ReportParameter("UnidadPeso", UnidadPeso))
|
params.Add(New ReportParameter("UnidadPeso", UnidadPeso))
|
||||||
@@ -2425,14 +2420,14 @@ Partial Class PopUpVerFactura
|
|||||||
Row("RFC") = ValorXML(node, "RFCRemitenteDestinatario", "")
|
Row("RFC") = ValorXML(node, "RFCRemitenteDestinatario", "")
|
||||||
Row("Nombre") = ValorXML(node, "NombreRemitenteDestinatario", "")
|
Row("Nombre") = ValorXML(node, "NombreRemitenteDestinatario", "")
|
||||||
|
|
||||||
Dim nodeDomicilio = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte20:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
|
Dim nodeDomicilio As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte20:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
|
||||||
If nodeDomicilio IsNot Nothing Then
|
If nodeDomicilio IsNot Nothing Then
|
||||||
|
|
||||||
Dim Estado As String = ""
|
Dim Estado As String = ""
|
||||||
Dim Municipio As String = ""
|
Dim Municipio As String = ""
|
||||||
Dim Colonia As String = ""
|
Dim Colonia As String = ""
|
||||||
Dim calle = ValorXML(nodeDomicilio, "Calle", "")
|
Dim calle As String = ValorXML(nodeDomicilio, "Calle", "")
|
||||||
Dim CP = ValorXML(nodeDomicilio, "CodigoPostal", "")
|
Dim CP As String = ValorXML(nodeDomicilio, "CodigoPostal", "")
|
||||||
|
|
||||||
Dim dr As DataRow = GlobalDTGralColonias(ValorXML(nodeDomicilio, "Estado", ""), ValorXML(nodeDomicilio, "Municipio", ""), ValorXML(nodeDomicilio, "Colonia", "")).FiltroPrimero("")
|
Dim dr As DataRow = GlobalDTGralColonias(ValorXML(nodeDomicilio, "Estado", ""), ValorXML(nodeDomicilio, "Municipio", ""), ValorXML(nodeDomicilio, "Colonia", "")).FiltroPrimero("")
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
@@ -2451,7 +2446,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("DistanciaTotal", DistanciaTotal.ToString()))
|
params.Add(New ReportParameter("DistanciaTotal", DistanciaTotal.ToString()))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim nodeRelacion = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
Dim nodeRelacion As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||||
|
|
||||||
If nodeRelacion IsNot Nothing Then
|
If nodeRelacion IsNot Nothing Then
|
||||||
Dim RelacionCodigo As String = ValorXML(nodeRelacion, "TipoRelacion")
|
Dim RelacionCodigo As String = ValorXML(nodeRelacion, "TipoRelacion")
|
||||||
@@ -2476,17 +2471,16 @@ Partial Class PopUpVerFactura
|
|||||||
Relacion = "08 - Factura generada por pagos en parcialidades"
|
Relacion = "08 - Factura generada por pagos en parcialidades"
|
||||||
Case "09"
|
Case "09"
|
||||||
Relacion = "09 - Factura generada por pagos diferidos"
|
Relacion = "09 - Factura generada por pagos diferidos"
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim nodoDocumentosRealcionados = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
Dim nodoDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||||
For Each node As XmlNode In nodoDocumentosRealcionados
|
For Each node As XmlNode In nodoDocumentosRelacionados
|
||||||
|
|
||||||
Dim nRow As DataRow = DTRelacionados.NewRow
|
Dim nRow As DataRow = DTRelacionados.NewRow
|
||||||
nRow("Relacion") = Relacion
|
nRow("Relacion") = Relacion
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim nodoUUID = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cfdi:CfdiRelacionado")
|
Dim nodoUUID As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cfdi:CfdiRelacionado")
|
||||||
nRow("UUID") = ValorXML(nodoUUID, "UUID", "")
|
nRow("UUID") = ValorXML(nodoUUID, "UUID", "")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
nRow("UUID") = ""
|
nRow("UUID") = ""
|
||||||
@@ -2726,7 +2720,7 @@ Partial Class PopUpVerFactura
|
|||||||
End Using
|
End Using
|
||||||
|
|
||||||
If Folio > 0 AndAlso DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then
|
If Folio > 0 AndAlso DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then
|
||||||
Dim ObjFactura = New Modelos.Factura
|
Dim ObjFactura As New Modelos.Factura
|
||||||
ObjFactura.Version = "3.3"
|
ObjFactura.Version = "3.3"
|
||||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
@@ -2936,12 +2930,12 @@ Partial Class PopUpVerFactura
|
|||||||
Dim PathArchivo As String = "" 'String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
|
Dim PathArchivo As String = "" 'String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
|
||||||
|
|
||||||
|
|
||||||
Dim TmpDTImpuestos = New DataTable
|
Dim TmpDTImpuestos As New DataTable
|
||||||
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||||
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||||
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||||
|
|
||||||
Dim TmpDTImpuestosIVAIEPS = New DataTable
|
Dim TmpDTImpuestosIVAIEPS As New DataTable
|
||||||
TmpDTImpuestosIVAIEPS.Columns.Add("Impuesto", GetType(String))
|
TmpDTImpuestosIVAIEPS.Columns.Add("Impuesto", GetType(String))
|
||||||
TmpDTImpuestosIVAIEPS.Columns.Add("tasa", GetType(String))
|
TmpDTImpuestosIVAIEPS.Columns.Add("tasa", GetType(String))
|
||||||
TmpDTImpuestosIVAIEPS.Columns.Add("Importe", GetType(Double))
|
TmpDTImpuestosIVAIEPS.Columns.Add("Importe", GetType(Double))
|
||||||
@@ -2964,7 +2958,7 @@ Partial Class PopUpVerFactura
|
|||||||
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
||||||
Dim CveSubProyecto As Integer = dtVentas(0)("CveSubProyecto").ToString().ToEntero()
|
Dim CveSubProyecto As Integer = dtVentas(0)("CveSubProyecto").ToString().ToEntero()
|
||||||
|
|
||||||
Dim DtSubProyecto = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=dtVentas(0)("CveEmpresa").ToString().ToEntero())
|
Dim DtSubProyecto As DataTable = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=dtVentas(0)("CveEmpresa").ToString().ToEntero())
|
||||||
|
|
||||||
Vta.SubProyecto = DtSubProyecto.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
Vta.SubProyecto = DtSubProyecto.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
||||||
'Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
'Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
||||||
@@ -3078,7 +3072,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||||
If dtImpuesto.Rows.Count > 0 Then
|
If dtImpuesto.Rows.Count > 0 Then
|
||||||
For Each Row As DataRow In dtImpuesto.Rows
|
For Each Row As DataRow In dtImpuesto.Rows
|
||||||
Dim Orden = 80
|
Dim Orden As Integer = 80
|
||||||
If Row("Importe").ToString.ToDouble <> 0 Then
|
If Row("Importe").ToString.ToDouble <> 0 Then
|
||||||
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
||||||
DR("Importe") = Row("Importe").ToString.ToDouble
|
DR("Importe") = Row("Importe").ToString.ToDouble
|
||||||
@@ -3342,15 +3336,11 @@ Partial Class PopUpVerFactura
|
|||||||
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1)
|
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1)
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim CveConcepto As Integer = ObjInventarios.CveConcepto
|
Dim CveConcepto As Integer = ObjInventarios.CveConcepto
|
||||||
Dim Folio As String = ObjInventarios.Folio.ToString
|
Dim Folio As String = ObjInventarios.Folio.ToString
|
||||||
Dim CveCompra = ObjInventarios.CveCompra
|
Dim CveCompra As Integer = ObjInventarios.CveCompra
|
||||||
Dim Fecha As String = ObjInventarios.Fecha.ToShortDateString
|
Dim Fecha As String = ObjInventarios.Fecha.ToShortDateString
|
||||||
Dim FechaHora As DateTime = ObjInventarios.FechaHora
|
Dim FechaHora As DateTime = ObjInventarios.FechaHora
|
||||||
Dim Almacen As String = ObjInventarios.Almacen
|
Dim Almacen As String = ObjInventarios.Almacen
|
||||||
@@ -3441,8 +3431,6 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim CantidadProductos As Decimal = 0
|
Dim CantidadProductos As Decimal = 0
|
||||||
Dim CantidadUsados As Decimal = 0
|
Dim CantidadUsados As Decimal = 0
|
||||||
|
|
||||||
@@ -3533,12 +3521,7 @@ Partial Class PopUpVerFactura
|
|||||||
keys(0) = DtMovimientos.Columns("No")
|
keys(0) = DtMovimientos.Columns("No")
|
||||||
DtMovimientos.PrimaryKey = keys
|
DtMovimientos.PrimaryKey = keys
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
||||||
@@ -4284,8 +4267,8 @@ Partial Class PopUpVerFactura
|
|||||||
Dim SBDireccionD As New StringBuilder()
|
Dim SBDireccionD As New StringBuilder()
|
||||||
Dim CveCliente As Integer = 0
|
Dim CveCliente As Integer = 0
|
||||||
Dim CveDireccionEnvio As Integer = 0
|
Dim CveDireccionEnvio As Integer = 0
|
||||||
Dim ClienteNombre = "", EnvioContacto = "", EnvioDireccion = "", EnvioColonia = "", EnvioCiudad = "", EnvioEstado = "", ClientePais = "", EnvioCP = "", Contrato = "",
|
Dim ClienteNombre As String = "", EnvioContacto As String = "", EnvioDireccion As String = "", EnvioColonia As String = "", EnvioCiudad As String = "", EnvioEstado As String = "", ClientePais As String = "", EnvioCP As String = "", Contrato As String = "",
|
||||||
Paqueteria = "", NumContrato = "", Guia = ""
|
Paqueteria As String = "", NumContrato As String = "", Guia As String = ""
|
||||||
|
|
||||||
Dim CveContrato As Integer = 0
|
Dim CveContrato As Integer = 0
|
||||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||||
@@ -5451,7 +5434,7 @@ Partial Class PopUpVerFactura
|
|||||||
Private Sub GenerarPDFOS(CveOS As Integer)
|
Private Sub GenerarPDFOS(CveOS As Integer)
|
||||||
Dim ObjOS As New ClsOS()
|
Dim ObjOS As New ClsOS()
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
Dim CveFolio = ""
|
Dim CveFolio As String = ""
|
||||||
CreaDT()
|
CreaDT()
|
||||||
|
|
||||||
Dim FIRutaReporte As New System.IO.FileInfo(String.Format("{0}Formatos/OrdenServicio.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim FIRutaReporte As New System.IO.FileInfo(String.Format("{0}Formatos/OrdenServicio.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
@@ -5718,7 +5701,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72) Then
|
If UsuarioActual.CveEmpresa.Contiene(72) Then
|
||||||
Dim SBDomicilioSucursal As New StringBuilder()
|
Dim SBDomicilioSucursal As New StringBuilder()
|
||||||
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString.ToEntero, Estatus:=1).FiltroPrimero("")
|
Dim DRSucursal As DataRow = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString.ToEntero, Estatus:=1).FiltroPrimero("")
|
||||||
|
|
||||||
If DRSucursal IsNot Nothing Then
|
If DRSucursal IsNot Nothing Then
|
||||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||||
@@ -5868,21 +5851,21 @@ Partial Class PopUpVerFactura
|
|||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
If drv IsNot Nothing Then
|
If drv IsNot Nothing Then
|
||||||
Dim Total = drv("Total").ToString().ToDecimal()
|
Dim Total As Decimal = drv("Total").ToString().ToDecimal()
|
||||||
Dim CveEstatusFactura = drv("CveEstatusFactura").ToString().ToEntero()
|
Dim CveEstatusFactura As Integer = drv("CveEstatusFactura").ToString().ToEntero()
|
||||||
Dim FolioFiscal = drv("FolioFiscal").ToString()
|
Dim FolioFiscal As String = drv("FolioFiscal").ToString()
|
||||||
Dim RFCReceptor = drv("RFCReceptor").ToString()
|
Dim RFCReceptor As String = drv("RFCReceptor").ToString()
|
||||||
Dim SelloCancelacion = drv("SelloCancelacion").ToString()
|
Dim SelloCancelacion As String = drv("SelloCancelacion").ToString()
|
||||||
Dim SelloSolicitudCancelacion = drv("SelloSolicitudCancelacion").ToString()
|
Dim SelloSolicitudCancelacion As String = drv("SelloSolicitudCancelacion").ToString()
|
||||||
Dim EstadoCancelacion = drv("EstadoCancelacion").ToString()
|
Dim EstadoCancelacion As String = drv("EstadoCancelacion").ToString()
|
||||||
Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime
|
Dim FechaCancelacion As DateTime = drv("FechaCancelacion").ToString.ToDateTime
|
||||||
|
|
||||||
Dim MotivoCancelacion As String = ""
|
Dim MotivoCancelacion As String = ""
|
||||||
Dim FolioSustitucion As String = ""
|
Dim FolioSustitucion As String = ""
|
||||||
|
|
||||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/AcuseCancelacion.mrt"
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/AcuseCancelacion.mrt"
|
||||||
|
|
||||||
Dim RFCEmisor = UsuarioActual.Empresa.RFC
|
Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||||
|
|
||||||
Dim Titulo As String = "Acuse de cancelación de CFDI"
|
Dim Titulo As String = "Acuse de cancelación de CFDI"
|
||||||
Dim EstadoCFDI As String = "Cancelado"
|
Dim EstadoCFDI As String = "Cancelado"
|
||||||
@@ -5908,9 +5891,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
Using ObjV As New ClsVentas
|
Using ObjV As New ClsVentas
|
||||||
If ObjV.GetVentasPendientesCancelacion(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveVenta:=CveVenta) Then
|
If ObjV.GetVentasPendientesCancelacion(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveVenta:=CveVenta) Then
|
||||||
Dim RowCancelacion = ObjV.DtResultados.FiltroPrimero("")
|
Dim RowCancelacion As DataRow = ObjV.DtResultados.FiltroPrimero("")
|
||||||
If RowCancelacion IsNot Nothing Then
|
If RowCancelacion IsNot Nothing Then
|
||||||
Dim CveMotivoCancelacion = RowCancelacion("CveMotivoCancelacion").ToString().ToEntero()
|
Dim CveMotivoCancelacion As Integer = RowCancelacion("CveMotivoCancelacion").ToString().ToEntero()
|
||||||
FolioSustitucion = RowCancelacion("FolioFiscalSustitucion").ToString()
|
FolioSustitucion = RowCancelacion("FolioFiscalSustitucion").ToString()
|
||||||
|
|
||||||
If CveMotivoCancelacion > 0 Then
|
If CveMotivoCancelacion > 0 Then
|
||||||
@@ -5956,7 +5939,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("MsgError", ""))
|
params.Add(New ReportParameter("MsgError", ""))
|
||||||
params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss")))
|
params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss")))
|
||||||
|
|
||||||
Dim DtAcuse = New DataTable("DtAcuse")
|
Dim DtAcuse As New DataTable("DtAcuse")
|
||||||
DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String)))
|
DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String)))
|
||||||
DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String)))
|
DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String)))
|
||||||
DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String)))
|
DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String)))
|
||||||
@@ -5964,7 +5947,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
If CveEstatusFactura = 20 Then
|
If CveEstatusFactura = 20 Then
|
||||||
|
|
||||||
Dim RowCFDI = DtAcuse.NewRow()
|
Dim RowCFDI As DataRow = DtAcuse.NewRow()
|
||||||
|
|
||||||
RowCFDI("FolioFiscal") = FolioFiscal
|
RowCFDI("FolioFiscal") = FolioFiscal
|
||||||
RowCFDI("Estatus") = "Solicitud de cancelación recibida"
|
RowCFDI("Estatus") = "Solicitud de cancelación recibida"
|
||||||
@@ -6020,7 +6003,7 @@ Partial Class PopUpVerFactura
|
|||||||
#Region "I E C H E Q U E S"
|
#Region "I E C H E Q U E S"
|
||||||
|
|
||||||
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
|
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
|
||||||
Dim CveTipoTransaccion = -1
|
Dim CveTipoTransaccion As Integer = -1
|
||||||
Dim ObjIE As New ClsBancos()
|
Dim ObjIE As New ClsBancos()
|
||||||
ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa)
|
ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa)
|
||||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -6029,13 +6012,13 @@ Partial Class PopUpVerFactura
|
|||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
If CveTipoTransaccion = 1 Then
|
If CveTipoTransaccion = 1 Then
|
||||||
Dim Folio = ObjIE.Folio
|
Dim Folio As String = ObjIE.Folio
|
||||||
Dim Importe = ObjIE.Importe
|
Dim Importe As Double = ObjIE.Importe
|
||||||
Dim Observacion = ObjIE.Observaciones
|
Dim Observacion As String = ObjIE.Observaciones
|
||||||
Dim ImporteLetra = String.Format("--- {0} ---", Importe.Texto2Letras(ObjIE.CveMoneda))
|
Dim ImporteLetra As String = String.Format("--- {0} ---", Importe.Texto2Letras(ObjIE.CveMoneda))
|
||||||
Dim Beneficiario = ObjIE.PagueseA
|
Dim Beneficiario As String = ObjIE.PagueseA
|
||||||
Dim Fecha = ObjIE.FechaDocumento.ToShortDateString
|
Dim Fecha As String = ObjIE.FechaDocumento.ToShortDateString
|
||||||
Dim CveCuenta = ObjIE.CveCuenta
|
Dim CveCuenta As Integer = ObjIE.CveCuenta
|
||||||
params.Add(New ReportParameter("Fecha", Fecha))
|
params.Add(New ReportParameter("Fecha", Fecha))
|
||||||
params.Add(New ReportParameter("Folio", Folio))
|
params.Add(New ReportParameter("Folio", Folio))
|
||||||
params.Add(New ReportParameter("Beneficiario", Beneficiario))
|
params.Add(New ReportParameter("Beneficiario", Beneficiario))
|
||||||
@@ -6044,11 +6027,8 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("Observaciones", Observacion))
|
params.Add(New ReportParameter("Observaciones", Observacion))
|
||||||
params.Add(New ReportParameter("Tipo", If(ObjIE.EsAbonoEnCuenta, "PARA ABONO EN CUENTA DEL BENEFICIARIO", "")))
|
params.Add(New ReportParameter("Tipo", If(ObjIE.EsAbonoEnCuenta, "PARA ABONO EN CUENTA DEL BENEFICIARIO", "")))
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
||||||
|
|
||||||
Dim InicialesUsuarioGenero As String = ""
|
Dim InicialesUsuarioGenero As String = ""
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim NombreUsuarioRenero As String = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("Nombre", $"CveUsuario ={ObjIE.CveUsuario}")
|
Dim NombreUsuarioRenero As String = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("Nombre", $"CveUsuario ={ObjIE.CveUsuario}")
|
||||||
If NombreUsuarioRenero.Trim.Length > 0 Then
|
If NombreUsuarioRenero.Trim.Length > 0 Then
|
||||||
@@ -6057,7 +6037,6 @@ Partial Class PopUpVerFactura
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
params.Add(New ReportParameter("InicialesUsuarioGenero", InicialesUsuarioGenero))
|
params.Add(New ReportParameter("InicialesUsuarioGenero", InicialesUsuarioGenero))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -6082,7 +6061,7 @@ Partial Class PopUpVerFactura
|
|||||||
DtMovimientosPoliza.Columns.Add("Cargo", GetType(Double))
|
DtMovimientosPoliza.Columns.Add("Cargo", GetType(Double))
|
||||||
DtMovimientosPoliza.Columns.Add("Abono", GetType(Double))
|
DtMovimientosPoliza.Columns.Add("Abono", GetType(Double))
|
||||||
|
|
||||||
Dim Dr = DtMovimientosPoliza.NewRow
|
Dim Dr As DataRow = DtMovimientosPoliza.NewRow
|
||||||
Dr("CODIGO") = ""
|
Dr("CODIGO") = ""
|
||||||
Dr("Cuenta") = ""
|
Dr("Cuenta") = ""
|
||||||
Dr("Cargo") = 0
|
Dr("Cargo") = 0
|
||||||
@@ -6101,7 +6080,7 @@ Partial Class PopUpVerFactura
|
|||||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
For Each drt As DataRow In ObjIE.DtResultados.Rows
|
For Each drt As DataRow In ObjIE.DtResultados.Rows
|
||||||
Dim Dr = DtMovimientosPoliza.NewRow
|
Dim Dr As DataRow = DtMovimientosPoliza.NewRow
|
||||||
Dr("CODIGO") = drt("CuentaCodigo")
|
Dr("CODIGO") = drt("CuentaCodigo")
|
||||||
Dr("Cuenta") = drt("CuentaNombre")
|
Dr("Cuenta") = drt("CuentaNombre")
|
||||||
Dr("Cargo") = If(drt("TipoMovto").ToString = "False", drt("ImporteMN"), "0")
|
Dr("Cargo") = If(drt("TipoMovto").ToString = "False", drt("ImporteMN"), "0")
|
||||||
@@ -6389,7 +6368,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim rds = New ReportDataSource("DataSet1", dtMovs)
|
Dim rds As New ReportDataSource("DataSet1", dtMovs)
|
||||||
reportDataSetsList.Add(rds)
|
reportDataSetsList.Add(rds)
|
||||||
|
|
||||||
Dim dtnc As New DataTable
|
Dim dtnc As New DataTable
|
||||||
@@ -6398,7 +6377,7 @@ Partial Class PopUpVerFactura
|
|||||||
dtnc = ObjCompra.DtResultados
|
dtnc = ObjCompra.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjCompra.Dispose()
|
ObjCompra.Dispose()
|
||||||
Dim rds2 = New ReportDataSource("DataSet2", dtnc)
|
Dim rds2 As New ReportDataSource("DataSet2", dtnc)
|
||||||
reportDataSetsList.Add(rds2)
|
reportDataSetsList.Add(rds2)
|
||||||
dtnc.Dispose()
|
dtnc.Dispose()
|
||||||
|
|
||||||
@@ -6538,7 +6517,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
||||||
PS = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
|
PS = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
|
||||||
If Modalidad = "Individual" Then
|
If Modalidad = "Individual" Then
|
||||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||||
|
|
||||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||||
@@ -6547,7 +6526,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
||||||
|
|
||||||
For i As Integer = 0 To Cant
|
For i As Integer = 0 To Cant
|
||||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||||
|
|
||||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||||
@@ -6586,7 +6565,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Lote As String = DetalleRow.Item("Lote").ToString
|
Dim Lote As String = DetalleRow.Item("Lote").ToString
|
||||||
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
||||||
If Modalidad = "Individual" Then
|
If Modalidad = "Individual" Then
|
||||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||||
|
|
||||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||||
@@ -6595,7 +6574,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
||||||
|
|
||||||
For i As Integer = 0 To Cant
|
For i As Integer = 0 To Cant
|
||||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||||
|
|
||||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||||
@@ -6716,7 +6695,7 @@ Partial Class PopUpVerFactura
|
|||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
|
|
||||||
|
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
Dim DtDatos As New DataTable
|
Dim DtDatos As New DataTable
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
@@ -6956,7 +6935,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim CveMonedaImp As Integer
|
Dim CveMonedaImp As Integer
|
||||||
Dim TipoPolImp As String
|
Dim TipoPolImp As String
|
||||||
Dim RutaReporte As String
|
Dim RutaReporte As String
|
||||||
Dim params = New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
TipoPolImp = If(drp("CveTipoPoliza").ToString.ToEntero = 1, "Ingreso", If(drp("CveTipoPoliza").ToString.ToEntero = 2, "Egreso", "Diario"))
|
TipoPolImp = If(drp("CveTipoPoliza").ToString.ToEntero = 1, "Ingreso", If(drp("CveTipoPoliza").ToString.ToEntero = 2, "Egreso", "Diario"))
|
||||||
CveTipoPolizaImp = drp("CveTipoPoliza").ToString.ToEntero
|
CveTipoPolizaImp = drp("CveTipoPoliza").ToString.ToEntero
|
||||||
|
|||||||
@@ -1338,7 +1338,7 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(273) Then
|
If UsuarioActual.TienePermisoProceso(273) Then
|
||||||
If CType(sender, GridView).ID = "GvA" And e.Row.DBCampo("CveCompra").ToEntero > 0 And e.Row.DBCampo("TipoDocto") = "NC" Then
|
If CType(sender, GridView).ID = "GvA" And e.Row.DBCampo("CveCompra").ToEntero > 0 And e.Row.DBCampo("TipoDocto") = "NC" Then
|
||||||
Dim Parametros = Encripta($"CveCompra={e.Row.DBCampo("CveCompra").ToEntero}&SerieFolio={e.Row.DBCampo("SerieFolio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveProveedor={CveProveedor}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}&FechaCompra={e.Row.DBCampo("Fecha")}")
|
Dim Parametros As String = Encripta($"CveCompra={e.Row.DBCampo("CveCompra").ToEntero}&SerieFolio={e.Row.DBCampo("SerieFolio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveProveedor={CveProveedor}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}&FechaCompra={e.Row.DBCampo("Fecha")}")
|
||||||
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||||
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinC&P={Parametros}"
|
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinC&P={Parametros}"
|
||||||
End If
|
End If
|
||||||
@@ -1452,8 +1452,8 @@ Partial Class Compras_Proveedores
|
|||||||
Private Sub CargaCuentasDDL(Ddl As DropDownList, CveFuncionalidad As Integer)
|
Private Sub CargaCuentasDDL(Ddl As DropDownList, CveFuncionalidad As Integer)
|
||||||
|
|
||||||
'CARGA LO YA SELECCIONADO
|
'CARGA LO YA SELECCIONADO
|
||||||
Dim CveSeleccionado = -1
|
Dim CveSeleccionado As Integer = -1
|
||||||
Dim Seleccionado = ""
|
Dim Seleccionado As String = ""
|
||||||
Seleccionado = Ddl.SelectedItem.Text
|
Seleccionado = Ddl.SelectedItem.Text
|
||||||
CveSeleccionado = Ddl.SelectedValue.ToEntero
|
CveSeleccionado = Ddl.SelectedValue.ToEntero
|
||||||
|
|
||||||
@@ -1544,7 +1544,7 @@ Partial Class Compras_Proveedores
|
|||||||
Dim tIdContaProveedor As Integer
|
Dim tIdContaProveedor As Integer
|
||||||
Dim CuentaAbono As Integer
|
Dim CuentaAbono As Integer
|
||||||
|
|
||||||
Dim ErrorBancos = False
|
Dim ErrorBancos As Boolean = False
|
||||||
Dim ErrorConta As Boolean = False
|
Dim ErrorConta As Boolean = False
|
||||||
Dim ErrorContactos As Boolean = False
|
Dim ErrorContactos As Boolean = False
|
||||||
Dim ErrorSucursales As Boolean = False
|
Dim ErrorSucursales As Boolean = False
|
||||||
@@ -1645,7 +1645,7 @@ Partial Class Compras_Proveedores
|
|||||||
If IdCuentaContable > 0 Then
|
If IdCuentaContable > 0 Then
|
||||||
|
|
||||||
ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1)
|
ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1)
|
||||||
Dim dt = ObjContaAC.DtResultados
|
Dim dt As DataTable = ObjContaAC.DtResultados
|
||||||
Dim CtaCodigo As String
|
Dim CtaCodigo As String
|
||||||
|
|
||||||
If dt.Rows.Count = 1 Then
|
If dt.Rows.Count = 1 Then
|
||||||
@@ -1836,7 +1836,7 @@ Partial Class Compras_Proveedores
|
|||||||
Dim CreoCuenta As Boolean = False
|
Dim CreoCuenta As Boolean = False
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or (UsuarioActual.Empresa.UsaContabilidad And UsuarioActual.Empresa.Funcionalidad(322).ToString.Trim.ToEntero = 0)) Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or (UsuarioActual.Empresa.UsaContabilidad And UsuarioActual.Empresa.Funcionalidad(322).ToString.Trim.ToEntero = 0)) Then
|
||||||
Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("")
|
Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("")
|
||||||
If drCuenta IsNot Nothing Then
|
If drCuenta IsNot Nothing Then
|
||||||
CuentaAbono = drCuenta("Id").ToString.ToEntero
|
CuentaAbono = drCuenta("Id").ToString.ToEntero
|
||||||
@@ -2962,8 +2962,8 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
If Adjunto.Trim.Length > 0 Then
|
If Adjunto.Trim.Length > 0 Then
|
||||||
|
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||||
|
|
||||||
If File.Exists(linkDescargaArchivo) Then
|
If File.Exists(linkDescargaArchivo) Then
|
||||||
ImgDownLoad.Visible = True
|
ImgDownLoad.Visible = True
|
||||||
@@ -3378,7 +3378,7 @@ Partial Class Compras_Proveedores
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If CveProveedor < 0 Then
|
If CveProveedor < 0 Then
|
||||||
For Index = 1 To TempDTCuentasBancos.Rows.Count
|
For Index As Integer = 1 To TempDTCuentasBancos.Rows.Count
|
||||||
TempDTCuentasBancos.Rows(Index - 1)("CveCuentaDeposito") = Index
|
TempDTCuentasBancos.Rows(Index - 1)("CveCuentaDeposito") = Index
|
||||||
Next
|
Next
|
||||||
TempDTCuentasBancos.AcceptChanges()
|
TempDTCuentasBancos.AcceptChanges()
|
||||||
@@ -3455,7 +3455,7 @@ Partial Class Compras_Proveedores
|
|||||||
Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvRow.RowIndex
|
Dim index As Integer = GvRow.RowIndex
|
||||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||||
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
|
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
@@ -3626,7 +3626,7 @@ Partial Class Compras_Proveedores
|
|||||||
'Dim DtMonedas As New DataTable
|
'Dim DtMonedas As New DataTable
|
||||||
'DtMonedas.Columns.Add("CveMoneda", GetType(Integer))
|
'DtMonedas.Columns.Add("CveMoneda", GetType(Integer))
|
||||||
'DtMonedas.Columns.Add("Abreviatura", GetType(String))
|
'DtMonedas.Columns.Add("Abreviatura", GetType(String))
|
||||||
Dim OcupaFiltro = False
|
Dim OcupaFiltro As Boolean = False
|
||||||
|
|
||||||
If CType(GVHistorial.DataSource, DataTable) IsNot Nothing AndAlso CType(GVHistorial.DataSource, DataTable).MAX("CveMoneda").ToEntero > 1 Then
|
If CType(GVHistorial.DataSource, DataTable) IsNot Nothing AndAlso CType(GVHistorial.DataSource, DataTable).MAX("CveMoneda").ToEntero > 1 Then
|
||||||
OcupaFiltro = True
|
OcupaFiltro = True
|
||||||
@@ -3717,10 +3717,10 @@ Partial Class Compras_Proveedores
|
|||||||
Dim DTCxPTempral As DataTable = Nothing
|
Dim DTCxPTempral As DataTable = Nothing
|
||||||
|
|
||||||
'OBTENEMOS LOS DATOS
|
'OBTENEMOS LOS DATOS
|
||||||
Dim FI = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||||
Dim FF = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||||
Dim FVI = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
Dim FVI As String = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
||||||
Dim FVF = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
Dim FVF As String = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
||||||
|
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
If ObjMovtos.GetCxPProveedor(CveProveedor, FI, FF, -1, -1, -1, -1, CveMonedaFiltro, -1, RBSucursal.SelectedValue.ToEntero, -1, FVI, FVF) Then
|
If ObjMovtos.GetCxPProveedor(CveProveedor, FI, FF, -1, -1, -1, -1, CveMonedaFiltro, -1, RBSucursal.SelectedValue.ToEntero, -1, FVI, FVF) Then
|
||||||
@@ -3729,7 +3729,7 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
If DTCxPTempral IsNot Nothing AndAlso DTCxPTempral.Rows.Count > 0 Then
|
If DTCxPTempral IsNot Nothing AndAlso DTCxPTempral.Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = DTCxPTempral.Rows(0)
|
Dim dr As DataRow = DTCxPTempral.Rows(0)
|
||||||
Dim lista = New List(Of CrystalParametro)
|
Dim lista As New List(Of CrystalParametro)
|
||||||
|
|
||||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxP.SelectedItem.Text))
|
lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxP.SelectedItem.Text))
|
||||||
@@ -4052,10 +4052,10 @@ Partial Class Compras_Proveedores
|
|||||||
If rblreporte.SelectedValue = "cxp" Then
|
If rblreporte.SelectedValue = "cxp" Then
|
||||||
|
|
||||||
'OBTENEMOS LOS DATOS
|
'OBTENEMOS LOS DATOS
|
||||||
Dim FI = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||||
Dim FF = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||||
Dim FVI = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
Dim FVI As String = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
||||||
Dim FVF = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
Dim FVF As String = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
||||||
|
|
||||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {TxtFechaInicioCXP.Text}"
|
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {TxtFechaInicioCXP.Text}"
|
||||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {TxtFechaFinCXP.Text}"
|
Dim FechaFn As String = $" <b>Fecha Fin:</b> {TxtFechaFinCXP.Text}"
|
||||||
@@ -4105,8 +4105,8 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
'OBTENEMOS LOS DATOS
|
'OBTENEMOS LOS DATOS
|
||||||
Dim DtANC As DataTable
|
Dim DtANC As DataTable
|
||||||
Dim FI = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||||
Dim FF = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||||
Dim CveProveedorSucursal As Integer = RBSucursal.SelectedValue.ToEntero()
|
Dim CveProveedorSucursal As Integer = RBSucursal.SelectedValue.ToEntero()
|
||||||
If ObjMovtos.GetAnticiposProveedor(CveProveedor, If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), CveMoneda, -1, FI, FF) Then
|
If ObjMovtos.GetAnticiposProveedor(CveProveedor, If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), CveMoneda, -1, FI, FF) Then
|
||||||
DtANC = If(DdlTipoCuentasCxP.SelectedValue = "-1", ObjMovtos.DtResultados, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, FechaVencimiento"))
|
DtANC = If(DdlTipoCuentasCxP.SelectedValue = "-1", ObjMovtos.DtResultados, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, FechaVencimiento"))
|
||||||
|
|||||||
@@ -787,16 +787,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If MsgError = "" And UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePolizaPago, UsuarioActual.CveEmpresa) Then
|
|
||||||
MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
If MsgError = "" AndAlso CvePrePolizaExcedente > 0 AndAlso Not ObjMov.PrePolizaSimplificacion(CvePrePolizaExcedente, UsuarioActual.CveEmpresa) Then
|
|
||||||
MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
|
|
||||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then
|
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then
|
||||||
@@ -888,14 +878,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePolizaNueva, UsuarioActual.CveEmpresa) Then
|
|
||||||
Retorno = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
<table width="100%" cellpadding="0" cellspacing="0">
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||||||
<tr class="SubTotales">
|
<tr class="SubTotales">
|
||||||
<td style="width: 25px;">
|
<td style="width: 25px;">
|
||||||
<asp:CheckBox ID="Chk" runat="server" />
|
<asp:CheckBox ID="Chk" runat="server" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
|||||||
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
||||||
{
|
{
|
||||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
||||||
|
e.Row.FCCheckBox("Chk").Visible = (e.Row.DBCampo("FolioPoliza") == "");
|
||||||
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}";
|
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}";
|
||||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,6 @@
|
|||||||
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
||||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
@@ -253,12 +252,10 @@
|
|||||||
<%--<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
<%--<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||||
<%--<asp:BoundField HeaderText="IVA ND <br/>8%" DataField="ValorIvaNoDeducible08" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
<%--<asp:BoundField HeaderText="IVA ND <br/>8%" DataField="ValorIvaNoDeducible08" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||||
<%-- <asp:BoundField HeaderText="IVA ND 16%" DataField="ValorIvaNoDeducible16" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
<%-- <asp:BoundField HeaderText="IVA ND 16%" DataField="ValorIvaNoDeducible16" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||||
|
|
||||||
<asp:BoundField HeaderText="IVA <br/>Importación " HtmlEncode="False" DataField="IVAImportacion" Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">RetIVA <br/>Hon/Ser.Prof.</asp:Label>
|
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">Ret IVA <br/>Hon/Ser.Prof.</asp:Label>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
|
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
|
||||||
@@ -270,12 +267,12 @@
|
|||||||
<asp:BoundField HeaderText="Ret IVA <br/> Serv." HtmlEncode="False" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Ret IVA <br/> Serv." HtmlEncode="False" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Ret ISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Ret ISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Ret ISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Ret ISR <br/> Arrenda." HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Ret ISR <br/> Resico" HtmlEncode="False" DataField="RetISRResico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Ret ISR <br/> Resico" HtmlEncode="False" DataField="RetISRResico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Fecha Doc." DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
|
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
|
||||||
|
|
||||||
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -313,6 +310,7 @@
|
|||||||
<asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false"
|
<asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false"
|
||||||
OnRowDataBound="GvIVA2_RowDataBound" DataKeyNames="PorcentajeIVA" >
|
OnRowDataBound="GvIVA2_RowDataBound" DataKeyNames="PorcentajeIVA" >
|
||||||
<Columns>
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Tipo" DataField="TipoIVA" />
|
||||||
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
||||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|||||||
@@ -99,9 +99,7 @@
|
|||||||
<div class="catcuentas left">Cuenta</div>
|
<div class="catcuentas left">Cuenta</div>
|
||||||
<div class="catcuentas right">
|
<div class="catcuentas right">
|
||||||
<asp:TextBox ID="TxtCuenta" Style="width: 200px" runat="server" MaxLength="30"></asp:TextBox>
|
<asp:TextBox ID="TxtCuenta" Style="width: 200px" runat="server" MaxLength="30"></asp:TextBox>
|
||||||
<ajax:MaskedEditExtender TargetControlID="Tcuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
<ajax:MaskedEditExtender TargetControlID="TxtCuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||||
<asp:TextBox ID="Tcuenta" Style="width: 100px" runat="server" MaxLength="30" Visible="false"></asp:TextBox>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-line">
|
<div class="form-line">
|
||||||
|
|||||||
@@ -149,20 +149,18 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
|
|
||||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||||
DtDatos = ObjConta.DtResultados
|
DtDatos = ObjConta.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|
||||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||||
Dim Mascara As String = "####-####-###"
|
Dim Mascara As String = UsuarioActual.Empresa.ContaFormatoCuenta.Replace("X", "9") '"###-##-####"
|
||||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
'If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||||
Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
' Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
MEECuenta.Mask = Mascara.Replace("0", "9")
|
MEECuenta.Mask = Mascara '.Replace("0", "9")
|
||||||
MEECuenta.AutoComplete = True
|
MEECuenta.AutoComplete = True
|
||||||
MEECuenta.AutoCompleteValue = Mascara
|
MEECuenta.AutoCompleteValue = Mascara
|
||||||
|
|
||||||
@@ -432,7 +430,7 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
Dim CuentaEfectivo As Integer = 0
|
Dim CuentaEfectivo As Integer = 0
|
||||||
'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||||
Tcuenta.Text.Replace("-", "")
|
TxtCuenta.Text.Replace("-", "")
|
||||||
Dim idnew As Integer = 0
|
Dim idnew As Integer = 0
|
||||||
|
|
||||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||||
|
|||||||
@@ -156,6 +156,10 @@
|
|||||||
<DataField>CodigoObjetoImpuesto</DataField>
|
<DataField>CodigoObjetoImpuesto</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="NumeroPedimento">
|
||||||
|
<DataField>NumeroPedimento</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
</Fields>
|
</Fields>
|
||||||
<rd:DataSetInfo>
|
<rd:DataSetInfo>
|
||||||
<rd:DataSetName>DsOC</rd:DataSetName>
|
<rd:DataSetName>DsOC</rd:DataSetName>
|
||||||
@@ -2399,7 +2403,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!PS.Value & " " & Fields!Obs.Value</Value>
|
<Value>=Fields!PS.Value & " " & Fields!Obs.Value & IIF(Fields!NumeroPedimento.Value<>"",System.Environment.NewLine &System.Environment.NewLine & "Número Pedimento: "&Fields!NumeroPedimento.Value,"")</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>7.5pt</FontSize>
|
<FontSize>7.5pt</FontSize>
|
||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
|
|||||||
@@ -822,9 +822,6 @@
|
|||||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Serie" Visible="false">
|
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||||
<EditItemTemplate>
|
|
||||||
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("Serie")%>' Style="text-align: right;"></asp:TextBox>
|
|
||||||
</EditItemTemplate>
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lbSerie" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
<asp:Literal ID="lbSerie" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -832,9 +829,6 @@
|
|||||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Lote" Visible="false">
|
<asp:TemplateField HeaderText="Lote" Visible="false">
|
||||||
<EditItemTemplate>
|
|
||||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("Lote")%>' Style="text-align: right;"></asp:TextBox>
|
|
||||||
</EditItemTemplate>
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LbLote" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
<asp:Literal ID="LbLote" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -848,11 +842,6 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sección" Visible="false">
|
<asp:TemplateField HeaderText="Sección" Visible="false">
|
||||||
<EditItemTemplate>
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" CssClass="select2me" runat="server">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</EditItemTemplate>
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LbSeccionAlmacen" runat="server" Text='<%# Eval("SeccionAlmacen")%>'></asp:Literal>
|
<asp:Literal ID="LbSeccionAlmacen" runat="server" Text='<%# Eval("SeccionAlmacen")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -1748,9 +1737,9 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div runat="server" id="divClasificacionProducto" class="form-group form-md-line-input input-iconright">
|
<div runat="server" id="divClasificacionProducto" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="hidden">
|
<%-- <asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="hidden">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>--%>
|
||||||
<%--<br />--%>
|
<%--<br />--%>
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssClass="form-control input-sm select2me" CssStyle="width: 50%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssClass="form-control input-sm select2me" CssStyle="width: 50%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
<label style="line-height: 0.8" for="<%= DdlProducto2.ClientID.ToString()%>">Producto</label>
|
<label style="line-height: 0.8" for="<%= DdlProducto2.ClientID.ToString()%>">Producto</label>
|
||||||
@@ -1768,13 +1757,13 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false">
|
<div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false">
|
||||||
<asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="120px" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="120px"></asp:TextBox>
|
||||||
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
||||||
<label for="<%= TxtnSerie.ClientID.ToString()%>">Serie</label>
|
<label for="<%= TxtnSerie.ClientID.ToString()%>">Serie</label>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false">
|
<div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false">
|
||||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px"></asp:TextBox>
|
||||||
<label for="<%= TxtnLote.ClientID.ToString()%>">Lote</label>
|
<label for="<%= TxtnLote.ClientID.ToString()%>">Lote</label>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -539,10 +539,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function isWhitFamily() As Boolean
|
|
||||||
Return (UsuarioActual.CveEmpresa = 66)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#Region " VALORES INICIALES "
|
#Region " VALORES INICIALES "
|
||||||
Protected Sub CreaDT()
|
Protected Sub CreaDT()
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
@@ -603,16 +599,16 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
'Llenar el dropdownlist de Secciones
|
'Llenar el dropdownlist de Secciones
|
||||||
If UsuarioActual.CveEmpresa = 66 Then
|
'If UsuarioActual.CveEmpresa = 66 Then
|
||||||
DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
' DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||||
Else
|
'Else
|
||||||
Dim ObjClasificaciones As New ClsClasificaciones
|
' Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
' If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
' DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||||
End If
|
' End If
|
||||||
ObjClasificaciones.Dispose()
|
' ObjClasificaciones.Dispose()
|
||||||
End If
|
'End If
|
||||||
DdlClasificacion.DataBind()
|
'DdlClasificacion.DataBind()
|
||||||
|
|
||||||
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
'DdlSeccionAlmacen.DataBind()
|
'DdlSeccionAlmacen.DataBind()
|
||||||
@@ -1293,7 +1289,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LimpiarAgregar()
|
Private Sub LimpiarAgregar()
|
||||||
DdlClasificacion.SelectedValue = "-1"
|
'DdlClasificacion.SelectedValue = "-1"
|
||||||
txtCantidad.Text = ""
|
txtCantidad.Text = ""
|
||||||
TxtnLote.Text = ""
|
TxtnLote.Text = ""
|
||||||
TxtObservacionesdetalle.Text = ""
|
TxtObservacionesdetalle.Text = ""
|
||||||
@@ -1459,7 +1455,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtnLote.Text = ""
|
TxtnLote.Text = ""
|
||||||
LblCodigo.Text = ""
|
LblCodigo.Text = ""
|
||||||
TxtnSerie.Text = ""
|
TxtnSerie.Text = ""
|
||||||
TxtnLote.Text = ""
|
|
||||||
TxtnFechaCaducidad.Text = ""
|
TxtnFechaCaducidad.Text = ""
|
||||||
HdnCodigoAF.Value = "-1"
|
HdnCodigoAF.Value = "-1"
|
||||||
HdnCveActivoFijo.Value = "-1"
|
HdnCveActivoFijo.Value = "-1"
|
||||||
@@ -2540,30 +2535,22 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtFolio.Text = Folio.ToString
|
TxtFolio.Text = Folio.ToString
|
||||||
FolioAsignado = Folio
|
FolioAsignado = Folio
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
'Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||||
ChangeDdlProducto()
|
' ChangeDdlProducto()
|
||||||
End Sub
|
'End Sub
|
||||||
Private Sub ChangeDdlProducto()
|
Private Sub ChangeDdlProducto()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||||
Dim filtro As String = ""
|
Dim filtro As String = ""
|
||||||
If Not (DdlClasificacion.SelectedValue = "-1") Then
|
'If Not (DdlClasificacion.SelectedValue = "-1") Then
|
||||||
|
' filtro = String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue)
|
||||||
If isWhitFamily() Then
|
'End If
|
||||||
filtro = String.Format("CveSubFamilia={0}", DdlClasificacion.SelectedValue)
|
|
||||||
Else
|
|
||||||
filtro = String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros($"{filtro} AND CveTipoPS = 2", "PSCodigo")
|
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros($"{filtro} AND CveTipoPS = 2", "PSCodigo")
|
||||||
DdlProducto2.DataBind()
|
DdlProducto2.DataBind()
|
||||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
Else
|
Else
|
||||||
If isWhitFamily() Then
|
'DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
|
||||||
DdlProducto2.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacion.SelectedValue)
|
|
||||||
Else
|
|
||||||
DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2571,27 +2558,20 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ElProductoChange()
|
ElProductoChange()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub ElProductoChange()
|
Private Sub ElProductoChange()
|
||||||
TxtnSerie.Visible = False
|
|
||||||
divSerie.Visible = False
|
|
||||||
|
|
||||||
TxtnLote.Visible = False
|
divSerie.Visible = False
|
||||||
divLote.Visible = False
|
divLote.Visible = False
|
||||||
|
|
||||||
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||||
|
|
||||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
If CBool(dr("AplicaSerie")) Then
|
If CBool(dr("AplicaSerie")) Then
|
||||||
|
|
||||||
TxtnSerie.Visible = True
|
|
||||||
divSerie.Visible = True
|
divSerie.Visible = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If CBool(dr("AplicaLote")) Then
|
If CBool(dr("AplicaLote")) Then
|
||||||
TxtnLote.Visible = True
|
|
||||||
divLote.Visible = True
|
divLote.Visible = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If CBool(dr("AplicaSeccion")) Then
|
If CBool(dr("AplicaSeccion")) Then
|
||||||
divSeccionAlmacen.Visible = True
|
divSeccionAlmacen.Visible = True
|
||||||
@@ -2604,7 +2584,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
If CBool(dr("AplicaCaducidad")) Then
|
If CBool(dr("AplicaCaducidad")) Then
|
||||||
divCaducidad.Visible = True
|
divCaducidad.Visible = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -2628,7 +2607,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||||
'LblSerie.Visible = False
|
'LblSerie.Visible = False
|
||||||
TxtnSerie.Visible = False
|
divSerie.Visible = False
|
||||||
'TrSerieLote.Visible = False
|
'TrSerieLote.Visible = False
|
||||||
'TrSerieLote2.Visible = False
|
'TrSerieLote2.Visible = False
|
||||||
|
|
||||||
@@ -2641,16 +2620,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtnSerie.Visible = True
|
TxtnSerie.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtnLote.Visible = False
|
'divLote.Visible = False
|
||||||
'TrLote.Visible = False
|
'TrLote.Visible = False
|
||||||
'TrLote2.Visible = False
|
'TrLote2.Visible = False
|
||||||
GvM.Columns(10).Visible = False
|
GvM.Columns(10).Visible = False
|
||||||
|
|
||||||
'TxtnBatch.Visible = False
|
|
||||||
'TrBatch.Visible = False
|
|
||||||
'TrBatch2.Visible = False
|
|
||||||
'GvM.Columns(11).Visible = False
|
|
||||||
|
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
tdPUExtranjero.Visible = False
|
tdPUExtranjero.Visible = False
|
||||||
tdPUExtranjero2.Visible = False
|
tdPUExtranjero2.Visible = False
|
||||||
@@ -2724,12 +2698,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If (CveMovimiento > 0) Or (TieneRelacionado > 0 Or CveMovimientoRelacionado > 0) Then 'CveMovimiento > 0 And e.Row.DBCampo("TienePrePoliza").ToEntero > 0
|
If (CveMovimiento > 0) Or (TieneRelacionado > 0 Or CveMovimientoRelacionado > 0) Then 'CveMovimiento > 0 And e.Row.DBCampo("TienePrePoliza").ToEntero > 0
|
||||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||||
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
||||||
e.Row.FCTextBox("TxtSerie").Enabled = False
|
'e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||||
e.Row.FCTextBox("TxtLote").Enabled = False
|
'e.Row.FCTextBox("TxtLote").Enabled = False
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
'e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False'
|
||||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
|
||||||
End If
|
End If
|
||||||
e.Row.FCTextBox("TxtSerie").Enabled = True
|
'e.Row.FCTextBox("TxtSerie").Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If EsNuevoMov Then
|
If EsNuevoMov Then
|
||||||
@@ -2795,7 +2768,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||||
txtCantidad.Enabled = False
|
txtCantidad.Enabled = False
|
||||||
DdlClasificacion.Enabled = False
|
'DdlClasificacion.Enabled = False
|
||||||
DdlProducto2.Enabled = False
|
DdlProducto2.Enabled = False
|
||||||
DdlUnidad.Enabled = False
|
DdlUnidad.Enabled = False
|
||||||
|
|
||||||
@@ -2808,7 +2781,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ElProductoChange()
|
ElProductoChange()
|
||||||
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
||||||
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
||||||
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
|
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.ToString("0.00########")
|
||||||
TxtnSerie.Text = GvRow.DataKey("Serie")
|
TxtnSerie.Text = GvRow.DataKey("Serie")
|
||||||
TxtnLote.Text = GvRow.DataKey("Lote")
|
TxtnLote.Text = GvRow.DataKey("Lote")
|
||||||
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad").ToDate.ToShortDateString
|
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad").ToDate.ToShortDateString
|
||||||
@@ -5313,7 +5286,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Private Sub limpiarModalDetalle()
|
Private Sub limpiarModalDetalle()
|
||||||
txtCantidad.Enabled = True
|
txtCantidad.Enabled = True
|
||||||
DdlClasificacion.Enabled = True
|
'DdlClasificacion.Enabled = True
|
||||||
DdlProducto2.Enabled = True
|
DdlProducto2.Enabled = True
|
||||||
DdlUnidad.Enabled = True
|
DdlUnidad.Enabled = True
|
||||||
divCantidad.Visible = True
|
divCantidad.Visible = True
|
||||||
|
|||||||
@@ -508,13 +508,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.FCLinkButton("BtnSurtir").CommandArgument = If(e.Row.DBCampo("TipoEntrega") = "1", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveTraspasoSolicitud"))
|
e.Row.FCLinkButton("BtnSurtir").CommandArgument = If(e.Row.DBCampo("TipoEntrega") = "1", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveTraspasoSolicitud"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Select Case e.Row.DBCampo("TipoEntrega").ToString().ToEntero()
|
Select Case e.Row.DBCampo("TipoEntrega").ToString().ToEntero()
|
||||||
Case 1
|
Case 1
|
||||||
If UsuarioActual.TienePermisoProceso(201) Then
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
Dim Css = "Texto"
|
Dim Css As String = "Texto"
|
||||||
Dim Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DBCampo("CveVenta")}"
|
Dim Liga As String = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DBCampo("CveVenta")}"
|
||||||
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -532,8 +530,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left' > Recibir</i>"
|
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left' > Recibir</i>"
|
||||||
End If
|
End If
|
||||||
Case 2
|
Case 2
|
||||||
Dim Css = "Texto"
|
Dim Css As String = "Texto"
|
||||||
Dim Liga = $"/Inventarios/TrasladoSolicitud.aspx?&CveTraspasoSolicitud={e.Row.DBCampo("CveTraspasoSolicitud")}"
|
Dim Liga As String = $"/Inventarios/TrasladoSolicitud.aspx?&CveTraspasoSolicitud={e.Row.DBCampo("CveTraspasoSolicitud")}"
|
||||||
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
||||||
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary btn-sm"
|
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary btn-sm"
|
||||||
e.Row.FCLinkButton("BtnSurtir").Text = " Traspasar <i class='fa fa-arrow-right' ></i>"
|
e.Row.FCLinkButton("BtnSurtir").Text = " Traspasar <i class='fa fa-arrow-right' ></i>"
|
||||||
@@ -548,7 +546,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
#Region " CARGA VENTA POR SURTIR "
|
#Region " CARGA VENTA POR SURTIR "
|
||||||
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Boton = CType(sender, LinkButton)
|
Dim Boton As LinkButton = CType(sender, LinkButton)
|
||||||
CveVentaAD = -1
|
CveVentaAD = -1
|
||||||
|
|
||||||
If Boton.CommandArgument.ToEntero() > 0 Then
|
If Boton.CommandArgument.ToEntero() > 0 Then
|
||||||
@@ -598,7 +596,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
If ArchivoBitacora <> "" Then
|
If ArchivoBitacora <> "" Then
|
||||||
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
|
Dim Archivo As New System.IO.FileInfo(ArchivoBitacora)
|
||||||
If Archivo.Exists() Then
|
If Archivo.Exists() Then
|
||||||
HplCargaBitacora.Visible = True
|
HplCargaBitacora.Visible = True
|
||||||
uppCargaBitacora.Update()
|
uppCargaBitacora.Update()
|
||||||
@@ -609,7 +607,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer))
|
If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer))
|
||||||
If Not DtDatos.Columns.Contains("CantidadGV") Then DtDatos.Columns.Add("CantidadGV", GetType(Double))
|
If Not DtDatos.Columns.Contains("CantidadGV") Then DtDatos.Columns.Add("CantidadGV", GetType(Double))
|
||||||
If Not DtDatos.Columns.Contains("CantidadTraspaso") Then DtDatos.Columns.Add("CantidadTraspaso", GetType(Double))
|
If Not DtDatos.Columns.Contains("CantidadTraspaso") Then DtDatos.Columns.Add("CantidadTraspaso", GetType(Double))
|
||||||
Dim Index = 1
|
Dim Index As Integer = 1
|
||||||
For Each Dr As DataRow In DtDatos.Rows
|
For Each Dr As DataRow In DtDatos.Rows
|
||||||
Dr("Consec") = Index
|
Dr("Consec") = Index
|
||||||
Index += 1
|
Index += 1
|
||||||
@@ -695,7 +693,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DdlAlmacen.Items.Insert(0, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoOrigen}"), CveAlmacenTraspasoOrigen.ToString()))
|
DdlAlmacen.Items.Insert(0, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoOrigen}"), CveAlmacenTraspasoOrigen.ToString()))
|
||||||
Else
|
Else
|
||||||
'[IPP] PARCHE - Debe hacerse permiso proceso - 17Enero2018
|
'[IPP] PARCHE - Debe hacerse permiso proceso - 17Enero2018
|
||||||
Dim RestriccionAlmacenSubProyecto = If(UsuarioActual.CveEmpresa.Contiene(72, 80), $" AND CveSubProyecto = {CveSubProyecto}", "")
|
Dim RestriccionAlmacenSubProyecto As String = If(UsuarioActual.CveEmpresa.Contiene(72, 80), $" AND CveSubProyecto = {CveSubProyecto}", "")
|
||||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"{StrAlmacenes} {RestriccionAlmacenSubProyecto}")
|
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"{StrAlmacenes} {RestriccionAlmacenSubProyecto}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -841,7 +839,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
LbObservaciones.Text = DtDatos.Rows(0)("Observaciones").ToString()
|
LbObservaciones.Text = DtDatos.Rows(0)("Observaciones").ToString()
|
||||||
|
|
||||||
Dim Index = 1
|
Dim Index As Integer = 1
|
||||||
For Each Dr As DataRow In DtDatos.Rows
|
For Each Dr As DataRow In DtDatos.Rows
|
||||||
Dr("Consec") = Index
|
Dr("Consec") = Index
|
||||||
Index += 1
|
Index += 1
|
||||||
@@ -962,7 +960,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
UpVenta.Update()
|
UpVenta.Update()
|
||||||
|
|
||||||
'CARGA LO PRECARGADO CON SERIE
|
'CARGA LO PRECARGADO CON SERIE
|
||||||
Dim Contador = 0
|
Dim Contador As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero() = CvePSSerie AndAlso DtDatosDetalle IsNot Nothing Then
|
If Gvr.DataKey("CvePS").ToEntero() = CvePSSerie AndAlso DtDatosDetalle IsNot Nothing Then
|
||||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||||
@@ -987,7 +985,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then
|
If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then
|
||||||
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
|
Dim Contador As Integer = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString()
|
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString()
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
||||||
@@ -1004,7 +1002,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then
|
If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then
|
||||||
Dim Str = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c)
|
Dim Str As Array = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c)
|
||||||
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
||||||
PSSerie = e.Row.DBCampo("PS").ToString()
|
PSSerie = e.Row.DBCampo("PS").ToString()
|
||||||
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
|
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
|
||||||
@@ -1042,7 +1040,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
|
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
@@ -1056,13 +1054,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtLote").Text = "" Then
|
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) Then
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
||||||
e.Row.FCTextBox("TxtLote").Enabled = True
|
e.Row.FCTextBox("TxtLote").Enabled = True
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -1126,7 +1123,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
|
|
||||||
LbProducto.Text = Argumentos(2)
|
LbProducto.Text = Argumentos(2)
|
||||||
LbCantidad.Text = Argumentos(3)
|
LbCantidad.Text = Argumentos(3)
|
||||||
@@ -1140,7 +1137,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CveConsecSerie = Argumentos(4).ToEntero()
|
CveConsecSerie = Argumentos(4).ToEntero()
|
||||||
CveMetodoInventario = Argumentos(5).ToEntero()
|
CveMetodoInventario = Argumentos(5).ToEntero()
|
||||||
|
|
||||||
|
|
||||||
If CveMetodoInventario = 6 Then
|
If CveMetodoInventario = 6 Then
|
||||||
RegistraScript("$('#DivLote').modal({backdrop: 'static', keyboard: false});")
|
RegistraScript("$('#DivLote').modal({backdrop: 'static', keyboard: false});")
|
||||||
CargaLote()
|
CargaLote()
|
||||||
@@ -1151,7 +1147,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
UpSerie.Update()
|
UpSerie.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " AGREGA POR SERIE/LOTE "
|
#Region " AGREGA POR SERIE/LOTE "
|
||||||
@@ -1175,7 +1170,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal({backdrop: 'static', keyboard: false})", "show")
|
If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal({backdrop: 'static', keyboard: false})", "show")
|
||||||
|
|
||||||
Dim AplicaCaducidad = False
|
Dim AplicaCaducidad As Boolean = False
|
||||||
Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie)
|
Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie)
|
||||||
If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then
|
If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then
|
||||||
AplicaCaducidad = If(dttt.FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
AplicaCaducidad = If(dttt.FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
||||||
@@ -1238,7 +1233,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE SALIDA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE SALIDA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0
|
Dim Contador As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("AplicaSerie") = "True" Then
|
If Gvr.DataKey("AplicaSerie") = "True" Then
|
||||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||||
@@ -1309,7 +1304,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
'Valida Existencia
|
'Valida Existencia
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
||||||
@@ -1319,7 +1314,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
Else
|
Else
|
||||||
If DtExistencias IsNot Nothing Then
|
If DtExistencias IsNot Nothing Then
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
Dim Existencia As Decimal = DtExistencias.SUMD("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
||||||
@@ -1328,8 +1323,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim Row As DataRow = DtDatosDetalle.NewRow
|
||||||
Dim Row = DtDatosDetalle.NewRow
|
|
||||||
|
|
||||||
Row("ConsecId") = CveConsecSerie
|
Row("ConsecId") = CveConsecSerie
|
||||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||||
@@ -1539,15 +1533,15 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Row = DtDatosDetalleLote.NewRow
|
Dim Row As DataRow = DtDatosDetalleLote.NewRow
|
||||||
Dim CantidadLote = TxtCantidadLote.Text.ToDecimal
|
Dim CantidadLote As Decimal = TxtCantidadLote.Text.ToDecimal
|
||||||
|
|
||||||
Dim MensajeSinExistencias As New StringBuilder
|
Dim MensajeSinExistencias As New StringBuilder
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Lote:=Lote, ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Lote:=Lote, ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
If Existencia < CantidadLote Then
|
If Existencia < CantidadLote Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -1556,7 +1550,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If DtExistencias IsNot Nothing Then
|
If DtExistencias IsNot Nothing Then
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Lote = '{Lote}' AND Batch = '{Batch}'")
|
Dim Existencia As Decimal = DtExistencias.SUMD("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Lote = '{Lote}' AND Batch = '{Batch}'")
|
||||||
If Existencia < CantidadLote Then
|
If Existencia < CantidadLote Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -1566,7 +1560,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim FechaCaducidad = ""
|
Dim FechaCaducidad As String = ""
|
||||||
If ObjInventarios.LoteRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero()) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
If ObjInventarios.LoteRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero()) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||||
FechaCaducidad = ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString
|
FechaCaducidad = ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString
|
||||||
End If
|
End If
|
||||||
@@ -1619,19 +1613,19 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TdSeriePS.Visible = False
|
TdSeriePS.Visible = False
|
||||||
Dim Existe = False
|
Dim Existe As Boolean = False
|
||||||
Dim PSTemp = ""
|
Dim PSTemp As String = ""
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
||||||
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
''VALIDA EXISTENCIA
|
''VALIDA EXISTENCIA
|
||||||
If Not TipoDocto.Contiene("Dev") Then
|
If Not TipoDocto.Contiene("Dev") Then
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString().ToEntero(), Gvr.DataKey("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia As Decimal = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString().ToEntero(), Gvr.DataKey("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
@@ -1641,7 +1635,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If DtExistencias IsNot Nothing Then
|
If DtExistencias IsNot Nothing Then
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString().ToEntero()}")
|
Dim Existencia As Decimal = DtExistencias.SUMD("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString().ToEntero()}")
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
@@ -1663,7 +1657,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033)
|
Dim CantidadEspecial As Boolean = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033)
|
||||||
|
|
||||||
If CantidadEspecial Then
|
If CantidadEspecial Then
|
||||||
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
||||||
@@ -1702,7 +1696,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub VerificaVentaSurtida()
|
Private Sub VerificaVentaSurtida()
|
||||||
Dim Surtida = True
|
Dim Surtida As Boolean = True
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then
|
If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then
|
||||||
@@ -1729,7 +1723,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
AgregaCantidadEspecial()
|
AgregaCantidadEspecial()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub AgregaCantidadEspecial()
|
Private Sub AgregaCantidadEspecial()
|
||||||
Dim TxtCantidad = GvDatos.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvDatos.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
||||||
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
||||||
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString().FormatoNumero
|
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString().FormatoNumero
|
||||||
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
||||||
@@ -1872,7 +1866,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim FolioVirtual As Integer = -1
|
Dim FolioVirtual As Integer = -1
|
||||||
|
|
||||||
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
||||||
Dim Index = 0
|
Dim Index As Integer = 0
|
||||||
For Each gvr As GridViewRow In GvDatos.Rows
|
For Each gvr As GridViewRow In GvDatos.Rows
|
||||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
@@ -1921,8 +1915,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DtTraspasos.Columns.Add("CveTipoAlmacen", GetType(Integer))
|
DtTraspasos.Columns.Add("CveTipoAlmacen", GetType(Integer))
|
||||||
DtTraspasos.Columns.Add("CveConceptoMovimientoSalida", GetType(Integer))
|
DtTraspasos.Columns.Add("CveConceptoMovimientoSalida", GetType(Integer))
|
||||||
|
|
||||||
Dim CveMovimientoSalida = -1, FolioSalida = -1, CveMovimientoEntrada = -1, CveMovimientoEntradaApartado = -1, FolioEntrada = -1, CveMovimientoSalidaDevRem = -1, FolioMovimientoSalidaDevRem = -1, CveMovimientoEntradaDevRem = -1, FolioMovimientoEntradaDevRem = -1
|
Dim CveMovimientoSalida As Integer = -1, FolioSalida As Integer = -1, CveMovimientoEntrada As Integer = -1, CveMovimientoEntradaApartado As Integer = -1, FolioEntrada As Integer = -1, CveMovimientoSalidaDevRem As Integer = -1, FolioMovimientoSalidaDevRem As Integer = -1, CveMovimientoEntradaDevRem As Integer = -1, FolioMovimientoEntradaDevRem As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
Dim DtDevSinCosto As New DataTable
|
Dim DtDevSinCosto As New DataTable
|
||||||
DtDevSinCosto.Columns.Add("CveAlmacen", GetType(Integer))
|
DtDevSinCosto.Columns.Add("CveAlmacen", GetType(Integer))
|
||||||
@@ -1957,7 +1950,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
StrXML.Append("</conceptos>")
|
StrXML.Append("</conceptos>")
|
||||||
|
|
||||||
Dim TieneErrorExistencia = False
|
Dim TieneErrorExistencia As Boolean = False
|
||||||
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
TieneErrorExistencia = True
|
TieneErrorExistencia = True
|
||||||
@@ -2019,7 +2012,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2069,7 +2062,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2212,7 +2205,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2266,7 +2259,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2319,7 +2312,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2414,7 +2407,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
FolioGarantia = ObjInventario.Folio
|
FolioGarantia = ObjInventario.Folio
|
||||||
|
|
||||||
For Each RowGarantia As DataRow In DtGarantias.Rows
|
For Each RowGarantia As DataRow In DtGarantias.Rows
|
||||||
Dim CvePS = RowGarantia("CvePS").ToString().ToEntero()
|
Dim CvePS As Integer = RowGarantia("CvePS").ToString().ToEntero()
|
||||||
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
|
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
|
||||||
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
|
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
|
||||||
Dim PU As Decimal = 0 'valor cero, por tema contable 'RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
|
Dim PU As Decimal = 0 'valor cero, por tema contable 'RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
|
||||||
@@ -2456,16 +2449,16 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If Not ErrorMovInv AndAlso TipoMovimiento = 2 AndAlso UsuarioActual.Empresa.Funcionalidad(587) = "1" Then
|
If Not ErrorMovInv AndAlso TipoMovimiento = 2 AndAlso UsuarioActual.Empresa.Funcionalidad(587) = "1" Then
|
||||||
For Each Dr1 As DataRow In DtExistencias.FiltraParametros("CveTipoAlmacenDevolucion = 26").Rows
|
For Each Dr1 As DataRow In DtExistencias.FiltraParametros("CveTipoAlmacenDevolucion = 26").Rows
|
||||||
Dim CveMovimientoSalidaSinCosto = Dr1("CveMovimiento").ToString().ToEntero()
|
Dim CveMovimientoSalidaSinCosto As Integer = Dr1("CveMovimiento").ToString().ToEntero()
|
||||||
|
|
||||||
'Dim CveAlmacenSinCosto As Integer = Dr1("CveAlmacenDevolucion").ToString().ToEntero()
|
'Dim CveAlmacenSinCosto As Integer = Dr1("CveAlmacenDevolucion").ToString().ToEntero()
|
||||||
|
|
||||||
'Dim AlmacenSinCosto As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=26).FiltroPrimeroValor("Almacen", $"CveAlmacen={CveAlmacenSinCosto}").ToString()
|
'Dim AlmacenSinCosto As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=26).FiltroPrimeroValor("Almacen", $"CveAlmacen={CveAlmacenSinCosto}").ToString()
|
||||||
|
|
||||||
Dim CveMovimientoDevolucionSinCosto = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
|
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
|
||||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
|
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
|
||||||
Dim FolioDevSinCosto = ObjInventario.Folio
|
Dim FolioDevSinCosto As Integer = ObjInventario.Folio
|
||||||
|
|
||||||
If Not CveMovimientoDevolucionSinCosto > 0 Then
|
If Not CveMovimientoDevolucionSinCosto > 0 Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -2488,7 +2481,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If ErrorMovInv Then Exit For
|
If ErrorMovInv Then Exit For
|
||||||
|
|
||||||
Dim DrMovto = DtDevSinCosto.NewRow
|
Dim DrMovto As DataRow = DtDevSinCosto.NewRow
|
||||||
DrMovto("Almacen") = DdlAlmacen.SelectedItem.Text
|
DrMovto("Almacen") = DdlAlmacen.SelectedItem.Text
|
||||||
DrMovto("CveAlmacen") = DdlAlmacen.SelectedValue.ToEntero()
|
DrMovto("CveAlmacen") = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
DrMovto("CveMovimientoEntrada") = CveMovimientoDevolucionSinCosto
|
DrMovto("CveMovimientoEntrada") = CveMovimientoDevolucionSinCosto
|
||||||
@@ -2515,7 +2508,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero() And TipoDocto <> "Rem" Then CveAlmacenTraspasoDestino = 0
|
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero() And TipoDocto <> "Rem" Then CveAlmacenTraspasoDestino = 0
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
||||||
Dim ConceptoMovimiento = 3
|
Dim ConceptoMovimiento As Integer = 3
|
||||||
ConceptoMovimiento = If(TipoMovimiento = 1, ConceptoMovimiento, 18)
|
ConceptoMovimiento = If(TipoMovimiento = 1, ConceptoMovimiento, 18)
|
||||||
ConceptoMovimiento = If(CveAlmacenTraspasoDestino > 0, 8, ConceptoMovimiento)
|
ConceptoMovimiento = If(CveAlmacenTraspasoDestino > 0, 8, ConceptoMovimiento)
|
||||||
|
|
||||||
@@ -2692,10 +2685,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If TipoMovimiento = 2 Then
|
If TipoMovimiento = 2 Then
|
||||||
If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then
|
If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then
|
||||||
|
|
||||||
Dim DtTempApartados = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
Dim DtTempApartados As DataTable = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
||||||
Dim CveMovimientoSalidaApartado = -1
|
Dim CveMovimientoSalidaApartado As Integer = -1
|
||||||
Dim CveAlmacenApartado = -1
|
Dim CveAlmacenApartado As Integer = -1
|
||||||
Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero())
|
Dim CveAlmacenOrigen As Integer = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero())
|
||||||
Dim CveSeccionAlmacen As Integer = 0
|
Dim CveSeccionAlmacen As Integer = 0
|
||||||
Dim ValorTraspaso As Decimal = 0
|
Dim ValorTraspaso As Decimal = 0
|
||||||
If DtTempApartados IsNot Nothing AndAlso DtTempApartados.Rows.Count > 0 Then
|
If DtTempApartados IsNot Nothing AndAlso DtTempApartados.Rows.Count > 0 Then
|
||||||
@@ -2708,7 +2701,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
FolioSalida = ObjInventario.Folio
|
FolioSalida = ObjInventario.Folio
|
||||||
CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero()
|
CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero()
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
||||||
@@ -2898,7 +2891,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
Dim CvePS As Integer = RowUsado("CvePS").ToString().ToEntero()
|
||||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||||
@@ -2947,7 +2940,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
'AGREGA BITACORA A VENTA
|
'AGREGA BITACORA A VENTA
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
Dim MensajeBitacora = If(TipoMovimiento = 1, "Surtida", "Devuelta")
|
Dim MensajeBitacora As String = If(TipoMovimiento = 1, "Surtida", "Devuelta")
|
||||||
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then
|
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
@@ -3103,7 +3096,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ValorMultiplicador = -1
|
ValorMultiplicador = -1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/EntregaAlmacen", 1, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/EntregaAlmacen", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
|
|
||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
@@ -3222,16 +3215,16 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
Dim CveMovimientoSalida As Integer
|
Dim CveMovimientoSalida As Integer
|
||||||
Dim ConceptoMovimiento = 0
|
Dim ConceptoMovimiento As Integer = 0
|
||||||
Dim FolioSalida As Integer
|
Dim FolioSalida As Integer
|
||||||
Dim CveMovimientoEntrada As Integer
|
Dim CveMovimientoEntrada As Integer
|
||||||
Dim FolioEntrada As Integer
|
Dim FolioEntrada As Integer
|
||||||
Dim ErrorMovInv As Boolean
|
Dim ErrorMovInv As Boolean
|
||||||
Dim DtDetalle As New DataTable
|
Dim DtDetalle As New DataTable
|
||||||
Dim TextoError = ""
|
Dim TextoError As String = ""
|
||||||
|
|
||||||
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
||||||
Dim Index = 0
|
Dim Index As Integer = 0
|
||||||
For Each gvr As GridViewRow In GvDatos.Rows
|
For Each gvr As GridViewRow In GvDatos.Rows
|
||||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
@@ -3247,7 +3240,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If ObjInventario.EntregaAlmacenTraspasosGet(CveTraspasoSurtir) Then
|
If ObjInventario.EntregaAlmacenTraspasosGet(CveTraspasoSurtir) Then
|
||||||
DtDatosTraspaso = ObjInventario.DtResultados
|
DtDatosTraspaso = ObjInventario.DtResultados
|
||||||
End If
|
End If
|
||||||
Dim CantidadGV = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("CantidadF").ToDecimal)
|
Dim CantidadGV As Decimal = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("CantidadF").ToDecimal)
|
||||||
If DtDatos.SUM("CantidadF") <> DtDatosTraspaso.SUM("CantidadF") Then
|
If DtDatos.SUM("CantidadF") <> DtDatosTraspaso.SUM("CantidadF") Then
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
@@ -3268,8 +3261,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'VALIDA ALMACENES
|
'VALIDA ALMACENES
|
||||||
Dim Almacen1 = DdlAlmacen.SelectedValue.ToEntero()
|
Dim Almacen1 As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
Dim Almacen2 = CveAlmacenTraspasoDestino
|
Dim Almacen2 As Integer = CveAlmacenTraspasoDestino
|
||||||
If Almacen1 <= 0 Or Almacen2 <= 0 Then
|
If Almacen1 <= 0 Or Almacen2 <= 0 Then
|
||||||
Alert("Ocurrió un error al obtener los almacenes del movimiento. Por favor recargue y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al obtener los almacenes del movimiento. Por favor recargue y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
@@ -3299,7 +3292,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
StrXML.Append("</conceptos>")
|
StrXML.Append("</conceptos>")
|
||||||
|
|
||||||
Dim TieneErrorExistencia = False
|
Dim TieneErrorExistencia As Boolean = False
|
||||||
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
TieneErrorExistencia = True
|
TieneErrorExistencia = True
|
||||||
@@ -3502,7 +3495,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio)
|
Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio)
|
||||||
Dim Cuerpo As New StringBuilder()
|
Dim Cuerpo As New StringBuilder()
|
||||||
Dim Destinatario As String = ""
|
Dim Destinatario As String = ""
|
||||||
Dim MensajeEnviado = False
|
Dim MensajeEnviado As Boolean = False
|
||||||
Dim tCvecliente As Integer
|
Dim tCvecliente As Integer
|
||||||
Dim tCveVendedor As Integer
|
Dim tCveVendedor As Integer
|
||||||
Dim bytes() As Byte = Nothing
|
Dim bytes() As Byte = Nothing
|
||||||
@@ -3951,7 +3944,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DtDatosSugerencias.Columns.Add("CantidadSeleccionada", GetType(Double))
|
DtDatosSugerencias.Columns.Add("CantidadSeleccionada", GetType(Double))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Index = 1
|
Dim Index As Integer = 1
|
||||||
For Each Dr As DataRow In DtDatosSugerencias.Rows
|
For Each Dr As DataRow In DtDatosSugerencias.Rows
|
||||||
Dr("Consec") = Index
|
Dr("Consec") = Index
|
||||||
|
|
||||||
@@ -4005,7 +3998,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Protected Sub BtnImprimirSugerencias_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnImprimirSugerencias_Click(sender As Object, e As EventArgs)
|
||||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|||||||
@@ -1040,7 +1040,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ArchivoBitacora = String.Format("{0}Temp\RecepcionDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
ArchivoBitacora = String.Format("{0}Temp\RecepcionDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
||||||
ArchivoBitacoraDetalle = String.Format("{0}Temp\RecepcionDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
ArchivoBitacoraDetalle = String.Format("{0}Temp\RecepcionDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
||||||
If ArchivoBitacora <> "" Then
|
If ArchivoBitacora <> "" Then
|
||||||
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
|
Dim Archivo As New System.IO.FileInfo(ArchivoBitacora)
|
||||||
If Archivo.Exists() Then
|
If Archivo.Exists() Then
|
||||||
HplCargaBitacora.Visible = True
|
HplCargaBitacora.Visible = True
|
||||||
uppCargaBitacora.Update()
|
uppCargaBitacora.Update()
|
||||||
@@ -1467,7 +1467,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
|
Dim Contador As Integer = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
|
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
|
||||||
|
|
||||||
'' Empresa Acumuladores
|
'' Empresa Acumuladores
|
||||||
@@ -1612,7 +1612,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
||||||
Dim TxtCantidad = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
If Gvr.DataKey("AplicaSerie") = "True" Then
|
If Gvr.DataKey("AplicaSerie") = "True" Then
|
||||||
@@ -1625,7 +1625,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString.ToEntero.Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString.ToEntero.Contiene(343032, 343033)
|
Dim CantidadEspecial As Boolean = Gvr.DataKey("CveClasificacion").ToString.ToEntero.Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString.ToEntero.Contiene(343032, 343033)
|
||||||
|
|
||||||
If CantidadEspecial Then
|
If CantidadEspecial Then
|
||||||
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
||||||
@@ -1639,9 +1639,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
Dim MensajeSinExistencias As New StringBuilder
|
Dim MensajeSinExistencias As New StringBuilder
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {Gvr.DataKey("CvePS").ToEntero} AND CveUM = {Gvr.DataKey("CveUM").ToEntero} ") + 1
|
Dim ExistenciaActual As Decimal = DtInv.SUMD("CantidadSurtidaPantalla", $"CvePS = {Gvr.DataKey("CvePS").ToEntero} AND CveUM = {Gvr.DataKey("CveUM").ToEntero} ") + 1
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(Gvr.DataKey("CvePS").ToEntero, Gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(Gvr.DataKey("CvePS").ToEntero, Gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
If Existencia < ExistenciaActual Then
|
If Existencia < ExistenciaActual Then
|
||||||
@@ -1662,20 +1662,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
UPInv.Update()
|
UPInv.Update()
|
||||||
Dim Dr = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||||
Dr("CantidadSurtidaPantalla") = TxtCantidad.Text.ToDecimal
|
Dr("CantidadSurtidaPantalla") = TxtCantidad.Text.ToDecimal
|
||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Codigo ""<b>{TxtCodigoPS.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Codigo ""<b>{TxtCodigoPS.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
@@ -1695,7 +1691,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
AgregaCantidadEspecial()
|
AgregaCantidadEspecial()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub AgregaCantidadEspecial()
|
Private Sub AgregaCantidadEspecial()
|
||||||
Dim TxtCantidad = GvInv.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvInv.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
||||||
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
||||||
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString.FormatoNumero
|
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString.FormatoNumero
|
||||||
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
||||||
@@ -1715,7 +1711,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
#Region " AGREGA POR SERIE/LOTE "
|
#Region " AGREGA POR SERIE/LOTE "
|
||||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
|
|
||||||
LbProducto.Text = Argumentos(3)
|
LbProducto.Text = Argumentos(3)
|
||||||
LbCantidad.Text = Argumentos(4).FormatoNumero
|
LbCantidad.Text = Argumentos(4).FormatoNumero
|
||||||
@@ -1767,7 +1763,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE ENTRADA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE ENTRADA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0
|
Dim Contador As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||||
@@ -1782,7 +1778,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Dr = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||||
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
Next
|
Next
|
||||||
@@ -1806,7 +1802,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SeriesArreglo = Serie.Trim.Split(";"c)
|
Dim SeriesArreglo As Array = Serie.Trim.Split(";"c)
|
||||||
|
|
||||||
'VALIDACION DE SERIES DUPLICADAS
|
'VALIDACION DE SERIES DUPLICADAS
|
||||||
Dim MensajeAlert As New StringBuilder
|
Dim MensajeAlert As New StringBuilder
|
||||||
@@ -1839,7 +1835,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
Dim MensajeSinExistencias As New StringBuilder
|
Dim MensajeSinExistencias As New StringBuilder
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Index = 0
|
Dim Index As Integer = 0
|
||||||
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
|
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
|
||||||
|
|
||||||
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
||||||
@@ -1848,7 +1844,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
For Each Serie In SeriesArreglo
|
For Each Serie In SeriesArreglo
|
||||||
If Serie <> "" Then
|
If Serie <> "" Then
|
||||||
|
|
||||||
Dim Row = DtDatosDetalle.NewRow
|
Dim Row As DataRow = DtDatosDetalle.NewRow
|
||||||
Index = Index + 1
|
Index = Index + 1
|
||||||
If Index > Cantidad Then Exit For
|
If Index > Cantidad Then Exit For
|
||||||
|
|
||||||
@@ -1859,7 +1855,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
||||||
Continue For
|
Continue For
|
||||||
@@ -1973,7 +1969,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnLote_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnLote_Click(sender As Object, e As EventArgs)
|
||||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
|
|
||||||
LbLoteProducto2.Text = Argumentos(3)
|
LbLoteProducto2.Text = Argumentos(3)
|
||||||
LbLoteCantidad2.Text = Argumentos(4).FormatoNumero
|
LbLoteCantidad2.Text = Argumentos(4).FormatoNumero
|
||||||
@@ -2002,10 +1998,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE ENTRADA POR LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE ENTRADA POR LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0.0
|
Dim Contador As Decimal = 0
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||||
Contador = DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
Contador = DtDatosLoteDetalle.SUMD("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
||||||
Gvr.FCCheckBox("cbInv").Enabled = False
|
Gvr.FCCheckBox("cbInv").Enabled = False
|
||||||
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
||||||
If DtDatosLoteDetalle IsNot Nothing AndAlso Contador > 0 Then
|
If DtDatosLoteDetalle IsNot Nothing AndAlso Contador > 0 Then
|
||||||
@@ -2017,7 +2013,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Dr = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||||
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
Next
|
Next
|
||||||
@@ -2070,7 +2066,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote)
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote)
|
||||||
If Existencia < CantidadLote Then
|
If Existencia < CantidadLote Then
|
||||||
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -2405,11 +2401,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'CONTABILIZAR - SIMPLIFICAR
|
'CONTABILIZAR - SIMPLIFICAR
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Retorno = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
@@ -2476,11 +2467,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'CONTABILIZAR - SIMPLIFICAR
|
'CONTABILIZAR - SIMPLIFICAR
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Retorno = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
@@ -3471,13 +3457,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
MensajeError = "Error al simplificar los conceptos contables"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
MensajeContabilidad = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
MensajeContabilidad = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||||
@@ -3578,14 +3557,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
MensajeError = "Error al simplificar los conceptos contables"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
|
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
@@ -4824,7 +4795,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
|
||||||
Dim dt As DataTable = Nothing
|
Dim dt As DataTable = Nothing
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
|
|
||||||
Try
|
Try
|
||||||
dt = ReadExcelFile(Ruta + FileName, True)
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
@@ -4871,7 +4842,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
For Each RowExcel As DataRow In dt.Rows
|
For Each RowExcel As DataRow In dt.Rows
|
||||||
If RowExcel("Código").ToString() <> "" Then
|
If RowExcel("Código").ToString() <> "" Then
|
||||||
|
|
||||||
Dim RowPS = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString()))
|
Dim RowPS As DataRow = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString()))
|
||||||
|
|
||||||
If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then
|
If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then
|
||||||
|
|
||||||
|
|||||||
@@ -1455,8 +1455,8 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
Dim Concepto As String = ConceptoPoliza
|
Dim Concepto As String = ConceptoPoliza
|
||||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados2", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados2", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
Dim tCveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||||
Dim tCveConcepto As Integer = 278
|
Dim tCveConcepto As Integer = 278
|
||||||
|
|
||||||
For Each RowInv As DataRow In tmpCostos.Rows
|
For Each RowInv As DataRow In tmpCostos.Rows
|
||||||
@@ -1471,7 +1471,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Correcto = False
|
Correcto = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
@@ -1479,26 +1478,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CONTABILIZAR - SIMPLIFICAR
|
|
||||||
If Correcto Then
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Correcto = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
|
||||||
' If ObjContaContPAQ Is Nothing Then
|
|
||||||
' ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
' ObjContaContPAQ.IniciaTransacSQL()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaContPAQ) Then
|
|
||||||
' Retorno = False
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Correcto = False
|
Correcto = False
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Partial Class Inventarios_RepVentasXSurtir
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
If ObjInventarios.GetPendietePorSurtirVenta(DdlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlTipo.SelectedValue.ToEntero) Then
|
If ObjInventarios.GetPendientePorSurtirVenta(DdlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlTipo.SelectedValue.ToEntero) Then
|
||||||
GvDatos.DataSource = ObjInventarios.DtResultados
|
GvDatos.DataSource = ObjInventarios.DtResultados
|
||||||
Else
|
Else
|
||||||
GvDatos.DataSource = Nothing
|
GvDatos.DataSource = Nothing
|
||||||
|
|||||||
@@ -1270,8 +1270,9 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Width="70px" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
<asp:DropDownList ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Width="70px" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar" CausesValidation="true"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno."
|
||||||
|
InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:Label ID="LblMoneda" runat="server" Text="" Visible="false"></asp:Label>
|
<asp:Label ID="LblMoneda" runat="server" Text="" Visible="false"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -2071,7 +2071,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
Dim Gvr As GridViewRow = CType(CType(sender, DropDownList).BindingContainer, GridViewRow)
|
Dim Gvr As GridViewRow = CType(CType(sender, DropDownList).BindingContainer, GridViewRow)
|
||||||
'Dim filtro As String = ""
|
'Dim filtro As String = ""
|
||||||
Dim CveClasificacion = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
Dim CveClasificacion As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||||
|
|
||||||
' filtro = String.Format("CveClasificacion={0}", CveClasificacion)
|
' filtro = String.Format("CveClasificacion={0}", CveClasificacion)
|
||||||
|
|
||||||
@@ -2085,7 +2085,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
Dim Gvr As GridViewRow = CType(CType(sender, DropDownList).BindingContainer, GridViewRow)
|
Dim Gvr As GridViewRow = CType(CType(sender, DropDownList).BindingContainer, GridViewRow)
|
||||||
Dim filtro As String = ""
|
Dim filtro As String = ""
|
||||||
Dim Cvepsgvd = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
Dim Cvepsgvd As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||||
If Cvepsgvd > 0 Then
|
If Cvepsgvd > 0 Then
|
||||||
Dim CboUM As DropDownList = Gvr.FCDropDownList("CboUnidadMedidaEdit")
|
Dim CboUM As DropDownList = Gvr.FCDropDownList("CboUnidadMedidaEdit")
|
||||||
Dim TxtPU As TextBox = Gvr.FCTextBox("TxtImporteEdit")
|
Dim TxtPU As TextBox = Gvr.FCTextBox("TxtImporteEdit")
|
||||||
@@ -3591,11 +3591,11 @@ Partial Class OC_OC
|
|||||||
If CveEstatusFinalError > 0 Then
|
If CveEstatusFinalError > 0 Then
|
||||||
Dim objOrdenCompra As New ClsOC
|
Dim objOrdenCompra As New ClsOC
|
||||||
objOrdenCompra.IniciaTransacSQL()
|
objOrdenCompra.IniciaTransacSQL()
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
'AC
|
'AC
|
||||||
Dim ObjAC As ClsContPAQi = Nothing
|
Dim ObjAC As ClsContPAQi = Nothing
|
||||||
Dim PolizaCancelacion = -1
|
Dim PolizaCancelacion As Integer = -1
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjAC.IniciaTransacSQL()
|
ObjAC.IniciaTransacSQL()
|
||||||
@@ -3655,8 +3655,8 @@ Partial Class OC_OC
|
|||||||
' > 0: GENERO POLIZA DE CANCELACION
|
' > 0: GENERO POLIZA DE CANCELACION
|
||||||
' < 0: ERROR
|
' < 0: ERROR
|
||||||
|
|
||||||
Dim ErrorCancelar = False
|
Dim ErrorCancelar As Boolean = False
|
||||||
Dim IdPolizaNueva = 0
|
Dim IdPolizaNueva As Integer = 0
|
||||||
|
|
||||||
If IDPolizaPresupuestal > 0 Then
|
If IDPolizaPresupuestal > 0 Then
|
||||||
Dim dt As DataTable
|
Dim dt As DataTable
|
||||||
@@ -5221,7 +5221,7 @@ Partial Class OC_OC
|
|||||||
UPEventoBitacora.Update()
|
UPEventoBitacora.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function GuardaBitacoraTemporal(ObjEventoBitacora As ClsOIEventos) As Boolean
|
Private Function GuardaBitacoraTemporal(ObjEventoBitacora As ClsOIEventos) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno As Boolean = False
|
||||||
Dim Archivo As System.IO.FileInfo = Nothing
|
Dim Archivo As System.IO.FileInfo = Nothing
|
||||||
|
|
||||||
For Each Dr As DataRow In DtBitacora.Rows
|
For Each Dr As DataRow In DtBitacora.Rows
|
||||||
@@ -5686,7 +5686,7 @@ Partial Class OC_OC
|
|||||||
Else
|
Else
|
||||||
DivIVAFacturar.Visible = True
|
DivIVAFacturar.Visible = True
|
||||||
End If
|
End If
|
||||||
CveMonedaPreferente = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
CveMonedaPreferente = dtt.FiltroPrimeroValor("CveMonedaPreferente").ToEntero()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
||||||
Me.CveConfianzaProveedor = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
Me.CveConfianzaProveedor = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
||||||
'SI NO TIENE ASIGNADO UN NIVEL DE CONFIANZA SE ASIGNARA EL VALOR DE 'PROVEEDOR NO DEDICADO'
|
'SI NO TIENE ASIGNADO UN NIVEL DE CONFIANZA SE ASIGNARA EL VALOR DE 'PROVEEDOR NO DEDICADO'
|
||||||
@@ -5698,7 +5698,7 @@ Partial Class OC_OC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'MUESTRA IVA PROVEEDOR EXTRANJERO
|
'MUESTRA IVA PROVEEDOR EXTRANJERO
|
||||||
If UsuarioActual.CveEmpresa <> 119 AndAlso GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then
|
If UsuarioActual.CveEmpresa <> 119 AndAlso dtt.FiltraParametros("RFC = 'XEXX010101000'").Rows.Count = 1 Then
|
||||||
'Alert("Proveedor extranjero")
|
'Alert("Proveedor extranjero")
|
||||||
LblLeyendaProveedorIVA.Text = "IVA 0%"
|
LblLeyendaProveedorIVA.Text = "IVA 0%"
|
||||||
'Si es proveedor extranjero selecciona iva al 0%
|
'Si es proveedor extranjero selecciona iva al 0%
|
||||||
@@ -5853,7 +5853,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
'CORREO MODIFICADA
|
'CORREO MODIFICADA
|
||||||
If EsNuevo = False And DtHistorial IsNot Nothing Then
|
If EsNuevo = False And DtHistorial IsNot Nothing Then
|
||||||
Dim Bitacora = DtHistorial.FiltraParametros("CveConceptoHistorialBitacora <> 1").Rows.Count
|
Dim Bitacora As Integer = DtHistorial.FiltraParametros("CveConceptoHistorialBitacora <> 1").Rows.Count
|
||||||
Dim ObjGral As New ClsGenerales
|
Dim ObjGral As New ClsGenerales
|
||||||
If ObjGral.GetHistorialBitacora(-1, CveOrdenCompra, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjGral.GetHistorialBitacora(-1, CveOrdenCompra, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
DtHistorial = ObjGral.DtResultados.FiltraParametros("CveConceptoHistorialBitacora <> 1")
|
DtHistorial = ObjGral.DtResultados.FiltraParametros("CveConceptoHistorialBitacora <> 1")
|
||||||
@@ -5867,7 +5867,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
'CORREO PROVEEDOR - SE GENERO OC
|
'CORREO PROVEEDOR - SE GENERO OC
|
||||||
If CveOCGeneradas.Count > 0 Then
|
If CveOCGeneradas.Count > 0 Then
|
||||||
For i = 0 To CveOCGeneradas.Count - 1
|
For i As Integer = 0 To CveOCGeneradas.Count - 1
|
||||||
EnviarCorreoOrdenCompra(CveOCGeneradas(i))
|
EnviarCorreoOrdenCompra(CveOCGeneradas(i))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -6058,7 +6058,7 @@ Partial Class OC_OC
|
|||||||
Dim OCsGeneradas As New StringBuilder
|
Dim OCsGeneradas As New StringBuilder
|
||||||
If FolioOCGeneradas.Count > 0 Then
|
If FolioOCGeneradas.Count > 0 Then
|
||||||
OCsGeneradas.Append("Se generaron la(s) siguiente(s) orden(es) de compra: ")
|
OCsGeneradas.Append("Se generaron la(s) siguiente(s) orden(es) de compra: ")
|
||||||
For Each FolioOC In FolioOCGeneradas
|
For Each FolioOC As Integer In FolioOCGeneradas
|
||||||
OCsGeneradas.Append($" #<b>{FolioOC}</b> ")
|
OCsGeneradas.Append($" #<b>{FolioOC}</b> ")
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -6512,7 +6512,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
dt = ReadExcelFile(Ruta + FileName, True)
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
|
|
||||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
'Try
|
'Try
|
||||||
@@ -6645,7 +6645,7 @@ Partial Class OC_OC
|
|||||||
'Agregar PS
|
'Agregar PS
|
||||||
If DtDetalle IsNot Nothing Then
|
If DtDetalle IsNot Nothing Then
|
||||||
Dim dr As DataRow = DtDetalle.NewRow
|
Dim dr As DataRow = DtDetalle.NewRow
|
||||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||||
If DrPS Is Nothing Then
|
If DrPS Is Nothing Then
|
||||||
Alert("Ocurrió un error al cargar la información de los productos del archivo. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al cargar la información de los productos del archivo. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Continue For
|
Continue For
|
||||||
@@ -6665,7 +6665,7 @@ Partial Class OC_OC
|
|||||||
Dim IEPSPSIVA As Decimal = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
Dim IEPSPSIVA As Decimal = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
||||||
Dim CveClasificacion As Integer = DrPS("CveClasificacion").ToString.ToEntero
|
Dim CveClasificacion As Integer = DrPS("CveClasificacion").ToString.ToEntero
|
||||||
Dim Clasificacion As String = DrPS("Clasificacion").ToString
|
Dim Clasificacion As String = DrPS("Clasificacion").ToString
|
||||||
Dim CveActivoFijo = HdnCveActivoFijo.Value.ToEntero
|
Dim CveActivoFijo As Integer = HdnCveActivoFijo.Value.ToEntero
|
||||||
Dim IdCuentaPorEjercer As Integer = If(HdnCveCuentaPorEjercer.Value = String.Empty, -1, HdnCveCuentaPorEjercer.Value.ToEntero)
|
Dim IdCuentaPorEjercer As Integer = If(HdnCveCuentaPorEjercer.Value = String.Empty, -1, HdnCveCuentaPorEjercer.Value.ToEntero)
|
||||||
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
|
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
|
||||||
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
|
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
|
||||||
@@ -6677,7 +6677,6 @@ Partial Class OC_OC
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
'Cargo el GridView
|
'Cargo el GridView
|
||||||
GvD.DataSource = DtDetalle
|
GvD.DataSource = DtDetalle
|
||||||
GvD.DataBind()
|
GvD.DataBind()
|
||||||
|
|||||||
@@ -885,12 +885,12 @@ Partial Class RH_Personal
|
|||||||
'Configuración
|
'Configuración
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
Dim dt = GlobalDTSubProyectosUsuariosB(1360, -1, 172, -1, -1)
|
Dim dt As DataTable = GlobalDTSubProyectosUsuariosB(1360, -1, 172, -1, -1)
|
||||||
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
||||||
pnlSalarioIMSS.Visible = False
|
pnlSalarioIMSS.Visible = False
|
||||||
End If
|
End If
|
||||||
LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158))
|
LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158))
|
||||||
Using objno = New ClsNominas
|
Using objno As New ClsNominas
|
||||||
objno.GetConceptos()
|
objno.GetConceptos()
|
||||||
dtNomConceptos = objno.DtResultados
|
dtNomConceptos = objno.DtResultados
|
||||||
End Using
|
End Using
|
||||||
@@ -1729,24 +1729,24 @@ Partial Class RH_Personal
|
|||||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.jpg", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.jpg", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png") Then
|
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.png", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.png", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp") Then
|
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.bmp", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.bmp", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg") Then
|
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpeg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpeg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
End If
|
End If
|
||||||
@@ -1973,13 +1973,12 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Dim Extension As String = Path.GetExtension(UsuarioActual.Empresa.Ruta & "Temp\RH\" & ViewState("Archivo").ToString())
|
Dim Extension As String = Path.GetExtension(UsuarioActual.Empresa.Ruta & "Temp\RH\" & ViewState("Archivo").ToString())
|
||||||
Dim URL As String = If(Extension.Trim().Length > 0, CvePersonal & Extension, "")
|
Dim URL As String = If(Extension.Trim().Length > 0, CvePersonal & Extension, "")
|
||||||
Dim Ruta = String.Format("{0}Temp\RH\{1}", UsuarioActual.Empresa.Ruta, ViewState("Archivo").ToString())
|
Dim Ruta As String = String.Format("{0}Temp\RH\{1}", UsuarioActual.Empresa.Ruta, ViewState("Archivo").ToString())
|
||||||
Dim Archivo As New System.IO.FileInfo(Ruta)
|
Dim Archivo As New System.IO.FileInfo(Ruta)
|
||||||
|
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
Dim TieneError = False
|
Dim Mensaje As String = ""
|
||||||
Dim Mensaje = ""
|
Dim Accion As String = ""
|
||||||
Dim Accion = ""
|
|
||||||
|
|
||||||
'Dim FechaBaja As Date = MinFecha
|
'Dim FechaBaja As Date = MinFecha
|
||||||
'Dim FechaActivo As Date = MinFecha
|
'Dim FechaActivo As Date = MinFecha
|
||||||
@@ -3320,7 +3319,7 @@ Partial Class RH_Personal
|
|||||||
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||||
Dim EsBancomer = False
|
Dim EsBancomer As Boolean = False
|
||||||
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
|
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
|
||||||
If nombrebanco.ToUpper.Contains("BBVA") Or nombrebanco.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
If nombrebanco.ToUpper.Contains("BBVA") Or nombrebanco.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
||||||
EsBancomer = True
|
EsBancomer = True
|
||||||
@@ -3478,7 +3477,7 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CvePersonal < 0 Then
|
If CvePersonal < 0 Then
|
||||||
For index = 1 To TempDTCuentasBancos.Rows.Count
|
For index As Integer = 1 To TempDTCuentasBancos.Rows.Count
|
||||||
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
||||||
Next
|
Next
|
||||||
TempDTCuentasBancos.AcceptChanges()
|
TempDTCuentasBancos.AcceptChanges()
|
||||||
@@ -3514,25 +3513,22 @@ Partial Class RH_Personal
|
|||||||
CargaGridCuentasBancos("")
|
CargaGridCuentasBancos("")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
|
Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
|
||||||
Dim NombreBanco = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
|
Dim NombreBanco As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
|
||||||
Dim NumeroSucursal = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
Dim NumeroSucursal As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
||||||
Dim CLABE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
Dim CLABE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
||||||
Dim SWIFT = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
Dim SWIFT As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
||||||
Dim Plaza = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
Dim Plaza As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
||||||
Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
Dim NumeroCuenta As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
||||||
Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
Dim ConvenioCIE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
||||||
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
Dim Referencia As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
||||||
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
|
Dim CveMoneda As Integer = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
|
||||||
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
Dim Estatus As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||||
Dim EstatusPagoElectronico = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
|
Dim EstatusPagoElectronico As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
|
||||||
|
|
||||||
Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
|
||||||
|
|
||||||
|
Dim Moneda As String = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
||||||
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
|
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
|
||||||
|
Dim RefCrediProveedor As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
|
||||||
Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
|
Dim EsBancomer As Boolean = False
|
||||||
|
|
||||||
Dim EsBancomer = False
|
|
||||||
|
|
||||||
If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
|
If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
|
||||||
EsBancomer = True
|
EsBancomer = True
|
||||||
@@ -3587,7 +3583,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
Dim index As Integer = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
||||||
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
||||||
Row("BancoNombre") = NombreBanco
|
Row("BancoNombre") = NombreBanco
|
||||||
Row("Sucursal") = NumeroSucursal
|
Row("Sucursal") = NumeroSucursal
|
||||||
@@ -3618,7 +3614,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
Dim index As Integer = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
||||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3681,7 +3677,7 @@ Partial Class RH_Personal
|
|||||||
End Function
|
End Function
|
||||||
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim LB = CType(sender, LinkButton)
|
Dim LB As LinkButton = CType(sender, LinkButton)
|
||||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||||
|
|
||||||
@@ -3794,7 +3790,7 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||||
|
|
||||||
@@ -3892,7 +3888,7 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||||
|
|
||||||
@@ -4320,7 +4316,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim scripMascara = " $('#" & TxtFechaVigencia.ClientID & "').mask('00/00/0000');"
|
Dim scripMascara As String = " $('#" & TxtFechaVigencia.ClientID & "').mask('00/00/0000');"
|
||||||
RegistraScript(scripMascara)
|
RegistraScript(scripMascara)
|
||||||
If array.Length > 0 Then
|
If array.Length > 0 Then
|
||||||
extencion = array(array.Length - 1)
|
extencion = array(array.Length - 1)
|
||||||
@@ -4335,7 +4331,7 @@ Partial Class RH_Personal
|
|||||||
If documentacionFormato = "" Then
|
If documentacionFormato = "" Then
|
||||||
ImgDownLoadFormato.Visible = False
|
ImgDownLoadFormato.Visible = False
|
||||||
Else
|
Else
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
||||||
ImgDownLoadFormato.Visible = True
|
ImgDownLoadFormato.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -4343,8 +4339,8 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
If Adjunto.Trim.Length > 0 Then
|
If Adjunto.Trim.Length > 0 Then
|
||||||
|
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Personal/" & CvePersonal & "/" & Adjunto
|
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Personal/" & CvePersonal & "/" & Adjunto
|
||||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
|
Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
|
||||||
|
|
||||||
If File.Exists(linkDescargaArchivo) Then
|
If File.Exists(linkDescargaArchivo) Then
|
||||||
|
|
||||||
@@ -4434,11 +4430,7 @@ Partial Class RH_Personal
|
|||||||
If pathDesti.ToUpper.Contains("GAFETTE") Or pathDesti.ToUpper.Contains("GAFETE") Then
|
If pathDesti.ToUpper.Contains("GAFETTE") Or pathDesti.ToUpper.Contains("GAFETE") Then
|
||||||
|
|
||||||
GemBox.Document.ComponentInfo.SetLicense(SerialGemBoxDocument)
|
GemBox.Document.ComponentInfo.SetLicense(SerialGemBoxDocument)
|
||||||
|
Dim document As GemBox.Document.DocumentModel = GemBox.Document.DocumentModel.Load(pathDesti)
|
||||||
Dim document = GemBox.Document.DocumentModel.Load(pathDesti)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim imgPersonalURL As String = ""
|
Dim imgPersonalURL As String = ""
|
||||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
||||||
@@ -4529,7 +4521,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
Private Function GetDatosTagsDocumentos() As List(Of TagsDocumentos)
|
Private Function GetDatosTagsDocumentos() As List(Of TagsDocumentos)
|
||||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||||
|
|
||||||
If CvePersonal <> -1 Then
|
If CvePersonal <> -1 Then
|
||||||
Dim objRH As New ClsRH
|
Dim objRH As New ClsRH
|
||||||
@@ -4537,183 +4529,56 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
|
If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", NombreCompleto))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", NombreCompleto))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal.ToString("###,###,###.00")))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal.ToString("###,###,###.00")))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString()))
|
||||||
|
|
||||||
|
|
||||||
'If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then
|
'If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then
|
||||||
|
|
||||||
' ListaTagsDocumentost.Add(New TagsDocumentos("{CveSucursal}", DDLSucursal4.Text))
|
' ListaTagsDocumentost.Add(New TagsDocumentos("{CveSucursal}", DDLSucursal4.Text))
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString().ToDate.ToShortDateString))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString().ToDate.ToShortDateString))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString().ToDate.ToShortDateString))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString().ToDate.ToShortDateString))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", ""))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", ""))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", ""))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", ""))
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy")))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy")))
|
||||||
|
|
||||||
|
|
||||||
Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year
|
Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year
|
||||||
|
|
||||||
Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy")
|
Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
||||||
End If
|
End If
|
||||||
@@ -5585,17 +5450,15 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Private Function GetDatosTagsVacaciones(_VacFolio As Integer) As List(Of TagsDocumentos)
|
Private Function GetDatosTagsVacaciones(_VacFolio As Integer) As List(Of TagsDocumentos)
|
||||||
|
|
||||||
Dim ListaTags = New List(Of TagsDocumentos)
|
Dim ListaTags As New List(Of TagsDocumentos)
|
||||||
Dim objRH As New ClsRH
|
Dim objRH As New ClsRH
|
||||||
|
|
||||||
If objRH.VacacionesFolioGet(CvePersonal, _VacFolio) Then
|
If objRH.VacacionesFolioGet(CvePersonal, _VacFolio) Then
|
||||||
|
|
||||||
If objRH.DtResultados.Rows.Count > 0 Then
|
If objRH.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
ListaTags.Add(New TagsDocumentos("{Anios}", VacAnios.ToString()))
|
ListaTags.Add(New TagsDocumentos("{Anios}", VacAnios.ToString()))
|
||||||
ListaTags.Add(New TagsDocumentos("{DiasUsados}", VacDiasUsados.ToString()))
|
ListaTags.Add(New TagsDocumentos("{DiasUsados}", VacDiasUsados.ToString()))
|
||||||
ListaTags.Add(New TagsDocumentos("{DiasDisponibles}", VacDiasDisponibles.ToString()))
|
ListaTags.Add(New TagsDocumentos("{DiasDisponibles}", VacDiasDisponibles.ToString()))
|
||||||
|
|
||||||
If Not IsDBNull(objRH.DtResultados(0)("InicioVac")) Then
|
If Not IsDBNull(objRH.DtResultados(0)("InicioVac")) Then
|
||||||
ListaTags.Add(New TagsDocumentos("{InicioVac}", objRH.DtResultados(0)("InicioVac").ToString().ToDate.ToString("dd/MM/yyyy")))
|
ListaTags.Add(New TagsDocumentos("{InicioVac}", objRH.DtResultados(0)("InicioVac").ToString().ToDate.ToString("dd/MM/yyyy")))
|
||||||
End If
|
End If
|
||||||
@@ -5982,7 +5845,7 @@ Partial Class RH_Personal
|
|||||||
Next
|
Next
|
||||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
||||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}&version={4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica), Now)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}&version={4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica), Now)
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
End If
|
End If
|
||||||
UpImage.Update()
|
UpImage.Update()
|
||||||
@@ -6253,22 +6116,19 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
If gvr.DataKey("SeTimbro") = "True" Then
|
If gvr.DataKey("SeTimbro") = "True" Then
|
||||||
|
|
||||||
Dim NombreComercial = UsuarioActual.Empresa.Empresa
|
Dim NombreComercial As String = UsuarioActual.Empresa.Empresa
|
||||||
Dim SerieFolio = gvr.DataKey("SerieFolio").ToString()
|
Dim SerieFolio As String = gvr.DataKey("SerieFolio").ToString()
|
||||||
Dim Destinatario = gvr.DataKey("Correo").ToString()
|
Dim Destinatario As String = gvr.DataKey("Correo").ToString()
|
||||||
Dim Personal = gvr.DataKey("Nombre").ToString()
|
Dim Personal As String = gvr.DataKey("Nombre").ToString()
|
||||||
Dim fechai = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
|
Dim fechai As String = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
|
||||||
Dim fechaf = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
|
Dim fechaf As String = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
|
||||||
Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero()
|
Dim cvePeriodo As Integer = gvr.DataKey("CvePeriodo").ToString().ToEntero()
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.CveRol = 1 Then
|
||||||
Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf)
|
Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf)
|
||||||
End If
|
End If
|
||||||
MandaCorreo(NombreComercial, SerieFolio, Destinatario, Personal, fechai, fechaf, cvePeriodo)
|
MandaCorreo(NombreComercial, SerieFolio, Destinatario, Personal, fechai, fechaf, cvePeriodo)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MandaCorreo(NombreComercial As String, SerieFolio As String, Destinatario As String, Optional Personal As String = "", Optional FechaI As String = "", Optional FechaF As String = "", Optional CvePeriodo As Integer = -1)
|
Private Sub MandaCorreo(NombreComercial As String, SerieFolio As String, Destinatario As String, Optional Personal As String = "", Optional FechaI As String = "", Optional FechaF As String = "", Optional CvePeriodo As Integer = -1)
|
||||||
@@ -6484,7 +6344,7 @@ Partial Class RH_Personal
|
|||||||
ObjAF.Dispose()
|
ObjAF.Dispose()
|
||||||
Else
|
Else
|
||||||
If DTLicencias IsNot Nothing Then
|
If DTLicencias IsNot Nothing Then
|
||||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
Dim Row As DataRow = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
||||||
DTLicencias.Rows.Remove(Row)
|
DTLicencias.Rows.Remove(Row)
|
||||||
GvLicencias.DataSource = DTLicencias
|
GvLicencias.DataSource = DTLicencias
|
||||||
GvLicencias.DataBind()
|
GvLicencias.DataBind()
|
||||||
@@ -6529,7 +6389,7 @@ Partial Class RH_Personal
|
|||||||
Else
|
Else
|
||||||
If DTLicencias IsNot Nothing Then
|
If DTLicencias IsNot Nothing Then
|
||||||
If HdnModalidadLicencia.Value = "A" Then
|
If HdnModalidadLicencia.Value = "A" Then
|
||||||
Dim Row = DTLicencias.NewRow()
|
Dim Row As DataRow = DTLicencias.NewRow()
|
||||||
|
|
||||||
Row("Licencia") = TxtLicencia.Text.Trim()
|
Row("Licencia") = TxtLicencia.Text.Trim()
|
||||||
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
||||||
@@ -6546,7 +6406,7 @@ Partial Class RH_Personal
|
|||||||
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
ElseIf HdnModalidadLicencia.Value = "U" Then
|
ElseIf HdnModalidadLicencia.Value = "U" Then
|
||||||
Try
|
Try
|
||||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
Dim Row As DataRow = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
||||||
|
|
||||||
Row("Licencia") = TxtLicencia.Text.Trim()
|
Row("Licencia") = TxtLicencia.Text.Trim()
|
||||||
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
||||||
@@ -6582,7 +6442,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\RepResguardosAF.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\RepResguardosAF.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim dtVC As DataTable = Nothing
|
Dim dtVC As DataTable = Nothing
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
@@ -6601,7 +6461,7 @@ Partial Class RH_Personal
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim SBDomicilioSucursal As New StringBuilder()
|
Dim SBDomicilioSucursal As New StringBuilder()
|
||||||
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero(), Estatus:=1).FiltroPrimero("")
|
Dim DRSucursal As DataRow = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero(), Estatus:=1).FiltroPrimero("")
|
||||||
|
|
||||||
If DRSucursal IsNot Nothing Then
|
If DRSucursal IsNot Nothing Then
|
||||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||||
@@ -7146,12 +7006,7 @@ Partial Class RH_Personal
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkDescargaFormatoParametros_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDescargaFormatoParametros_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||||
|
|
||||||
|
|
||||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjRH As New ClsRH
|
Dim ObjRH As New ClsRH
|
||||||
ListaTagsDocumentost = ObjRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)
|
ListaTagsDocumentost = ObjRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)
|
||||||
ObjRH.Dispose()
|
ObjRH.Dispose()
|
||||||
@@ -7161,10 +7016,7 @@ Partial Class RH_Personal
|
|||||||
If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then
|
If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos(GvRow.DataKey("Parametro"), GvRow.FCTextBox("TxtParametro").Text))
|
ListaTagsDocumentost.Add(New TagsDocumentos(GvRow.DataKey("Parametro"), GvRow.FCTextBox("TxtParametro").Text))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
|
Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
|
||||||
Dim PathSource As String
|
Dim PathSource As String
|
||||||
Dim pathDesti As String
|
Dim pathDesti As String
|
||||||
@@ -7276,10 +7128,6 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub DdlSubProyectoAsignado_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
Protected Sub DdlSubProyectoAsignado_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Using objrh As New ClsRH()
|
Using objrh As New ClsRH()
|
||||||
@@ -7671,8 +7519,8 @@ Partial Class RH_Personal
|
|||||||
ffin = gvrow.DataKey("FechaFin").ToDateTime()
|
ffin = gvrow.DataKey("FechaFin").ToDateTime()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Dim estatus = -1
|
Dim estatus As Integer = -1
|
||||||
Dim continuar = False
|
Dim continuar As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
If (LnkActivar.Visible) Then
|
If (LnkActivar.Visible) Then
|
||||||
@@ -7826,17 +7674,11 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
ObjRH.Dispose()
|
ObjRH.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
|
Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
|
||||||
objGemBoxDocument.SustituirTags(Tags)
|
objGemBoxDocument.SustituirTags(Tags)
|
||||||
objGemBoxDocument.GuardarStreamPDF()
|
objGemBoxDocument.GuardarStreamPDF()
|
||||||
|
|
||||||
|
Dim objbyte As Byte() = objGemBoxDocument.GetBytesDocumento
|
||||||
Dim objbyte = objGemBoxDocument.GetBytesDocumento
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -7859,9 +7701,6 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -7993,11 +7832,7 @@ Partial Class RH_Personal
|
|||||||
SBDatosBancarios.Append(If(GvRow.FCLabel("LtMoneda").Text.Trim.Length > 0, $"Moneda: {GvRow.FCLabel("LtMoneda").Text}, ", ""))
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LtMoneda").Text.Trim.Length > 0, $"Moneda: {GvRow.FCLabel("LtMoneda").Text}, ", ""))
|
||||||
SBDatosBancarios.Append(If(GvRow.FCLabel("LlbEstatusTexto").Text.Trim.Length > 0, $"Estatus: {GvRow.FCLabel("LlbEstatusTexto").Text} ", ""))
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LlbEstatusTexto").Text.Trim.Length > 0, $"Estatus: {GvRow.FCLabel("LlbEstatusTexto").Text} ", ""))
|
||||||
SBDatosBancarios.AppendLine($"<br>")
|
SBDatosBancarios.AppendLine($"<br>")
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If SBDatosBancarios.ToString.Trim.Length > 0 Then
|
If SBDatosBancarios.ToString.Trim.Length > 0 Then
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Datos Bancarios:</td><td style=' text-align: left; font-weight:bold;'>{ SBDatosBancarios.ToString }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Datos Bancarios:</td><td style=' text-align: left; font-weight:bold;'>{ SBDatosBancarios.ToString }</td></tr>")
|
||||||
End If
|
End If
|
||||||
@@ -8010,9 +7845,6 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs)
|
||||||
DdlVacPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
DdlVacPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
|
||||||
@@ -8048,16 +7880,14 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If fechaFinParametro <> Nothing Then
|
If fechaFinParametro <> Nothing Then
|
||||||
|
|
||||||
Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
||||||
Dim DiasNolavorales As Integer = 0
|
Dim DiasNolavorales As Integer = 0
|
||||||
Dim FechaTemp As Date = fechaInicioParametro
|
Dim FechaTemp As Date = fechaInicioParametro
|
||||||
|
|
||||||
For x = 1 To DiferenciaEntreFechas
|
For x As Integer = 1 To DiferenciaEntreFechas
|
||||||
Dim day_of_week = CType(FechaTemp.DayOfWeek, Integer) + 1
|
Dim day_of_week As Integer = CType(FechaTemp.DayOfWeek, Integer) + 1
|
||||||
|
|
||||||
If day_of_week = diaDescanso Then
|
If day_of_week = diaDescanso Then
|
||||||
DiasNolavorales = DiasNolavorales + 1
|
DiasNolavorales = DiasNolavorales + 1
|
||||||
@@ -8092,8 +7922,8 @@ Partial Class RH_Personal
|
|||||||
Dim DiasAgregados As Integer = 0
|
Dim DiasAgregados As Integer = 0
|
||||||
Dim FechaFin As Date = fechaInicioParametro
|
Dim FechaFin As Date = fechaInicioParametro
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
For x = 2 To diasVacaciones
|
For x As Integer = 2 To diasVacaciones
|
||||||
Dim day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1
|
Dim day_of_week As Integer = CType(FechaFin.DayOfWeek, Integer) + 1
|
||||||
If day_of_week = diaDescanso Then
|
If day_of_week = diaDescanso Then
|
||||||
FechaFin = FechaFin.AddDays(2)
|
FechaFin = FechaFin.AddDays(2)
|
||||||
DiasAgregados = DiasAgregados + 1
|
DiasAgregados = DiasAgregados + 1
|
||||||
@@ -8136,7 +7966,6 @@ Partial Class RH_Personal
|
|||||||
If Not validaFechasVaciones() Then
|
If Not validaFechasVaciones() Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero, TxtFechaFinVac.Text.ToDate)
|
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero, TxtFechaFinVac.Text.ToDate)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
'SI ES EMPRESA DE ACUMULADORES DEBE OBLIGAR A SUBIR UN ARCHIVO
|
'SI ES EMPRESA DE ACUMULADORES DEBE OBLIGAR A SUBIR UN ARCHIVO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
Dim files = Anexo.getfiles()
|
Dim files As Extensiones.Files = Anexo.getfiles()
|
||||||
If files IsNot Nothing Then
|
If files IsNot Nothing Then
|
||||||
If files.Archivos IsNot Nothing Then
|
If files.Archivos IsNot Nothing Then
|
||||||
If files.Archivos.Count = 0 Then
|
If files.Archivos.Count = 0 Then
|
||||||
@@ -1141,39 +1141,15 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
' If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
' MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
' Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
|
If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
|
||||||
MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
||||||
'If ObjMov.ValorPolizaDescuadre > 0 Then
|
'If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||||
' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
||||||
'End If
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''Conta ContPAQ
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
|
||||||
' If idCuentaContabilizacion > 0 Then
|
|
||||||
' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
|
||||||
' IDPoliza = ObjMov.ContaIdPoliza
|
|
||||||
' FolioPoliza = ObjMov.ContaFolio
|
|
||||||
' Else
|
|
||||||
' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
|
||||||
' MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas))
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
Else
|
Else
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
@@ -2708,8 +2684,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||||
|
|
||||||
Dim DTExcel As New DataTable
|
Dim DTExcel As New DataTable
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
Dim ErrorExcel = False
|
Dim ErrorExcel As Boolean = False
|
||||||
|
|
||||||
DTExcel = ReadExcelFile(Directorio + file.filename, True)
|
DTExcel = ReadExcelFile(Directorio + file.filename, True)
|
||||||
|
|
||||||
|
|||||||
@@ -100,16 +100,15 @@
|
|||||||
<asp:CheckBox runat="server" ID="chk" CssClass="ChkAllEvt" />
|
<asp:CheckBox runat="server" ID="chk" CssClass="ChkAllEvt" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="200px" />
|
<asp:BoundField HeaderText="Cliente" DataField="Nombre" />
|
||||||
<asp:BoundField HeaderText="Servicio" DataField="Servicio" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Servicio" DataField="Servicio" />
|
||||||
<asp:BoundField HeaderText="Mercancia" DataField="Mercancia" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Mercancia" DataField="Mercancia" />
|
||||||
<asp:BoundField HeaderText="Fecha Salida" DataField="FechaSalida" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
<asp:BoundField HeaderText="Fecha Salida" DataField="FechaSalida" DataFormatString="{0:dd/MM/yyyy HH:mm}" ItemStyle-Width="80px" />
|
||||||
<asp:BoundField HeaderText="Fecha Llegada" DataField="FechaLlegada" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
<asp:BoundField HeaderText="Fecha Llegada" DataField="FechaLlegada" DataFormatString="{0:dd/MM/yyyy HH:mm}" ItemStyle-Width="80px" />
|
||||||
<asp:BoundField HeaderText="Cant." DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cant." DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Origen" DataField="DireccionOrigen" ItemStyle-Width="200px" />
|
<asp:BoundField HeaderText="Origen" DataField="DireccionOrigen" />
|
||||||
<asp:BoundField HeaderText="Destino" DataField="DireccionDestino" ItemStyle-Width="200px" />
|
<asp:BoundField HeaderText="Destino" DataField="DireccionDestino" />
|
||||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="265px" />
|
|
||||||
</Columns>
|
</Columns>
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Option Strict On
|
|||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports ADSTimbrado
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@ Partial Class Ventas_FacturacionAcarreos
|
|||||||
CveCliente = DdlClientes.SelectedValue.ToEntero()
|
CveCliente = DdlClientes.SelectedValue.ToEntero()
|
||||||
End If
|
End If
|
||||||
Using ObjVentas As New ClsVentas
|
Using ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), Now, UsuarioActual.CveEmpresa) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
@@ -57,7 +58,7 @@ Partial Class Ventas_FacturacionAcarreos
|
|||||||
|
|
||||||
Dim FileExcel As New ExcelFile()
|
Dim FileExcel As New ExcelFile()
|
||||||
|
|
||||||
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
Dim worksheet As ExcelWorksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||||
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||||
{
|
{
|
||||||
.ColumnHeaders = True,
|
.ColumnHeaders = True,
|
||||||
@@ -67,8 +68,8 @@ Partial Class Ventas_FacturacionAcarreos
|
|||||||
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||||
|
|
||||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||||
For i = 0 To columnCount
|
For i As Integer = 0 To columnCount
|
||||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ Partial Class Ventas_FacturacionAcarreos
|
|||||||
Private Sub CargarArchivo(Ruta As String, FileName As String)
|
Private Sub CargarArchivo(Ruta As String, FileName As String)
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
Dim dt As DataTable = Nothing
|
Dim dt As DataTable = Nothing
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
|
|
||||||
Try
|
Try
|
||||||
dt = ReadExcelFile(Ruta + FileName, True)
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
@@ -257,7 +258,7 @@ Partial Class Ventas_FacturacionAcarreos
|
|||||||
|
|
||||||
Dim CvePSMercancia As Integer = GvRow.DataKey("CvePSRelacionado").ToEntero()
|
Dim CvePSMercancia As Integer = GvRow.DataKey("CvePSRelacionado").ToEntero()
|
||||||
|
|
||||||
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda)
|
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda)
|
||||||
ObjFactura.EmitirCartaPorte = True
|
ObjFactura.EmitirCartaPorte = True
|
||||||
ObjFactura.CveFacturacionAcarreo = GvRow.DataKey("CveFacturacionAcarreo").ToEntero()
|
ObjFactura.CveFacturacionAcarreo = GvRow.DataKey("CveFacturacionAcarreo").ToEntero()
|
||||||
|
|
||||||
@@ -267,7 +268,7 @@ Partial Class Ventas_FacturacionAcarreos
|
|||||||
ObjFactura.CalculaTotales()
|
ObjFactura.CalculaTotales()
|
||||||
ObjFactura.PreparaTimbre()
|
ObjFactura.PreparaTimbre()
|
||||||
|
|
||||||
Dim resp = ObjFactura.EmitirFactura(Timbrar:=True, Modulo:="FacturacionAcarreos")
|
Dim resp As Modelos.Factura.MMensajeFactura = ObjFactura.EmitirFactura(Timbrar:=True, Modulo:="FacturacionAcarreos")
|
||||||
|
|
||||||
For Each m As String In resp.Mensajes
|
For Each m As String In resp.Mensajes
|
||||||
msg.AppendFormat("{0}<br/>", m)
|
msg.AppendFormat("{0}<br/>", m)
|
||||||
@@ -338,7 +339,7 @@ Partial Class Ventas_FacturacionAcarreos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreaDTMercancias(CvePS As Integer, Cantidad As Decimal) As DataTable
|
Private Function CreaDTMercancias(CvePS As Integer, Cantidad As Decimal) As DataTable
|
||||||
Dim DtMercancias = New DataTable()
|
Dim DtMercancias As New DataTable()
|
||||||
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
|
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
|
||||||
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||||
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||||
|
|||||||
@@ -650,14 +650,14 @@ Partial Class PV
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal)
|
'Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal)
|
||||||
Get
|
' Get
|
||||||
Return New Dictionary(Of Integer, Decimal) From {
|
' Return New Dictionary(Of Integer, Decimal) From {
|
||||||
{20516, 0.21D}, 'Descuento para lubricantes LTH
|
' {20516, 0.21D}, 'Descuento para lubricantes LTH
|
||||||
{20515, 0.25D} 'Descuento para filtros LTH
|
' {20515, 0.25D} 'Descuento para filtros LTH
|
||||||
}
|
' }
|
||||||
End Get
|
' End Get
|
||||||
End Property
|
'End Property
|
||||||
Private Property CveAutorizacion As Integer
|
Private Property CveAutorizacion As Integer
|
||||||
Get
|
Get
|
||||||
Return (IfNull(ViewState("CveAutorizacion"), "-1", ViewState("CveAutorizacion"))).ToString().ToEntero()
|
Return (IfNull(ViewState("CveAutorizacion"), "-1", ViewState("CveAutorizacion"))).ToString().ToEntero()
|
||||||
@@ -1484,7 +1484,7 @@ Partial Class PV
|
|||||||
TrRetIVA.Style.Add("display", "")
|
TrRetIVA.Style.Add("display", "")
|
||||||
UsuarioActual.Empresa.MostrarRetIVA = True
|
UsuarioActual.Empresa.MostrarRetIVA = True
|
||||||
If TmpDT IsNot Nothing Then
|
If TmpDT IsNot Nothing Then
|
||||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
Dim PorcentajeRetIVA As Decimal = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1814,11 +1814,11 @@ Partial Class PV
|
|||||||
ViewState("CveClienteAnterior") = CveCliente
|
ViewState("CveClienteAnterior") = CveCliente
|
||||||
|
|
||||||
'SI EL DETALLE NO TIENE MOVIMIENTOS DE INVENTARIO ES VISIBLE
|
'SI EL DETALLE NO TIENE MOVIMIENTOS DE INVENTARIO ES VISIBLE
|
||||||
Dim CantidadFacturadaRemision = 0.0
|
Dim CantidadFacturadaRemision As Decimal = 0
|
||||||
For Each Gvr As GridViewRow In GvPS.Rows
|
For Each Gvr As GridViewRow In GvPS.Rows
|
||||||
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||||
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||||
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble
|
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString.ToDecimal
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'ACTIVA CAMBIO DE CLIENTE - SI NO TIENE NADA FACTURADO
|
'ACTIVA CAMBIO DE CLIENTE - SI NO TIENE NADA FACTURADO
|
||||||
@@ -2156,7 +2156,7 @@ Partial Class PV
|
|||||||
|
|
||||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||||
CveCorte = ObjPVenta.CveCorte
|
CveCorte = ObjPVenta.CveCorte
|
||||||
Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-1)
|
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-1)
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
|
||||||
DebeCerrarCorte = True
|
DebeCerrarCorte = True
|
||||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||||
@@ -2223,32 +2223,32 @@ Partial Class PV
|
|||||||
Dt.Columns.Add("Descripcion", GetType(String))
|
Dt.Columns.Add("Descripcion", GetType(String))
|
||||||
Dt.Columns.Add("Importe", GetType(Decimal))
|
Dt.Columns.Add("Importe", GetType(Decimal))
|
||||||
|
|
||||||
Dim Dr1 = Dt.NewRow
|
Dim Dr1 As DataRow = Dt.NewRow
|
||||||
Dr1("Descripcion") = "Fondo de Caja"
|
Dr1("Descripcion") = "Fondo de Caja"
|
||||||
Dr1("Importe") = ObjPVenta.DtResultados(0)("ImporteInicial").ToString.ToDouble
|
Dr1("Importe") = ObjPVenta.DtResultados(0)("ImporteInicial").ToString.ToDouble
|
||||||
Dt.Rows.Add(Dr1)
|
Dt.Rows.Add(Dr1)
|
||||||
|
|
||||||
Dim Dr2 = Dt.NewRow
|
Dim Dr2 As DataRow = Dt.NewRow
|
||||||
Dr2("Descripcion") = "Ventas en Efectivo"
|
Dr2("Descripcion") = "Ventas en Efectivo"
|
||||||
Dr2("Importe") = ObjPVenta.DtResultados(0)("VentasEfectivo").ToString.ToDouble
|
Dr2("Importe") = ObjPVenta.DtResultados(0)("VentasEfectivo").ToString.ToDouble
|
||||||
Dt.Rows.Add(Dr2)
|
Dt.Rows.Add(Dr2)
|
||||||
|
|
||||||
Dim Dr3 = Dt.NewRow
|
Dim Dr3 As DataRow = Dt.NewRow
|
||||||
Dr3("Descripcion") = "Propinas"
|
Dr3("Descripcion") = "Propinas"
|
||||||
Dr3("Importe") = ObjPVenta.DtResultados(0)("Propina").ToString.ToDouble
|
Dr3("Importe") = ObjPVenta.DtResultados(0)("Propina").ToString.ToDouble
|
||||||
Dt.Rows.Add(Dr3)
|
Dt.Rows.Add(Dr3)
|
||||||
|
|
||||||
Dim Dr4 = Dt.NewRow
|
Dim Dr4 As DataRow = Dt.NewRow
|
||||||
Dr4("Descripcion") = "Entradas"
|
Dr4("Descripcion") = "Entradas"
|
||||||
Dr4("Importe") = ObjPVenta.DtResultados(0)("Ingresado").ToString.ToDouble
|
Dr4("Importe") = ObjPVenta.DtResultados(0)("Ingresado").ToString.ToDouble
|
||||||
Dt.Rows.Add(Dr4)
|
Dt.Rows.Add(Dr4)
|
||||||
|
|
||||||
Dim Dr5 = Dt.NewRow
|
Dim Dr5 As DataRow = Dt.NewRow
|
||||||
Dr5("Descripcion") = "Salidas"
|
Dr5("Descripcion") = "Salidas"
|
||||||
Dr5("Importe") = ObjPVenta.DtResultados(0)("Retirado").ToString.ToDouble
|
Dr5("Importe") = ObjPVenta.DtResultados(0)("Retirado").ToString.ToDouble
|
||||||
Dt.Rows.Add(Dr5)
|
Dt.Rows.Add(Dr5)
|
||||||
|
|
||||||
Dim Dr6 = Dt.NewRow
|
Dim Dr6 As DataRow = Dt.NewRow
|
||||||
Dr6("Descripcion") = "Total"
|
Dr6("Descripcion") = "Total"
|
||||||
Dr6("Importe") = Total
|
Dr6("Importe") = Total
|
||||||
Dt.Rows.Add(Dr6)
|
Dt.Rows.Add(Dr6)
|
||||||
@@ -2318,7 +2318,7 @@ Partial Class PV
|
|||||||
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
||||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||||
Dim Liga = "document.location.href=""/Ventas/PV.aspx"";"
|
Dim Liga As String = "document.location.href=""/Ventas/PV.aspx"";"
|
||||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2329,7 +2329,7 @@ Partial Class PV
|
|||||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||||
Dim Liga = "document.location.href=""/Ventas/PV.aspx"";"
|
Dim Liga As String = "document.location.href=""/Ventas/PV.aspx"";"
|
||||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -2773,7 +2773,7 @@ Partial Class PV
|
|||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaFormatoSucursal()
|
Private Sub CargaFormatoSucursal()
|
||||||
Dim dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", If(DdlSubProyectoDatos.SelectedValue = "", "-1", DdlSubProyectoDatos.SelectedValue)))
|
Dim dr As DataRow = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", If(DdlSubProyectoDatos.SelectedValue = "", "-1", DdlSubProyectoDatos.SelectedValue)))
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
ViewState("SucCalle") = dr("Calle")
|
ViewState("SucCalle") = dr("Calle")
|
||||||
ViewState("SucNoExt") = dr("NoExt")
|
ViewState("SucNoExt") = dr("NoExt")
|
||||||
@@ -2820,7 +2820,7 @@ Partial Class PV
|
|||||||
If CveClienteSuc > 0 Then
|
If CveClienteSuc > 0 Then
|
||||||
If ObjCliente.GetSucursales(CveCliente, CveClienteSuc) Then
|
If ObjCliente.GetSucursales(CveCliente, CveClienteSuc) Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
Dim Correo = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
Dim Correo As String = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
||||||
If Correo.Trim.Length > 0 Then
|
If Correo.Trim.Length > 0 Then
|
||||||
ViewState("Mail") = Correo
|
ViewState("Mail") = Correo
|
||||||
End If
|
End If
|
||||||
@@ -2992,7 +2992,7 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaVendedores()
|
Private Sub CargaVendedores()
|
||||||
|
|
||||||
Dim CveVendedorActual = DdlVendedor.SelectedValue
|
Dim CveVendedorActual As Integer = DdlVendedor.SelectedValue.ToEntero
|
||||||
|
|
||||||
DdlVendedor.Items.Clear()
|
DdlVendedor.Items.Clear()
|
||||||
|
|
||||||
@@ -3127,10 +3127,11 @@ Partial Class PV
|
|||||||
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero
|
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim resultados = From OrdenDT In TmpDT
|
'Dim resultados = From OrdenDT In TmpDT
|
||||||
Order By OrdenDT("Orden").ToString.ToEntero
|
' Order By OrdenDT("Orden").ToString.ToEntero
|
||||||
Select OrdenDT
|
' Select OrdenDT
|
||||||
TmpDT = resultados.CopyToDataTable
|
'TmpDT = resultados.CopyToDataTable
|
||||||
|
TmpDT = TmpDT.FiltraParametros("", "Orden")
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
||||||
@@ -3305,11 +3306,11 @@ Partial Class PV
|
|||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") Then
|
||||||
Dim MensajeCosto As New StringBuilder
|
Dim MensajeCosto As New StringBuilder
|
||||||
Dim CostoMenor = 0.0D
|
Dim CostoMenor As Decimal = 0
|
||||||
Dim CostoMayor = 0.0D
|
Dim CostoMayor As Decimal = 0
|
||||||
Dim Costo = 0.0D
|
Dim Costo As Decimal = 0
|
||||||
Dim EsValido = False 'BANDERA
|
Dim EsValido As Boolean = False 'BANDERA
|
||||||
Dim EsValidoMayor = False
|
Dim EsValidoMayor As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||||
@@ -3321,7 +3322,7 @@ Partial Class PV
|
|||||||
|
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim PU = 0.0D
|
Dim PU As Decimal = 0
|
||||||
For Each dr As DataRow In TmpDT.Rows
|
For Each dr As DataRow In TmpDT.Rows
|
||||||
'SI ES SERVICIO NO VALIDA
|
'SI ES SERVICIO NO VALIDA
|
||||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveTipoPS").ToString.ToEntero = 1 Then
|
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveTipoPS").ToString.ToEntero = 1 Then
|
||||||
@@ -3450,7 +3451,7 @@ Partial Class PV
|
|||||||
|
|
||||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||||
Dim urlFactura As String = ""
|
Dim urlFactura As String = ""
|
||||||
Dim urlAjuste = ""
|
Dim urlAjuste As String = ""
|
||||||
Dim SbAlert As New StringBuilder
|
Dim SbAlert As New StringBuilder
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -3536,7 +3537,7 @@ Partial Class PV
|
|||||||
Retorno.Mensajes(Retorno.Mensajes.Count - 1) = SbAlert.ToString()
|
Retorno.Mensajes(Retorno.Mensajes.Count - 1) = SbAlert.ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each Mensaje In Retorno.Mensajes
|
For Each Mensaje As String In Retorno.Mensajes
|
||||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), If(Retorno.TieneError, "", Retorno.LigaPV), ShowCloseButton:=False)
|
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), If(Retorno.TieneError, "", Retorno.LigaPV), ShowCloseButton:=False)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -3553,14 +3554,14 @@ Partial Class PV
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
||||||
Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
Dim Url As New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
Try
|
Try
|
||||||
Using httpClient = New HttpClient()
|
Using httpClient As New HttpClient()
|
||||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
Using request As New HttpRequestMessage(HttpMethod.Get, Url)
|
||||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CveUsuario=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CveUsuario=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||||
Dim response = httpClient.SendAsync(request).Result
|
Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result
|
||||||
If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then
|
If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then
|
||||||
File = response.Content.ReadAsByteArrayAsync().Result
|
File = response.Content.ReadAsByteArrayAsync().Result
|
||||||
End If
|
End If
|
||||||
@@ -3810,12 +3811,12 @@ Partial Class PV
|
|||||||
ObjFactura.CveAlmacenServicioDomicilio = ddlAlmacen.SelectedValue.ToEntero() 'GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
ObjFactura.CveAlmacenServicioDomicilio = ddlAlmacen.SelectedValue.ToEntero() 'GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||||
|
|
||||||
'PREPARA DT INVENTARIO
|
'PREPARA DT INVENTARIO
|
||||||
Dim DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
Dim DtInv As DataTable = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
For Each GvRow As GridViewRow In GvInv.Rows
|
For Each GvRow As GridViewRow In GvInv.Rows
|
||||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
Dim filtro = DtInv.Select(String.Format("CvePS = {0} AND Consec = {1}", GvRow.DataKey("CvePS"), GvRow.DataKey("Consec")))
|
Dim filtro As DataRow() = DtInv.Select(String.Format("CvePS = {0} AND Consec = {1}", GvRow.DataKey("CvePS"), GvRow.DataKey("Consec")))
|
||||||
If filtro IsNot Nothing AndAlso filtro.Length > 0 Then
|
If filtro IsNot Nothing AndAlso filtro.Length > 0 Then
|
||||||
Dim Row = filtro(0)
|
Dim Row As DataRow = filtro(0)
|
||||||
Row("Serie") = GvRow.FCTextBox("TxtSerie").Text.Trim
|
Row("Serie") = GvRow.FCTextBox("TxtSerie").Text.Trim
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4083,7 +4084,7 @@ Partial Class PV
|
|||||||
Dim PrecioSugerido As Decimal = 0
|
Dim PrecioSugerido As Decimal = 0
|
||||||
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||||
If UsuarioActual.CveEmpresa.Contiene(80, 119) Then
|
If UsuarioActual.CveEmpresa.Contiene(80, 119) Then
|
||||||
Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
Dim CvePrecioListaPS As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
||||||
If CvePrecioListaPS > 0 Then
|
If CvePrecioListaPS > 0 Then
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||||
@@ -4091,9 +4092,9 @@ Partial Class PV
|
|||||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||||
If PrecioSugerido = 0 Then
|
If PrecioSugerido = 0 Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
Dim PorcentajePrecio As Decimal = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||||
End If
|
End If
|
||||||
@@ -4343,26 +4344,26 @@ Partial Class PV
|
|||||||
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
||||||
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
|
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
|
||||||
If Not String.IsNullOrEmpty(DrPS("CveMarca").ToString()) AndAlso DrPS("CveMarca").ToString().ToEntero() > 0 Then
|
If Not String.IsNullOrEmpty(DrPS("CveMarca").ToString()) AndAlso DrPS("CveMarca").ToString().ToEntero() > 0 Then
|
||||||
Dim RowPorcentaje = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
|
Dim RowPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
|
||||||
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
|
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
|
||||||
If RowPorcentaje IsNot Nothing Then
|
If RowPorcentaje IsNot Nothing Then
|
||||||
'(AHORA LOS DESCUENTOS SON ACUMULABLES)
|
'(AHORA LOS DESCUENTOS SON ACUMULABLES)
|
||||||
'Descuento = 0
|
'Descuento = 0
|
||||||
Dim PorcentajeProducto = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
Dim PorcentajeProducto As Decimal = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
||||||
Dim PorcentajeProducto2 = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
Dim PorcentajeProducto2 As Decimal = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
||||||
Dim PorcentajeProducto3 = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
Dim PorcentajeProducto3 As Decimal = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
||||||
|
|
||||||
Dim TotalInicial As Decimal = (Cantidad * (PU)) '- Descuento
|
Dim TotalInicial As Decimal = (Cantidad * (PU)) '- Descuento
|
||||||
Dim TotalFinal = TotalInicial
|
Dim TotalFinal As Decimal = TotalInicial
|
||||||
'SI APLICA EL PRIMER DESCUENTO
|
'SI APLICA EL PRIMER DESCUENTO
|
||||||
If PorcentajeProducto > 0 Then
|
If PorcentajeProducto > 0 Then
|
||||||
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
|
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
|
||||||
Dim Total2 = (TotalInicial - Descuento1)
|
Dim Total2 As Decimal = (TotalInicial - Descuento1)
|
||||||
|
|
||||||
'SI APLICA EL SEGUNDO DESCUENTO
|
'SI APLICA EL SEGUNDO DESCUENTO
|
||||||
If PorcentajeProducto2 > 0 Then
|
If PorcentajeProducto2 > 0 Then
|
||||||
Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2)
|
Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2)
|
||||||
Dim Total3 = (Total2 - Descuento2)
|
Dim Total3 As Decimal = (Total2 - Descuento2)
|
||||||
|
|
||||||
'SI APLICA EL TERCER DESCUENTO
|
'SI APLICA EL TERCER DESCUENTO
|
||||||
If PorcentajeProducto3 > 0 Then
|
If PorcentajeProducto3 > 0 Then
|
||||||
@@ -4385,20 +4386,20 @@ Partial Class PV
|
|||||||
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
|
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
|
||||||
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso RowPorcentaje("ProntoPago").ToString().ToDecimal() > 0 Then
|
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso RowPorcentaje("ProntoPago").ToString().ToDecimal() > 0 Then
|
||||||
Dim TotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
|
Dim TotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
|
||||||
Dim PorcentajeProntoPago = RowPorcentaje("ProntoPago").ToString().ToDecimal() / 100D
|
Dim PorcentajeProntoPago As Decimal = RowPorcentaje("ProntoPago").ToString().ToDecimal() / 100D
|
||||||
|
|
||||||
ObjDescuento.ImporteProntoPago = (TotalProntoPago * PorcentajeProntoPago).RoundSQL(2)
|
ObjDescuento.ImporteProntoPago = (TotalProntoPago * PorcentajeProntoPago).RoundSQL(2)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
'Else
|
||||||
'If CveMarcaPS = 1092 Then ' E140 - alcalinas LTH
|
' 'If CveMarcaPS = 1092 Then ' E140 - alcalinas LTH
|
||||||
' Descuento = ((Cantidad * PU) * 0.183D).RoundSQL(2)
|
' ' Descuento = ((Cantidad * PU) * 0.183D).RoundSQL(2)
|
||||||
'End If
|
' 'End If
|
||||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
' If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||||
Descuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)).RoundSQL(2)
|
' Descuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)).RoundSQL(2)
|
||||||
End If
|
' End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''condicion final, si es cambio de Vigencia, no aplica descuento
|
''condicion final, si es cambio de Vigencia, no aplica descuento
|
||||||
@@ -4699,14 +4700,14 @@ Partial Class PV
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveTipoInv = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
Dim CveTipoInv As Integer = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
||||||
|
|
||||||
If Cantidad <> 1 And CveTipoInv = 5 AndAlso UsuarioActual.CveEmpresa <> 72 Then
|
If Cantidad <> 1 And CveTipoInv = 5 AndAlso UsuarioActual.CveEmpresa <> 72 Then
|
||||||
Alert("El producto se tiene que dar salida por serie y producto por producto (Cantidad = 1).", TipoMensaje.MsgAdvertencia)
|
Alert("El producto se tiene que dar salida por serie y producto por producto (Cantidad = 1).", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim AplicaSerie = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("AplicaSerie"))
|
Dim AplicaSerie As Boolean = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("AplicaSerie"))
|
||||||
|
|
||||||
If TmpDT.FiltraParametros("AsientoContableVentas <> '" & AsientoContableVentas.ToString & "'").Rows.Count = 0 Then
|
If TmpDT.FiltraParametros("AsientoContableVentas <> '" & AsientoContableVentas.ToString & "'").Rows.Count = 0 Then
|
||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
@@ -5211,10 +5212,10 @@ Partial Class PV
|
|||||||
If Not CveContrato > 0 Then
|
If Not CveContrato > 0 Then
|
||||||
|
|
||||||
'BANDERAS PARA VALIDACIONES
|
'BANDERAS PARA VALIDACIONES
|
||||||
Dim EsValido = False
|
Dim EsValido As Boolean = False
|
||||||
Dim EsValidoMayor = False
|
Dim EsValidoMayor As Boolean = False
|
||||||
Dim CostoMenor = 0.0D
|
Dim CostoMenor As Decimal = 0.0D
|
||||||
Dim CostoMayor = 0.0D
|
Dim CostoMayor As Decimal = 0.0D
|
||||||
|
|
||||||
'PRECIO MINIMO
|
'PRECIO MINIMO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(129).ToEntero > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
|
If UsuarioActual.Empresa.Funcionalidad(129).ToEntero > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
|
||||||
@@ -5331,7 +5332,7 @@ Partial Class PV
|
|||||||
GvPSRowIndexEdit = GvRow.RowIndex
|
GvPSRowIndexEdit = GvRow.RowIndex
|
||||||
ConsecutivoVenta = GvRow.DataKey("Consec").ToEntero
|
ConsecutivoVenta = GvRow.DataKey("Consec").ToEntero
|
||||||
CveVentaDetalle = GvRow.DataKey("CveVentaDetalle").ToEntero
|
CveVentaDetalle = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||||
Dim EsCargo = CBool(GvRow.DataKey("EsCargo"))
|
Dim EsCargo As Boolean = CBool(GvRow.DataKey("EsCargo"))
|
||||||
LnkAgregarPS.Text = "Actualizar"
|
LnkAgregarPS.Text = "Actualizar"
|
||||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
||||||
@@ -5476,7 +5477,7 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SELECCIONA EL PS DEPENDIENDO LA MODALIDAD (CODIGO BARRAS - DDL)
|
'SELECCIONA EL PS DEPENDIENDO LA MODALIDAD (CODIGO BARRAS - DDL)
|
||||||
Dim CvePS = DdlPS.SelectedValue.ToEntero
|
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
|
||||||
If ValidaAgregarPS(CvePS, DdlUnidadMedida.SelectedValue.ToEntero, TxtPrecio.Text.Trim.ToDouble, HdnTipoPS.Value.ToEntero, TxtCantidad.Text.ToDecimal) Then
|
If ValidaAgregarPS(CvePS, DdlUnidadMedida.SelectedValue.ToEntero, TxtPrecio.Text.Trim.ToDouble, HdnTipoPS.Value.ToEntero, TxtCantidad.Text.ToDecimal) Then
|
||||||
@@ -5494,9 +5495,9 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjDescuento As New Modelos.VentaDescuentos
|
Dim ObjDescuento As New Modelos.VentaDescuentos
|
||||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
'If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||||
ObjDescuento.ImporteDescuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero))
|
' ObjDescuento.ImporteDescuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero))
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
ObjDescuento = CalcularDescuentos(CvePS, Cantidad, PU)
|
ObjDescuento = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||||
If ObjDescuento.EsPUModificado Then
|
If ObjDescuento.EsPUModificado Then
|
||||||
@@ -5512,7 +5513,7 @@ Partial Class PV
|
|||||||
Proyecto = RowSP("Proyecto").ToString
|
Proyecto = RowSP("Proyecto").ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Consec = AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
Dim Consec As Integer = AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||||
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
||||||
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
||||||
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
|
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
|
||||||
@@ -5548,7 +5549,7 @@ Partial Class PV
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Total = 0.0D
|
Dim Total As Decimal = 0.0D
|
||||||
Dim Descuento As Decimal = HdnDescuento.Value.ToDecimal
|
Dim Descuento As Decimal = HdnDescuento.Value.ToDecimal
|
||||||
Dim Porcentaje As Decimal = Descuento / TmpDT.SUMD("Total")
|
Dim Porcentaje As Decimal = Descuento / TmpDT.SUMD("Total")
|
||||||
Dim LastDr As DataRow = Nothing
|
Dim LastDr As DataRow = Nothing
|
||||||
@@ -5661,7 +5662,7 @@ Partial Class PV
|
|||||||
|
|
||||||
#Region "CALCULA TOTALES"
|
#Region "CALCULA TOTALES"
|
||||||
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True)
|
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True)
|
||||||
Dim TmpDT = Me.TmpDT.FiltraParametros("EliminarDB = False", Orderby:="Consec")
|
Dim TmpDT As DataTable = Me.TmpDT.FiltraParametros("EliminarDB = False", Orderby:="Consec")
|
||||||
|
|
||||||
Dim TotalSubTotal As Decimal = TmpDT.SUM("TotalImporte").ToDecimal
|
Dim TotalSubTotal As Decimal = TmpDT.SUM("TotalImporte").ToDecimal
|
||||||
Dim TotalDescuentos As Decimal = TmpDT.SUM("Descuento").ToDecimal
|
Dim TotalDescuentos As Decimal = TmpDT.SUM("Descuento").ToDecimal
|
||||||
@@ -5744,7 +5745,7 @@ Partial Class PV
|
|||||||
Dim Cuerpo As String = String.Empty
|
Dim Cuerpo As String = String.Empty
|
||||||
Dim ResultadoMail As Integer = 0
|
Dim ResultadoMail As Integer = 0
|
||||||
|
|
||||||
Dim TipoComprobante = ""
|
Dim TipoComprobante As String = ""
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue.ToString = "Ing" Then TipoComprobante = "Factura"
|
If DdlTipoComprobante.SelectedValue.ToString = "Ing" Then TipoComprobante = "Factura"
|
||||||
If DdlTipoComprobante.SelectedValue.ToString = "Egs" Then TipoComprobante = "Nota de Crédito"
|
If DdlTipoComprobante.SelectedValue.ToString = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||||
@@ -6144,8 +6145,8 @@ Partial Class PV
|
|||||||
DtPagos.Rows.RemoveAt(e.RowIndex)
|
DtPagos.Rows.RemoveAt(e.RowIndex)
|
||||||
|
|
||||||
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
|
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
|
||||||
Dim abonado = DtPagos.SUM("Importe")
|
Dim abonado As Decimal = DtPagos.SUMD("Importe")
|
||||||
Dim saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
Dim saldo As Decimal = TxtTotal.Text.Replace(",", "").ToDecimal - abonado
|
||||||
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||||
|
|
||||||
CargaGridContado()
|
CargaGridContado()
|
||||||
@@ -6173,7 +6174,7 @@ Partial Class PV
|
|||||||
'Pago en Efectivo
|
'Pago en Efectivo
|
||||||
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
||||||
If DdlCuentaEfectivo.Items.Count > 0 Then
|
If DdlCuentaEfectivo.Items.Count > 0 Then
|
||||||
Dim DrEfectivo = DtPagos.NewRow
|
Dim DrEfectivo As DataRow = DtPagos.NewRow
|
||||||
DrEfectivo("CveTipoMovimiento") = 13
|
DrEfectivo("CveTipoMovimiento") = 13
|
||||||
DrEfectivo("TipoMovimiento") = "Pago en Efectivo"
|
DrEfectivo("TipoMovimiento") = "Pago en Efectivo"
|
||||||
DrEfectivo("CveCuenta") = DdlCuentaEfectivo.SelectedValue
|
DrEfectivo("CveCuenta") = DdlCuentaEfectivo.SelectedValue
|
||||||
@@ -6192,7 +6193,7 @@ Partial Class PV
|
|||||||
'Pago Tarjeta Credito
|
'Pago Tarjeta Credito
|
||||||
If TxtImporteCredito.Text.ToDecimal > 0 Then
|
If TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||||
If DdlCuentaTarjetaCredito.Items.Count > 0 Then
|
If DdlCuentaTarjetaCredito.Items.Count > 0 Then
|
||||||
Dim DrCredito = DtPagos.NewRow
|
Dim DrCredito As DataRow = DtPagos.NewRow
|
||||||
DrCredito("CveTipoMovimiento") = 12
|
DrCredito("CveTipoMovimiento") = 12
|
||||||
DrCredito("TipoMovimiento") = "Tarjeta de Crédito"
|
DrCredito("TipoMovimiento") = "Tarjeta de Crédito"
|
||||||
DrCredito("CveCuenta") = DdlCuentaTarjetaCredito.SelectedValue
|
DrCredito("CveCuenta") = DdlCuentaTarjetaCredito.SelectedValue
|
||||||
@@ -6211,7 +6212,7 @@ Partial Class PV
|
|||||||
'Pago Tarjeta Debito
|
'Pago Tarjeta Debito
|
||||||
If TxtImporteDebito.Text.ToDecimal > 0 Then
|
If TxtImporteDebito.Text.ToDecimal > 0 Then
|
||||||
If DdlCuentaTarjetaDebito.Items.Count > 0 Then
|
If DdlCuentaTarjetaDebito.Items.Count > 0 Then
|
||||||
Dim DrDebito = DtPagos.NewRow
|
Dim DrDebito As DataRow = DtPagos.NewRow
|
||||||
DrDebito("CveTipoMovimiento") = 11
|
DrDebito("CveTipoMovimiento") = 11
|
||||||
DrDebito("TipoMovimiento") = "Tarjeta de Debito"
|
DrDebito("TipoMovimiento") = "Tarjeta de Debito"
|
||||||
DrDebito("CveCuenta") = DdlCuentaTarjetaDebito.SelectedValue
|
DrDebito("CveCuenta") = DdlCuentaTarjetaDebito.SelectedValue
|
||||||
@@ -6231,7 +6232,7 @@ Partial Class PV
|
|||||||
'Pago Tarjeta Debito
|
'Pago Tarjeta Debito
|
||||||
If TxtImporteCheque.Text.ToDecimal > 0 Then
|
If TxtImporteCheque.Text.ToDecimal > 0 Then
|
||||||
If DdlCuentaCheque.Items.Count > 0 Then
|
If DdlCuentaCheque.Items.Count > 0 Then
|
||||||
Dim DrCheque = DtPagos.NewRow
|
Dim DrCheque As DataRow = DtPagos.NewRow
|
||||||
DrCheque("CveTipoMovimiento") = 3
|
DrCheque("CveTipoMovimiento") = 3
|
||||||
DrCheque("TipoMovimiento") = "Cheque"
|
DrCheque("TipoMovimiento") = "Cheque"
|
||||||
DrCheque("CveCuenta") = DdlCuentaCheque.SelectedValue
|
DrCheque("CveCuenta") = DdlCuentaCheque.SelectedValue
|
||||||
@@ -6251,7 +6252,7 @@ Partial Class PV
|
|||||||
'Pago Transferencia
|
'Pago Transferencia
|
||||||
If TxtImporteTransferencia.Text.ToDecimal > 0 Then
|
If TxtImporteTransferencia.Text.ToDecimal > 0 Then
|
||||||
If DdlCuentaTransferencia.Items.Count > 0 Then
|
If DdlCuentaTransferencia.Items.Count > 0 Then
|
||||||
Dim DrCheque = DtPagos.NewRow
|
Dim DrCheque As DataRow = DtPagos.NewRow
|
||||||
DrCheque("CveTipoMovimiento") = 8
|
DrCheque("CveTipoMovimiento") = 8
|
||||||
DrCheque("TipoMovimiento") = "Transferencia"
|
DrCheque("TipoMovimiento") = "Transferencia"
|
||||||
DrCheque("CveCuenta") = DdlCuentaTransferencia.SelectedValue
|
DrCheque("CveCuenta") = DdlCuentaTransferencia.SelectedValue
|
||||||
@@ -6281,7 +6282,7 @@ Partial Class PV
|
|||||||
LimpiaEscondeContado()
|
LimpiaEscondeContado()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaPagosContado() As Boolean
|
Private Function ValidaPagosContado() As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
|
If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
|
||||||
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
|
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -6308,13 +6309,13 @@ Partial Class PV
|
|||||||
#Region " SERIE ALMACEN "
|
#Region " SERIE ALMACEN "
|
||||||
|
|
||||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||||
Dim Row = CType(CType(sender, Button).NamingContainer, GridViewRow)
|
Dim Row As GridViewRow = CType(CType(sender, Button).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
If Row.FCTextBox("TxtSerie").Text.Trim = "" Then Exit Sub
|
If Row.FCTextBox("TxtSerie").Text.Trim = "" Then Exit Sub
|
||||||
|
|
||||||
Dim Index = Row.RowIndex
|
Dim Index As Integer = Row.RowIndex
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPSSerie(Row.FCTextBox("TxtSerie").Text.ToString.Trim, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPSSerie(Row.FCTextBox("TxtSerie").Text.ToString.Trim, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
'Valida Existencia
|
'Valida Existencia
|
||||||
@@ -6334,9 +6335,9 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ValidaSerieINV() As Boolean
|
Private Function ValidaSerieINV() As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno As Boolean = False
|
||||||
Dim Existencia = 0.0
|
Dim Existencia As Decimal = 0
|
||||||
Dim ExistenciaActual = 0.0
|
Dim ExistenciaActual As Decimal = 0
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
@@ -6351,7 +6352,7 @@ Partial Class PV
|
|||||||
If Gvr.FCTextBox("TxtSerie").Visible = True And Gvr.FCTextBox("TxtSerie").Text.Trim <> "" Then
|
If Gvr.FCTextBox("TxtSerie").Visible = True And Gvr.FCTextBox("TxtSerie").Text.Trim <> "" Then
|
||||||
|
|
||||||
Existencia = ObjInventarios.GetExistenciasPSSerie(Gvr.FCTextBox("TxtSerie").Text.ToString, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
Existencia = ObjInventarios.GetExistenciasPSSerie(Gvr.FCTextBox("TxtSerie").Text.ToString, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||||
ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Gvr.FCTextBox("TxtSerie").Text.Trim))
|
ExistenciaActual = DtInv.SUMD("Cantidad", String.Format("Serie = '{0}'", Gvr.FCTextBox("TxtSerie").Text.Trim))
|
||||||
|
|
||||||
'Valida Existencia
|
'Valida Existencia
|
||||||
If Existencia - ExistenciaActual < 0 Or Existencia = 0 Then
|
If Existencia - ExistenciaActual < 0 Or Existencia = 0 Then
|
||||||
@@ -6562,7 +6563,7 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||||
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
Dim DtUsosCFDI As DataTable = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
||||||
|
|
||||||
If DtUsosCFDI.Rows.Count = 0 Then
|
If DtUsosCFDI.Rows.Count = 0 Then
|
||||||
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -6582,7 +6583,7 @@ Partial Class PV
|
|||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
|
|
||||||
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
||||||
Dim GeneroCliente = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||||
|
|
||||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||||
@@ -6980,7 +6981,7 @@ Partial Class PV
|
|||||||
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa)
|
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa)
|
||||||
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
Dim DtTamanios = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0")
|
Dim DtTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0")
|
||||||
|
|
||||||
CargaModelos()
|
CargaModelos()
|
||||||
CargaBCIAjuste()
|
CargaBCIAjuste()
|
||||||
@@ -7018,6 +7019,7 @@ Partial Class PV
|
|||||||
DtModelosAuto = ObjGral.DtResultados
|
DtModelosAuto = ObjGral.DtResultados
|
||||||
DdlModeloAuto.DataSource = DtModelosAuto
|
DdlModeloAuto.DataSource = DtModelosAuto
|
||||||
End If
|
End If
|
||||||
|
ObjGral.Dispose()
|
||||||
DdlModeloAuto.DataBind()
|
DdlModeloAuto.DataBind()
|
||||||
DdlModeloAuto.Items.Insert(0, New ListItem("-", "-1"))
|
DdlModeloAuto.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -7266,7 +7268,7 @@ Partial Class PV
|
|||||||
|
|
||||||
If PrecioSugerido = 0 Then
|
If PrecioSugerido = 0 Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
Dim CostoPS As Decimal = 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
|
'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)
|
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
@@ -7969,10 +7971,8 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ListaPScargo As New List(Of Modelos.MConceptoUsado)
|
Dim ListaPScargo As New List(Of Modelos.MConceptoUsado)
|
||||||
|
|
||||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa)
|
Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa)
|
||||||
Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
Dim DTCvePSCostos As DataTable = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||||
|
|
||||||
|
|
||||||
Dim CveUnidadMedidaPSA As Integer = -1
|
Dim CveUnidadMedidaPSA As Integer = -1
|
||||||
Dim UnidadMedidaPSA As String = "Unidad"
|
Dim UnidadMedidaPSA As String = "Unidad"
|
||||||
@@ -8060,7 +8060,7 @@ Partial Class PV
|
|||||||
Next
|
Next
|
||||||
ObjProductosServicios.Dispose()
|
ObjProductosServicios.Dispose()
|
||||||
|
|
||||||
Dim ModalidadBack = Modalidad
|
Dim ModalidadBack As String = Modalidad
|
||||||
'CAMBIA LA MODALIDAD PARA AGREGAR LOS PS CARGO
|
'CAMBIA LA MODALIDAD PARA AGREGAR LOS PS CARGO
|
||||||
If Modalidad = "U" Then
|
If Modalidad = "U" Then
|
||||||
Modalidad = "A"
|
Modalidad = "A"
|
||||||
|
|||||||
@@ -1869,10 +1869,10 @@ Partial Class ProductosyServicios
|
|||||||
CargaGvPSAdicionales()
|
CargaGvPSAdicionales()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GvPSAdicionales_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvPSAdicionales.RowDeleting
|
Private Sub GvPSAdicionales_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvPSAdicionales.RowDeleting
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim CvePSAdicional = GvPSAdicionales.Rows(e.RowIndex).DataKey("CvePSAdicional").ToEntero
|
Dim CvePSAdicional As Integer = GvPSAdicionales.Rows(e.RowIndex).DataKey("CvePSAdicional").ToEntero
|
||||||
Dim PSAdicional = GvPSAdicionales.Rows(e.RowIndex).DataKey("PS").ToString
|
Dim PSAdicional As String = GvPSAdicionales.Rows(e.RowIndex).DataKey("PS").ToString
|
||||||
|
|
||||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||||
If Not ObjProductosServicios.RemovePSAdicionales(CvePS, CvePSAdicional) Then
|
If Not ObjProductosServicios.RemovePSAdicionales(CvePS, CvePSAdicional) Then
|
||||||
@@ -1912,7 +1912,7 @@ Partial Class ProductosyServicios
|
|||||||
Private Sub BtnAgregarPSAdicional_Click(sender As Object, e As EventArgs) Handles BtnAgregarPSAdicional.Click
|
Private Sub BtnAgregarPSAdicional_Click(sender As Object, e As EventArgs) Handles BtnAgregarPSAdicional.Click
|
||||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||||
ObjProductosServicios.IniciaTransacSQL()
|
ObjProductosServicios.IniciaTransacSQL()
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
If CvePSAdicional < 0 Then
|
If CvePSAdicional < 0 Then
|
||||||
If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ Imports System.Data
|
|||||||
Imports System.Drawing
|
Imports System.Drawing
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
'Imports CrystalDecisions.CrystalReports.Engine
|
|
||||||
'Imports CrystalDecisions.Shared
|
|
||||||
|
|
||||||
Partial Class Ventas_RepVentasUtilidad
|
Partial Class Ventas_RepVentasUtilidad
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -90,16 +88,17 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
DdlMarcas.DataBind()
|
DdlMarcas.DataBind()
|
||||||
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
|
|
||||||
Dim CveSubProyecto = If(Request("CveSubProyecto") IsNot Nothing, Request("CveSubProyecto").ToString, "-1").ToString
|
Dim CveSubProyecto As String = If(Request("CveSubProyecto") IsNot Nothing, Request("CveSubProyecto").ToString, "-1").ToString
|
||||||
Dim CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor") <> "", Request("CveVendedor"), "-1").ToString
|
Dim CveVendedor As String = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor") <> "", Request("CveVendedor"), "-1").ToString
|
||||||
Dim CveCliente = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente") <> "", Request("CveCliente"), "-1").ToString
|
Dim CveCliente As String = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente") <> "", Request("CveCliente"), "-1").ToString
|
||||||
Dim CveGpo = If(Request("CveGpo") IsNot Nothing AndAlso Request("CveGpo") <> "", Request("CveGpo"), "-1").ToString
|
Dim CveGpo As String = If(Request("CveGpo") IsNot Nothing AndAlso Request("CveGpo") <> "", Request("CveGpo"), "-1").ToString
|
||||||
Dim Gpo = If(Request("Gpo") IsNot Nothing AndAlso Request("Gpo") <> "", Request("Gpo"), "-1").ToString
|
Dim Gpo As String = If(Request("Gpo") IsNot Nothing AndAlso Request("Gpo") <> "", Request("Gpo"), "-1").ToString
|
||||||
Dim FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
Dim FechaI As String = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
||||||
Dim FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
Dim FechaF As String = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||||
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion") <> "", Request("CveClasificacion"), "-1").ToString
|
Dim CveClasificacion As String = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion") <> "", Request("CveClasificacion"), "-1").ToString
|
||||||
Dim CvePS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString
|
Dim CveCategoria As String = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria") <> "", Request("CveCategoria"), "-1").ToString
|
||||||
Dim CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString
|
Dim CvePS As String = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString
|
||||||
|
Dim CveMarca As String = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString
|
||||||
|
|
||||||
DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto)
|
DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto)
|
||||||
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
||||||
@@ -107,6 +106,7 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
DdlClientes.SelectedValue = CveCliente
|
DdlClientes.SelectedValue = CveCliente
|
||||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}").FiltroPrimeroValor("Nombre")
|
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}").FiltroPrimeroValor("Nombre")
|
||||||
End If
|
End If
|
||||||
|
DdlCategoria.SelectedValueExist(CveCategoria)
|
||||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||||
DdlPS.SelectedValue = CvePS
|
DdlPS.SelectedValue = CvePS
|
||||||
If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
||||||
@@ -125,8 +125,8 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
Case 1
|
Case 1
|
||||||
txtFechaF.Text = $"31/12/{CveGpo}"
|
txtFechaF.Text = $"31/12/{CveGpo}"
|
||||||
Case 2
|
Case 2
|
||||||
Dim Mes = CveGpo.Substring(5, 2)
|
Dim Mes As String = CveGpo.Substring(5, 2)
|
||||||
Dim DiaFinal = ""
|
Dim DiaFinal As String = ""
|
||||||
If Mes = "02" Then DiaFinal = "28" Else If Mes.Contiene("01", "03", "05", "07", "08", "10", "12") Then DiaFinal = "31" Else DiaFinal = "30"
|
If Mes = "02" Then DiaFinal = "28" Else If Mes.Contiene("01", "03", "05", "07", "08", "10", "12") Then DiaFinal = "31" Else DiaFinal = "30"
|
||||||
txtFechaI.Text = $"01/{CveGpo.Substring(5, 2)}/{CveGpo.Substring(0, 4)}"
|
txtFechaI.Text = $"01/{CveGpo.Substring(5, 2)}/{CveGpo.Substring(0, 4)}"
|
||||||
If txtFechaI.Text.ToDate.FirstDayOfMonth = FechaI.ToDate.FirstDayOfMonth Then
|
If txtFechaI.Text.ToDate.FirstDayOfMonth = FechaI.ToDate.FirstDayOfMonth Then
|
||||||
@@ -297,12 +297,13 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
If txtFechaI.Text = "" Then FechaI = MinFecha
|
If txtFechaI.Text = "" Then FechaI = MinFecha
|
||||||
If txtFechaF.Text = "" Then FechaF = MaxFecha
|
If txtFechaF.Text = "" Then FechaF = MaxFecha
|
||||||
|
|
||||||
Dim Cliente = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
Dim Cliente As String = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||||
Dim Sucursal = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
Dim Sucursal As String = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
Dim Vendedor As String = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||||
Dim Marca = If(DdlMarcas.SelectedValue = "-1", "", $" <b>Marcas:</b> {DdlMarcas.SelectedItem.Text}")
|
Dim Marca As String = If(DdlMarcas.SelectedValue = "-1", "", $" <b>Marcas:</b> {DdlMarcas.SelectedItem.Text}")
|
||||||
|
Dim Categoria As String = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
|
||||||
' Dim Grupo = DdlGrupo.SelectedItem.Text
|
' Dim Grupo = DdlGrupo.SelectedItem.Text
|
||||||
|
|
||||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||||
@@ -323,7 +324,7 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
If txtFechaF.Text = "" Then FechaFin = "-1"
|
If txtFechaF.Text = "" Then FechaFin = "-1"
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
Dim dt As DataTable = ObjVentas.DtResultados
|
Dim dt As DataTable = ObjVentas.DtResultados
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
@@ -345,17 +346,17 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim Sucursal = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
Dim Sucursal As String = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||||
Dim Cliente = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
Dim Vendedor As String = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||||
|
|
||||||
Dim lista = New List(Of CrystalParametro)
|
Dim lista As New List(Of CrystalParametro)
|
||||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
lista.Add(New CrystalParametro("AgrupadoPor", $"{Sucursal}{FechaIn}{FechaFn}{Cliente}{Vendedor}{PS}{Clasificacion}"))
|
lista.Add(New CrystalParametro("AgrupadoPor", $"{Sucursal}{FechaIn}{FechaFn}{Cliente}{Vendedor}{PS}{Clasificacion}"))
|
||||||
lista.Add(New CrystalParametro("UtilidadPerdida", LblNombreNeto.Text))
|
lista.Add(New CrystalParametro("UtilidadPerdida", LblNombreNeto.Text))
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpDetalles" runat="server" UpdateMode="Conditional" class="col-md-4">
|
<asp:UpdatePanel ID="UpDetalles" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet smmallpadding light bordered" id="DivVentaDetalle" runat="server">
|
<div class="portlet xspadding light bordered" id="DivVentaDetalle" runat="server">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
@@ -268,13 +268,13 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td><b>Dias Emision:</b> </td>
|
<td><b>Dias Emisión:</b> </td>
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblDiasEmision" runat="server" Text="Dias Emision"></asp:Label>
|
<asp:Label ID="LblDiasEmision" runat="server" Text="Dias Emisión"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td><b>Dias Vencimiento:</b> </td>
|
<td><b>Dias Vencimiento:</b> </td>
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblDiasVencimiento" runat="server" Text="Dias Vencimiento"></asp:Label>
|
<asp:Label ID="LblDiasVencimiento" runat="server" Text="Días Vencimiento"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpBonificacion" runat="server" UpdateMode="Conditional" class="col-md-4">
|
<asp:UpdatePanel ID="UpBonificacion" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet smmallpadding light bordered" id="Div2" runat="server">
|
<div class="portlet xspadding light bordered" id="Div2" runat="server">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpDetallesCosto" runat="server" UpdateMode="Conditional" class="col-md-4">
|
<asp:UpdatePanel ID="UpDetallesCosto" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet smmallpadding light bordered" id="Div1" runat="server">
|
<div class="portlet xspadding light bordered" id="Div1" runat="server">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
|
|||||||
@@ -131,6 +131,7 @@
|
|||||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||||
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
||||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Categoría" Value="10"></asp:ListItem>
|
||||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
@@ -230,7 +231,7 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas"
|
||||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}" />
|
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}" />
|
||||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
||||||
|
|||||||
@@ -247,9 +247,9 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
|||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
e.Row.Cells(0).Text = "Total"
|
e.Row.Cells(0).Text = "Total"
|
||||||
Dim Css As String = "Texto"
|
Dim Css As String = "Texto"
|
||||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}",
|
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}",
|
||||||
e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
|
e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
|
||||||
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"))
|
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria"))
|
||||||
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
|
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
|
||||||
Else
|
Else
|
||||||
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
||||||
|
|||||||
@@ -936,8 +936,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div class="divtab">
|
<div class="divtab">
|
||||||
<asp:UpdatePanel ID="UpPS" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpPS" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -5335,7 +5333,7 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="Chk" runat="server" Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
<asp:CheckBox ID="Chk" runat="server" Enabled='<%#If(Eval("Habilitado").ToString <> "", CBool(Eval("Habilitado").ToString), False)%>' ToolTip='<%#If(Eval("Habilitado").ToString <> "", "Debe de surtirla para facturarla.", "")%>' Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||||
<ControlStyle Width="8px" />
|
<ControlStyle Width="8px" />
|
||||||
@@ -5355,7 +5353,7 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="Chk" runat="server" Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
<asp:CheckBox ID="Chk" runat="server" Enabled='<%#If(Eval("Habilitado").ToString <> "", CBool(Eval("Habilitado").ToString), False)%>' ToolTip='<%#If(Eval("Habilitado").ToString <> "", "Debe de surtirla para facturarla.", "")%>' Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||||
<ControlStyle Width="8px" />
|
<ControlStyle Width="8px" />
|
||||||
@@ -5368,7 +5366,7 @@
|
|||||||
Cantidad
|
Cantidad
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCantidadRem" runat="server" Text='<%#Eval("Cantidad", "{0:#,###.#####}").ToString%>' MaxLength="12" Width="46px" Height="24px"></asp:TextBox>
|
<asp:TextBox ID="TxtCantidadRem" runat="server" style="text-align:right;" Text='<%#Eval("Cantidad", "{0:#,###.#####}").ToString%>' MaxLength="12" Width="46px" Height="24px"></asp:TextBox>
|
||||||
<asp:RangeValidator ID="RVCantRem" runat="server" Type="Double" MinimumValue="0" MaximumValue='<%#Eval("Cantidad").ToString%>' ErrorMessage="Cantidad Excedida" ControlToValidate="TxtCantidadRem" Display="None" ValidationGroup="GprGvRemPS"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVCantRem" runat="server" Type="Double" MinimumValue="0" MaximumValue='<%#Eval("Cantidad").ToString%>' ErrorMessage="Cantidad Excedida" ControlToValidate="TxtCantidadRem" Display="None" ValidationGroup="GprGvRemPS"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECantidad3" runat="server" HighlightCssClass="vco" TargetControlID="RVCantRem" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCECantidad3" runat="server" HighlightCssClass="vco" TargetControlID="RVCantRem" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user