This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-09-29 06:01:13 -07:00
47 changed files with 1296 additions and 506 deletions

View File

@@ -430,9 +430,7 @@
<div class="col-md-7">
<div class="form-group">
<asp:DropDownList CssClass="form-control input-sm input-medium select2me" ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Width="200px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin Cliente Asignado" Value="-1"></asp:ListItem>
</asp:DropDownList>
<ADS:Dropdownlost ID="Ddlclientes" Width="100%" CssStyle="width: 100%;" UsaWebService="true" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
</div>
</div>
</div>
@@ -2555,8 +2553,8 @@
<div class="row">
<div class="col-md-5">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="form-control select2me" AppendDataBoundItems="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="DdlProveedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compañia''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorioP"></asp:RequiredFieldValidator>
<ADS:DropDownLost ID="DdlProveedor" Width="100%" CssStyle="width: 100%;" runat="server" UsaWebService="true" data-metodo="getproveedores" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="form-control select2me" AppendDataBoundItems="true"></ADS:DropDownLost>
<%--<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="DdlProveedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compañia''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorioP"></asp:RequiredFieldValidator>--%>
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>
</div>

View File

@@ -381,7 +381,7 @@ Partial Class AF_AF
CargaEstatusActivoFijo()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, lblProyecto, LblSubProyecto)
RowProyecto.Visible = DdlProyecto.Visible
CargaCliente()
'CargaCliente()
CargaGrupos()
CargaMarcas()
CargaTiposAgenda()
@@ -471,10 +471,10 @@ Partial Class AF_AF
DdlEstadoActivoFijo.DataSource = GlobalDTEstadoActivoFijo
DdlEstadoActivoFijo.DataBind()
End Sub
Private Sub CargaCliente()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
DdlClientes.DataBind()
End Sub
'Private Sub CargaCliente()
' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
' DdlClientes.DataBind()
'End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargaSubProyecto()
@@ -668,7 +668,10 @@ Partial Class AF_AF
DdlProyecto.SelectedValue = ObjActivoFijo.CveProyecto.ToString
CargaSubProyecto()
DdlSubProyecto.SelectedValue = ObjActivoFijo.DtResultados.Rows(0)("CveSubProyecto").ToString
DdlClientes.SelectedValueExist(ObjActivoFijo.CveCliente)
Ddlclientes.SelectedValue = ObjActivoFijo.CveCliente.ToString
If ObjActivoFijo.CveCliente > 0 Then
Ddlclientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=ObjActivoFijo.CveCliente).FiltroPrimeroValor("NombreComercial")
End If
DdlMarcas.SelectedValueExist(ObjActivoFijo.CveMarcaActivoFijo)
CargaModelos(DdlMarcas.SelectedValue.ToEntero)
DdlModelos.SelectedValueExist(ObjActivoFijo.CveModeloActivoFijo)
@@ -971,10 +974,10 @@ Partial Class AF_AF
UpDatos.Update()
End Sub
Private Sub CargaProveedor()
DdlProveedor.Items.Clear()
DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
'DdlProveedor.Items.Clear()
'DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
'DdlProveedor.DataBind()
UpAddPolizas.Update()
End Sub
@@ -1009,7 +1012,7 @@ Partial Class AF_AF
UpDatos.Update()
BtnAgregarPoliza.Text = "Agregar"
LabelPolizas.InnerText = "Agregar Póliza de seguro"
DdlProveedor.SelectedIndex = 0
'DdlProveedor.SelectedIndex = 0
TxtPolizaSeguro.Text = ""
TxtFechaExpPoliza.Text = ""
TxtFechaVenPoliza.Text = ""

View File

@@ -129,6 +129,7 @@ Public Class ClsClientes
Public Property CveMetodoPago33 As Integer
Public Property CveClienteCorporativo As String
Public Property DesglosaIEPS As Boolean
Public Property NoDesglosaIVA As Boolean
Public Property AplicaComercioExterior As Boolean
Public Property CveTipoOperacion As Integer
Public Property CvePedimento As Integer
@@ -385,6 +386,7 @@ Public Class ClsClientes
_CveClienteCorporativo = Data(0)("CveClienteCorporativo").ToString
_DesglosaIEPS = CType(Data(0)("DesglosaIEPS"), Boolean)
_NoDesglosaIVA = CType(Data(0)("NoDesglosaIVA"), Boolean)
_AplicaComercioExterior = CType(Data(0)("AplicaComercioExterior"), Boolean)
_CveTipoOperacion = Data(0)("CveTipoOperacion").ToString.ToEntero
@@ -513,17 +515,21 @@ Public Class ClsClientes
'SqlAdapter.Dispose()
Return Retorno
End Function
Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1", Optional CveEstatusFactura As Integer = -1, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
Public Function GetHistorialVentas(CveCliente As Integer, CveEmpresa As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1", Optional CveEstatusFactura As Integer = -1, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClienteHistorialVentas")
SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
SqlAdapter.SelectCommand.Parameters.Add("@SelectTop", SqlDbType.Int).Value = SelectTop
SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
SqlAdapter.SelectCommand.Parameters.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
SqlAdapter.SelectCommand.Parameters.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
SqlAdapter.SelectCommand.Parameters.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@SelectTop", SqlDbType.Int).Value = SelectTop
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
@@ -757,7 +763,7 @@ Public Class ClsClientes
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False) As Boolean
Dim Retorno As Boolean = False
@@ -878,6 +884,7 @@ Public Class ClsClientes
.Add("@CveClienteCorporativo", SqlDbType.Int).Value = CveClienteCorporativo
.Add("@DesglosaIEPS", SqlDbType.Bit).Value = If(DesglosaIEPS, 1, 0)
.Add("@NoDesglosaIVA", SqlDbType.Bit).Value = If(NoDesglosaIVA, 1, 0)
.Add("@AplicaComercioExterior", SqlDbType.Bit).Value = AplicaComercioExterior
.Add("@CveTipoOperacion", SqlDbType.Int).Value = CveTipoOperacion

View File

@@ -438,12 +438,12 @@ Public Class ClsCompras
End Function
Public Function AddCompraDetalle(CveCompra As Integer, CveUM As Integer, CvePS As Integer, CveSubProyecto As Integer, CveCliente As Integer, CveActivoFijo As Integer,
Cantidad As Double, PU As Double, IVA As Double, Total As Double, Descuento As Double, Observaciones As String, CveOCDetalle As Integer,
Cantidad As Decimal, PU As Decimal, IVA As Decimal, Total As Decimal, Descuento As Decimal, Observaciones As String, CveOCDetalle As Integer,
Optional TipoRecepcion As Integer = -1, Optional CveContrato As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1,
Optional AplicaCostoIndirecto As Integer = -1, Optional EstatusAlmacen As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveTipoGasto As Integer = -1,
Optional AF_Medida As Integer = -1, Optional AF_TipoMantenimiento As Integer = -1, Optional Referencia As String = "", Optional OtrosGastos As Decimal = 0,
Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0,
Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0, Optional IEPSPSIVAPorcentaje As Double = 0,
Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0,
Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0, Optional IEPSPSIVAPorcentaje As Decimal = 0,
Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -457,12 +457,12 @@ Public Class ClsCompras
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
.Add("@PU", SqlDbType.Float).Value = PU
.Add("@IVA", SqlDbType.Float).Value = IVA
.Add("@Total", SqlDbType.Float).Value = Total
.Add("@Descuento", SqlDbType.Float).Value = Descuento
.Add("@OtrosGastos", SqlDbType.Float).Value = OtrosGastos
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
.Add("@PU", SqlDbType.Decimal).Value = PU
.Add("@IVA", SqlDbType.Decimal).Value = IVA
.Add("@Total", SqlDbType.Decimal).Value = Total
.Add("@Descuento", SqlDbType.Decimal).Value = Descuento
.Add("@OtrosGastos", SqlDbType.Decimal).Value = OtrosGastos
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle
.Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion
@@ -476,16 +476,16 @@ Public Class ClsCompras
.Add("@AF_TipoMantenimiento", SqlDbType.Int).Value = AF_TipoMantenimiento
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
.Add("@CveCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
.Add("@RetISR", SqlDbType.Float).Value = RetISR
.Add("@IEPSPS", SqlDbType.Float).Value = IEPSPS
.Add("@IEPSPSIVA", SqlDbType.Float).Value = IEPSPSIVA
.Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA
.Add("@RetISR", SqlDbType.Decimal).Value = RetISR
.Add("@IEPSPS", SqlDbType.Decimal).Value = IEPSPS
.Add("@IEPSPSIVA", SqlDbType.Decimal).Value = IEPSPSIVA
.Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
.Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje
.Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje
.Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje
.Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle

View File

@@ -6229,30 +6229,6 @@ Public Class ClsContabilidad
#End Region
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
If Not Data Is Nothing Then Data.Dispose() : Data = Nothing
If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing
If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing
If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing
If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing
End If
End If
Me.disposedValue = True
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
#Region "Periodos Bloqueo Meses"
Public Function GetPeriodosBloqueo(CveEmpresa As Integer) As Boolean
Dim Retorno = False
@@ -6376,8 +6352,6 @@ Public Class ClsContabilidad
End Function
#End Region
#Region "ESTADO RESULTADOS HORIZONTAL"
@@ -6567,4 +6541,32 @@ Public Class ClsContabilidad
Return Retorno
End Function
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
If Not Data Is Nothing Then Data.Dispose() : Data = Nothing
If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing
If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing
If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing
If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing
End If
End If
Me.disposedValue = True
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
End Class

View File

@@ -492,6 +492,30 @@ Public Class ClsContratos
Return Retorno
End Function
'Usado en conrtatos Obra
Public Function AbrirCerrarContrato(CveContrato As Integer, CveEmpresa As Integer, Cerrar As Boolean, CveUsuario As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosObraAbrirCerrar")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Cerrar", SqlDbType.Bit).Value = Cerrar
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al abrir o cerrar el contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
'Public Function AddContratosTipo1(NumeroContrato As String, DescripcionContrato As String, CveProveedor As Integer, CveCliente As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
' CveSubProyecto As Integer, PorIVA As Double, EstatusContrato As Boolean, Archivo As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveContratosEstatus As Integer, CveContratoTipo As Integer) As Integer
' ' Return AddContratos(NumeroContrato, DescripcionContrato, CveProveedor, CveCliente, -1, FechaInicial, FechaFinal, "", "", CveSubProyecto, PorIVA, -1, -1, -1, EstatusContrato, Archivo, "", CveContratoPadre, CveUsuario, CveEmpresa, False, CveContratosEstatus, CveContratoTipo)
@@ -550,7 +574,8 @@ Public Class ClsContratos
Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Integer
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0,
Optional ImporteSubTotal As Decimal = 0) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Con_ContratosObraAdd")
@@ -603,6 +628,7 @@ Public Class ClsContratos
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
.Add("@ImporteSubTotal", SqlDbType.Money).Value = ImporteSubTotal
.Add("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output
@@ -629,7 +655,8 @@ Public Class ClsContratos
CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Boolean
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0,
Optional ImporteSubTotal As Decimal = 0) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosObraUpdate")
@@ -681,6 +708,7 @@ Public Class ClsContratos
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
.Add("@ImporteSubTotal", SqlDbType.Money).Value = ImporteSubTotal
End With
@@ -1823,6 +1851,27 @@ Public Class ClsContratos
Return Retorno
End Function
'Es usando en ContratoObra para validar la actualizacion de cantidad de avance
Public Function GetContratosDetalleAvance(CveContratoDetalle As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosDetalleAvanceGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el avance de los detalles", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region

View File

@@ -2527,7 +2527,7 @@ Public Class ClsGenerales
CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1,
Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1, Optional CvePromocion As Integer = -1,
Optional CveAsistencia As Integer = -1, Optional CveAsistenciaDetalle As Integer = -1, Optional CveTipoBitacora As Integer = -1,
Optional FechaInicio As String = "", Optional FechaFin As String = "") As Boolean
Optional FechaInicio As String = "", Optional FechaFin As String = "", Optional Fecha As Date = MinFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_HistorialBitacoraGet")
@@ -2554,6 +2554,8 @@ Public Class ClsGenerales
.Add("@CveTipoBitacora", SqlDbType.Int).Value = CveTipoBitacora
.Add("@FechaInicio", SqlDbType.VarChar).Value = FechaInicio
.Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin
.Add("@Fecha", SqlDbType.Date).Value = Fecha
End With
'SqlTypes.SqlDateTime.Null

View File

@@ -1279,7 +1279,7 @@ Public Class ClsInventarios
Optional CveSeccionAlmacen As Integer = -1, Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha,
Optional Observaciones As String = "", Optional CveMovimientoDetalleEntrada As Integer = -1, Optional PUTC As Decimal = -1,
Optional CostoIndirecto As Decimal = 0, Optional CveCompraDetalle As Integer = -1, Optional CveOrdenCompraDetalle As Integer = -1, Optional CveVentaDetalle As Integer = -1,
Optional CveContratoDetalle As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional EsInterno As Integer = -1) As Boolean
Optional CveContratoDetalle As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional EsInterno As Integer = -1, Optional CveVentaDetallePadre As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_MovimientosDetalleAdd")
@@ -1305,6 +1305,7 @@ Public Class ClsInventarios
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
.Add("@EsInterno", SqlDbType.Int).Value = EsInterno
.Add("@CveVentaDetallePadre", SqlDbType.Int).Value = CveVentaDetallePadre
.Add("@CveMovimientoDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
End With

View File

@@ -1157,7 +1157,7 @@ Public Class ClsPaginas
Dim AppNombre As String = String.Format("GlobalDTProyectosUsuarios-{0}", CveEmpresa)
If Application(AppNombre) Is Nothing Then
Dim ObjSubProyectos As New ClsSubProyectos()
If ObjSubProyectos.GetSubProyectosUsuarios Then Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
ObjSubProyectos.Dispose()
GuardaLog("Se Cargo GlobalDTProyectosUsuarios")
End If
@@ -1352,7 +1352,7 @@ Public Class ClsPaginas
End Get
End Property
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1,
Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1") As DataTable
Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1", Optional CodigoSATPS As String = "-1") As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
If CveEmpresa <> -1 Then
@@ -1367,7 +1367,7 @@ Public Class ClsPaginas
Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow))
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
'Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
Codigo = Codigo.ToUpper().Trim()
@@ -1375,6 +1375,7 @@ Public Class ClsPaginas
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
If CodigoSATPS <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!SATClavePS) = CodigoSATPS))
Try
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
@@ -5706,6 +5707,7 @@ Public Class ClsPaginas
Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
wsreport = Nothing
params = Nothing
ds.Dispose() : ds = Nothing
Else
If IsNothing(MR) Then MR = New ReportViewer
Try
@@ -5735,6 +5737,7 @@ Public Class ClsPaginas
'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
End Try
MR.Dispose()
MR = Nothing
'Dim ruta = wsreport.StreamPDF(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
'If File.Exists(ruta) Then
' Bytes = File.ReadAllBytes(ruta)

