--
This commit is contained in:
@@ -610,9 +610,9 @@
|
|||||||
<label class=" control-label">AF Padre:</label>
|
<label class=" control-label">AF Padre:</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-8">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<asp:DropDownList ID="DdlAFPadres" runat="server" AppendDataBoundItems="true" DataTextField="Codigo" DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlAFPadres" runat="server" AppendDataBoundItems="true" DataTextField="CodigoDescripcion" DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -151,6 +151,10 @@
|
|||||||
<asp:ListItem Text="Sin Responsable" Value="-3"></asp:ListItem>
|
<asp:ListItem Text="Sin Responsable" Value="-3"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-1">AF Padre:</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlAFPadres" runat="server" AppendDataBoundItems="true" DataTextField="CodigoDescripcion" DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Partial Class AF_CatAF
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
ViewState("CveActivoFijo") = -1
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaCaracteristicas()
|
CargaCaracteristicas()
|
||||||
|
|
||||||
@@ -129,7 +129,24 @@ Partial Class AF_CatAF
|
|||||||
CargarTipoActivoFijo()
|
CargarTipoActivoFijo()
|
||||||
CargaGrupos()
|
CargaGrupos()
|
||||||
CargaResponsable()
|
CargaResponsable()
|
||||||
|
CargaAFPadres()
|
||||||
End Sub
|
End Sub
|
||||||
|
Public Sub CargaAFPadres()
|
||||||
|
Dim ObjAF As New ClsAF()
|
||||||
|
|
||||||
|
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||||
|
|
||||||
|
DdlAFPadres.DataSource = ObjAF.DtResultados
|
||||||
|
DdlAFPadres.DataBind()
|
||||||
|
|
||||||
|
DdlAFPadres.Items.Remove(DdlAFPadres.Items.FindByValue(CveActivoFijo.ToString))
|
||||||
|
DdlAFPadres.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjAF.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaGrupos()
|
Private Sub CargaGrupos()
|
||||||
Dim ObjAF As New ClsAF
|
Dim ObjAF As New ClsAF
|
||||||
@@ -262,7 +279,8 @@ Partial Class AF_CatAF
|
|||||||
If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador)
|
If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador)
|
||||||
|
|
||||||
Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=CveCliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero) Then
|
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero,
|
||||||
|
DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, CveCliente:=Cvecliente, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, BuscaPorAFPadre:=DdlAFPadres.SelectedValue.ToEntero) Then
|
||||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||||
DtActivosFijos = ObjAF.DtResultados
|
DtActivosFijos = ObjAF.DtResultados
|
||||||
'GvDatos.DataSource = ObjAF.DtResultados
|
'GvDatos.DataSource = ObjAF.DtResultados
|
||||||
|
|||||||
@@ -1875,7 +1875,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Public Function RepMovimientos(CveEmpresa As Integer, CveMoneda As Integer, FechaI As String, FechaF As String, CveConcepto As Integer, CveProveedor As Integer, Almacenes As String,
|
Public Function RepMovimientos(CveEmpresa As Integer, CveMoneda As Integer, FechaI As String, FechaF As String, CveConcepto As Integer, CveProveedor As Integer, Almacenes As String,
|
||||||
CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, Optional CveMarca As String = "-1", Optional CvePersonal As Integer = -1,
|
CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, Optional CveMarca As String = "-1", Optional CvePersonal As Integer = -1,
|
||||||
Optional CveClasificacion2 As Integer = -1, Optional CveTipoAlmacen As String = "-1", Optional Modalidad As Integer = -1) As Boolean
|
Optional CveClasificacion2 As Integer = -1, Optional CveTipoAlmacen As String = "-1", Optional Modalidad As Integer = -1, Optional CodigoInicio As String = "-1", Optional CodigoFin As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_ReporteMovimientos")
|
DataAdapter("PA_Inv_ReporteMovimientos")
|
||||||
@@ -1898,6 +1898,8 @@ Public Class ClsInventarios
|
|||||||
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
|
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
|
||||||
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
|
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
|
||||||
.Add("@Modalidad", SqlDbType.Int).Value = Modalidad
|
.Add("@Modalidad", SqlDbType.Int).Value = Modalidad
|
||||||
|
.Add("@CodigoInicio", SqlDbType.VarChar).Value = CodigoInicio
|
||||||
|
.Add("@CodigoFin", SqlDbType.VarChar).Value = CodigoFin
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -2633,7 +2633,7 @@ Public Class ClsOC
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer) As Boolean
|
Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_OC_PendientesCompra")
|
DataAdapter("PA_OC_PendientesCompra")
|
||||||
|
|
||||||
@@ -2641,6 +2641,7 @@ Public Class ClsOC
|
|||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos
|
.Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -2653,7 +2654,7 @@ Public Class ClsOC
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer) As Boolean
|
Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_OC_CancelarPartidaPendiente")
|
DataAdapter("PA_OC_CancelarPartidaPendiente")
|
||||||
|
|
||||||
@@ -2661,6 +2662,7 @@ Public Class ClsOC
|
|||||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
|
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
|
||||||
.Add("@NuevaCantidad", SqlDbType.Decimal).Value = NuevaCantidad
|
.Add("@NuevaCantidad", SqlDbType.Decimal).Value = NuevaCantidad
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -9728,14 +9728,17 @@ Public Class ClsPaginas
|
|||||||
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' N O T A D E C R E D I T O
|
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' N O T A D E C R E D I T O
|
||||||
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||||
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, Pago.CveMonedaPago, True, 2)
|
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, Pago.CveMonedaPago, True, 2)
|
||||||
|
|
||||||
|
Dim CveClienteAplicacion As Integer = If(Pago.CveClientePago > 0, Pago.CveClientePago, VentaActual.CveCliente)
|
||||||
|
|
||||||
If Pago.CveMonedaPago > 1 Then
|
If Pago.CveMonedaPago > 1 Then
|
||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=CveClienteAplicacion, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, ConPrePNC.CveConceptoComplementario, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, ConPrePNC.CveConceptoComplementario, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=CveClienteAplicacion, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=CveClienteAplicacion, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' I N G R E S O S X C O M P R O B A R
|
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' I N G R E S O S X C O M P R O B A R
|
||||||
|
|||||||
@@ -183,6 +183,25 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetMovimientosDepositoCaja(CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_MovimientosDepositoVentaGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los datos de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function AgroOrdenProduccionUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, CveOrdenProduccion As Int32) As Boolean
|
Public Function AgroOrdenProduccionUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, CveOrdenProduccion As Int32) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_AGRO_OrdenProduccionUpvta", CommandType.StoredProcedure)
|
DataAdapter("PA_AGRO_OrdenProduccionUpvta", CommandType.StoredProcedure)
|
||||||
@@ -6044,7 +6063,7 @@ Public Class ClsVentas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0, Optional CveVenta As Integer = -1, Optional CveIE As Integer = -1) As Boolean
|
Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0, Optional CveVenta As Integer = -1, Optional CveIE As Integer = -1, Optional CveTipoVenta As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_AutorizacionLimitesAdd")
|
DataAdapter("PA_Vta_AutorizacionLimitesAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -6061,6 +6080,7 @@ Public Class ClsVentas
|
|||||||
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
|
.Add("@Motivo", SqlDbType.VarChar).Value = Motivo
|
||||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||||
|
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -6071,6 +6091,22 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetAutorizacion(CveAutorizacion As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_AutorizacionGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error la autorización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_AutorizacionLimitesGet")
|
DataAdapter("PA_Vta_AutorizacionLimitesGet")
|
||||||
@@ -7671,6 +7707,26 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetSMSIndicadores(Opcion As Integer, FechaInicio As Date, FechaFin As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_SMS_IndicadoresGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
|
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||||
|
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los indicadores de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3290,12 +3290,10 @@
|
|||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px">
|
<asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px">
|
||||||
<asp:ListItem Value="-1">-</asp:ListItem>
|
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||||
<asp:ListItem Value="1">Fecha Factura</asp:ListItem>
|
<asp:ListItem Value="1" Selected="True">Fecha Factura</asp:ListItem>
|
||||||
<asp:ListItem Value="2">Fecha Entrada</asp:ListItem>
|
<asp:ListItem Value="2">Fecha Entrada</asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlTipoFechaVencimiento" InitialValue="-1" runat="server" ControlToValidate="DdlTipoFechaVencimiento" Display="None"
|
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Fecha Vencimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlTipoFechaVencimiento" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoFechaVencimiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label>
|
<label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -425,42 +425,17 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-5">
|
||||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-1">
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpAddWishList" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div runat="server" id="DVWishList" visible="false">
|
|
||||||
<table style="width:170px!important" >
|
|
||||||
<td style="width:70px!important">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox runat="server" ID="TxtCantidad" Width="70px" CssClass="form-control"></asp:TextBox>
|
|
||||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td style="width:100px!important">
|
|
||||||
<asp:LinkButton ID="LnkAgrgarWishList" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkAgrgarWishList_Click" Width="91px"><i class="fa fa-shopping-cart" aria-hidden="true"></i> Agregar</asp:LinkButton>
|
|
||||||
</td>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="col-md-1" style="text-align:right!important">
|
<div class="col-md-1" style="text-align:right!important">
|
||||||
<div id="DivIndicadorL1" runat="server" visible="false" >
|
<div id="DivIndicadorL1" runat="server" visible="false" >
|
||||||
@@ -497,11 +472,51 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAddWishList" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div runat="server" id="DVWishList" visible="false" style="margin-top:-3PX">
|
||||||
|
<table style="width: 220px!important">
|
||||||
|
<td style="width: 50px!important">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div style="color: gray; font-size: 12px; font-weight: bold;">
|
||||||
|
REQ
|
||||||
|
</div>
|
||||||
|
<div style="color: blue; font-size: 20px; font-weight: bold;">
|
||||||
|
<asp:LinkButton ID="LnkIndicador_REQ" Text="0" OnClick="LnkIndicador_REQ_Click" runat="server" CssClass="Texto" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="width: 70px!important">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox runat="server" ID="TxtCantidad" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||||
|
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890.-" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="width: 100px!important">
|
||||||
|
<asp:LinkButton ID="LnkAgrgarWishList" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkAgrgarWishList_Click" Width="91px"><i class="fa fa-shopping-cart"></i> Agregar</asp:LinkButton>
|
||||||
|
</td>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -651,7 +666,7 @@
|
|||||||
<div class="modal-content" style="width:500px;">
|
<div class="modal-content" style="width:500px;">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<h4 class="modal-title">
|
<h4 class="modal-title">
|
||||||
<asp:Literal ID="Literal3" Text="OC Pendientes por Recibir" runat="server"> </asp:Literal></h4>
|
<asp:Literal ID="LtlModalOC" Text="OC Pendientes por Recibir" runat="server"> </asp:Literal></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row" >
|
<div class="row" >
|
||||||
|
|||||||
@@ -32,6 +32,20 @@ Partial Class Inventarios_Kardex
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Property TipoCancelacion As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("TipoCancelacion") Is Nothing Then
|
||||||
|
ViewState("TipoCancelacion") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("TipoCancelacion").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
ViewState("TipoCancelacion") = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -298,58 +312,66 @@ Partial Class Inventarios_Kardex
|
|||||||
GvM.DataSource = DtTemp
|
GvM.DataSource = DtTemp
|
||||||
GvM.DataBind()
|
GvM.DataBind()
|
||||||
UpAcciones.Update()
|
UpAcciones.Update()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa <> 119 Then
|
If UsuarioActual.CveEmpresa <> 119 Then
|
||||||
|
Dim drPs As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("", "")
|
||||||
Dim drPs As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "")
|
|
||||||
|
|
||||||
If drPs IsNot Nothing Then
|
If drPs IsNot Nothing Then
|
||||||
Dim NumeroParte As String = drPs("NumeroParte").ToString
|
Dim NumeroParte As String = drPs("NumeroParte").ToString
|
||||||
Dim Codigo As String = drPs("Codigo").ToString
|
Dim PS As String = drPs("PSCodigo").ToString
|
||||||
Dim PS As String = drPs("PS").ToString
|
LblNumeroParte.Visible = True
|
||||||
|
|
||||||
If NumeroParte.Trim.Length > 0 Then
|
If NumeroParte.Trim.Length > 0 Then
|
||||||
If UsuarioActual.TienePermisoPagina(13) Then
|
If UsuarioActual.TienePermisoPagina(13) Then
|
||||||
LblNumeroParte.Text = $" Producto: <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{Codigo}</a> - <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{NumeroParte}</a> - <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{PS}</a>"
|
LblNumeroParte.Text = $" Producto: <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{NumeroParte}</a> - <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{PS}</a>"
|
||||||
Else
|
Else
|
||||||
LblNumeroParte.Text = $" Producto: {NumeroParte}"
|
LblNumeroParte.Text = $" Producto: {NumeroParte}"
|
||||||
End If
|
End If
|
||||||
LblNumeroParte.Visible = True
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
|
Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpNumeroParte.Update()
|
UpNumeroParte.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargarOCPendientesCompra()
|
|
||||||
|
Private Sub CargarOCPendientesCompra(Opcion As Integer, Optional CargaGrid As Boolean = False) ' Opcion1 OC, 2 REQ
|
||||||
|
|
||||||
|
|
||||||
Dim tCveSubProyectos As String = "-1"
|
Dim tCveSubProyectos As String = "-1"
|
||||||
If ddlAlmacen.SelectedValue <> "" Then
|
If ddlAlmacen.SelectedValue <> "" Then
|
||||||
Dim tt As String = ddlAlmacen.GetSelectedValues()
|
Dim tt As String = ddlAlmacen.GetSelectedValues()
|
||||||
tCveSubProyectos = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen IN ({tt})").DataColumnToString("CveSubProyecto")
|
tCveSubProyectos = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen IN ({tt})").DataColumnToString("CveSubProyecto")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then
|
If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa, Opcion:=Opcion) Then
|
||||||
GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc")
|
|
||||||
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
If CargaGrid Then
|
||||||
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Opcion = 1 Then
|
||||||
|
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||||
|
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||||
|
ElseIf Opcion = 2 Then
|
||||||
|
LnkIndicador_REQ.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString().ToDecimal.RoundSQL(2).ToString("###,###.##")
|
||||||
|
If LnkIndicador_REQ.Text = "" Then
|
||||||
|
LnkIndicador_REQ.Text = "0"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjOC.Dispose()
|
ObjOC.Dispose()
|
||||||
GvOC.DataBind()
|
GvOC.DataBind()
|
||||||
UpModalOC.Update()
|
UpModalOC.Update()
|
||||||
UpOCS.Update()
|
UpOCS.Update()
|
||||||
|
UpAddWishList.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -463,7 +485,8 @@ Partial Class Inventarios_Kardex
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
CargarOCPendientesCompra()
|
CargarOCPendientesCompra(1)
|
||||||
|
CargarOCPendientesCompra(2)
|
||||||
CargaPreciosLista(CvePS)
|
CargaPreciosLista(CvePS)
|
||||||
DivIndicadorOC.Visible = True
|
DivIndicadorOC.Visible = True
|
||||||
DivIndicadorOC2.Visible = True
|
DivIndicadorOC2.Visible = True
|
||||||
@@ -833,8 +856,19 @@ Partial Class Inventarios_Kardex
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Protected Sub LnkIndicador_OC_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkIndicador_OC_Click(sender As Object, e As EventArgs)
|
||||||
UpModalOC.Update()
|
TipoCancelacion = 1
|
||||||
|
LtlModalOC.Text = "OC Pendientes por Recibir"
|
||||||
|
CargarOCPendientesCompra(1, True)
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
|
||||||
|
UpModalOC.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkIndicador_REQ_Click(sender As Object, e As EventArgs)
|
||||||
|
TipoCancelacion = 2
|
||||||
|
LtlModalOC.Text = "Requisiciones"
|
||||||
|
CargarOCPendientesCompra(2, True)
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
|
||||||
|
UpModalOC.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkCancelarOCDetalle_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCancelarOCDetalle_Click(sender As Object, e As EventArgs)
|
||||||
@@ -848,8 +882,14 @@ Partial Class Inventarios_Kardex
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa) Then
|
If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa, Opcion:=TipoCancelacion) Then
|
||||||
CargarOCPendientesCompra()
|
If TipoCancelacion = 1 Then
|
||||||
|
CargarOCPendientesCompra(1, True)
|
||||||
|
Else
|
||||||
|
CargarOCPendientesCompra(2, True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Alert("La partida se cancelo correctamente.")
|
Alert("La partida se cancelo correctamente.")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -910,7 +950,9 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
|
|
||||||
Protected Sub LnkAgrgarWishList_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAgrgarWishList_Click(sender As Object, e As EventArgs)
|
||||||
AgregarAWishList()
|
If AgregarAWishList() Then
|
||||||
|
CargarOCPendientesCompra(2)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function AgregarAWishList() As Boolean
|
Private Function AgregarAWishList() As Boolean
|
||||||
@@ -922,6 +964,7 @@ Partial Class Inventarios_Kardex
|
|||||||
Dim CveSubProyecto As Integer = -1
|
Dim CveSubProyecto As Integer = -1
|
||||||
Dim FolioOrdenCompra As String = ""
|
Dim FolioOrdenCompra As String = ""
|
||||||
Dim CveOrdenCompra As Integer = -1
|
Dim CveOrdenCompra As Integer = -1
|
||||||
|
Dim CveOrdenCompraDetalle As Integer = -1
|
||||||
Dim UltimoCosto As Decimal = 0D
|
Dim UltimoCosto As Decimal = 0D
|
||||||
Dim CveProveedorCompra As Integer = -1
|
Dim CveProveedorCompra As Integer = -1
|
||||||
Dim Cantidad As Decimal = TxtCantidad.Text.ToDecimal
|
Dim Cantidad As Decimal = TxtCantidad.Text.ToDecimal
|
||||||
@@ -934,12 +977,12 @@ Partial Class Inventarios_Kardex
|
|||||||
Dim PorcentajeRetIVA As Decimal = 0
|
Dim PorcentajeRetIVA As Decimal = 0
|
||||||
|
|
||||||
|
|
||||||
If Not Cantidad > 0 Then
|
'If Not Cantidad > 0 Then
|
||||||
Alert("Debe indicar una cantidad.", TipoMensaje.MsgAdvertencia)
|
' Alert("Debe indicar una cantidad.", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
' Return False
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If almacenStr.Length > 0 Then
|
If almacenStr.Length <> 0 Then
|
||||||
CveAlmacen = almacenStr(0).ToEntero
|
CveAlmacen = almacenStr(0).ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1001,15 +1044,32 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
If respuesta AndAlso CveOrdenCompra > 0 Then
|
If respuesta AndAlso CveOrdenCompra > 0 Then
|
||||||
|
|
||||||
|
If ObjOC.GetOrdenesDetalle(CveOrdenCompra, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim drOcDetalle As DataRow = ObjOC.DtResultados.FiltroPrimero($"CvePs={CvePS}")
|
||||||
|
If drOcDetalle IsNot Nothing Then
|
||||||
|
CveOrdenCompraDetalle = drOcDetalle("CveOrdenCompraDetalle").ToString.ToEntero
|
||||||
|
Cantidad = drOcDetalle("Cantidad").ToString.ToDecimal + Cantidad
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Total As Decimal = (Cantidad * UltimoCosto).RoundSQL
|
Dim Total As Decimal = (Cantidad * UltimoCosto).RoundSQL
|
||||||
Dim IVA As Decimal = (Total * PorcentajeIVA).RoundSQL
|
Dim IVA As Decimal = (Total * PorcentajeIVA).RoundSQL
|
||||||
RetIVA = IVA * PorcentajeRetIVA
|
RetIVA = IVA * PorcentajeRetIVA
|
||||||
RetISR = Total * PorcentajeRetISR
|
RetISR = Total * PorcentajeRetISR
|
||||||
|
|
||||||
If Not ObjOC.AddOrdenCompraDetalle(CveOrdenCompra, Cantidad, CveUnidadMedida, CvePS, UltimoCosto, CveSubProyecto, -1, "Obs", UsuarioActual.CveUsuario,
|
If CveOrdenCompraDetalle > 0 Then
|
||||||
IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR, Total:=Total, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=PorcentajeRetIVA, RetISRPorcentaje:=PorcentajeRetISR) Then
|
If Not ObjOC.UpdateOrdenCompraDetalle(Cantidad, CveUnidadMedida, CvePS, UltimoCosto, CveSubProyecto, -1, "Obs", UsuarioActual.CveUsuario, CveOrdenCompraDetalle, -1, 0, IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR,
|
||||||
respuesta = False
|
Total:=Total, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=PorcentajeRetIVA, RetISRPorcentaje:=PorcentajeRetISR) >= 0 Then
|
||||||
|
respuesta = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not ObjOC.AddOrdenCompraDetalle(CveOrdenCompra, Cantidad, CveUnidadMedida, CvePS, UltimoCosto, CveSubProyecto, -1, "Obs", UsuarioActual.CveUsuario,
|
||||||
|
IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR, Total:=Total, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=PorcentajeRetIVA, RetISRPorcentaje:=PorcentajeRetISR) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2498,7 +2498,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
'DETALLES
|
'DETALLES
|
||||||
Me.ObjRemisionNC.DtDetalle = CreaDTDetalleRNC()
|
Me.ObjRemisionNC.DtDetalle = Modelos.Factura.CreaDTFactura()
|
||||||
|
|
||||||
'GUARDAR AJUSTES
|
'GUARDAR AJUSTES
|
||||||
Me.ObjRemisionNC.DtAjustes = TmpDTAjustes
|
Me.ObjRemisionNC.DtAjustes = TmpDTAjustes
|
||||||
@@ -2649,99 +2649,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
Protected Function CreaDTDetalleRNC() As DataTable
|
|
||||||
Dim TmpDT As New DataTable
|
|
||||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("Codigo", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveUM", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("UM", GetType(String))
|
|
||||||
TmpDT.Columns.Add("SATClaveUM", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveClasificacion", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Clasificacion", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CvePS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("PS", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CodigoPS", GetType(String))
|
|
||||||
TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
|
|
||||||
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Serie", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CuentaPredial", GetType(String))
|
|
||||||
TmpDT.Columns.Add("Obs", GetType(String))
|
|
||||||
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
|
|
||||||
TmpDT.Columns.Add("PU", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("IVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("IEPS", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("Descuento", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
|
||||||
'Para uso del módulo contable
|
|
||||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
|
||||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("SubProyecto", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer))
|
|
||||||
|
|
||||||
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
|
|
||||||
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer))
|
|
||||||
'Contratos
|
|
||||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
|
||||||
'Remisiones a Facturas
|
|
||||||
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
|
|
||||||
|
|
||||||
'Pedido2 a Facturas
|
|
||||||
TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("Origen", GetType(Integer))
|
|
||||||
'Ordenes Servicio
|
|
||||||
TmpDT.Columns.Add("CveOS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveOSDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("SeFacturara", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Folio", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Estatus", GetType(String))
|
|
||||||
'Ordenamiento
|
|
||||||
TmpDT.Columns.Add("Orden", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("TipoDocto", GetType(String))
|
|
||||||
'OC
|
|
||||||
TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("CantidadFacturadaPed2", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("CantidadInventario", GetType(Decimal))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
|
|
||||||
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
|
|
||||||
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
|
||||||
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
|
||||||
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
|
||||||
TmpDT.Columns.Add("CantidadConversion", GetType(Integer))
|
|
||||||
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
|
||||||
|
|
||||||
Return TmpDT
|
|
||||||
End Function
|
|
||||||
Protected Sub CargaDTDetalleRNC()
|
Protected Sub CargaDTDetalleRNC()
|
||||||
|
|
||||||
For Each Row As GridViewRow In GvM.Rows
|
For Each Row As GridViewRow In GvM.Rows
|
||||||
|
|||||||
@@ -151,24 +151,15 @@
|
|||||||
<asp:ListItem Text="No Inventariable" Value="0"></asp:ListItem>
|
<asp:ListItem Text="No Inventariable" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-1 truncate" style="text-align: right!important">Grupo:</div>
|
<div class="col-md-1 truncate" style="text-align: right!important">Grupo:</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="input-small input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="input-small input-sm select2me" Width="100%">
|
||||||
<asp:ListItem Text="Almacen" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Almacen" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Clasificación" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Clasificación" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Tipo Almacen" Value="3"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ Partial Class Inventarios_RepAlmacen
|
|||||||
|
|
||||||
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero,
|
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero,
|
||||||
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then
|
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
GVAlmacen.DataSource = objInv.DtResultados
|
GVAlmacen.DataSource = objInv.DtResultados
|
||||||
TmpDT = objInv.DtResultados
|
TmpDT = objInv.DtResultados
|
||||||
End If
|
End If
|
||||||
@@ -122,7 +123,7 @@ Partial Class Inventarios_RepAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&CveClasificacion={e.Row.DataKey("CveClasificacion").ToEntero}&FechaInicio={e.Row.DataKey("FechaInicio").ToDate.ToString("dd/MM/yyyy")}&FechaCorte={e.Row.DataKey("FechaFin").ToDate.ToString("dd/MM/yyyy")}&Tipo=-1"
|
Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&CveClasificacion={e.Row.DataKey("CveClasificacion").ToEntero}&FechaInicio={e.Row.DataKey("FechaInicio").ToDate.ToString("dd/MM/yyyy")}&FechaCorte={e.Row.DataKey("FechaFin").ToDate.ToString("dd/MM/yyyy")}&CveTipoAlmacen={e.Row.DBCampo("CveTipoAlmacen")}&Tipo=-1"
|
||||||
e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
|
e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
|
||||||
|
|
||||||
'If DdlGrupo.SelectedValue.ToEntero = 1 Then
|
'If DdlGrupo.SelectedValue.ToEntero = 1 Then
|
||||||
|
|||||||
@@ -3,53 +3,55 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel ID="UPAcciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPAcciones" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o"></i> PDF</asp:LinkButton>
|
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o"></i> PDF</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkExcelPersonalizado" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel Personalizado</asp:LinkButton>
|
<asp:LinkButton ID="LnkExcelPersonalizado" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel Personalizado</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkFormatoInventario" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Generar Formato Inventario</asp:LinkButton>
|
<asp:LinkButton ID="LnkFormatoInventario" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Generar Formato Inventario</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
<%-- <li>
|
<%-- <li>
|
||||||
<asp:LinkButton ID="Lnkcompuxlsinventarios" OnClick="Lnkcompuxlsinventarios_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Inventarios HP</asp:LinkButton>
|
<asp:LinkButton ID="Lnkcompuxlsinventarios" OnClick="Lnkcompuxlsinventarios_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Inventarios HP</asp:LinkButton>
|
||||||
</li>--%>
|
</li>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkImprimir" />
|
<asp:PostBackTrigger ControlID="LnkImprimir" />
|
||||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
<asp:PostBackTrigger ControlID="LnkExcelPersonalizado" />
|
<asp:PostBackTrigger ControlID="LnkExcelPersonalizado" />
|
||||||
<asp:PostBackTrigger ControlID="LnkFormatoInventario" />
|
<asp:PostBackTrigger ControlID="LnkFormatoInventario" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
|
.dataTables_scrollHead {
|
||||||
|
background-color: #95A5A6;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.dataTables_scrollHead{
|
.table-scrollable {
|
||||||
background-color:#95A5A6;
|
margin-top: 0px !important;
|
||||||
color:white;
|
margin-bottom: 0px !important;
|
||||||
}
|
}
|
||||||
.table-scrollable{
|
|
||||||
margin-top:0px!important;
|
.dataTables_scroll {
|
||||||
margin-bottom:0px!important;
|
padding-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Totales a {
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
.dataTables_scroll{
|
|
||||||
padding-top:0px;
|
|
||||||
}
|
|
||||||
.Totales a{
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -71,7 +73,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1 truncate">Almacén</div>
|
<div class="col-md-1 truncate">Almacén</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">Fecha Inicio</div>
|
<div class="col-md-1 truncate">Fecha Inicio</div>
|
||||||
<div class="col-md-2 col-sm-2">
|
<div class="col-md-2 col-sm-2">
|
||||||
@@ -195,51 +197,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
||||||
<div class="col-md-1">Código Inicio:</div>
|
<div class="col-md-1">Código Inicio:</div>
|
||||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox></div>
|
<div class="col-md-2">
|
||||||
<div class="col-md-1">Código Fin:</div>
|
<asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox></div>
|
||||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox></div>
|
<div class="col-md-1">Código Fin:</div>
|
||||||
|
<div class="col-md-2">
|
||||||
<div class="col-md-1" runat="server" id="DVNavegar" >
|
<asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox></div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary">Anterior</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5">
|
|
||||||
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary">Siguiente</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div class="row col-md-12" align="right">
|
<div class="row col-md-12" align="right">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div id="dvCa" style="width:100%;visibility:hidden;top:40px">
|
<div id="dvCa" style="width: 100%; visibility: hidden; top: 40px">
|
||||||
<table id="dTable" class="correcto table Widthall " runat="server"><tr>
|
<table id="dTable" class="correcto table Widthall " runat="server">
|
||||||
<td id="dvArt" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px;width:32.5%;"><b>Producto</b></td>
|
<tr>
|
||||||
<td id="dvCan" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:30%;border-style: solid;"><b>Cantidad</b></td>
|
<td id="dvArt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; width: 32.5%;"><b>Producto</b></td>
|
||||||
<td id="dvImp" runat="server" class="dataTables_scrollHead" style="text-align:center!important;width: 37.5%;font-size:14px;"><b>Importe</b></td>
|
<td id="dvCan" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; border-right-color: white!important; border-left-color: white!important; width: 30%; border-style: solid;"><b>Cantidad</b></td>
|
||||||
</tr></table>
|
<td id="dvImp" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 37.5%; font-size: 14px;"><b>Importe</b></td>
|
||||||
</div>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall adssigrid-scroll adssigrid-order" data-cols="1" data-rows="2"
|
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD"
|
||||||
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,NumeroParte,PS"
|
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,NumeroParte,PS"
|
||||||
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -255,80 +248,80 @@
|
|||||||
<%--4--%>
|
<%--4--%>
|
||||||
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="22.5%" HeaderText="Descripción" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="PS" />
|
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="22.5%" HeaderText="Descripción" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="PS" />
|
||||||
<%--5--%>
|
<%--5--%>
|
||||||
<asp:BoundField Visible="false" DataField="SeccionAlmacen" HeaderText="Sección Almacén" ItemStyle-Width="10%" />
|
<asp:BoundField Visible="false" DataField="SeccionAlmacen" HeaderText="Sección Almacén" ItemStyle-Width="10%" />
|
||||||
<%--6--%>
|
<%--6--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Inicial" >
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Inicial">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSaldoI" runat="server" Text='<%# If(Eval("SaldoIniCant").ToString() = "0", "-", Eval("SaldoIniCant", "{0:#,###.######}")) %>'></asp:Label>
|
<asp:Label ID="lbSaldoI" runat="server" Text='<%# If(Eval("SaldoIniCant").ToString() = "0", "-", Eval("SaldoIniCant", "{0:#,###.######}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--7--%>
|
<%--7--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Entradas">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Entradas">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbEntradasCant" runat="server" Text='<%#If(Eval("EntradaCant").ToString() = "0", "-", Eval("EntradaCant", "{0:#,###.######}")) %>'></asp:Label>
|
<asp:Label ID="lbEntradasCant" runat="server" Text='<%#If(Eval("EntradaCant").ToString() = "0", "-", Eval("EntradaCant", "{0:#,###.######}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--8--%>
|
<%--8--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Salidas">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Salidas">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSalidasCant" runat="server" Text='<%# If(Eval("SalidaCant").ToString() = "0", "-", Eval("SalidaCant", "{0:#,###.######}")) %>'></asp:Label>
|
<asp:Label ID="lbSalidasCant" runat="server" Text='<%# If(Eval("SalidaCant").ToString() = "0", "-", Eval("SalidaCant", "{0:#,###.######}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--9--%>
|
<%--9--%>
|
||||||
<asp:BoundField Visible="false" DataField="CantidadPendienteSurtir" HeaderText="Pte Surtir" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
|
<asp:BoundField Visible="false" DataField="CantidadPendienteSurtir" HeaderText="Pte Surtir" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%--10--%>
|
<%--10--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Final" ItemStyle-CssClass="LightGray">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Final" ItemStyle-CssClass="LightGray">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSaldoF" runat="server" Text='<%# If(Eval("SaldoFCant").ToString() = "0", "-", Eval("SaldoFCant", "{0:#,###.######}")) %>'></asp:Label>
|
<asp:Label ID="lbSaldoF" runat="server" Text='<%# If(Eval("SaldoFCant").ToString() = "0", "-", Eval("SaldoFCant", "{0:#,###.######}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<%--11--%>
|
<%--11--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Inicial">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Inicial">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSaldoI2" runat="server" Text='<%# If(Eval("SaldoIniImp").ToString() = "0", "-", Eval("SaldoIniImp", "{0:N2}")) %>'></asp:Label>
|
<asp:Label ID="lbSaldoI2" runat="server" Text='<%# If(Eval("SaldoIniImp").ToString() = "0", "-", Eval("SaldoIniImp", "{0:N2}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--12--%>
|
<%--12--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Entradas">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Entradas">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbEntradaImp" runat="server" Text='<%# If(Eval("EntradaImp").ToString() = "0", "-", Eval("EntradaImp", "{0:N2}")) %>'></asp:Label>
|
<asp:Label ID="lbEntradaImp" runat="server" Text='<%# If(Eval("EntradaImp").ToString() = "0", "-", Eval("EntradaImp", "{0:N2}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--13--%>
|
<%--13--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Salidas">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Salidas">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSalidaImp" runat="server" Text='<%# If(Eval("SalidaImp").ToString() = "0", "-", Eval("SalidaImp", "{0:N2}")) %>'></asp:Label>
|
<asp:Label ID="lbSalidaImp" runat="server" Text='<%# If(Eval("SalidaImp").ToString() = "0", "-", Eval("SalidaImp", "{0:N2}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--14--%>
|
<%--14--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Final" >
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Final">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSaldoF2" runat="server" Text='<%# If(Eval("SaldoFImp").ToString() = "0", "-", Eval("SaldoFImp", "{0:N2}")) %>'></asp:Label>
|
<asp:Label ID="lbSaldoF2" runat="server" Text='<%# If(Eval("SaldoFImp").ToString() = "0", "-", Eval("SaldoFImp", "{0:N2}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--15--%>
|
<%--15--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Último Costo">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Último Costo">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbUltimoCosto" runat="server" Text='<%# If(Eval("UltimoCosto").ToString() = "0", "-", Eval("UltimoCosto", "{0:N2}")) %>'></asp:Label>
|
<asp:Label ID="lbUltimoCosto" runat="server" Text='<%# If(Eval("UltimoCosto").ToString() = "0", "-", Eval("UltimoCosto", "{0:N2}")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--16--%>
|
<%--16--%>
|
||||||
<asp:BoundField Visible="false" DataField="FechaCompra" HeaderText="Última Compra" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
|
<asp:BoundField Visible="false" DataField="FechaCompra" HeaderText="Última Compra" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%--17--%>
|
<%--17--%>
|
||||||
<asp:BoundField Visible="false" DataField="FechaVenta" HeaderText="Última Venta" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
|
<asp:BoundField Visible="false" DataField="FechaVenta" HeaderText="Última Venta" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%--18--%>
|
<%--18--%>
|
||||||
<asp:BoundField Visible="false" DataField="PUPromedio" HeaderText="PU Promedio" DataFormatString="{0:N2}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
|
<asp:BoundField Visible="false" DataField="PUPromedio" HeaderText="PU Promedio" DataFormatString="{0:N2}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -369,7 +362,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="Id_Clave" HeaderText="Folio / Concepto" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Id_Clave" HeaderText="Folio / Concepto" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" HTMLEncode="false"/>
|
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" HtmlEncode="false" />
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
@@ -379,7 +372,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||||
@@ -393,7 +386,7 @@
|
|||||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<table style="width:598px;" class="table table-advance">
|
<table style="width: 598px;" class="table table-advance">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
@@ -402,21 +395,21 @@
|
|||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
<asp:CheckBox ID="ChkCodigoBarras" runat="server" Text="Código Barras" />
|
<asp:CheckBox ID="ChkCodigoBarras" runat="server" Text="Código Barras" />
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
<asp:CheckBox ID="ChkSeccionAlmacen" runat="server" Text="Sección Almacen" />
|
<asp:CheckBox ID="ChkSeccionAlmacen" runat="server" Text="Sección Almacen" />
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: left;" id="TdModalClasificacion2" runat="server" visible ="false">
|
<td style="text-align: left;" id="TdModalClasificacion2" runat="server" visible="false">
|
||||||
<asp:CheckBox ID="ChkClasificacion2" runat="server" Text="Clasificación 2" />
|
<asp:CheckBox ID="ChkClasificacion2" runat="server" Text="Clasificación 2" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
<asp:CheckBox ID="ChkFechaUltimaCompra" runat="server" Text="Fecha Última Compra" />
|
<asp:CheckBox ID="ChkFechaUltimaCompra" runat="server" Text="Fecha Última Compra" />
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
<asp:CheckBox ID="ChkFechaUltimaVenta" runat="server" Text="Fecha Última Venta" />
|
<asp:CheckBox ID="ChkFechaUltimaVenta" runat="server" Text="Fecha Última Venta" />
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
<asp:CheckBox ID="ChkPUPromedio" runat="server" Text="PU Promedio" />
|
<asp:CheckBox ID="ChkPUPromedio" runat="server" Text="PU Promedio" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -436,5 +429,117 @@
|
|||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||||
|
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function elementexist(element) {
|
||||||
|
if ($(element)) {
|
||||||
|
if ($(element).html()) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Sys.Application.add_load(function (s, e) {
|
||||||
|
});
|
||||||
|
|
||||||
|
var dTable;
|
||||||
|
function pageLoad() {
|
||||||
|
var Tam = TamañoVentana();
|
||||||
|
var Alto = Tam.height - 330;
|
||||||
|
if (Alto < 100) {
|
||||||
|
Alto = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var rows = false;
|
||||||
|
var cont = 0;
|
||||||
|
|
||||||
|
$("#<%=GvM.ClientID %> tr").each(function () {
|
||||||
|
|
||||||
|
cont++;
|
||||||
|
subHeaders();
|
||||||
|
});
|
||||||
|
|
||||||
|
<%-- if (cont > 2) {
|
||||||
|
var head = $('<thead></thead>');
|
||||||
|
head.append($('#<%=GvM.ClientID %> tr:nth-child(1)'));
|
||||||
|
$('#<%=GvM.ClientID %>').prepend(head);
|
||||||
|
dTable = $('#<%=GvM.ClientID %>').DataTable({
|
||||||
|
'order': [], 'orderable': true, scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false
|
||||||
|
});
|
||||||
|
|
||||||
|
subHeaders();
|
||||||
|
//$dataTables_scrollHead--%>
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).resize(function () {
|
||||||
|
|
||||||
|
subHeaders();
|
||||||
|
dTable.columns.adjust().draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
function subHeaders() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var recco = 0;
|
||||||
|
|
||||||
|
$("#<%=GvM.ClientID %> tr").each(function () {
|
||||||
|
if (!this.rowIndex) return;
|
||||||
|
|
||||||
|
var celdas = [];
|
||||||
|
|
||||||
|
$(this).find('td').each(function (column, td) {
|
||||||
|
|
||||||
|
celdas.push($(td).width());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var ancho = 0
|
||||||
|
ancho += celdas[0];
|
||||||
|
ancho += celdas[1];
|
||||||
|
|
||||||
|
console.log('ancho req ' + ancho);
|
||||||
|
$('#dvArt').width(ancho);
|
||||||
|
ancho = 0;
|
||||||
|
|
||||||
|
ancho += celdas[2];
|
||||||
|
ancho += celdas[3];
|
||||||
|
ancho += celdas[4];
|
||||||
|
ancho += celdas[5];
|
||||||
|
|
||||||
|
console.log('ancho req ' + ancho);
|
||||||
|
$('#dvCan').width(ancho);
|
||||||
|
ancho = 0;
|
||||||
|
|
||||||
|
ancho += celdas[6];
|
||||||
|
ancho += celdas[7];
|
||||||
|
ancho += celdas[8];
|
||||||
|
ancho += celdas[9];
|
||||||
|
|
||||||
|
console.log('ancho req ' + ancho);
|
||||||
|
$('#dvImp').width(ancho);
|
||||||
|
|
||||||
|
$('#dvCa').css('visibility', 'visible');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -266,10 +266,13 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
CveMarca = DdlMarca.SelectedValue.ToEntero
|
CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||||
|
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||||
|
|
||||||
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
||||||
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
||||||
DdlMovs.SelectedValue.ToEntero, CveMarca:=Marcas, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
|
DdlMovs.SelectedValue.ToEntero, CveMarca:=Marcas, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
|
||||||
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero) Then
|
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||||
dt = Reporte.DtResultados
|
dt = Reporte.DtResultados
|
||||||
|
|
||||||
|
|
||||||
@@ -585,331 +588,4 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
|
||||||
NavegacionPS(Siguiente:=False)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkPSSiguiente_Click(sender As Object, e As EventArgs)
|
|
||||||
NavegacionPS(Siguiente:=True)
|
|
||||||
End Sub
|
|
||||||
Private Sub NavegacionPS(Siguiente As Boolean)
|
|
||||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero
|
|
||||||
|
|
||||||
If Not CvePS > 0 Then
|
|
||||||
CvePS = ObtenerInicioPSNavegacion(Siguiente:=Siguiente)
|
|
||||||
If Not CvePS > 0 Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim dt As DataTable = New DataTable
|
|
||||||
|
|
||||||
Dim Entrada As Boolean = True
|
|
||||||
Dim Salida As Boolean = True
|
|
||||||
|
|
||||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
|
||||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
|
||||||
Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue.ToEntero = 0, -1, DdlAlmacen.SelectedValue.ToEntero)
|
|
||||||
Dim CveAlmacenes As String = DdlAlmacen.GetSelectedValues()
|
|
||||||
If CveAlmacenes.Contains(",") Then
|
|
||||||
CveAlmacen = -1
|
|
||||||
End If
|
|
||||||
If CvePS > 0 Then
|
|
||||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
|
||||||
If dr IsNot Nothing Then
|
|
||||||
DdlPS.SelectedText = dr("PSCodigo").ToString
|
|
||||||
DdlPS.SelectedValue = CvePS.ToString
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Dim CveTiposAlmacen As String = "-1"
|
|
||||||
'For Each item As ListItem In CBLTiposAlmacen.Items
|
|
||||||
' CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
|
||||||
'Next
|
|
||||||
|
|
||||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
|
||||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
|
||||||
If ObjInventarios.GetKardexPSNavegacion(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, "-1", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
|
||||||
CveAlmacenes, Siguiente:=Siguiente, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
|
||||||
dt = ObjInventarios.DtResultados.Copy
|
|
||||||
End If
|
|
||||||
ObjInventarios.Dispose()
|
|
||||||
|
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
|
||||||
DdlPS.SelectedValue = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
DdlPS.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
CargaDatos()
|
|
||||||
'UPFiltros.Update()
|
|
||||||
UPPMov.Update()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function ObtenerInicioPSNavegacion(Siguiente As Boolean) As Integer
|
|
||||||
|
|
||||||
Dim CvePSRespuesta As Integer = -1
|
|
||||||
Dim dt As DataTable = New DataTable
|
|
||||||
|
|
||||||
If Siguiente Then
|
|
||||||
If TxtCodigoInicio.Text.Trim.Length > 0 Then
|
|
||||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
|
||||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If TxtCodigoFinal.Text.Trim.Length > 0 Then
|
|
||||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
|
||||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
|
||||||
CvePSRespuesta = dt.Rows(0)("CvePS").ToString.ToEntero
|
|
||||||
DdlPS.SelectedValue = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
DdlPS.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
'UPFiltros.Update()
|
|
||||||
UPPMov.Update()
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Return CvePSRespuesta
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
|
||||||
' Dim continuar = True
|
|
||||||
' Try
|
|
||||||
|
|
||||||
' Dim wb As New ClosedXML.Excel.XLWorkbook()
|
|
||||||
' Dim libro As ClosedXML.Excel.IXLWorksheet = wb.AddWorksheet("Reporte de inventarios")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Dim Fila As Integer = 0
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Cell(Fila + 3, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Column(1).Width = 34.43
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
|
||||||
' libro.Cell(Fila + 2, 1).Value = "RECORD Type"
|
|
||||||
' libro.Cell(Fila + 3, 1).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(2).Width = 24
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "Codigo del Partner"
|
|
||||||
' libro.Cell(Fila + 2, 2).Value = "Reporter_id "
|
|
||||||
' libro.Cell(Fila + 3, 2).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(3).Width = 28.71
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "Nombre de la Empresa"
|
|
||||||
' libro.Cell(Fila + 2, 3).Value = "Reporter Company Name"
|
|
||||||
' libro.Cell(Fila + 3, 3).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(4).Width = 23.57
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "CÓDIGO DEL PAÍS"
|
|
||||||
' libro.Cell(Fila + 2, 4).Value = "COUNTRY CD"
|
|
||||||
' libro.Cell(Fila + 3, 4).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(5).Width = 17.57
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "Ubicación"
|
|
||||||
' libro.Cell(Fila + 2, 5).Value = "LOCATION"
|
|
||||||
' libro.Cell(Fila + 3, 5).Value = "OPCIONAL"
|
|
||||||
|
|
||||||
' libro.Column(6).Width = 35.29
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "FECHA DEL INVENTARIO"
|
|
||||||
' libro.Cell(Fila + 2, 6).Value = "Period End Date"
|
|
||||||
' libro.Cell(Fila + 3, 6).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(7).Width = 23.43
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "REENVIO"
|
|
||||||
' libro.Cell(Fila + 2, 7).Value = "RESUBMIT"
|
|
||||||
' libro.Cell(Fila + 3, 7).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(8).Width = 29.29
|
|
||||||
' libro.Column(9).Width = 25
|
|
||||||
' libro.Column(10).Width = 18.14
|
|
||||||
' libro.Column(11).Width = 32.71
|
|
||||||
' libro.Column(12).Width = 13.57
|
|
||||||
' libro.Column(13).Width = 13
|
|
||||||
' libro.Column(14).Width = 32
|
|
||||||
' libro.Column(15).Width = 12.71
|
|
||||||
' libro.Column(16).Width = 13
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Fila = Fila + 3
|
|
||||||
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "IH"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "10245068"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "MX"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = ""
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "N"
|
|
||||||
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 3), libro.Cell(Fila + 3, 15)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
|
||||||
' libro.Cell(Fila + 3, 7).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Cell(Fila + 3, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "NÚMERO DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "OPCION DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "UPC"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "CODIGO SKU"
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "ORDENES DE COMPRAS EN ABIERTO "
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "INVENTARIO DISPONIBLE"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "DEVOLUCIONES"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "INVENTARIO RESERVADO"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = "INVENTARIO TOTAL"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "EN TRANSITO"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "VALOR UNITARIO DEL PRODUCTO HP"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "VALOR TOTAL DEL INVENTARIO"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "NOMBRE DE LA TIENDA"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "Codigo de la tienda"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "MONEDA"
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "RECORD TYPE "
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "Partner Reported Product ID"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "PROD_OPTION"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "UPC"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "Reseller product number "
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "Quantity on Order"
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "Quantity on Hand"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "Quantity in stock allocated to be returned to supplier"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "Reserved Inventory"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = "Quantity avail. for sale"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "Quantity in float (In transit between partner warehouses)"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "INVENTORY UNIT VALUE"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "INVENTORY VALUATION"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "Sell from name (For retailers, ""Store Name / Site Name"")"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "Sell From Location ID"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "CURRENCY"
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
|
|
||||||
' If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
' For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
|
||||||
' 'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO TOTAL"
|
|
||||||
' 'libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DEL REGISTRO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "TOTAL DE REGISTROS"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "Suma del Inventario Disponible"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "Suma del Inventario Total"
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "RECORD TYPE"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "COUNT OF RECORDS"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "SUM OF “"On Hand”""
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "SUM OF “"Total Inventory"”"
|
|
||||||
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' Dim Codigo As Double = 0
|
|
||||||
' Dim SaldoFCant As Double = 0
|
|
||||||
' Dim SaldoFImp As Double = 0
|
|
||||||
' If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
|
||||||
' Codigo = dt.COUNT("Codigo", "CvePS>0")
|
|
||||||
' SaldoFCant = dt.SUM("SaldoFCant", "CvePS>0")
|
|
||||||
' SaldoFImp = dt.SUM("SaldoFImp", "CvePS>0")
|
|
||||||
' End If
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "IT"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = String.Format("{0}", Codigo)
|
|
||||||
' 'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
|
|
||||||
' 'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
|
|
||||||
' 'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
|
||||||
|
|
||||||
|
|
||||||
' ''Guarda streem y descarga
|
|
||||||
' Dim fs As Stream = New MemoryStream()
|
|
||||||
' wb.SaveAs(fs)
|
|
||||||
' fs.Position = 0
|
|
||||||
' Dim memoryStream As New MemoryStream()
|
|
||||||
' Using input As Stream = fs
|
|
||||||
' input.CopyTo(memoryStream)
|
|
||||||
' End Using
|
|
||||||
' memoryStream.Position = 0
|
|
||||||
|
|
||||||
' Response.Clear()
|
|
||||||
' Response.Buffer = True
|
|
||||||
|
|
||||||
' Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
||||||
' Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
|
|
||||||
' Response.BinaryWrite(memoryStream.ToArray())
|
|
||||||
' Response.End()
|
|
||||||
|
|
||||||
' ''endGuarda streem y descarga
|
|
||||||
' Catch
|
|
||||||
|
|
||||||
' continuar = False
|
|
||||||
' End Try
|
|
||||||
' If Not continuar Then
|
|
||||||
' Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -9415,99 +9415,6 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreaDTVentas() As DataTable
|
|
||||||
Dim TmpDT = New DataTable
|
|
||||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("Codigo", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveUM", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("UM", GetType(String))
|
|
||||||
TmpDT.Columns.Add("SATClaveUM", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveClasificacion", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Clasificacion", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CvePS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("PS", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CodigoPS", GetType(String))
|
|
||||||
TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
|
|
||||||
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Serie", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CuentaPredial", GetType(String))
|
|
||||||
TmpDT.Columns.Add("Obs", GetType(String))
|
|
||||||
TmpDT.Columns.Add("TiempoEntrega", GetType(String))
|
|
||||||
TmpDT.Columns.Add("PU", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("IVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("IEPS", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("Descuento", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
|
||||||
'Para uso del módulo contable
|
|
||||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
|
||||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("SubProyecto", GetType(String))
|
|
||||||
TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer))
|
|
||||||
|
|
||||||
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
|
|
||||||
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer))
|
|
||||||
'Contratos
|
|
||||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
|
||||||
'Remisiones a Facturas
|
|
||||||
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
|
|
||||||
|
|
||||||
'Pedido2 a Facturas
|
|
||||||
TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("Origen", GetType(Integer))
|
|
||||||
'Ordenes Servicio
|
|
||||||
TmpDT.Columns.Add("CveOS", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveOSDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("SeFacturara", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Folio", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("Estatus", GetType(String))
|
|
||||||
'Ordenamiento
|
|
||||||
TmpDT.Columns.Add("Orden", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("TipoDocto", GetType(String))
|
|
||||||
'OC
|
|
||||||
TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("CantidadFacturadaPed2", GetType(Decimal))
|
|
||||||
TmpDT.Columns.Add("CantidadInventario", GetType(Decimal))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
|
|
||||||
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
|
|
||||||
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
|
||||||
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
|
||||||
|
|
||||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
|
||||||
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
|
||||||
TmpDT.Columns.Add("CantidadConversion", GetType(Integer))
|
|
||||||
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
|
||||||
|
|
||||||
Return TmpDT
|
|
||||||
End Function
|
|
||||||
Private Function AgregarProductoServicio(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
Private Function AgregarProductoServicio(ByRef TmpDT As DataTable, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||||
PU As Decimal, Descuento As Decimal,
|
PU As Decimal, Descuento As Decimal,
|
||||||
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
|
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
|
||||||
@@ -9631,7 +9538,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
Private Function CreaObjetosVenta(Tipo As Integer, CveSubProyecto As Integer, ByRef ObjVentas As ClsVentas) As Modelos.Factura.MMensajeFactura
|
Private Function CreaObjetosVenta(Tipo As Integer, CveSubProyecto As Integer, ByRef ObjVentas As ClsVentas) As Modelos.Factura.MMensajeFactura
|
||||||
Dim TmpDT As DataTable = CreaDTVentas()
|
Dim TmpDT As DataTable = Modelos.Factura.CreaDTFactura()
|
||||||
Dim UsadosBonificacion As List(Of Integer) = New List(Of Integer)
|
Dim UsadosBonificacion As List(Of Integer) = New List(Of Integer)
|
||||||
|
|
||||||
TmpDT.Rows.Clear()
|
TmpDT.Rows.Clear()
|
||||||
|
|||||||
@@ -832,10 +832,19 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If ChkProveedorIntermediario.Checked Then
|
If ChkProveedorIntermediario.Checked Then
|
||||||
CveProvIntermediario = If(DdlProveedorIntermediario.SelectedValue.ToEntero <= 0, -1, DdlProveedorIntermediario.SelectedValue.ToEntero)
|
CveProvIntermediario = If(DdlProveedorIntermediario.SelectedValue.ToEntero <= 0, -1, DdlProveedorIntermediario.SelectedValue.ToEntero)
|
||||||
End If
|
End If
|
||||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal,
|
|
||||||
|
Dim Folio = TxtFolio.Text.Trim
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
Folio = "-1"
|
||||||
|
End If
|
||||||
|
|
||||||
|
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, Folio, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal,
|
||||||
GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio,
|
GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio,
|
||||||
TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito,
|
TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito,
|
||||||
CveProveedorIntermediario:=CveProvIntermediario, ImporteDeduccionesPago:=TxtImporteDeduccionesPago.Text.ToDecimal, FechaEmision:=FechaEmision)
|
CveProveedorIntermediario:=CveProvIntermediario, ImporteDeduccionesPago:=TxtImporteDeduccionesPago.Text.ToDecimal, FechaEmision:=FechaEmision)
|
||||||
|
If Folio = "-1" Then
|
||||||
|
TxtFolio.Text = ObjIE.Folio.ToString()
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc
|
If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc
|
||||||
CveIE = DdlIngreso.SelectedValue.ToEntero
|
CveIE = DdlIngreso.SelectedValue.ToEntero
|
||||||
|
|||||||
@@ -630,7 +630,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
If ObjVtaRemision.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjVtaRemision.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
DbRowVenta = ObjVtaRemision.DtResultados.Copy().FiltroPrimero("")
|
DbRowVenta = ObjVtaRemision.DtResultados.Copy().FiltroPrimero("")
|
||||||
End If
|
End If
|
||||||
ObjVtaRemision.Dispose()
|
ObjVtaRemision.Dispose()
|
||||||
|
|
||||||
|
Dim SeTimbro As Boolean = False
|
||||||
|
|
||||||
If DbRowVenta IsNot Nothing Then
|
If DbRowVenta IsNot Nothing Then
|
||||||
Dim VentaActual As New Venta(UsuarioActual)
|
Dim VentaActual As New Venta(UsuarioActual)
|
||||||
@@ -924,7 +926,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim MsgTimbrado As String = ""
|
Dim MsgTimbrado As String = ""
|
||||||
Dim FolioFiscalFactura = ""
|
Dim FolioFiscalFactura = ""
|
||||||
Dim DebeTimbrar As Boolean = True
|
Dim DebeTimbrar As Boolean = True
|
||||||
Dim SeTimbro As Boolean = False
|
|
||||||
|
|
||||||
'SI SE GENERO FACTURA DE INGRESO, TIMBRARLA DESPUES DE REALIZAR EL PAGO
|
'SI SE GENERO FACTURA DE INGRESO, TIMBRARLA DESPUES DE REALIZAR EL PAGO
|
||||||
If DebeTimbrar AndAlso respFactura IsNot Nothing Then
|
If DebeTimbrar AndAlso respFactura IsNot Nothing Then
|
||||||
@@ -956,15 +958,15 @@ Partial Class Ventas_PVCobranza
|
|||||||
If SeTimbro Then
|
If SeTimbro Then
|
||||||
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respFactura.CveVenta, "XML", respFactura.SerieFolio, respFactura.Factura.TipoDocto)))
|
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respFactura.CveVenta, "XML", respFactura.SerieFolio, respFactura.Factura.TipoDocto)))
|
||||||
msBuild.AppendFormat("{0}", xml)
|
msBuild.AppendFormat("{0}", xml)
|
||||||
|
|
||||||
|
Dim pdf = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respFactura.CveVenta)))
|
||||||
|
msBuild.AppendFormat("{0}", pdf)
|
||||||
Else
|
Else
|
||||||
If Not String.IsNullOrEmpty(MsgTimbrado) Then
|
If Not String.IsNullOrEmpty(MsgTimbrado) Then
|
||||||
msBuild.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
|
msBuild.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim pdf = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respFactura.CveVenta)))
|
|
||||||
msBuild.AppendFormat("{0}", pdf)
|
|
||||||
|
|
||||||
If respFactura.Factura.Inv_CveMovimiento > 0 Then
|
If respFactura.Factura.Inv_CveMovimiento > 0 Then
|
||||||
msBuild.AppendFormat("<b><a target='_blank' class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">Movimiento de Almacén</a></b><br/>", respFactura.Factura.Inv_CveMovimiento)
|
msBuild.AppendFormat("<b><a target='_blank' class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">Movimiento de Almacén</a></b><br/>", respFactura.Factura.Inv_CveMovimiento)
|
||||||
End If
|
End If
|
||||||
@@ -1004,12 +1006,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
If SeTimbroNC Then
|
If SeTimbroNC Then
|
||||||
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respNC.CveVenta, "XML", respNC.SerieFolio, respNC.Factura.TipoDocto)))
|
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respNC.CveVenta, "XML", respNC.SerieFolio, respNC.Factura.TipoDocto)))
|
||||||
msBuild.AppendFormat("{0}", xml)
|
msBuild.AppendFormat("{0}", xml)
|
||||||
|
|
||||||
|
Dim pdfNC = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respNC.CveVenta)))
|
||||||
|
msBuild.AppendFormat("{0}", pdfNC)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim pdfNC = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respNC.CveVenta)))
|
|
||||||
msBuild.AppendFormat("{0}", pdfNC)
|
|
||||||
|
|
||||||
|
|
||||||
If respNC IsNot Nothing AndAlso respNC.Factura IsNot Nothing AndAlso respNC.Factura.DtAnticiposAplicados IsNot Nothing Then
|
If respNC IsNot Nothing AndAlso respNC.Factura IsNot Nothing AndAlso respNC.Factura.DtAnticiposAplicados IsNot Nothing Then
|
||||||
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
|
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
|
||||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}",
|
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}",
|
||||||
@@ -1059,14 +1060,19 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
Try
|
Try
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
Dim ImpresionDirecta As Boolean = UsuarioActual.Empresa.Funcionalidad(109) = "1"
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso Not SeTimbro Then
|
||||||
|
ImpresionDirecta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ImpresionDirecta Then
|
||||||
ImpresionDirectaPDF(CveVenta)
|
ImpresionDirectaPDF(CveVenta)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
'ENVIO DE CORREO
|
'ENVIO DE CORREO
|
||||||
Try
|
Try
|
||||||
If respFactura IsNot Nothing AndAlso respFactura.Factura IsNot Nothing Then
|
If respFactura IsNot Nothing AndAlso respFactura.Factura IsNot Nothing AndAlso SeTimbro Then
|
||||||
Dim EnviarMail As Boolean = respFactura.Factura.Cliente.EnviarFactura = "Si"
|
Dim EnviarMail As Boolean = respFactura.Factura.Cliente.EnviarFactura = "Si"
|
||||||
Dim Hilo As New System.Threading.Thread(Sub() EnviarMailFactura(EnviarMail, respFactura.Factura, UsuarioActual))
|
Dim Hilo As New System.Threading.Thread(Sub() EnviarMailFactura(EnviarMail, respFactura.Factura, UsuarioActual))
|
||||||
Hilo.Start()
|
Hilo.Start()
|
||||||
@@ -1618,9 +1624,13 @@ Partial Class Ventas_PVCobranza
|
|||||||
If CveBancoCuenta > 0 Then
|
If CveBancoCuenta > 0 Then
|
||||||
Dim CveIEPago As Integer = 0
|
Dim CveIEPago As Integer = 0
|
||||||
Dim ErrorConta As Boolean
|
Dim ErrorConta As Boolean
|
||||||
|
|
||||||
If String.IsNullOrEmpty(Obs) Then
|
If String.IsNullOrEmpty(Obs) Then
|
||||||
Obs = VentaActual.SerieFolio
|
Obs = $"Folio: {VentaActual.SerieFolio}"
|
||||||
|
Else
|
||||||
|
Obs = $"{Obs}. Folio: {VentaActual.SerieFolio}"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteBancos, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
|
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteBancos, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
|
||||||
If CveIEPago > 0 Then
|
If CveIEPago > 0 Then
|
||||||
Dim tImportePago As Decimal = If(ImporteBancos > ImporteAbonoVenta, ImporteAbonoVenta, ImporteBancos) 'toma el importe menor para la factura
|
Dim tImportePago As Decimal = If(ImporteBancos > ImporteAbonoVenta, ImporteAbonoVenta, ImporteBancos) 'toma el importe menor para la factura
|
||||||
|
|||||||
@@ -202,8 +202,11 @@ Partial Class Ventas_RepVentas
|
|||||||
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
|
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20"))
|
DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
|
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Giro", "22"))
|
DdlGrupo.Items.Insert(13, New ListItem("Giro", "22"))
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
|
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlGrupo.Items.Insert(13, New ListItem("Tipo Venta", "24"))
|
||||||
|
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
DdlGrupo.SelectedValueExist("3")
|
DdlGrupo.SelectedValueExist("3")
|
||||||
@@ -222,6 +225,7 @@ Partial Class Ventas_RepVentas
|
|||||||
|
|
||||||
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' ")
|
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' ")
|
||||||
DdlTipoVenta.DataBind()
|
DdlTipoVenta.DataBind()
|
||||||
|
DdlTipoVenta.Items.Insert(0, New ListItem("Sin Asignar", "-2"))
|
||||||
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -314,11 +318,15 @@ Partial Class Ventas_RepVentas
|
|||||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
||||||
|
|
||||||
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
|
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
|
||||||
|
Dim CveTipoVenta As Integer = -1
|
||||||
|
If DivTipoVenta.Visible Then
|
||||||
|
CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
|
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
|
||||||
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
|
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
|
||||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
|
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
|
||||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then
|
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=CveTipoVenta) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
DtVentas = ObjVentas.DtResultados
|
DtVentas = ObjVentas.DtResultados
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Imports System.Data
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
|
Imports DocumentFormat.OpenXml.Office2010.PowerPoint
|
||||||
|
|
||||||
Partial Class RepVentasDetalle
|
Partial Class RepVentasDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -326,6 +327,7 @@ Partial Class RepVentasDetalle
|
|||||||
|
|
||||||
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs'")
|
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs'")
|
||||||
DdlTipoVenta.DataBind()
|
DdlTipoVenta.DataBind()
|
||||||
|
DdlTipoVenta.Items.Insert(0, New ListItem("Sin Asignar", "-2"))
|
||||||
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -461,6 +463,11 @@ Partial Class RepVentasDetalle
|
|||||||
ChkLecturaAdmin.Checked = Not ModalidadContable
|
ChkLecturaAdmin.Checked = Not ModalidadContable
|
||||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
Dim CveTipoVenta As Integer = -1
|
||||||
|
If DivTipoVenta.Visible Then
|
||||||
|
CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||||
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
|
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
|
||||||
@@ -468,7 +475,7 @@ Partial Class RepVentasDetalle
|
|||||||
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
|
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
|
||||||
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(),
|
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(),
|
||||||
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then
|
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=CveTipoVenta) Then
|
||||||
DtVentas = AddRows(ObjVentas.DtResultados)
|
DtVentas = AddRows(ObjVentas.DtResultados)
|
||||||
ImgImprimir.Enabled = True
|
ImgImprimir.Enabled = True
|
||||||
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
||||||
@@ -536,6 +543,7 @@ Partial Class RepVentasDetalle
|
|||||||
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
||||||
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
||||||
ChkKilometraje.Visible = UsuarioActual.Empresa.Funcionalidad(558) = "1" 'empresa llantera
|
ChkKilometraje.Visible = UsuarioActual.Empresa.Funcionalidad(558) = "1" 'empresa llantera
|
||||||
|
ChkTipoVenta.Visible = UsuarioActual.Empresa.Funcionalidad(531) = "1" 'empresa acumuladores
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
@@ -668,6 +676,11 @@ Partial Class RepVentasDetalle
|
|||||||
ChkEstatusFactura.Checked = True
|
ChkEstatusFactura.Checked = True
|
||||||
ChkCliente.Checked = True
|
ChkCliente.Checked = True
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
ChkSucursal.Checked = False
|
||||||
|
ChkTipoVenta.Checked = True
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||||
@@ -781,6 +794,8 @@ Partial Class RepVentasDetalle
|
|||||||
|
|
||||||
If ChkDescargarXML.Checked Then ListPersonalizada.Add("XML")
|
If ChkDescargarXML.Checked Then ListPersonalizada.Add("XML")
|
||||||
|
|
||||||
|
If ChkTipoVenta.Checked Then ListPersonalizada.Add("TipoVenta")
|
||||||
|
|
||||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
||||||
'Alert("Personalizacion guardada")
|
'Alert("Personalizacion guardada")
|
||||||
End If
|
End If
|
||||||
@@ -841,6 +856,7 @@ Partial Class RepVentasDetalle
|
|||||||
ChkDescargarPDF.Checked = False
|
ChkDescargarPDF.Checked = False
|
||||||
ChkDescargarXML.Checked = False
|
ChkDescargarXML.Checked = False
|
||||||
|
|
||||||
|
ChkTipoVenta.Checked = False
|
||||||
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
||||||
|
|
||||||
For Each personalizacion As String In Personalizaciones
|
For Each personalizacion As String In Personalizaciones
|
||||||
@@ -980,6 +996,9 @@ Partial Class RepVentasDetalle
|
|||||||
Case "PDF"
|
Case "PDF"
|
||||||
ChkDescargarPDF.Checked = True
|
ChkDescargarPDF.Checked = True
|
||||||
Exit Select
|
Exit Select
|
||||||
|
Case "TipoVenta"
|
||||||
|
ChkTipoVenta.Checked = True
|
||||||
|
Exit Select
|
||||||
Case Else
|
Case Else
|
||||||
Exit Select
|
Exit Select
|
||||||
End Select
|
End Select
|
||||||
@@ -988,6 +1007,7 @@ Partial Class RepVentasDetalle
|
|||||||
Personaliza()
|
Personaliza()
|
||||||
Else
|
Else
|
||||||
PersonalizaDefault()
|
PersonalizaDefault()
|
||||||
|
Personaliza()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UPPersonalizar.Update()
|
UPPersonalizar.Update()
|
||||||
|
|||||||
@@ -417,9 +417,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LbVerificarExistencia" Visible="false" runat="server"><i class='fa fa-list-alt'></i>Verificar Existencias</asp:LinkButton>
|
<asp:LinkButton ID="LbVerificarExistencia" Visible="false" runat="server"><i class='fa fa-list-alt'></i>Verificar Existencias</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkEnvioDeCorreoFactura" runat="server" CausesValidation="False" OnClick="LnkEnvioDeCorreoFactura_Click" Visible="false" > <i class="fa fa-envelope-o" aria-hidden="true"></i> Envio De Correo</asp:LinkButton>
|
<asp:LinkButton ID="LnkEnvioDeCorreoFactura" runat="server" CausesValidation="False" OnClick="LnkEnvioDeCorreoFactura_Click" Visible="false"> <i class="fa fa-envelope-o" aria-hidden="true"></i> Envio De Correo</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||||
@@ -654,7 +654,7 @@
|
|||||||
<td runat="server">
|
<td runat="server">
|
||||||
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
|
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -995,6 +995,11 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:Label ID="lblMotivoDev" runat="server"></asp:Label></td>
|
<asp:Label ID="lblMotivoDev" runat="server"></asp:Label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr align="left" id="TrTipoVentaEgs" runat="server" visible="false">
|
||||||
|
<td><b class="truncate">Tipo Venta:</b> </td>
|
||||||
|
<td>
|
||||||
|
<asp:Label ID="LblTipoVentaEGS" runat="server"></asp:Label></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1345,7 +1350,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
|
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
|
||||||
<asp:Hyperlink ID="HLPS" runat="server" Visible="false" Target="_blank" Text='<%# Eval("CodigoPS") %>'></asp:Hyperlink>
|
<asp:HyperLink ID="HLPS" runat="server" Visible="false" Target="_blank" Text='<%# Eval("CodigoPS") %>'></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged1" CssClass="select2me">
|
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged1" CssClass="select2me">
|
||||||
@@ -7357,7 +7362,14 @@
|
|||||||
<h4 class="modal-title">Aplicar NC</h4>
|
<h4 class="modal-title">Aplicar NC</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<div class="row form-group" id="DivTipoVentaAsingado" runat="server" visible="false">
|
||||||
|
<div class="col-md-2">
|
||||||
|
Tipo Venta:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:Label runat="server" ID="LblTipoVentaAsignado" ></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row form-group">
|
<div class="row form-group">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
Concepto:
|
Concepto:
|
||||||
@@ -8847,6 +8859,11 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
|
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivTipoVentaSol" runat="server">
|
||||||
|
<asp:DropDownList ID="DdlTipoVentaSolCredito" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlTipoVentaSolCredito.ClientID.ToString()%>">Tipo:</label>
|
||||||
|
</div>
|
||||||
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
|
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
||||||
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
|
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
|
||||||
@@ -9016,7 +9033,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-content" style="width:650px;">
|
<div class="modal-content" style="width: 650px;">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<h4 class="modal-title">
|
<h4 class="modal-title">
|
||||||
<asp:Label ID="LblDvModalTipoVentaTitulo" runat="server">Tipo de Venta</asp:Label>
|
<asp:Label ID="LblDvModalTipoVentaTitulo" runat="server">Tipo de Venta</asp:Label>
|
||||||
@@ -9114,11 +9131,11 @@
|
|||||||
<div class="row" runat="server" id="DVGvPSProced" visible="false">
|
<div class="row" runat="server" id="DVGvPSProced" visible="false">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:CheckBox ID="ChkVerTodosPS" runat="server" Text="Ver Todos los productos" AutoPostBack="true" OnCheckedChanged="ChkVerTodosPS_CheckedChanged" />
|
<asp:CheckBox ID="ChkVerTodosPS" runat="server" Text="Ver Todos los productos" AutoPostBack="true" OnCheckedChanged="ChkVerTodosPS_CheckedChanged" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" style="text-align: right">
|
<div class="col-md-4" style="text-align: right">
|
||||||
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="display: inline-block; width: 150px;" />
|
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -9137,18 +9154,18 @@
|
|||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Ed. Médica" ItemStyle-Width="40px" Visible="false">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Ed. Médica" ItemStyle-Width="40px" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtEdMedica" runat="server" Style="text-align: right!important" Width="70px"></asp:TextBox>
|
<asp:TextBox ID="TxtEdMedica" runat="server" Style="text-align: right!important" Width="70px"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -9311,8 +9328,9 @@
|
|||||||
<asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover">
|
<asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Producto">
|
<asp:TemplateField HeaderText="Producto">
|
||||||
<ItemTemplate >
|
<ItemTemplate>
|
||||||
<span style="width:400px; display:flex;"> <asp:Literal ID="LtlProducto" runat="server" Text='<%# Eval("Producto") %>'></asp:Literal> </span>
|
<span style="width: 400px; display: flex;">
|
||||||
|
<asp:Literal ID="LtlProducto" runat="server" Text='<%# Eval("Producto") %>'></asp:Literal> </span>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -9326,63 +9344,63 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalDivMailFactura" class="modal ADS fade" role="dialog">
|
<div id="ModalDivMailFactura" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title">Envio de Correo</h4>
|
<h4 class="modal-title">Envio de Correo</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<asp:UpdatePanel ID="UpSendMailFactura" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpSendMailFactura" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:HiddenField ID="HdnCveVentaFactura" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnCveVentaFactura" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnFolioVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnFolioVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnTipoDocto" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnSerieFolio" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnSubProyecto" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnSubProyecto" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">Para:</div>
|
<div class="col-xs-4">Para:</div>
|
||||||
<div class="col-xs-8">
|
<div class="col-xs-8">
|
||||||
<asp:TextBox ID="TxtParaMailFactura" runat="server" Width="370px" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtParaMailFactura" runat="server" Width="370px" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row">
|
||||||
<div class="row">
|
<div class="col-xs-4">
|
||||||
<div class="col-xs-4">
|
Con copia para:<br />
|
||||||
Con copia para:<br />
|
(Separar con: ;)
|
||||||
(Separar con: ;)
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-8">
|
||||||
|
<asp:TextBox ID="TxtCCFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-8">
|
<div class="row">
|
||||||
<asp:TextBox ID="TxtCCFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
<div class="col-xs-4">Texto Adicional:</div>
|
||||||
|
<div class="col-xs-8">
|
||||||
|
<asp:TextBox ID="TxtBodyFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-4">Texto Adicional:</div>
|
|
||||||
<div class="col-xs-8">
|
|
||||||
<asp:TextBox ID="TxtBodyFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnSendMailFactura" Text="Enviar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" OnClick="BtnSendMailFactura_Click" />
|
<asp:Button ID="BtnSendMailFactura" Text="Enviar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" OnClick="BtnSendMailFactura_Click" />
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -5275,6 +5275,13 @@ Partial Class Ventas
|
|||||||
EsNCDevolucionEfectivo = True
|
EsNCDevolucionEfectivo = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
If Not String.IsNullOrEmpty(DbRowVenta("TipoVenta").ToString()) Then
|
||||||
|
TrTipoVentaEgs.Visible = True
|
||||||
|
LblTipoVentaEGS.Text = DbRowVenta("TipoVenta").ToString()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Case "Rem"
|
Case "Rem"
|
||||||
Trsaldo.Visible = True
|
Trsaldo.Visible = True
|
||||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||||
@@ -6024,7 +6031,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'ACTIVA EDITAR
|
'ACTIVA EDITAR
|
||||||
'SOLO LA PUEDE EDITAR CON PROCESO | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
'SOLO LA PUEDE EDITAR CON PROCESO | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||||
If UsuarioActual.TienePermisoProceso(202) And TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
If (UsuarioActual.TienePermisoProceso(202) OrElse UsuarioActual.TienePermisoProceso(302)) And TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
||||||
BtnPermisoEditarRemision.Visible = True
|
BtnPermisoEditarRemision.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -6182,7 +6189,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped") Then BtnPermisoEditarRemision.Visible = True
|
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ped") Then BtnPermisoEditarRemision.Visible = True
|
||||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
||||||
|
|
||||||
'OCULTAR BOTON DE EDICION SI SE FACTURA COTIZACION DESDE URL
|
'OCULTAR BOTON DE EDICION SI SE FACTURA COTIZACION DESDE URL
|
||||||
@@ -10210,45 +10217,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If PermiteAutorizacion Then
|
If PermiteAutorizacion Then
|
||||||
|
VerificaAutorizacionEgs(VerificarImportes:=True)
|
||||||
Dim ImporteAutorizacion As Decimal = 0
|
If Me.CveAutorizacion <= 0 Then
|
||||||
Dim TipoAutorizacion As Integer = 0
|
|
||||||
|
|
||||||
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
|
|
||||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, "Egs", CveEstatus:=1) Then
|
|
||||||
Dim RowAutorizacion As DataRow = Nothing
|
|
||||||
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
|
||||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="Importe DESC")
|
|
||||||
|
|
||||||
If RowAutorizacion IsNot Nothing Then
|
|
||||||
ImporteAutorizacion = RowAutorizacion("Importe").ToString().ToDecimal()
|
|
||||||
CveAutorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
|
||||||
TipoAutorizacion = RowAutorizacion("TipoAutorizacion").ToString().ToEntero()
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
|
|
||||||
If TipoAutorizacion = 1 Then
|
|
||||||
If ImporteAutorizacion < TxtTotal.Text.ToDecimal() Then
|
|
||||||
Dim BloquearCredito As Boolean = True
|
|
||||||
CveAutorizacion = -1
|
|
||||||
|
|
||||||
If BloquearCredito Then
|
|
||||||
Alert($"El importe autorizado es insuficiente. Importe autorizado:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
CveAutorizacion = -1
|
|
||||||
Alert($"No se encontro una autorización de crédito.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10532,6 +10504,50 @@ Partial Class Ventas
|
|||||||
EmitirImprimirNew(TipoDoctoViejo)
|
EmitirImprimirNew(TipoDoctoViejo)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub VerificaAutorizacionEgs(Optional VerificarImportes As Boolean = True)
|
||||||
|
Dim ImporteAutorizacion As Decimal = 0
|
||||||
|
Dim TipoAutorizacion As Integer = 0
|
||||||
|
|
||||||
|
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, "Egs", CveEstatus:=1) Then
|
||||||
|
Dim RowAutorizacion As DataRow = Nothing
|
||||||
|
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="Importe DESC")
|
||||||
|
|
||||||
|
If RowAutorizacion IsNot Nothing Then
|
||||||
|
ImporteAutorizacion = RowAutorizacion("Importe").ToString().ToDecimal()
|
||||||
|
CveAutorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
||||||
|
TipoAutorizacion = RowAutorizacion("TipoAutorizacion").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If TipoAutorizacion = 1 Then
|
||||||
|
If VerificarImportes Then
|
||||||
|
If ImporteAutorizacion < TxtTotal.Text.ToDecimal() Then
|
||||||
|
Dim BloquearCredito As Boolean = True
|
||||||
|
CveAutorizacion = -1
|
||||||
|
|
||||||
|
If BloquearCredito Then
|
||||||
|
Alert($"El importe autorizado es insuficiente. Importe autorizado:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
CveAutorizacion = -1
|
||||||
|
Alert($"No se encontro una autorización de crédito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " NNNNEEEEEEEWWWWWW "
|
#Region " NNNNEEEEEEEWWWWWW "
|
||||||
@@ -14644,31 +14660,49 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso factura.TipoDocto = "Egs" AndAlso Not factura.EsGarantia Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
CveTipoVentaGuardar = -1
|
CveTipoVentaGuardar = -1
|
||||||
|
|
||||||
If NCDescuento Then
|
If factura.TipoDocto = "Egs" AndAlso Not factura.EsGarantia Then
|
||||||
If ListaNCDescuento IsNot Nothing AndAlso ListaNCDescuento.Count > 0 Then
|
If NCDescuento Then
|
||||||
'VERIFICA SI BONIFICACION
|
If ListaNCDescuento IsNot Nothing AndAlso ListaNCDescuento.Count > 0 Then
|
||||||
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
'VERIFICA SI BONIFICACION
|
||||||
CveTipoVentaGuardar = 7 ' BONIFICACION
|
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
||||||
ElseIf ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
CveTipoVentaGuardar = 7 ' BU - BONIFICACION DE USADO
|
||||||
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
|
ElseIf ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
||||||
|
CveTipoVentaGuardar = 9 ' CU - CANCELACION DE USADO
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Else
|
||||||
Else
|
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||||
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
'VERIFICA SI BONIFICACION
|
||||||
'VERIFICA SI BONIFICACION
|
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
||||||
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
CveTipoVentaGuardar = 7 ' BU - BONIFICACION DE USADO
|
||||||
CveTipoVentaGuardar = 7 ' BONIFICACION
|
ElseIf ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
||||||
ElseIf ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
CveTipoVentaGuardar = 9 ' CU - CANCELACION DE USADO
|
||||||
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'GA - GARANTIAS Y AJUSTES
|
||||||
|
If factura.TipoDocto = "Egs" AndAlso factura.EsGarantia Then CveTipoVentaGuardar = 11
|
||||||
|
|
||||||
|
'DM - DEVOLUCION DE MERCANCIA
|
||||||
|
If factura.TipoDocto = "Dev" Then CveTipoVentaGuardar = 10
|
||||||
|
|
||||||
|
'SI TIENE TIPO VENTA LA AUTORIZACION TOMAR DE AHI
|
||||||
|
If factura.TipoDocto = "Egs" AndAlso Me.CveAutorizacion > 0 Then
|
||||||
|
If ObjVentas.GetAutorizacion(Me.CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero() > 0 Then CveTipoVentaGuardar = ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||||
@@ -15919,7 +15953,7 @@ Partial Class Ventas
|
|||||||
Pago.Referencia = row2.DataKey("Folio").ToString()
|
Pago.Referencia = row2.DataKey("Folio").ToString()
|
||||||
Pago.CveVentaAmortizacion = row2.DataKey("CveVenta").ToString().ToEntero()
|
Pago.CveVentaAmortizacion = row2.DataKey("CveVenta").ToString().ToEntero()
|
||||||
Pago.TipoPago = "NC"
|
Pago.TipoPago = "NC"
|
||||||
Pago.CveClientePago = ObjFactura.CveCliente
|
Pago.CveClientePago = row2.DataKey("CveCliente").ToString().ToEntero()
|
||||||
Pago.Referencia = Referencia
|
Pago.Referencia = Referencia
|
||||||
|
|
||||||
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaRef, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True)
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaRef, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True)
|
||||||
@@ -27148,12 +27182,24 @@ Partial Class Ventas
|
|||||||
SbCondiciones.Append("<br><b> -La remisión está relacionada con otra factura.</b>")
|
SbCondiciones.Append("<br><b> -La remisión está relacionada con otra factura.</b>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If Extra.Trim().Length > 0 Then
|
||||||
DivCanRem.Visible = False
|
SbCondiciones.AppendFormat("<br><b>*{0}</b>", Extra)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Extra.Length > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
SbCondiciones.AppendFormat("<br><b>*{0}</b>", Extra)
|
DivCanRem.Visible = False
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetMovimientosDepositoCaja(Me.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
SbCondiciones.Append("<br><br><span style='color: red;font-size: medium;'><b>*No se puede cancelar la factura, debido a que tiene el pago ya depositado.</b></span>")
|
||||||
|
BtnCancelarDocumento.Visible = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
BtnCancelarDocumento.Visible = False
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LbCancelarDescripcion.Text = SbCondiciones.ToString()
|
LbCancelarDescripcion.Text = SbCondiciones.ToString()
|
||||||
@@ -31832,6 +31878,18 @@ Partial Class Ventas
|
|||||||
BtnEmitirImprimir.Visible = True
|
BtnEmitirImprimir.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Me.CveAutorizacion > 0 Then
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacion(CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
If Not String.IsNullOrEmpty(ObjVentas.DtResultados.FiltroPrimeroValor("TipoVenta")) Then
|
||||||
|
TrTipoVentaEgs.Visible = True
|
||||||
|
TxtObsFact.Text = $"{ObjVentas.DtResultados.FiltroPrimeroValor("TipoVenta")}"
|
||||||
|
UPObservaciones.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al aplicar NC", ex)
|
OnError("Ocurrió un error al aplicar NC", ex)
|
||||||
End Try
|
End Try
|
||||||
@@ -36368,10 +36426,19 @@ Partial Class Ventas
|
|||||||
Select Case RblRNCTipo.SelectedValue
|
Select Case RblRNCTipo.SelectedValue
|
||||||
Case "1" 'CARGOS
|
Case "1" 'CARGOS
|
||||||
NCConcepto = ArrayNC(3).ToEntero()
|
NCConcepto = ArrayNC(3).ToEntero()
|
||||||
|
If DivTipoVentaAsingado.Visible Then
|
||||||
|
LblTipoVentaAsignado.Text = "CU - CANCELACION DE USADO "
|
||||||
|
End If
|
||||||
Case "2" 'BONIFICACIONES
|
Case "2" 'BONIFICACIONES
|
||||||
NCConcepto = ArrayNC(4).ToEntero()
|
NCConcepto = ArrayNC(4).ToEntero()
|
||||||
|
If DivTipoVentaAsingado.Visible Then
|
||||||
|
LblTipoVentaAsignado.Text = "BU - BONIFICACION DE USADO"
|
||||||
|
End If
|
||||||
Case "3" 'AJUSTE/GARANTIAS
|
Case "3" 'AJUSTE/GARANTIAS
|
||||||
NCConcepto = ArrayNC(1).ToEntero()
|
NCConcepto = ArrayNC(1).ToEntero()
|
||||||
|
If DivTipoVentaAsingado.Visible Then
|
||||||
|
LblTipoVentaAsignado.Text = "GA - GARANTIAS Y AJUSTES"
|
||||||
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
'CARGOS/AJUSTES POR GARANTIA POR PRODUCTO
|
'CARGOS/AJUSTES POR GARANTIA POR PRODUCTO
|
||||||
@@ -36443,6 +36510,7 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'CARGOS/AJUSTES POR GARANTIA POR TOTAL
|
'CARGOS/AJUSTES POR GARANTIA POR TOTAL
|
||||||
ElseIf RblRNCTipo.SelectedValue.Contiene("1", "3") AndAlso Not ChkMostarProductosRNC.Checked Then
|
ElseIf RblRNCTipo.SelectedValue.Contiene("1", "3") AndAlso Not ChkMostarProductosRNC.Checked Then
|
||||||
|
|
||||||
@@ -36562,6 +36630,7 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'BONIFICACIONES POR TOTAL
|
'BONIFICACIONES POR TOTAL
|
||||||
ElseIf RblRNCTipo.SelectedValue.Contiene("2") AndAlso Not ChkMostarProductosRNCBon.Checked Then
|
ElseIf RblRNCTipo.SelectedValue.Contiene("2") AndAlso Not ChkMostarProductosRNCBon.Checked Then
|
||||||
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
|
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
|
||||||
@@ -38373,6 +38442,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TxtImporteSolicitud.Text = ""
|
TxtImporteSolicitud.Text = ""
|
||||||
|
DdlSolCreditoTipoDocto_SelectedIndexChanged(Nothing, EventArgs.Empty)
|
||||||
RegistraScript("$('#DivModalSolicitarCredito').modal('show')")
|
RegistraScript("$('#DivModalSolicitarCredito').modal('show')")
|
||||||
UpModalSolicitud.Update()
|
UpModalSolicitud.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -38415,9 +38485,18 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Motivo As String = TxtMotivoAutorizacion.Text
|
Dim Motivo As String = TxtMotivoAutorizacion.Text
|
||||||
|
Dim CveTipoVenta As Integer = -1
|
||||||
|
If DdlTipoVentaSolCredito.SelectedValue.ToEntero() > 0 Then
|
||||||
|
CveTipoVenta = DdlTipoVentaSolCredito.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveTipoVenta <= 0 AndAlso TipoDocto = "Egs" Then
|
||||||
|
Alert("Debe seleccionar un tipo de venta", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjPS As New ClsVentas
|
Dim ObjPS As New ClsVentas
|
||||||
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtImporteSolicitud.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocumento:=DdlSolCreditoTipoDocto.SelectedValue, DiasVencidos:=DiasVencidos, Motivo:=Motivo) Then
|
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtImporteSolicitud.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocumento:=DdlSolCreditoTipoDocto.SelectedValue, DiasVencidos:=DiasVencidos, Motivo:=Motivo, CveTipoVenta:=CveTipoVenta) Then
|
||||||
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
||||||
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
'signal
|
'signal
|
||||||
@@ -38448,10 +38527,16 @@ Partial Class Ventas
|
|||||||
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Vencimiento", "2"))
|
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Vencimiento", "2"))
|
||||||
DivMotivoAutorizacion.Visible = True
|
DivMotivoAutorizacion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
DivTipoVentaSol.Visible = False
|
||||||
Case "Egs"
|
Case "Egs"
|
||||||
'QUITAR LA DE VENCIMIENTO
|
'QUITAR LA DE VENCIMIENTO
|
||||||
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("2"))
|
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("2"))
|
||||||
DivMotivoAutorizacion.Visible = True
|
DivMotivoAutorizacion.Visible = True
|
||||||
|
|
||||||
|
DivTipoVentaSol.Visible = True
|
||||||
|
DdlTipoVentaSolCredito.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' AND CveTipoVenta NOT IN (7,9,10,11) ")
|
||||||
|
DdlTipoVentaSolCredito.DataBind()
|
||||||
|
DdlTipoVentaSolCredito.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End Select
|
End Select
|
||||||
UpModalSolicitud.Update()
|
UpModalSolicitud.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -40297,34 +40382,6 @@ Partial Class Ventas
|
|||||||
DVGvPSProced.Visible = True
|
DVGvPSProced.Visible = True
|
||||||
GvPSProced.Columns(4).Visible = RBLTipoVenta.SelectedValue = "2" ' comisión Ed. Médica, solo cuando es pago directo
|
GvPSProced.Columns(4).Visible = RBLTipoVenta.SelectedValue = "2" ' comisión Ed. Médica, solo cuando es pago directo
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvPSProced.Rows
|
|
||||||
If RBLTipoVenta.SelectedValue = "2" Then
|
|
||||||
|
|
||||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
|
||||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
|
||||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
|
||||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
|
||||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
|
||||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
|
||||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
|
||||||
|
|
||||||
'SUGIERE PRECIO
|
|
||||||
Dim PrecioSugerido As Decimal = 0
|
|
||||||
Dim tPrecioSugerido As Decimal = 0
|
|
||||||
tPrecioSugerido = PU
|
|
||||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
|
||||||
|
|
||||||
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
|
|
||||||
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
|
||||||
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
|
||||||
GvRow.FCTextBox("TxtPrecio").Text = PrecioSugerido.ToString("#,##0.####")
|
|
||||||
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -40498,7 +40555,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Protected Sub LBNotaCredito_Click(sender As Object, e As EventArgs)
|
Protected Sub LBNotaCredito_Click(sender As Object, e As EventArgs)
|
||||||
CargaDdlNCPS()
|
CargaDdlNCPS()
|
||||||
|
DivTipoVentaAsingado.Visible = False
|
||||||
If CveVenta <= 0 Then 'cuando es nueva la factura
|
If CveVenta <= 0 Then 'cuando es nueva la factura
|
||||||
DivGvCxC.Visible = True
|
DivGvCxC.Visible = True
|
||||||
CargaCxC()
|
CargaCxC()
|
||||||
@@ -40506,6 +40563,24 @@ Partial Class Ventas
|
|||||||
UpAplicarNC.Update()
|
UpAplicarNC.Update()
|
||||||
'CARGAR RNC
|
'CARGAR RNC
|
||||||
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
VerificaAutorizacionEgs(VerificarImportes:=True)
|
||||||
|
If Me.CveAutorizacion <= 0 Then
|
||||||
|
Exit Sub
|
||||||
|
Else
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacion(Me.CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero() > 0 Then
|
||||||
|
DivTipoVentaAsingado.Visible = True
|
||||||
|
LblTipoVentaAsignado.Text = ObjVentas.DtResultados.FiltroPrimeroValor("TipoVenta")
|
||||||
|
DdlNCPS.Enabled = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user