View File

@@ -6582,6 +6582,8 @@ Namespace Modelos
Me.ClienteSucursal.Sucursal = Cliente.Sucursal
Me.ClienteSucursal.ImprimeNombreSucursal = Cliente.ImprimeNombreSucursal.ToString()
End If
Else
Cliente = New Modelos.ClienteModel()
End If
End Sub
Public Sub SetMoneda()
@@ -9791,6 +9793,9 @@ Namespace Modelos
Inherits Modelos.EntityModel
Protected Overloads Sub SetDefaultValues()
CveCliente = -1
Nombre = ""
RFC = ""
Codigo = ""
EnviarFactura = "Si"
Estatus = "Activo"
NoExt = ""

View File

@@ -3658,6 +3658,7 @@ Public Class Timbrado
End If
#Region "Complemento Pago"
@@ -3780,6 +3781,159 @@ Public Class Timbrado
End If
#End Region
#Region "C O M P L E M E N T O C A R T A P O R T E"
If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
''DATOS GENERALES
Dim ComCartaPorte = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorte()
Dim Transp As Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteTranspInternac
ComCartaPorte.TranspInternac = If(Carta.TranspInternac = "No", Transp.No, Transp.Sí)
ComCartaPorte.EntradaSalidaMercSpecified = False
ComCartaPorte.ViaEntradaSalidaSpecified = False
ComCartaPorte.TotalDistRecSpecified = False
'UBICACIONES
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
Dim i As Integer = 0
ComCartaPorte.Ubicaciones = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteUbicacion(Carta.Ubicaciones.Count - 1) {}
For Each ubica As CFDICartaPorteUbicaciones In Carta.Ubicaciones
'origen
ComCartaPorte.Ubicaciones(i) = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteUbicacion
ComCartaPorte.Ubicaciones(i).TipoEstacionSpecified = False
ComCartaPorte.Ubicaciones(i).DistanciaRecorrida = ubica.DistanciaRecorrida
ComCartaPorte.Ubicaciones(i).Origen = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteUbicacionOrigen With {.IDOrigen = ubica.Origen.IDOrigen,
.RFCRemitente = ubica.Origen.RFCRemitente,
.NombreRemitente = ubica.Origen.NombreRemitente,
.FechaHoraSalida = ubica.Origen.FechaHoraSalida.ToDate}
ComCartaPorte.Ubicaciones(i).Domicilio = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteUbicacionDomicilio With {.Calle = ubica.Origen.Domicilio.Calle,
.NumeroExterior = ubica.Origen.Domicilio.NumeroExterior,
.NumeroInterior = ubica.Origen.Domicilio.NumeroInterior,
.Colonia = ubica.Origen.Domicilio.Colonia,
.Localidad = ubica.Origen.Domicilio.Localidad,
.Referencia = ubica.Origen.Domicilio.Referencia,
.Municipio = ubica.Origen.Domicilio.Municipio,
.Estado = ubica.Origen.Domicilio.Estado,
.CodigoPostal = ubica.Origen.Domicilio.CP}
'falta pais
ComCartaPorte.Ubicaciones(i).Destino = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteUbicacionDestino With {.IDDestino = ubica.Destino.IDDestino,
.RFCDestinatario = ubica.Destino.RFCDestinatario,
.NombreDestinatario = ubica.Destino.NombreDestinatario,
.FechaHoraProgLlegada = ubica.Destino.FechaHoraProgLlegada.ToDate}
ComCartaPorte.Ubicaciones(i).Domicilio = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteUbicacionDomicilio With {.Calle = ubica.Destino.Domicilio.Calle,
.NumeroExterior = ubica.Destino.Domicilio.NumeroExterior,
.NumeroInterior = ubica.Destino.Domicilio.NumeroInterior,
.Colonia = ubica.Destino.Domicilio.Colonia,
.Localidad = ubica.Destino.Domicilio.Localidad,
.Referencia = ubica.Destino.Domicilio.Referencia,
.Municipio = ubica.Destino.Domicilio.Municipio,
.Estado = ubica.Destino.Domicilio.Estado,
.CodigoPostal = ubica.Destino.Domicilio.CP}
'cfdi.CartaPorteUbicacion(ubica.TipoEstacion, ubica.DistanciaRecorrida)
'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.Origen.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida)
'cfdi.CartaPorteDomicilio(ubica.Origen.Domicilio.Calle, ubica.Origen.Domicilio.NumeroExterior, ubica.Origen.Domicilio.NumeroInterior, ubica.Origen.Domicilio.Colonia, ubica.Origen.Domicilio.Localidad, ubica.Origen.Domicilio.Referencia, ubica.Origen.Domicilio.Municipio, ubica.Origen.Domicilio.Estado, ubica.Origen.Domicilio.Pais, ubica.Origen.Domicilio.CP)
'destino
'cfdi.CartaPorteUbicacion(ubica.TipoEstacion, ubica.DistanciaRecorrida)
'cfdi.CartaPorteDestino(ubica.Destino.IDDestino, ubica.Destino.RFCDestinatario, ubica.Destino.NombreDestinatario, ubica.Destino.NumRegIdTrib, ubica.Destino.ResidenciaFiscal, ubica.Destino.NumEstacion, ubica.Destino.NombreEstacion, ubica.Destino.NavegacionTrafico, ubica.Destino.FechaHoraProgLlegada)
'cfdi.CartaPorteDomicilio(ubica.Destino.Domicilio.Calle, ubica.Destino.Domicilio.NumeroExterior, ubica.Destino.Domicilio.NumeroInterior, ubica.Destino.Domicilio.Colonia, ubica.Destino.Domicilio.Localidad, ubica.Destino.Domicilio.Referencia, ubica.Destino.Domicilio.Municipio, ubica.Destino.Domicilio.Estado, ubica.Destino.Domicilio.Pais, ubica.Destino.Domicilio.CP)
Next
End If
'MERCANCIAS
If Carta.Mercancias IsNot Nothing Then
ComCartaPorte.Mercancias = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteMercancias
ComCartaPorte.Mercancias.PesoBrutoTotal = Carta.Mercancias.PesoBrutoTotal.ToDecimal
ComCartaPorte.Mercancias.PesoNetoTotal = Carta.Mercancias.PesoNetoTotal.ToDecimal
ComCartaPorte.Mercancias.NumTotalMercancias = Carta.Mercancias.NumTotalMercancias
ComCartaPorte.Mercancias.CargoPorTasacion = Carta.Mercancias.CargoporTasacion.ToDecimal
' ComCartaPorte.Mercancias.UnidadPeso = Carta.Mercancias.UnidadPeso
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
Dim i As Integer = 0
ComCartaPorte.Mercancias.Mercancia = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteMercanciasMercancia(Carta.Mercancias.Mercancias.Count - 1) {}
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
ComCartaPorte.Mercancias.Mercancia(i) = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteMercanciasMercancia
ComCartaPorte.Mercancias.Mercancia(i).BienesTranspSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).ClaveSTCCSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).Descripcion = concep.Descripción
ComCartaPorte.Mercancias.Mercancia(i).Cantidad = concep.Cantidad
ComCartaPorte.Mercancias.Mercancia(i).ClaveUnidadSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).Unidad = concep.Unidad
ComCartaPorte.Mercancias.Mercancia(i).Dimensiones = concep.Dimensiones
ComCartaPorte.Mercancias.Mercancia(i).MaterialPeligrosoSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).CveMaterialPeligrosoSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).EmbalajeSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).DescripEmbalaje = concep.DescripEmbalaje
ComCartaPorte.Mercancias.Mercancia(i).PesoEnKg = concep.PesoenKg
ComCartaPorte.Mercancias.Mercancia(i).ValorMercanciaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).MonedaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).FraccionArancelariaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).UUIDComercioExt = concep.UUIDComercioExt
'cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, concep.Embalaje, concep.DescripEmbalaje, concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
Next
End If
End If
'
If Carta.FiguraTransporte IsNot Nothing Then
If Carta.FiguraTransporte.AutoTransporteFederal IsNot Nothing Then
ComCartaPorte.FiguraTransporte = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteFiguraTransporte
ComCartaPorte.FiguraTransporte.CveTransporte = Profact.TimbraCFDI33.Complementos.CartaPorte10.c_CveTransporte.Item02
'ComCartaPorte.FiguraTransporte.CveTransporte.
'cfdi.CartaPorteAutotransporteFederal(Carta.FiguraTransporte.AutoTransporteFederal.PermSCT, Carta.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT, Carta.FiguraTransporte.AutoTransporteFederal.NombreAseg, Carta.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro)
'cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM)
'If Carta.FiguraTransporte.AutoTransporteFederal.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporteFederal.Remolques.Count > 0 Then
'For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporteFederal.Remolques
'cfdi.CartaPorteRemolque(concep.SubTipoRemolque, concep.Placa)
' Next
'
'End If
End If
'If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
' Dim i As Integer = 0
' ComCartaPorte.FiguraTransporte.Operadores = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteFiguraTransporteOperadoresOperador(Carta.FiguraTransporte.Operadores.Count - 1)() {}
' For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
' Dim Oper = New Profact.TimbraCFDI33.Complementos.CartaPorte10.CartaPorteFiguraTransporteOperadoresOperador()
' Oper.RFCOperador = concep.RFCOperador
' Oper.NumLicencia = concep.NumLicencia
' Oper.NombreOperador = concep.NombreOperador
' Oper.NumRegIdTribOperador = concep.NumRegidTribOperador
' 'Oper.ResidenciaFiscalOperador = concep.ResidenciaFiscalOperador
' ComCartaPorte.FiguraTransporte.Operadores
' 'cfdi.CartaPorteOperador(concep.RFCOperador, concep.NumLicencia, concep.NombreOperador, concep.NumRegidTribOperador, concep.ResidenciaFiscalOperador)
' Next
'End If
End If
End If
End If
#End Region
#Region "Nomina12"
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
Dim Nom = New Profact.TimbraCFDI33.Complementos.Nomina12.Nomina()

View File

@@ -600,6 +600,15 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
Dim i As Integer = 0 'limpieza de columnas
While i < DtRetorno.Columns.Count
If Not DtRetorno.Columns(i).ColumnName.Contiene("CveCliente", ColumnaNombre) Then
DtRetorno.Columns.RemoveAt(i)
Else
i = i + 1
End If
End While
DtRetorno.Columns("CveCliente").ColumnName = "id"
DtRetorno.Columns(ColumnaNombre).ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
@@ -913,7 +922,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
DtPSRetorno = DTTmp.Copy
Else
'no regresar datos herror al consultar
'no regresar datos error al consultar
DtPSRetorno.Clear()
End If
DTTmp.Dispose()

View File

@@ -1,4 +1,4 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepComplementoPago.aspx.vb" Inherits="Bancos_RepComplementoPago" %>
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="true" EnableEventValidation = "false" CodeFile="RepComplementoPago.aspx.vb" Inherits="Bancos_RepComplementoPago" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
@@ -10,15 +10,19 @@
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
<ContentTemplate>
<li>
<a><i class="fa fa-file-pdf-o" style="font-weight: bold;"></i>PDF</a>
<%--<a><i class="fa fa-file-pdf-o" style="font-weight: bold;"></i>PDF</a>--%>
<asp:LinkButton ID="LnkExcel" runat="server" OnClick="LnkExcel_Click" Text="<i class='fa fa-file-excel-o'></i> Excel" Visible="false" />
</li>
<li>
<asp:LinkButton ID="BtnEmitir" runat="server" Text="<i class='fa fa-print'></i> Emitir" Visible="false" />
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">

View File

@@ -1,7 +1,9 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.IO
Imports Extensiones
Imports GemBox.Spreadsheet
Partial Class Bancos_RepComplementoPago
Inherits ClsPaginas
@@ -33,9 +35,17 @@ Partial Class Bancos_RepComplementoPago
Private Sub CargaDatos()
Dim CveCliente As Integer = If(DdlCliente.SelectedValue.ToEntero > 0, DdlCliente.SelectedValue.ToEntero, -1)
Dim Banco As New ClsBancos
LnkExcel.Visible = False
If Banco.GetComplementoPagosRep(CveCliente, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, -1, -1, DdlOpcion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero) Then
GvD.DataSource = Banco.DtResultados '.FiltraParametros("CveComplementoPago is null")
If Banco.DtResultados.Rows.Count > 0 Then
LnkExcel.Visible = True
End If
End If
Banco.Dispose()
@@ -43,6 +53,8 @@ Partial Class Bancos_RepComplementoPago
GvD.DataBind()
UpDatos.Update()
UpAcciones.Update()
End Sub
Private Sub GeneraTimbre()
@@ -391,4 +403,133 @@ Partial Class Bancos_RepComplementoPago
UpSendMail.Update()
RegistraScript("$('#ModalDivMail').modal('show');")
End Sub
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
' GvD.ExportToExcelG("ReporteComplementos", "Reporte Complementos", UsuarioActual)
'GvD.ExportToExcelx("ReporteComplementos.xlsx")
' GvD.ExportToExcel("ReporteComplementos.xlsx")
Imprimir("Excel")
End Sub
Private Sub Imprimir(Optional reporte As String = "PDF")
If GvD.Rows.Count > 0 Then
Dim StrFiltro As New StringBuilder
'If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
'If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio: {0} ", txtFechaI.Text)
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text)
ExportToExcelG(GvD, "ReporteComplementos.xlsx", "Reporte complementos de pago", UsuarioActual, StrFiltro.ToString, 100, 150)
Else
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
End If
End Sub
Public Sub ExportToExcelG(Gv As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100)
Dim sw As New StringWriter()
Dim htw As New HtmlTextWriter(sw)
Gv.RenderControl(htw)
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
Dim excel As GemBox.Spreadsheet.ExcelFile
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
If Usuario IsNot Nothing Then
Dim TotalRowHeader As Integer = 8
Dim TotalRowFooter As Integer = 2
Dim worksheet = excel.Worksheets(0)
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
celdasConTexto.Style.Font.Name = "Calibri Light"
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
RangoNombreEmpresa.Merged = True
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
RangoNombreEmpresa.Style.Font.Size = 18 * 20
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
RangoFiltros.Merged = True
RangoFiltros.Value = Filtros
RangoFiltros.Style.Font.Size = 15 * 20
RangoFiltros.Style.Font.Name = "Calibri Light"
RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
RangoTitulo.Merged = True
RangoTitulo.Value = Titulo
RangoTitulo.Style.Font.Size = 20 * 20
RangoTitulo.Style.Font.Name = "Calibri Light"
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
worksheet.Columns("C").Width = 20000
worksheet.Columns("D").Width = 4000
worksheet.Columns("E").Width = 6000
worksheet.Columns("F").Width = 6000
worksheet.Columns("G").Width = 4000
worksheet.Columns("H").Width = 12000
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
If i > 0 Then
Try
worksheet.Columns(i).AutoFit(1)
Catch ex As Exception
End Try
End If
Next
Dim IndexEndTable As Integer = Gv.Rows.Count + TotalRowHeader + TotalRowFooter
worksheet.Rows(IndexEndTable).Cells(2).Value = "Usuario Imprimió"
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión"
worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy")
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
If Imagen.Exists Then
Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
Using sr As New StreamReader(Ruta)
Dim ms As New MemoryStream()
sr.BaseStream.CopyTo(ms)
worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
End Using
End If
End If
End Using
htw.Dispose()
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
End Class

View File

@@ -46,7 +46,7 @@
<tr style="text-align: left">
<td class="text-right"><b>Proveedor:</b></td>
<td>
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="180px"></asp:DropDownList>
<ADS:Dropdownlost ID="DdlProveedores" runat="server" UsaWebService="true" data-metodo="getproveedores" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</td>
</tr>
<tr style="text-align: left">

View File

@@ -31,9 +31,9 @@ Partial Class Compras_PopUpBuscarFolioC
End Sub
Protected Sub CargaProveedor()
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
'DdlProveedor.DataBind()
'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
@@ -57,7 +57,7 @@ Partial Class Compras_PopUpBuscarFolioC
If ValidarUnFiltroSeleccionado() Then
Dim ObjCompras As New ClsCompras()
If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Folio, FolioFiscal, Codigo, Proveedor, FechaI, FechaF, Descripcion, Obs,
CveProveedor:=DdlProveedor.SelectedValue.ToEntero, TopSelect:=100) Then
CveProveedor:=DdlProveedores.SelectedValue.ToEntero, TopSelect:=100) Then
If ObjCompras.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjCompras.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjCompras.DtResultados
@@ -112,7 +112,7 @@ Partial Class Compras_PopUpBuscarFolioC
If TxtDescripcion.Text.Trim.Length > 0 Then Return True
If TxtObservaciones.Text.Trim.Length > 0 Then Return True
If DdlTipoDocto.SelectedValue <> "-1" Then Return True
If DdlProveedor.SelectedValue.ToEntero <> 0 Then Return True
If DdlProveedores.SelectedValue.ToEntero <> 0 Then Return True
Return False
End Function
End Class

View File

@@ -1810,6 +1810,18 @@ Partial Class PopUpVerFactura
End If
End If
'SI ES TIPO RELACION 07- APLICACION DE ANTICIPOS
If dtVentas(0)("CveTipoRelacion").ToString.ToEntero = 7 Then
Dim RowTipoRelacion As DataRow = GlobalDTVtaTiposRelacion().FiltroPrimero($"CveTipoRelacion = {dtVentas(0)("CveTipoRelacion").ToString.ToEntero}")
Vta.Timbre.CFDIRelacionados.TipoRelacion = RowTipoRelacion("SATClaveTipoRelacion").ToString()
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = RowTipoRelacion("SATTipoRelacion").ToString()
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
End If
End If
'End If
'If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then

View File

@@ -143,7 +143,7 @@
<label for="<%= TxtIdCuentaContable.ClientID.ToString()%>">IdCuentaContable:</label>
</div>
<div class="form-group form-md-line-input input-iconright" id="divProveedor" runat="server" visible="false">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<ADS:Dropdownlost ID="DdlProveedor" CssClassDdl="select2me" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" data-metodo="getproveedores" CssStyle="width: 100%;" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpModulo" ></ADS:Dropdownlost>
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor: </label>
</div>
<div class="form-group form-md-line-input input-iconright" id="divCliente" runat="server" visible="false">

View File

@@ -26,14 +26,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End Sub
Private Sub CargaDatos()
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentasAsignaciones(UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
GvDatos.DataBind()
End Sub
'Private Sub CargaDatos()
' Dim ObjConta As New ClsContabilidad
' If ObjConta.GetCuentasAsignaciones(UsuarioActual.CveEmpresa) Then
' GvDatos.DataSource = ObjConta.DtResultados
' End If
' ObjConta.Dispose()
' GvDatos.DataBind()
'End Sub
Private Sub CargaDatosSistema()
Dim ObjConta As New ClsContabilidad
@@ -58,7 +58,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Dim ObjConta As New ClsContabilidad
If ObjConta.GetConta_ConceptosContables() Then
DdlCconceptosContables.DataSource = ObjConta.DtResultados
DdlCconceptosContables.DataSource = ObjConta.DtResultados.FiltraParametros("EsCuentaUnica = false AND EsSistema = True ")
DdlConceptoGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("EsCuentaUnica = false AND EsSistema = True AND EsGlobal = True")
End If
@@ -67,7 +67,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlCuentaGlobal.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.setEsWebService(True) 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlClientes.setEsWebService(True)
@@ -102,7 +102,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlCconceptosContables.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
@@ -123,7 +123,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
DdlProveedor.SelectedValueExist(GvRow.DataKey("CveProveedor"))
DdlProveedor.ddl.SelectedValueExist(GvRow.DataKey("CveProveedor"))
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
@@ -151,41 +151,22 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If Dr IsNot Nothing Then
If Dr("AplicaCliente").ToString = "True" Then
divCliente.Visible = True
DdlClientes.setEsWebService(True)
End If
If Dr("AplicaProveedor").ToString = "True" Then
divProveedor.Visible = True
End If
divCliente.Visible = Dr("AplicaCliente").ToString = "True"
If Dr("AplicaPersonal").ToString = "True" Then
divPersonal.Visible = True
DdlPersonal.setEsWebService(True)
divProveedor.Visible = Dr("AplicaProveedor").ToString = "True"
End If
divPersonal.Visible = Dr("AplicaPersonal").ToString = "True"
If Dr("AplicaImpuesto").ToString = "True" Then
divPorcentajeIVA.Visible = True
End If
divPorcentajeIVA.Visible = Dr("AplicaImpuesto").ToString = "True"
divClasificacion.Visible = Dr("AplicaClasificacion").ToString = "True"
If Dr("AplicaClasificacion").ToString = "True" Then
divClasificacion.Visible = True
End If
divBancos.Visible = Dr("AplicaBancos").ToString = "True"
If Dr("AplicaBancos").ToString = "True" Then
divBancos.Visible = True
End If
divAlmacen.Visible = Dr("AplicaAlmacen").ToString = "True"
If Dr("AplicaAlmacen").ToString = "True" Then
divAlmacen.Visible = True
End If
If Dr("AplicaSubProyecto").ToString = "True" Then
divSubProyectos.Visible = True
End If
divSubProyectos.Visible = Dr("AplicaSubProyecto").ToString = "True"
If Dr("AplicaActivoFijo").ToString = "True" Then
divActivoFijo.Visible = True
@@ -194,9 +175,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
End If
If Dr("AplicaNomina").ToString = "True" Then
divConceptoNomina.Visible = True
End If
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
End If
End Sub

View File

@@ -106,6 +106,15 @@
<asp:LinkButton ID="LnkModalAddMaquinariaFlotilla" Visible="false" runat="server" OnClick="LnkModalAddMaquinariaFlotilla_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Maquinaria-Flotilla-Herramienta</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkAbrirContrato" Visible="false" runat="server" OnClick="LnkAbrirContrato_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Abrir Contrato?" data-btn-ok-label="si"> <i class="fa-folder-open-o" style="font-weight:bold;"></i>Abrir Contrato</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkCerrarContrato" Visible="false" runat="server" OnClick="LnkCerrarContrato_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Cerrar Contrato?" data-btn-ok-label="si" > <i class="fa fa-times-circle" style="font-weight:bold;"></i>Cerrar Contrato</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
@@ -163,11 +172,8 @@
<div class="icon">
<i class="fa fa-list-ol"></i>
</div>
</div>
</div>
</div>
@@ -803,7 +809,7 @@
<div class="row">
<div class="col-md-12">
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CodigoPS,LimitarCantidad,PS,NoIdentificacion,PermitirAvance,CantidadContratada"
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CodigoPS,LimitarCantidad,PS,NoIdentificacion,PermitirAvance,CantidadContratada,CveClasificacion"
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
@@ -1085,6 +1091,7 @@
<td>
<asp:TextBox ID="TxtCantidadInt" runat="server" Width="70px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FLTCantidadInt" runat="server" TargetControlID="TxtCantidadInt" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVCantidadInt" runat="server" ControlToValidate="TxtCantidadInt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarInt"></asp:RequiredFieldValidator><ajax:ValidatorCalloutExtender ID="VCOCantidadInt" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadInt" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
@@ -1181,7 +1188,8 @@
<EditItemTemplate>
<div style="width: 65px;">
<asp:LinkButton ID="LinkButton1" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /><asp:LinkButton ID="LinkButton2" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
<asp:LinkButton ID="LinkButton2" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</div>
</EditItemTemplate>
@@ -1287,35 +1295,35 @@
<Columns>
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
<ItemTemplate>
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00}") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
<ItemTemplate>
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00}") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
<ItemTemplate>
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00}") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
<ItemTemplate>
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00}") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
@@ -2221,6 +2229,8 @@
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
<asp:Button ID="BtnCancelar" CssClass="btn btn-default" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Contratos/Contratos.aspx';return false" />
&nbsp;
</ContentTemplate>
@@ -2774,6 +2784,8 @@
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" ></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSVentas"> </asp:RequiredFieldValidator>
<asp:RangeValidator runat="server" id="RGVControlCantidadVentas" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" Type="Double" MinimumValue="1" MaximumValue="9999999999" ErrorMessage="No se pueden tener valores inferiores a lo ya avanzado" ValidationGroup="GrpAddPSVentas" />
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
</div>

View File

@@ -389,6 +389,19 @@ Partial Class Contratos_ContratoObra
End Property
Property BloquearTodo As Boolean
Get
If ViewState("BloquearTodo") Is Nothing Then
Return False
Else
Return Boolean.Parse(ViewState("BloquearTodo").ToString)
End If
End Get
Set(value As Boolean)
ViewState("BloquearTodo") = value
End Set
End Property
#End Region
@@ -483,6 +496,9 @@ Partial Class Contratos_ContratoObra
CargaDLLCargaGVCentrosConsto()
tabalCentrosdecotso()
BloquearControles()
End If
@@ -626,12 +642,38 @@ Partial Class Contratos_ContratoObra
'DdlProyecto.SelectedValue = "-1"
TxtCantidad.Text = ""
RGVControlCantidadVentas.Visible = False
TxtPU.Text = ""
TmpDT.Clear()
CargaGVPresupuestos(TmpDT)
CargaGVPresupuestosInsumos(TmpDT)
LbTotalGeneral.Text = "0.00"
End Sub
Private Sub BloquearControles()
If BloquearTodo Then
LnkModalAddPSVentas.Visible = False
LnkModalAddPSControl.Visible = False
LnkModalAddPresupuestoVentas.Visible = False
LnkModalAddPresupuestoControl.Visible = False
LnkModalAddGastos.Visible = False
LnkModalAddMaquinariaFlotilla.Visible = False
BtnDescargar.Enabled = False
A1.Visible = False
BtnGuardar.Enabled = False
BtnEliminar.Enabled = False
BtnCancelar.Enabled = False
End If
End Sub
#End Region
#Region " CONFIGURA TIPOS CONTRATO "
@@ -739,6 +781,24 @@ Partial Class Contratos_ContratoObra
DdlCliente.SelectedValue = ObjContratos.CveCliente.ToString
DdlCliente.SelectedText = ObjContratos.NombreComercial.ToString
LnkAbrirContrato.Visible = False
LnkCerrarContrato.Visible = False
If UsuarioActual.TienePermisoProceso(330) Then
If ObjContratos.TipoEstatus = 1 Then
LnkCerrarContrato.Visible = True
Else
LnkAbrirContrato.Visible = True
BloquearTodo = True
End If
End If
If ObjContratos.CveProveedor > 0 Then
' TrProveedor.Visible = True
TrCliente.Visible = False
@@ -873,6 +933,11 @@ Partial Class Contratos_ContratoObra
Alert("El Contrato Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
End If
Else
CveContrato = -1
Alert("Ocurrió un error al cargar el Contrato. Por favor vuelva a intentar.", TipoMensaje.MsgError)
@@ -1000,10 +1065,14 @@ Partial Class Contratos_ContratoObra
TipoContrato = DdlTipoContratoObra.SelectedValue.ToEntero
'Crear Contrato
Dim ImporteSubTotal As Decimal = TmpDT.SUM("Total", " CveContratoDetalle > 0 AND CveTipoPresupuesto=2 ").ToDecimal
If Not CveContrato > 0 Then
Dim EstatusContrato As Integer = 1
CveContrato = ObjContratos.AddContratosObra(TxtNumeroContrato.Text, TxtDescripcionContrato.Text, TxtNumeroLicitacion.Text.Trim, DdlContratista.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, -1, TxtFechaInicial.Text.ToDate, TxtFechaFinal.Text.ToDate,
TxtUbicacion.Text, TxtResponsable.Text, DdlProyecto.SelectedValue.ToEntero, TxtPorIVA.Text.ToDouble, TxtPorAnticipo.Text.ToDouble, TxtPorAmortizacionAnticipo.Text.ToDouble,
TxtPorGarantia.Text.ToDouble, "." & Session("FileExtension").ToString, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, Minimo, Maximo, Total,
@@ -1011,7 +1080,7 @@ Partial Class Contratos_ContratoObra
TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1,
PorcentajeComision:=0, TipoGarantia:=-1, Folio:=0, FechaVenc:=Nothing, EstatusFianza:=1,
CvePeriodo:=-1, CveCuentaEquipo:=-1, CveContratoPlantilla:=-1, CveVendedor:=-1,
Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble)
Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble, ImporteSubTotal:=ImporteSubTotal)
TieneError = Not GuardaFianzas(ObjContratos)
@@ -1074,7 +1143,7 @@ Partial Class Contratos_ContratoObra
CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1, PorcentajeComision:=0,
TipoGarantia:=-1, Folio:=-1, FechaVenc:=Nothing, EstatusFianza:=-1, CveContratoPlantilla:=-1,
CveCuentaEquipo:=-1, CveVendedor:=-1, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False,
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble) Then
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble, ImporteSubTotal:=ImporteSubTotal) Then
TieneError = Not GuardaFianzas(ObjContratos)
@@ -1698,6 +1767,21 @@ Partial Class Contratos_ContratoObra
End If
If e.Row.RowType = DataControlRowType.DataRow Then
If BloquearTodo Then
e.Row.FCLinkButton("LnkEditarPresupuestoVentaDetalle").Visible = False
e.Row.FCLinkButton("imgD").Visible = False
End If
If e.Row.DataKey("CveContratoDetalle").ToEntero <= 0 Then
e.Row.FCLinkButton("LnkEditarPresupuestoVentaDetalle").Visible = False
e.Row.FCLinkButton("imgD").Visible = False
End If
End If
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlUMEdit").DataBind()
@@ -2078,6 +2162,23 @@ Partial Class Contratos_ContratoObra
e.Row.FCDropDownList("DdlUMEdit").SelectedValue = e.Row.DataKey("CveUM")
End If
If e.Row.RowType = DataControlRowType.DataRow Then
If BloquearTodo Then
e.Row.FCLinkButton("LnkEditarPresupuestoControlDetalle").Visible = False
e.Row.FCLinkButton("imgD").Visible = False
End If
If e.Row.DataKey("CveContratoDetalle").ToEntero <= 0 Then
e.Row.FCLinkButton("LnkEditarPresupuestoControlDetalle").Visible = False
e.Row.FCLinkButton("imgD").Visible = False
End If
End If
End Sub
Protected Sub GVInsumos_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvInsumos.RowEditing
GvInsumos.EditIndex = e.NewEditIndex
@@ -2726,8 +2827,8 @@ Partial Class Contratos_ContratoObra
End Sub
Protected Sub GvContratoGastos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvContratosGastos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Or e.Row.DBCampo("CveVenta").ToString.ToEntero > 0 Then
If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Then e.Row.CssClass = "SubTotales" : e.Row.Cells(0).Text = e.Row.DBCampo("Cantidad").FormatoNumero(0)
e.Row.FCLinkButton("imgE").Visible = False
@@ -2738,6 +2839,16 @@ Partial Class Contratos_ContratoObra
ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lb)
End If
End If
If e.Row.RowType = DataControlRowType.DataRow Then
If BloquearTodo Then
e.Row.FCLinkButton("imgU").Visible = False
e.Row.FCLinkButton("imgE").Visible = False
e.Row.FCLinkButton("imgD").Visible = False
End If
End If
End Sub
Protected Sub GvContratoGastos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GvContratosGastos.RowDeleting
@@ -3185,6 +3296,15 @@ Partial Class Contratos_ContratoObra
End If
End If
If e.Row.RowType = DataControlRowType.DataRow Then
If BloquearTodo Then
e.Row.FCLinkButton("LinkEliminarBitacora").Visible = False
End If
End If
End Sub
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
@@ -4181,12 +4301,38 @@ Partial Class Contratos_ContratoObra
Dim CantidadMinimo As Integer = 0
Dim ObjContrtato As New ClsContratos
If ObjContrtato.GetContratosDetalleAvance(CveContratoDetalleEditar) Then
CantidadMinimo = ObjContrtato.DtResultados.Rows(0)(0).ToString.ToEntero
If CantidadMinimo = 0 Then
RGVControlCantidadVentas.Visible = False
Else
RGVControlCantidadVentas.Visible = True
RGVControlCantidadVentas.MinimumValue = CantidadMinimo.ToString
End If
End If
ObjContrtato.Dispose()
ModalVentasPSAdd = False
ChkContinualAgregandoVentas.Visible = False
ChkContinualAgregandoVentas.Checked = False
UpModalVentasAddPS.Update()
RegistraScript("$('#ModalVentasAddPS').modal('show')")
End Sub
Protected Sub LnkEditarPresupuestoControlDetalle_Click(sender As Object, e As EventArgs)
@@ -4276,6 +4422,7 @@ Partial Class Contratos_ContratoObra
'TxtOCInterna.Text = ""
TxtCantidad.Text = ""
RGVControlCantidadVentas.Visible = False
'ChkLimitarVenta.Checked = False
'TxtNoIdentificacionv.Text = ""
DdlClasificacionAdd.SelectedValueExist(-1)
@@ -5088,7 +5235,6 @@ Partial Class Contratos_ContratoObra
Private Sub GvGastosVeiculos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGastosVeiculos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("ORDEN").ToEntero = 1 Then
e.Row.CssClass = "Totales"
e.Row.Cells(1).Text = "Total"
@@ -5097,8 +5243,16 @@ Partial Class Contratos_ContratoObra
End If
End If
If e.Row.RowType = DataControlRowType.DataRow Then
If BloquearTodo Then
e.Row.FCLinkButton("LnkEliminarGasto").Visible = False
End If
End If
End Sub
@@ -5433,6 +5587,39 @@ Partial Class Contratos_ContratoObra
AddtabalCentrosdecotso(DdlCentroCostos.SelectedValue.ToEntero, DdlCentroCostos.SelectedItem.Text, TxtCentroCostosPorcentaje.Text.ToDecimal)
End Sub
Protected Sub LnkAbrirContrato_Click(sender As Object, e As EventArgs)
AbrirCerrarContrto(False)
End Sub
Protected Sub LnkCerrarContrato_Click(sender As Object, e As EventArgs)
AbrirCerrarContrto(True)
End Sub
Private Sub AbrirCerrarContrto(Cerrar As Boolean)
Dim ObjConrtato As New ClsContratos
If ObjConrtato.AbrirCerrarContrato(CveContrato, UsuarioActual.CveEmpresa, Cerrar, UsuarioActual.CveUsuario) Then
Alert($"Contrato { If(Cerrar, "Cerrado", "Abierto")} Correctamente", TipoMensaje.MsgInformacion, $"window.location.href=""./ContratoObra.aspx?CveContrato={CveContrato}"";")
End If
End Sub
Private Sub GvInt_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInt.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If BloquearTodo Then
'e.Row.FCLinkButton("LinkButton1").Enabled = False
'e.Row.FCLinkButton("LinkButton2").Enabled = False
e.Row.FCLinkButton("LinkButton3").Visible = False
e.Row.FCLinkButton("LinkButton4").Visible = False
End If
End If
End Sub
End Class

View File

@@ -70,8 +70,8 @@
<div class="col-md-1">
Cliente:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" Class="select2me" Width="100PX" ></asp:DropDownList>
<div class="col-md-3">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<div class="col-md-1">
@@ -106,7 +106,7 @@
<div class="number" style="display: none!important">
<small>Contratos</small>
<h3 class="font-purple-soft">
<span>
<span style="font-size: large" >
<asp:Literal Text="0" ID="LtlGrafNumeroContratos" runat="server" /></span>
</h3>
@@ -115,7 +115,7 @@
<div class="number">
<small>Total</small>
<h3 class="font-purple-soft">
<span>$<asp:Literal Text="0" ID="LtlGrafTotal" runat="server" /></span>
<span style="font-size: large" >$<asp:Literal Text="0" ID="LtlGrafTotal" runat="server" /></span>
</h3>
</div>
@@ -140,7 +140,7 @@
<td>
<small>Avance</small>
<h3 class="font-green-sharp">
<span>
<span style="font-size: large" >
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
</span>
<small class="font-green-sharp"></small>
@@ -150,7 +150,7 @@
<td>
<small>Porcentaje</small>
<h3 class="font-green-sharp">
<span>
<span style="font-size: large" >
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
</span>
<small class="font-green-sharp"></small>
@@ -192,7 +192,7 @@
<td>
<small>Faltante</small>
<h3 class="font-red-haze">
<span>
<span style="font-size: large" >
<asp:Literal Text="0" ID="LtlFaltanteImporte" runat="server" />
</span>
<small class="font-red-haze"></small>
@@ -202,7 +202,7 @@
<td>
<small>Porcentaje</small>
<h3 class="font-red-haze">
<span>
<span style="font-size: large" >
<asp:Literal Text="0" ID="LtlFaltanteImportePorcentaje1" runat="server" />
</span>
<small class="font-red-haze"></small>
@@ -309,7 +309,7 @@
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LblImporte" CssClass="Texto" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Label>
<asp:Label ID="LblImporteSubTotal" CssClass="Texto" runat="server" Text='<%# Eval("ImporteSubTotal", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>

View File

@@ -19,12 +19,15 @@ Partial Class RepContratosObraAvances
Private Sub CargaDatos()
Dim CveCliente As Integer = -1
Dim Con As New ClsContratos
Dim DTDatos As New DataTable
If DdlCliente.SelectedValue.ToEntero > 0 Then CveCliente = DdlCliente.SelectedValue.ToEntero
If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, CveCliente, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GVDatos.DataSource = Con.DtResultados
DTDatos = Con.DtResultados
If Con.DtResultados.Rows.Count > 0 Then
Indicadores(Con.DtResultados)
End If
Else
GVDatos.DataSource = Nothing
End If
@@ -35,9 +38,7 @@ Partial Class RepContratosObraAvances
UpDatos.Update()
If DTDatos.Rows.Count > 0 Then
Indicadores(DTDatos)
End If
End Sub
@@ -47,7 +48,10 @@ Partial Class RepContratosObraAvances
Dim NumeroContratos As Integer = DTDatos.Rows.Count
Dim TotalContratos As Decimal = DTDatos.SUM("Importe")
'Dim TotalContratos As Decimal = DTDatos.SUM("Importe")
Dim TotalContratos As Decimal = DTDatos.SUM("ImporteSubTotal")
Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte")
Dim TotalFaltante As Decimal = TotalContratos - TotalAvance
@@ -85,15 +89,15 @@ Partial Class RepContratosObraAvances
End Sub
Private Sub CargaClientes()
Dim dt As DataTable = Nothing
Dim Cli As New ClsClientes
If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
dt = Cli.DtResultados
End If
Cli.Dispose()
DdlCliente.DataSource = dt
DdlCliente.DataBind()
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
'Dim dt As DataTable = Nothing
'Dim Cli As New ClsClientes
'If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
' dt = Cli.DtResultados
'End If
'Cli.Dispose()
'DdlCliente.DataSource = dt
'DdlCliente.DataBind()
'DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
#End Region

View File

@@ -29,7 +29,7 @@
<div class="number" style="display: none!important">
<small>Numero Estimaciones</small>
<h3 class="font-purple-soft">
<span>
<span style="font-size: large" >
<asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones2" runat="server" /></span>
</h3>
@@ -38,7 +38,7 @@
<div class="number">
<small>Numero Estimaciones</small>
<h3 class="font-purple-soft">
<span><asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones" runat="server" /></span>
<span style="font-size: large" ><asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones" runat="server" /></span>
</h3>
</div>
@@ -63,7 +63,7 @@
<td>
<small>Avance</small>
<h3 class="font-green-sharp">
<span>
<span style="font-size: large">
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
</span>
<small class="font-green-sharp"></small>
@@ -73,7 +73,7 @@
<td>
<small>Porcentaje</small>
<h3 class="font-green-sharp">
<span>
<span style="font-size: large" >
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
</span>
<small class="font-green-sharp"></small>
@@ -115,7 +115,7 @@
<td>
<small>Fecha Fin</small>
<h3 class="font-red-haze">
<span>
<span style="font-size: large">
<asp:Literal Text="0" ID="LtlFechaFin" runat="server" />
</span>
<small class="font-red-haze"></small>
@@ -125,7 +125,7 @@
<td>
<small>Dias Restantes</small>
<h3 class="font-red-haze">
<span>
<span style="font-size: large">
<asp:Literal Text="0" ID="LtlDiasRestantes" runat="server" />
</span>
<small class="font-red-haze"></small>

View File

@@ -87,7 +87,7 @@ Partial Class RepContratosObraAvancesDetalle
Dim AvanceImporte As Decimal = DTDatos(0)("AvanceImporte").ToString.ToDecimal
Dim TotalContratos As Decimal = DTDatos(0)("Importe").ToString.ToDecimal
Dim TotalContratos As Decimal = DTDatos(0)("ImporteSubTotal").ToString.ToDecimal
Dim TotalAvancePorcentaje As Decimal = 0
If TotalContratos > 0 Then
@@ -100,6 +100,8 @@ Partial Class RepContratosObraAvancesDetalle
Dim FechaFinal As Date = DTDatos(0)("FechaFinal").ToString.ToDate
Dim Dias As Integer = (FechaFinal - Now).Days
Dias = If(Dias < 0, 0, Dias)
LtlAvanceImporte.Text = $"$ {AvanceImporte.ToString("###,###,###.00")}"
@@ -109,7 +111,7 @@ Partial Class RepContratosObraAvancesDetalle
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
LtlFechaFin.Text = FechaFinal.ToString("dd/MM/yyyy")
LtlDiasRestantes.Text = Dias.ToString("###,###")
LtlDiasRestantes.Text = If(Dias <= 0, "0", Dias.ToString("###,###"))
UpGrafica.Update()

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DsOC">
@@ -2127,7 +2127,26 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 - Quiroga (662) 261- 0838 - Caborca (637) 3724214 - Magdalena (632) 322-4080</Value>
<Value>Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 -</Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
<TextDecoration>None</TextDecoration>
<Color>#000000</Color>
</Style>
</TextRun>
<TextRun>
<Value> Portillo (662) 688-5349</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value> - Quiroga (662) 261- 0838 - Caborca (637) 3724214 </Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
@@ -2146,7 +2165,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 - Navojoa (642) 422-9852</Value>
<Value> Magdalena (632) 322-4080 - Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 </Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
@@ -2165,7 +2184,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Guamuchil (673) 688-0108 - Sanalona (667) 713-667</Value>
<Value>Navojoa (642) 422-9852 - Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Guamuchil (673) 688-0108</Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
@@ -2184,26 +2203,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali3 (686) 326 02 79</Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
<TextDecoration>None</TextDecoration>
<Color>#000000</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
<LineHeight>1pt</LineHeight>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552</Value>
<Value> Sanalona (667) 713-667 - Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 Mexicali3 (686) 326 02 79 - Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552</Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
@@ -2240,17 +2240,6 @@
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
<TextDecoration>None</TextDecoration>
<Color>#000000</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
@@ -4719,7 +4708,6 @@
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="ID2">
<MIMEType>image/png</MIMEType>

View File

@@ -814,7 +814,7 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
private string getCorreoString()
{
ClsVentas ObjVentas = new ClsVentas();
if (ObjVentas.GetVenta(CveVenta,UsuarioActual.CveEmpresa))
if (ObjVentas.GetVenta(CveVenta,UsuarioActual.CveEmpresa) && ObjVentas.DtResultados.Rows.Count > 0 )
{
int CveVendedor = ObjVentas.DtResultados.Rows[0]["CveVendedor"].ToEntero();
int CveCliente = ObjVentas.DtResultados.Rows[0]["CveCliente"].ToEntero();

View File

@@ -123,7 +123,7 @@
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 39px;">
<div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" />
</div>
@@ -134,7 +134,7 @@
<asp:DropDownList ID="DdlCAlmacen" runat="server" CssClass="form-control input-sm" Style="max-width: 200px" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
</div>--%>
<label class="col-md-1 truncate">Concepto:</label>
<div class="col-md-2 ">
<div class="col-md-3 ">
<asp:DropDownList ID="DdlCConcepto" DataTextField="Concepto" CssClass="form-control input-sm" DataValueField="CveConcepto" runat="server" Style="max-width: 200px"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Folio:</label>
@@ -165,23 +165,20 @@
</div>
<div class="caption uppercase" style="position: relative;">
<i class="fa fa-info-circle"></i>Información del movimiento
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
<div id="tbEncabezado" runat="server" class="rowpadding" visible="true">
<div class="row">
<label class="col-md-1 truncate" style="width: 110px">Almacén:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlAlmacen" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlAlmacen_SelectedIndexChanged" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
<div class="col-md-4">
<asp:DropDownList ID="DdlAlmacen" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlAlmacen_SelectedIndexChanged" runat="server" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvAlmacen" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlAlmacen" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RfvAlmacen" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-1 truncate" style="width: 110px" id="DivConcepto1" runat="server">Concepto:</label>
<div class="col-md-2 " id="DivConcepto2" runat="server">
<asp:DropDownList ID="DdlConcepto" DataTextField="Concepto" CssClass="form-control input-sm select2me" AutoPostBack="true" DataValueField="CveConcepto" runat="server" Style="max-width: 200px"></asp:DropDownList>
<div class="col-md-4 " id="DivConcepto2" runat="server">
<asp:DropDownList ID="DdlConcepto" DataTextField="Concepto" CssClass="form-control input-sm select2me" AutoPostBack="true" DataValueField="CveConcepto" runat="server" ></asp:DropDownList>
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvConcepto" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlConcepto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RfvConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
@@ -191,8 +188,8 @@
<div id="DivCliente" runat="server" visible="false">
<label class="col-md-1 truncate" style="width: 110px">Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClientes" AutoPostBack="true" OnSelectedIndexChanged="DdlClientes_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="NombreComercial" DataValueField="CveCliente"></asp:DropDownList>
<div class="col-md-4">
<asp:DropDownList ID="DdlClientes" AutoPostBack="true" OnSelectedIndexChanged="DdlClientes_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" DataTextField="NombreComercial" DataValueField="CveCliente"></asp:DropDownList>
</div>
</div>
@@ -286,26 +283,26 @@
<div class="col-md-2">
</div>
</div>
<div class="row" id="divGuia" runat="server" visible="False">
<div class="row">
<div id="divGuia" runat="server" visible="False">
<label class="col-md-1 truncate" style="width: 110px">
<asp:Label runat="server" ID="LblGuia">Guía:</asp:Label>
</label>
<div class="col-md-2">
<asp:TextBox ID="TxtGuia" runat="server" MaxLength="20" Width="100%"></asp:TextBox>
</div>
</div>
<div class="row" runat="server" id="TrResponsable">
<div class="col-md-6" runat="server" id="TrResponsable">
<label class="col-md-1" style="width: 110px">Recibe:</label>
<div class="col-md-3">
<asp:TextBox runat="server" Text="" ID="TxtResponsable" Width="100%" />
<%--<asp:DropDownList ID="DdlResponsable" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm" Style="width: 200px !important;"></asp:DropDownList>--%>
</div>
</div>
</div>
</div>
<div class="row">
<label class="col-md-1 truncate" style="width: 110px">
Observaciones:
</label>
<div class="col-md-5">
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>

View File

@@ -329,7 +329,7 @@ Partial Class Inventarios_EntradasSalidas
Case "1"
Case "2"
divMonedaSeccion.Visible = True
'divMonedaSeccion.Visible = True
divGuia.Visible = True
End Select

View File

@@ -1036,6 +1036,7 @@ Partial Class Inventarios_EntregaAlmacen
End Sub
Private Sub CargaDocumentos(tCveVenta As Integer)
If tCveVenta > 0 Then
Dim objInv As New ClsEdocumentacion
If objInv.DocumentacionElectronicaGet(-1, -1, -1, UsuarioActual.CveEmpresa, -1, tCveVenta) Then
@@ -1043,6 +1044,8 @@ Partial Class Inventarios_EntregaAlmacen
End If
objInv.Dispose()
GvDocs.DataBind()
End If
End Sub

View File

@@ -507,6 +507,7 @@ Partial Class Inventarios_InventarioFisico
FechaFin = GvRow.DataKey("FechaFin").ToEntero
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
chkUsarApp.Checked = Convert.ToBoolean(GvRow.DataKey("ConAplicacion").ToString)
divUsuarios.Visible = chkUsarApp.Checked
CargaGvAlmacen()
CargaGvClasificacion()
CargaGvProductosServicios()

View File

@@ -161,7 +161,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
str.Clear()
CveAlmacenes = CveAlmacenesStr.ToString.Substring(0, CveAlmacenesStr.Length - 1)
CveAlmacenes = CveAlmacenesStr.ToString.Substring(0, CveAlmacenesStr.Length)
End If
If ObjInventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then

View File

@@ -2229,6 +2229,14 @@ Partial Class Inventarios_RecepcionAlmacen
Return False
End If
If UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
If Filesgral Is Nothing OrElse Filesgral.Count = 0 Then
Alert("Es necesario agregar un documento.", TipoMensaje.MsgAdvertencia)
Return False
End If
End If
'VERIFICA EXISTENCIAS
If TipoMovimiento > 1 Then
Dim MensajeExistencias As New StringBuilder
@@ -2263,14 +2271,6 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
If Filesgral Is Nothing OrElse Filesgral.Count = 0 Then
Alert("Es necesario agregar un documento.", TipoMensaje.MsgAdvertencia)
Return False
End If
End If
Return True
End Function
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
@@ -3883,6 +3883,14 @@ Partial Class Inventarios_RecepcionAlmacen
End If
End If
'DOCUMENTOS RELACIONADOS AL MOVIMIENTO
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
If Not ErrorMovInv AndAlso Not GuardaDocumentoBitacora(ObjBitacora, CveMovimiento) Then
ErrorMovInv = True
Alert("Ocurrió un error al guardar los datos adjuntos de la bitácora", TipoMensaje.MsgError)
End If
End If
Else
ErrorMovInv = True

View File

@@ -41,6 +41,24 @@ Partial Class Inventarios_RepAnomalias
End Set
End Property
Public Property aplicacion As Boolean
Get
Return CType(ViewState("aplicacion"), Boolean)
End Get
Set(value As Boolean)
ViewState("aplicacion") = value
End Set
End Property
Public Property CreandoNuevoInventario As Boolean
Get
Return CType(ViewState("CreandoNuevoInventario"), Boolean)
End Get
Set(value As Boolean)
ViewState("CreandoNuevoInventario") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -51,6 +69,7 @@ Partial Class Inventarios_RepAnomalias
If CveInventarioFisico > 0 Then
CargaDatos(CveInventarioFisico)
CreandoNuevoInventario = False
End If
End If
@@ -72,7 +91,7 @@ Partial Class Inventarios_RepAnomalias
lbFechaI.Text = Inventario.FechaI
lbFechaF.Text = Inventario.FechaF
CveSubProyecto = Inventario.CveSubProyectoInventario
aplicacion = Inventario.ConAplicacion
If Inventario.Estatus = "Finalizado" Then
btnFin.Visible = False
End If
@@ -254,7 +273,7 @@ Partial Class Inventarios_RepAnomalias
#End Region
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound, GvS.RowDataBound
Protected Sub GVF_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Costo") = "-1" Then
e.Row.Cells(8).Text = "0"
@@ -264,6 +283,29 @@ Partial Class Inventarios_RepAnomalias
End If
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
End If
If e.Row.RowType = DataControlRowType.Header Then
If CreandoNuevoInventario Then
e.Row.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
End If
End If
End Sub
Protected Sub GVS_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvS.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Costo") = "-1" Then
e.Row.Cells(8).Text = "0"
End If
If e.Row.Cells(7).Text = MinFecha.ToString Then
e.Row.Cells(7).Text = ""
End If
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
End If
If e.Row.RowType = DataControlRowType.Header Then
If CreandoNuevoInventario Then
e.Row.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
End If
End If
End Sub
#Region " IMPRIMIR "
@@ -353,14 +395,14 @@ Partial Class Inventarios_RepAnomalias
GvF.Columns(0).Visible = True
LnkGuardar.Visible = True
LnkCrear.Visible = False
GvF.HeaderRow.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
CreandoNuevoInventario = True
End If
If GvS.Rows.Count > 0 Then
GvS.Columns(0).Visible = True
LnkGuardar.Visible = True
LnkCrear.Visible = False
GvS.HeaderRow.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
CreandoNuevoInventario = True
End If
UPAnomalias.Update()
UpdateGvS.Update()
@@ -374,13 +416,15 @@ Partial Class Inventarios_RepAnomalias
Dim ErrorClasif As Boolean = False
Dim ObjInventario As New ClsInventarios
Dim CveInventarioFisicoNew As Integer
Dim DtAlmacen, DtClasificacion, DtClasificacionExcluida, DtProveedor As DataTable
Dim DtAlmacen, DtClasificacion, DtClasificacionExcluida, DtProveedor, DtUsuario As DataTable
DtAlmacen = Nothing
DtClasificacion = Nothing
DtClasificacionExcluida = Nothing
DtProveedor = Nothing
DtUsuario = Nothing
ObjInventario.IniciaTransacSQL()
If ObjInventario.AddInventarioFisico(UsuarioActual.CveEmpresa, TxtTitulo.Text, lbObservaciones.Text, 0, CveSubProyecto) Then
If ObjInventario.AddInventarioFisico(UsuarioActual.CveEmpresa, TxtTitulo.Text, lbObservaciones.Text, 0, CveSubProyecto, aplicacion) Then
CveInventarioFisicoNew = ObjInventario.CveInventarioFisico
If ObjInventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
@@ -396,6 +440,18 @@ Partial Class Inventarios_RepAnomalias
DtProveedor = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
End If
If ObjInventario.GetInventarioFisicoDetallesUsuarios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
DtUsuario = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
End If
For Each Gvr As DataRow In DtUsuario.Rows
If Not ObjInventario.AddInventarioFisicoUsuarios(CveInventarioFisicoNew, Gvr("CveUsuario").ToString.ToEntero, Convert.ToBoolean(Gvr("Incluye").ToString), Convert.ToBoolean(Gvr("Cerrado").ToString), Convert.ToBoolean(Gvr("Bloqueado").ToString)) Then
ErrorClasif = True
Exit For
End If
Next
For Each Gvr As DataRow In DtAlmacen.Rows
If Not ObjInventario.AddInventarioFisicoAlmacenes(CveInventarioFisicoNew, Gvr("CveAlmacen").ToString.ToEntero) Then
ErrorClasif = True
@@ -455,6 +511,7 @@ Partial Class Inventarios_RepAnomalias
GvS.Columns(0).Visible = False
LnkGuardar.Visible = False
LnkCrear.Visible = True
CreandoNuevoInventario = False
CargaDatos(CveInventarioFisico)
Else
ObjInventario.RollBack()

View File

@@ -195,7 +195,7 @@
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<span data-placement="top" data-toggle="tooltip" title="Marcar el producto como que no se recibirá">
<asp:LinkButton runat="server" OnClick="BtnActulizarEstatus_Click" CssClass="btn btn-sm red" Text="<i class='fa fa-eye-slash' aria-hidden='true'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de marcar el producto como que no se recibirá?" data-btn-ok-label="si"></asp:LinkButton>
<asp:LinkButton ID="lnkAccion" runat="server" OnClick="BtnActulizarEstatus_Click" CssClass="btn btn-sm red" Text="<i class='fa fa-eye-slash' aria-hidden='true'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de marcar el producto como que no se recibirá?" data-btn-ok-label="si"></asp:LinkButton>
</span>
</ItemTemplate>
</asp:TemplateField>

View File

@@ -279,7 +279,7 @@ Partial Class RepNotasSinAlmacen
e.Row.Cells(1).Text = e.Row.DBCampo("Fecha").ToDate.ToShortDateString
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(2).Text = "<a class=""Texto"" href=""/Compras/Proveedores.aspx?CveProveedor=" & e.Row.DBCampo("CveProveedor") & """>" & e.Row.DBCampo("RazonSocial") & "</a>"
e.Row.FCLinkButton("lnkAccion").Visible = False
If GvCompras.Columns(4).Visible Then
e.Row.Cells(4).Text = ""
End If

View File

@@ -190,6 +190,20 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-2">F. Envío:</label>
<div class="col-md-2" style="padding-left: 5px; padding-top: 0px;" runat="server" id="divFechaEnvio" visible="false">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 120px !important;">
<asp:TextBox ID="TxtFechaEnvio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="75px" ClientIDMode="Static"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="ImgFechaEnvio" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtFechaEnvio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaEnvio" PopupButtonID="ImgFechaEnvio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="TxtFechaEnvio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Envío''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator2" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="row">
<label class="col-md-1">Unidad:</label>
@@ -827,7 +841,7 @@
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlConfigAuto.ClientID.ToString()%>">Configuración Carta Porte:</label>
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ConfigAutoTransporte" DataValueField="ClaveConfigAutoTransporte">
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte">
<asp:ListItem Selected="True" Text="Seleccione" Value=""></asp:ListItem>
</asp:DropDownList>
</div>

View File

@@ -189,6 +189,10 @@ Partial Class Inventarios_TraspasoAlmacen
LblResponsable.Visible = False
End If
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
divFechaEnvio.Visible = True
End If
CargaCombos()
CreaDT()

View File

@@ -5129,8 +5129,8 @@ Partial Class OC
option72.Visible = True
DivFolioAdicional.Visible = True
generarAnticipo.Visible = True
Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual)
Ddlcliente.DataBind()
'Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual)
'Ddlcliente.DataBind()
'Ddlcliente.Items.Insert(0, New ListItem(" - ", "-1"))

View File

@@ -272,7 +272,7 @@ Partial Class Ventas_PortalCliente
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjClientes As New ClsClientes()
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=CveClienteSucursal) Then
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=CveClienteSucursal) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
'Carga Generales
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0)
@@ -1726,7 +1726,7 @@ Partial Class Ventas_PortalCliente
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
Dim ObjClientes As New ClsClientes
If ObjClientes.GetHistorialVentas(CveCliente, TopPedidos, CveClienteSucursal:=-1, TipoDocto:="Pd2", CveEstatusFactura:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, TopPedidos, CveClienteSucursal:=-1, TipoDocto:="Pd2", CveEstatusFactura:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
GvPedidos.DataSource = ObjClientes.DtResultados
If ObjClientes.DtResultados.Rows.Count < 21 Then
LnkVerMasPedidos.Visible = False

View File

@@ -1231,8 +1231,12 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabHis" runat="server" HeaderText="Historial de Ventas">
<ajax:TabPanel ID="TabHis" runat="server">
<HeaderTemplate>
<span>Historial de Ventas</span>
</HeaderTemplate>
<ContentTemplate>
<div class="row">
<div class="col-md-3">
<div class="portlet light xspadding bordered">
@@ -1343,8 +1347,7 @@
<asp:PostBackTrigger ControlID="BtnPDFHistorial" />
</Triggers>
<ContentTemplate>
<asp:Button ID="BtnHistorialVentas" runat="server" ClientIDMode="Static" Text="HistorialVentas" Style="display: none;" OnClick="BtnHistorialVentas_Click" />
<asp:GridView ID="GVHistorial" runat="server" DataKeyNames="CveVenta, Folio, TipoDocto" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; min-width: 783px; width: 100%;" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
@@ -1560,12 +1563,14 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabCxC" runat="server" HeaderText="Cuentas x Cobrar">
<ajax:TabPanel ID="TabCxC" runat="server">
<HeaderTemplate>
<span>Cuentas x Cobrar</span>
</HeaderTemplate>
<ContentTemplate>
<asp:UpdatePanel ID="UpImprimir" runat="server">
<ContentTemplate>
<div class="row">
<div class="col-md-7">
@@ -1582,6 +1587,7 @@
<div class="portlet-body">
<asp:UpdatePanel ID="UpParametros" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:Button ID="BtnCargaCxC" runat="server" ClientIDMode="Static" Text="CargaCxC" Style="display: none;" OnClick="BtnCargaCxC_Click" />
<div class="row">
<div class="col-md-6">
@@ -2169,7 +2175,7 @@
<asp:UpdatePanel ID="UpAnticipos" runat="server">
<ContentTemplate>
<asp:Button ID="BtnCargaAnticipos" runat="server" ClientIDMode="Static" Text="CargaAnt" Style="display: none;" OnClick="BtnCargaAnticipos_Click" />
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
@@ -2298,7 +2304,10 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabBancos" runat="server" HeaderText="Bancos">
<ajax:TabPanel ID="TabBancos" runat="server">
<HeaderTemplate>
<span>Bancos</span>
</HeaderTemplate>
<ContentTemplate>
<div class="portlet light xspadding bordered ">
@@ -2442,6 +2451,10 @@
</div>
<div class="table-scrollable">
<asp:UpdatePanel ID="UpBancos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="BtnCargaBancos" runat="server" ClientIDMode="Static" Text="CargaBancos" Style="display: none;" OnClick="BtnCargaBancos_Click" />
<asp:GridView ID="GvBancos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Abonos"
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" DataKeyNames="SerieFolioCP">
<Columns>
@@ -2491,6 +2504,8 @@
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="text-right ">
<asp:LinkButton ID="BtnVerMasBancos" runat="server" Text="Ver Más" OnClick="BtnVerMasBancos_Click" class="btn btn-primary" />
@@ -6534,6 +6549,18 @@
"mask": "(999) 999-9999"
});
});--%>
if (<%= Me.CveCliente %> > 0) {
//CARGA EL HISTORIAL DE VENTAS
$("#C_Tab_TabHis_tab").click(function () { CargaHistorialVentas(); });
//CARGA EL CXC
$("#C_Tab_TabCxC_tab").click(function () { CargaCxC(); });
//CARGA ANTICIPOS
$("#C_Tab_TabAnticipos_tab").click(function () { CargaAnticipos(); });
//CARGA BANCOS
$("#C_Tab_TabBancos_tab").click(function () { CargaBancos(); });
}
}
$(document).on('mouseenter', ".truncate", function () {
var $this = $(this);
@@ -6706,6 +6733,23 @@
$get("HdnCuenta").value = op;
$("#BtnCargarCuentas").click();
}
function CargaCxC() {
$('#BtnCargaCxC').click();
}
function CargaAnticipos() {
$('#BtnCargaAnticipos').click();
}
function CargaBancos() {
$('#BtnCargaBancos').click();
}
function CargaHistorialVentas() {
$('#BtnHistorialVentas').click();
}
function LimpiaModal() {
$('#<%= TxtEnvioDireccion.ClientID %>').val('');
$('#<%= TxtEnvioNoExt.ClientID %>').val('');

View File

@@ -25,9 +25,9 @@ Partial Class Clientes
Private Opcion As Integer
<PersistenceModeAttribute(PersistenceMode.InnerProperty)>
Public ReadOnly Property RowStyle As TableItemStyle
Private ReadOnly Property CveCliente As Integer
Public ReadOnly Property CveCliente As Integer
Get
Return ViewState("CveCliente").ToString().ToEntero()
Return If(IsNothing(ViewState("CveCliente")), "-1", ViewState("CveCliente").ToString()).ToEntero()
End Get
End Property
Private Property DTCuentasBancos As DataTable
@@ -685,7 +685,7 @@ Partial Class Clientes
CreaDtPago()
RegistraScript("CargaHeader();")
CargaEstados()
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
TabFiscalContable.Visible = True
@@ -767,7 +767,7 @@ Partial Class Clientes
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta del Cliente:"
CargaDatosContrato()
'CargaDatosContrato()
'ImgAddVenta
@@ -815,6 +815,7 @@ Partial Class Clientes
'CargaCuentasyConceptos()
Else
'Configuración de Modalidad Insert
CargaEstados()
If UsuarioActual.Empresa.Funcionalidad(525) = "1" Then
Dim ObjClientes As New ClsClientes
@@ -1377,13 +1378,13 @@ Partial Class Clientes
If ObjCorporativo.DtResultados.Rows.Count > 0 Then
Dim dt As DataTable = ObjCorporativo.DtResultados
DdlCorporativo.DataSource = dt
DdlCorporativo.DataBind()
DdlCorporativo.Items.Insert(0, New ListItem("Seleccione", "-1"))
Else
DdlCorporativo.DataSource = Nothing
End If
End If
ObjCorporativo.Dispose()
DdlCorporativo.DataBind()
End Sub
Protected Sub CargaCuentasExistentes()
'SELECTED VALUES
@@ -1400,6 +1401,7 @@ Partial Class Clientes
HeedarContable.Attributes.Remove("onclick")
UpFiscalContable.Update()
End Sub
Private Function CargaDatos() As Boolean
Dim watch As New Diagnostics.Stopwatch()
watch.Start()
@@ -1414,34 +1416,30 @@ Partial Class Clientes
CargaDocumentosVenta(CveCliente)
Dim RetSC As Boolean = CargaSucursalesCliente()
Dim RetCC As Boolean = CargaCotizaciones()
CargaHistorial()
CargaResumenHistorial()
Dim RetCxC As Boolean = CargaCxC()
CargaAnticipos()
CargaPersonalAsignado()
CargaUsuariosPortal()
CargaBancos()
CargaOrdenesServiciosCliente()
'CargaPersonalAsignado()
'CargaOrdenesServiciosCliente()
CargaImpuestosLocales()
CargaCuentasContablesDdls()
CargaResponsables()
CargaCondicionesEntrega()
'CargaClasificaciones()
CargaGridRetenciones()
' CargaGridRetenciones()
' CargaDocs()
CargaCombos()
CargaDocumentacionCliente()
'CargaMetodosPago33()
'CargaFormaPago33()
'CargaComboCFDI()
CargarPagosNoBancarios()
'CargarPagosNoBancarios()
If UsuarioActual.TienePermisoProceso(279) Then
LnkPorcentajeMarcas.Visible = True
LnkPorcentajePrecios.Visible = True
End If
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
If UsuarioActual.Empresa.CvePlataforma = 3 Then ' SI ES USUARIO DE GPS.
@@ -1587,8 +1585,8 @@ Partial Class Clientes
HDLG.Value = If(ObjClientes.DtResultados(0)("LG").ToString() = "", "0", ObjClientes.DtResultados(0)("LG").ToString())
DdlPais.SelectedValueExist(ObjClientes.CvePais)
CargaEstado()
CargaEstado()
CargaEstados(ObjClientes.DtResultados(0)("SATPais").ToString())
@@ -1641,6 +1639,9 @@ Partial Class Clientes
'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0)
'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0)
'DIAS DE PAGO
If ObjClientes.RecepcionPagos <> "" AndAlso ObjClientes.RecepcionPagos.Length = 11 Then
Dim array As String() = ObjClientes.RecepcionPagos.Split(New Char() {"-"c})
@@ -1682,6 +1683,8 @@ Partial Class Clientes
TxtExtOtro.Text = ObjClientes.ExtOtros
If UsuarioActual.CveEmpresa.Contiene(119, 4, 7, 11, 12, 122, 145) Then
If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString())) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString()
If ObjClientes.IdCtaContAnticipos > 0 Then
DdlCtaContableAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContAnticipos), ObjClientes.IdCtaContAnticipos.ToString()))
@@ -1698,6 +1701,8 @@ Partial Class Clientes
If ObjClientes.IdCtaMonedaExtranjera > 0 Then DdlMonedaExtranjeraClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjera), ObjClientes.IdCtaMonedaExtranjera.ToString())) : DdlMonedaExtranjeraClientes.SelectedValue = ObjClientes.IdCtaMonedaExtranjera.ToString()
If ObjClientes.IdCtaMonedaExtranjeraAnticipos > 0 Then DdlMonedaExtranjeraAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjeraAnticipos), ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString())) : DdlMonedaExtranjeraAnticipos.SelectedValue = ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString()
ActivarRegistroAutomatico()
End If
'7eleven
TxtProveedor.Text = ObjClientes.SevenEleven_NumProveedor
@@ -1728,6 +1733,11 @@ Partial Class Clientes
Alert("El cliente actualmente se encuentra Inactivo.", TipoMensaje.MsgAdvertencia)
End If
'watch.Stop()
'Alert(watch.ElapsedMilliseconds.ToString())
'watch.Start()
CargaEventoBitacora()
'If UsuarioActual.Empresa.Funcionalidad(300) = "1" Then
' CargaCuentasConceptos()
@@ -1738,6 +1748,10 @@ Partial Class Clientes
' divCuentasContp.Visible = True
'End If
'watch.Stop()
'Alert(watch.ElapsedMilliseconds.ToString())
'watch.Start()
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
CargaCuentasConceptos()
divCuentas.Visible = True
@@ -1811,7 +1825,7 @@ Partial Class Clientes
End Function
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjClientes As New ClsClientes()
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
'Carga Grid
@@ -2059,6 +2073,10 @@ Partial Class Clientes
End If
ObjMovtos.Dispose()
GvBancos.DataBind()
CargarPagosNoBancarios()
UpBancos.Update()
End Sub
Protected Sub GvBancos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancos.RowDataBound
@@ -5787,7 +5805,7 @@ Partial Class Clientes
If ObjContabilidad.GetCuentas(Id, "-1", -1) Then
Retorno = ObjContabilidad.DtResultados.FiltroPrimeroValor("CtaCodigo")
End If
ObjContabilidad.Dispose()
Return Retorno
End Function
Private Sub SetValues()
@@ -8409,18 +8427,18 @@ Partial Class Clientes
DdlUsuario.DataBind()
'Carga Productos
DdlPSFiltro.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
DdlPSFiltro.setEsWebService(True)
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
'If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlPSFiltro.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacionFilto.SelectedValue)
DdlPSFiltro.SelectedText = ""
DdlPSFiltro.SelectedValue = "-1"
Else
DdlPSFiltro.ddl.Items.Clear()
DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero())
DdlPSFiltro.ddl.DataBind()
DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
'Else
' DdlPSFiltro.ddl.Items.Clear()
' DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero())
' DdlPSFiltro.ddl.DataBind()
' DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
'End If
CargaGrupo()
CargaTipoCentroCosto()
@@ -10381,9 +10399,9 @@ Partial Class Clientes
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetClientesPersonalEntrega(-1, CveCliente, UsuarioActual.CveEmpresa, -1) Then
GvClentesPersonalEntrega.DataSource = ObjVentas.DtResultados
GvClentesPersonalEntrega.DataBind()
End If
ObjVentas.Dispose()
GvClentesPersonalEntrega.DataBind()
End Sub
Protected Sub BtnAgregarClientePersonalEntrega_Click(sender As Object, e As EventArgs) Handles BtnAgregarClientePersonalEntrega.Click
@@ -10439,7 +10457,7 @@ Partial Class Clientes
Private Sub CargaResumenHistorial()
Dim ObjClientes As New ClsClientes()
If ObjClientes.GetHistorialVentas(CveCliente, -1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, -1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
Dim Cantidad As Double
@@ -10627,5 +10645,32 @@ Partial Class Clientes
CargaDispositivos(DdlEstatusDispositivos.SelectedValue.ToEntero())
End Sub
Protected Sub BtnCargaCxC_Click(sender As Object, e As EventArgs)
If CveCliente > 0 Then
CargaCxC()
UpDatos.Update()
End If
End Sub
Protected Sub BtnHistorialVentas_Click(sender As Object, e As EventArgs)
If CveCliente > 0 Then
CargaCotizaciones()
CargaHistorial()
CargaResumenHistorial()
UpnHistorial.Update()
UpDatos.Update()
End If
End Sub
Protected Sub BtnCargaAnticipos_Click(sender As Object, e As EventArgs)
If CveCliente > 0 Then
CargaAnticipos()
End If
End Sub
Protected Sub BtnCargaBancos_Click(sender As Object, e As EventArgs)
If CveCliente > 0 Then
CargaBancos()
UpDatos.Update()
End If
End Sub
End Class

View File

@@ -1018,7 +1018,13 @@
<div class="row">
<label class="col-md-4 truncate">Peso en Kg:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px"></asp:TextBox>
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px" Class="form-control input-sm"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Dimensiones:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDimensiones" runat="server" Width="120px" Class="form-control input-sm"></asp:TextBox>
</div>
</div>
</div>

View File

@@ -812,6 +812,7 @@ Partial Class ProductosyServicios
If ObjProductosServicios.PesoKg > 0 Then
TxtPesoKg.Text = ObjProductosServicios.PesoKg.ToString
End If
TxtDimensiones.Text = ObjProductosServicios.Dimensiones
DdlTipoPSDes.SelectedValueExist(ObjProductosServicios.CveClasificacionDetalle.ToString)
DdlUnidadMedida.SelectedValue = ObjProductosServicios.CveUnidadMedida.ToString
@@ -939,10 +940,9 @@ Partial Class ProductosyServicios
ChkLote.Checked = ObjProductosServicios.AplicaLote
ChkCaducidad.Checked = ObjProductosServicios.AplicaCaducidad
ChkSeccion.Checked = ObjProductosServicios.AplicaSeccion
If ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad") IsNot Nothing Then
TxtTiempoCaducidad.Text = ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad").ToString()
DivTiempoCaducidad.Visible = ChkCaducidad.Checked
End If
If ObjProductosServicios.AplicaSeccion Then
CargaGvSeccionAlmacen()
@@ -1330,7 +1330,7 @@ Partial Class ProductosyServicios
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal) > 0 Then
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1380,7 +1380,7 @@ Partial Class ProductosyServicios
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal) Then
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True
@@ -2187,6 +2187,8 @@ Partial Class ProductosyServicios
' CargaClasificacionesDetalles()
End If
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
Try
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
If Boolean.Parse(Dr("EsAcumulador").ToString) Then
@@ -2201,6 +2203,11 @@ Partial Class ProductosyServicios
Catch ex As Exception
OnError("Ocurrió un error al mostrar los tamaños", ex)
End Try
End If
End Sub
Private Sub MostarOcultarDivTamanio(Mostrar As Boolean)

View File

@@ -484,9 +484,9 @@
<asp:Literal ID="LtlFacturaCotizacion" runat="server" Text='<%# Eval("FolioVenta") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="F. Ejecución" Visible="false">
<asp:TemplateField HeaderText="Saldo" Visible="false" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlFEjecucion" runat="server" Text='<%# Eval("FechaEjecucion", "{0:d}") %>'></asp:Literal>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>' ></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -660,9 +660,12 @@
<td style="text-align: left;">
<asp:CheckBox ID="ChkMoneda" runat="server" Text="Moneda" Checked ="true" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkFechaEjecucion" runat="server" Text="Fecha Ejecución" /></td>
<asp:CheckBox ID="ChkSaldo" runat="server" Text="Saldo" Checked ="false" /></td>
</td>
</tr>
</tbody>
</table>

View File

@@ -803,7 +803,7 @@ Partial Class RepVentaDetalle
GvDatos.Columns(32).Visible = ChkFolioFacturacion.Checked
GvDatos.Columns(33).Visible = ChkFechaEjecucion.Checked
GvDatos.Columns(33).Visible = ChkSaldo.Checked
Personalizo = 1
If Personalizo = 1 Then

View File

@@ -2435,15 +2435,15 @@ Partial Class Ventas
LnkImprimirFormatoTelcel.Visible = True
End If
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
Dim ObjInventario As New ClsInventarios
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
DivDevAlm.Visible = True
End If
End If
ObjInventario.Dispose()
End If
'If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
' Dim ObjInventario As New ClsInventarios
' If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
' If ObjInventario.DtResultados.Rows.Count > 0 Then
' DivDevAlm.Visible = True
' End If
' End If
' ObjInventario.Dispose()
'End If
End If
@@ -2770,7 +2770,7 @@ Partial Class Ventas
CargaFormatoSucursal()
InicializaDevolucionAlmacen()
CargaOtrosConceptos()
'CargaOtrosConceptos()
CargaFacturaOC()
'SELECCIONA SUCURSAL DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
@@ -6003,7 +6003,7 @@ Partial Class Ventas
DivVentasUsados.Visible = True
Dim ObjClientes As New ClsClientes
If ObjClientes.GetHistorialVentas(CveCliente, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1) Then
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1) Then
DdlVentaUsado.DataSource = ObjClientes.DtResultados.FiltraParametros("UsadoMarcado = 0")
End If
ObjClientes.Dispose()
@@ -6089,7 +6089,7 @@ Partial Class Ventas
End Sub
Private Sub CargaFacturasARelacionar()
Using ObjClientes As New ClsClientes
If ObjClientes.GetHistorialVentas(Me.CveCliente, TipoDocto:="Ing") Then
If ObjClientes.GetHistorialVentas(Me.CveCliente, UsuarioActual.CveEmpresa, TipoDocto:="Ing") Then
DdlFacturaARelacionar.DataSource = ObjClientes.DtResultados
End If
End Using
@@ -6216,7 +6216,7 @@ Partial Class Ventas
Dim ValorAutorizacion As String = UsuarioActual.Empresa.Funcionalidad(595)
'OBLIGAR PAGO DE CONTADO SI EL CLIENTE NO PERMITE CREDITO
If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta <= 0 Then
If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot") AndAlso EsCreaApartirDe)) Then
RBLPago.SelectedValue = "2"
RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing)
@@ -6234,12 +6234,14 @@ Partial Class Ventas
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
LnkPedido2SinFacturar.Visible = False
LnkCotizaciones.Visible = False
BtnsFacturar.Visible = False
End If
UPCondicionesPago.Update()
'CARGAR CREDITO DISPONIBLE AL GENERAR UNA FACTURA
End If
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0 AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito Then
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
RBLPago.SelectedValue = "1"
RBLPago_SelectedIndexChanged(Nothing, Nothing)
@@ -6252,7 +6254,7 @@ Partial Class Ventas
LblCreditoDisponible.Text = CreditoDispo.FormatoNumero
If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%"
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") AndAlso (Not UsuarioActual.Empresa.Funcionalidad(702).Contiene("2")) Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
@@ -6288,8 +6290,9 @@ Partial Class Ventas
' el cliente tiene crédito disponible, no tiene bloqueo
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("PA"))
If UsuarioActual.TienePermisoProceso(60) Then DdlTipoComprobante.SelectedValueExistInsert("Ing", "Ingresos") 'puede facturar
If UsuarioActual.TienePermisoProceso(199) Then DdlTipoComprobante.SelectedValueExistInsert("Rem", "Remisión") ' puede remisionar
If UsuarioActual.TienePermisoProceso(60) Then DdlTipoComprobante.SelectedValueExistInsert("Ing", "Ingresos") 'puede facturar
DdlTipoComprobante.SelectedValueExist(UsuarioActual.CveTipoDocumento)
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
@@ -6301,7 +6304,7 @@ Partial Class Ventas
'GENERAR AUTORIZACION SI TIENE EXCEDIO EL LIMITE DE CREDITO
Select Case ValorAutorizacion
Case "1" 'CREAR DOCUMENTO DE AUTORIZACION PA
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") AndAlso Not (UsuarioActual.Empresa.Funcionalidad(702).Contiene("2")) Then
'VERIFICAR CANDADOS DE VENTA, REMISIONES SIN FACTURAR, FACTURAS QUE NO TENGAN VENCIDAS
Dim Vta As New ClsVentas
@@ -6311,6 +6314,7 @@ Partial Class Ventas
If Opcion > 0 Then
If Opcion = 1 Then
BtnEmitirImprimir.Visible = False
BtnsFacturar.Visible = False
End If
If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
Else
@@ -6387,7 +6391,7 @@ Partial Class Ventas
End If
'Puede hacer pedido
If Me.CveVenta <= 0 Then
If CveVenta <= 0 Then
If Not UsuarioActual.TienePermisoProceso(177) Then
If DdlTipoComprobante.Items.FindByValue("Pd2") IsNot Nothing Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
@@ -6734,7 +6738,7 @@ Partial Class Ventas
Dim CveSATNC = "84111506"
Dim dtt As New DataTable
dtt = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
dtt = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CodigoSATPS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
If dtt IsNot Nothing Then
DdlNCPS.DataSource = dtt
@@ -7645,6 +7649,8 @@ Partial Class Ventas
'No exceder el limite de credito, Si no tiene contrato limita el credito, si tiene no hace nada. Si no tiene remisiones tampoco hace nada.
If (Not CveContrato > 0 Or CveContratoTipo.Contiene(28)) AndAlso (Not NuevaFactura = 1) AndAlso RBLPago.SelectedValue = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") AndAlso RemisionesLista.Count <= 0 AndAlso TxtTotal.Text.ToDecimal > 0 AndAlso Not CvePedidoA > 0 Then
'If UsuarioActual.Empresa.Funcionalidad(518) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(185) Then
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
Dim ObjVentas As New ClsVentas
If ObjVentas.ObtenerCreditoRestante(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero()) Then
@@ -7675,6 +7681,8 @@ Partial Class Ventas
Exit Sub
End If
ObjVentas.Dispose()
End If
'End If
End If
@@ -8196,7 +8204,7 @@ Partial Class Ventas
Dim CveVentaAnterior As Integer = Me.CveVenta
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS,
ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion)
ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion, CveAnticipoPadre:=CveAnticipoPadre)
'Agregamos las OCs a la tabla
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso DTOrdenesCompraPS IsNot Nothing AndAlso DTOrdenesCompraPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
@@ -10048,6 +10056,11 @@ Partial Class Ventas
'CLIENTE
ObjFactura.CveCliente = CveCliente
ObjFactura.SetCliente()
ObjFactura.CveEmpresaCRM = CveEmpresaCRM
If CveCliente = -1 And CveEmpresaCRM > 0 Then
ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
ObjFactura.Cliente.RFC = LblRFCCRM.Text
End If
'SUCURSAL
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
@@ -11171,7 +11184,7 @@ Partial Class Ventas
#Region " GUARDAR - VENTA, PREPOLIZAS, INV, ESTIMACIONES, AC, NOTA DE CRÉDITO "
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer,
ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing,
ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing)
ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional CveAnticipoPadre As Integer = -1)
Dim Msgok As New StringBuilder
Dim CveAlmacenTraspasoOrigen As Integer = -1
@@ -11277,7 +11290,7 @@ Partial Class Ventas
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 Then
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
If DtVentasNC IsNot Nothing Then
For Each row As DataRow In DtVentasNC.Rows
If Not row("CveVenta").ToString().ToEntero() = -1 Then
@@ -11287,6 +11300,7 @@ Partial Class Ventas
End If
Next
Else
'SI ES REFACTURACION DEBE AGREGAR LA VENTA ANTERIOR COMO RELACIONADA TAMBIEN
If Not CveVenta = -1 Then
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVenta) Then
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
@@ -11298,6 +11312,14 @@ Partial Class Ventas
End If
End If
End If
'SI TIENE UN ANTICIPO TAMBIEN DEBE RELACIONARLO
If CveAnticipoPadre > 0 Then
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveAnticipoPadre) Then
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
End If
End If
End If
End If
@@ -13824,7 +13846,7 @@ Partial Class Ventas
CreaObjetosVenta(True)
If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then
If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
Alert("Ocurrió un error al procesar los datos para la vista previa. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
ObjFactura = Nothing
Exit Sub
@@ -18142,7 +18164,7 @@ Partial Class Ventas
End Sub
Private Sub SetPermisos()
If CveVenta < 1 Then
If CveVenta < 1 OrElse EsCreaApartirDe Then
'Puede cotizar
If Not UsuarioActual.TienePermisoProceso(59) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
@@ -18933,13 +18955,6 @@ Partial Class Ventas
End If
End If
If Not OcurrioError AndAlso ConSalida Then
'Esquema viejo, evitamos que aparezca por surtir
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
OcurrioError = True
End If
End If
End If
End If
@@ -19108,6 +19123,23 @@ Partial Class Ventas
'COMIENZA: VENTADETALLE
'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION
Dim CveVentaDetalle = If(ConceptoEntrada.Contiene(3, 40), TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero(), MovDet("CveVentaDetalle").ToString().ToEntero())
Dim CveVentaDetallePadre As Integer = -1
'If ConceptoEntrada = 3 Then
' CveVentaDetalle = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero()
'ElseIf ConceptoEntrada = 40 Then
' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero()
' CveVentaDetallePadre = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero()
' 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
' If CveVentaDetallePadre < 0 Then
' Alert("no se encontro la venta detalle nueva. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
' OcurrioError = True
' Exit For
' End If
'Else
' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero()
'End If
'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
If CveVentaDetalle < 0 Then
Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
@@ -19128,7 +19160,7 @@ Partial Class Ventas
CveMovimientoDetalleEntrada = MovDet("CveMovimientoDetalle").ToString().ToEntero()
End If
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, CveVentaDetallePadre:=CveVentaDetallePadre) Then
ContadorMovtosDetalles += 1
Else
OcurrioError = True
@@ -21344,6 +21376,11 @@ Partial Class Ventas
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
If ObjInv.DtResultados.Rows.Count > 0 Then
CargaGVInv(ObjInv.DtResultados)
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
DivDevAlm.Visible = True
End If
End If
End If
ObjInv.Dispose()
@@ -23101,7 +23138,7 @@ Partial Class Ventas
RequiereAlmacenDestino = True
DdlAlmacenAsignado.Items.Clear()
DdlAlmacenAsignado.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
DdlAlmacenAsignado.SelectedValue = "-1"
DdlAlmacenAsignado.SelectedValueExist("-1")
DdlAlmacenAsignado.DataBind()
DdlAlmacenAsignado.Items.Insert(0, New ListItem("Almacen", DbRowVenta("CveAlmacenTraspasoOrigen").ToString()))
DdlAlmacenAsignado.SelectedValueExist(DbRowVenta("CveAlmacenTraspasoOrigen").ToString())
@@ -29831,6 +29868,8 @@ Partial Class Ventas
GvPS.Columns(17).Visible = True
GvPS.Columns(18).Visible = True
SetPermisos()
CambiaTipoDocto()
CambiaSucursalGeneral(RecargarPartidas:=False)
CargaAnticipos(CveCliente)