Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3505,7 +3505,7 @@ Public Class ClsVentas
|
|||||||
''' <param name="CveEmpresa"></param>
|
''' <param name="CveEmpresa"></param>
|
||||||
''' <param name="Opcion"></param>
|
''' <param name="Opcion"></param>
|
||||||
''' <returns></returns>
|
''' <returns></returns>
|
||||||
Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer, Optional ConsultaIVA As Boolean = False) As Boolean
|
Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer, Optional ConsultaIVA As Boolean = False, Optional FechaConsulta As Date = ModExtensiones.MaxFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_ReporteCortesDetalleGet")
|
DataAdapter("PA_Vta_ReporteCortesDetalleGet")
|
||||||
@@ -3516,6 +3516,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
.Add("@ConsultaIVA", SqlDbType.Bit).Value = ConsultaIVA
|
.Add("@ConsultaIVA", SqlDbType.Bit).Value = ConsultaIVA
|
||||||
|
.Add("@FechaConsulta", SqlDbType.Date).Value = FechaConsulta
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ Partial Class Bancos_RepCortes
|
|||||||
#Region "G V - D A T O S "
|
#Region "G V - D A T O S "
|
||||||
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
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DBCampo("CveCorte").ToString = "" Then
|
If e.Row.DBCampo("FechaInicial").ToString = "" Then
|
||||||
e.Row.CssClass = "SubTotales2"
|
e.Row.CssClass = "SubTotales2"
|
||||||
If DtCortes IsNot Nothing Then
|
If DtCortes IsNot Nothing Then
|
||||||
e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2)
|
e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2)
|
||||||
@@ -189,10 +189,12 @@ Partial Class Bancos_RepCortes
|
|||||||
Protected Sub LbDescripcion_Click(sender As Object, e As EventArgs)
|
Protected Sub LbDescripcion_Click(sender As Object, e As EventArgs)
|
||||||
Dim btn As LinkButton = DirectCast(sender, LinkButton)
|
Dim btn As LinkButton = DirectCast(sender, LinkButton)
|
||||||
Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
|
Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
|
||||||
CveCorte = gvr.DataKey("CveCorte").ToString.ToEntero
|
|
||||||
Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero
|
CveCorte = gvr.DataKey("CveCorte").ToEntero()
|
||||||
Fecha = gvr.DataKey("FechaInicial").ToString
|
|
||||||
Nombre = gvr.DataKey("Nombre").ToString
|
Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToEntero()
|
||||||
|
Fecha = gvr.DataKey("FechaInicial")
|
||||||
|
Nombre = gvr.DataKey("Nombre")
|
||||||
|
|
||||||
'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
||||||
' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
|
' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
|
||||||
@@ -212,9 +214,17 @@ Partial Class Bancos_RepCortes
|
|||||||
' GvPorIVA.DataSource = ObjVentas.DtResultados
|
' GvPorIVA.DataSource = ObjVentas.DtResultados
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
Dim FechaConsulta = ModExtensiones.MaxFecha
|
||||||
|
|
||||||
|
Dim ConsultaPorSucursal As Boolean = UsuarioActual.Empresa.Funcionalidad(382) = "1"
|
||||||
|
|
||||||
|
If ConsultaPorSucursal Then
|
||||||
|
CveCorte = -1
|
||||||
|
FechaConsulta = gvr.DataKey("FechaInicial").ToDate()
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=2, ConsultaIVA:=UsuarioActual.CveEmpresa.Contiene(190, 192)) Then
|
If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=2, ConsultaIVA:=UsuarioActual.CveEmpresa.Contiene(190, 192), FechaConsulta:=FechaConsulta) Then
|
||||||
Dim DsDatos = ObjVentas.DataSetResultados.Copy()
|
Dim DsDatos = ObjVentas.DataSetResultados.Copy()
|
||||||
If DsDatos IsNot Nothing Then
|
If DsDatos IsNot Nothing Then
|
||||||
'DESGLOSE
|
'DESGLOSE
|
||||||
@@ -242,11 +252,12 @@ Partial Class Bancos_RepCortes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
|
If CveCorte > 0 Then
|
||||||
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy()
|
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
|
||||||
|
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
GvDep.DataSource = ObjVentas.DtResultados
|
GvDep.DataSource = ObjVentas.DtResultados
|
||||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
|||||||
@@ -128,7 +128,11 @@ Partial Class Ventas_Promociones
|
|||||||
'CLASIFICACIONES
|
'CLASIFICACIONES
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
Else
|
||||||
|
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
'CARGA PS
|
'CARGA PS
|
||||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
@@ -373,9 +377,11 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
|
||||||
Alert("Debe seleccionar una clasificacion", TipoMensaje.MsgAdvertencia)
|
If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
|
||||||
Exit Sub
|
Alert("Debe seleccionar una clasificacion", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TxtCantMinima.Text.ToEntero <= 0 Then
|
If TxtCantMinima.Text.ToEntero <= 0 Then
|
||||||
@@ -397,8 +403,13 @@ Partial Class Ventas_Promociones
|
|||||||
Dr("CveClasificacion") = DdlClasificacion.SelectedValue
|
Dr("CveClasificacion") = DdlClasificacion.SelectedValue
|
||||||
Dr("Clasificacion") = DdlClasificacion.SelectedItem.Text
|
Dr("Clasificacion") = DdlClasificacion.SelectedItem.Text
|
||||||
Else
|
Else
|
||||||
Dr("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimeroValor("CveClasificacion")
|
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||||
Dr("Clasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimeroValor("Clasificacion")
|
Dr("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimeroValor("CveClasificacion")
|
||||||
|
Dr("Clasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimeroValor("Clasificacion")
|
||||||
|
Else
|
||||||
|
Dr("CveClasificacion") = -1
|
||||||
|
Dr("Clasificacion") = "Todas"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dr("CvePS") = If(DdlPS.SelectedValue = "", "-1", DdlPS.SelectedValue)
|
Dr("CvePS") = If(DdlPS.SelectedValue = "", "-1", DdlPS.SelectedValue)
|
||||||
@@ -481,7 +492,7 @@ Partial Class Ventas_Promociones
|
|||||||
RegistraScript("$('#DivAgregar').modal('show')")
|
RegistraScript("$('#DivAgregar').modal('show')")
|
||||||
CveConsecutivo = e.CommandArgument.ToString.ToEntero
|
CveConsecutivo = e.CommandArgument.ToString.ToEntero
|
||||||
DdlRin.SelectedValueExist(Gvr.DataKey("CveRinTamaño"))
|
DdlRin.SelectedValueExist(Gvr.DataKey("CveRinTamaño"))
|
||||||
DdlClasificacion.SelectedValue = Gvr.DataKey("CveClasificacion")
|
DdlClasificacion.SelectedValueExist(Gvr.DataKey("CveClasificacion"))
|
||||||
ChangeDdlProducto()
|
ChangeDdlProducto()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||||
DdlPS.SelectedValue = Gvr.DataKey("CvePS")
|
DdlPS.SelectedValue = Gvr.DataKey("CvePS")
|
||||||
|
|||||||
@@ -576,7 +576,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
AplicaCancelacionConPagos = true;
|
AplicaCancelacionConPagos = true;
|
||||||
}
|
}
|
||||||
retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse,AplicaCancelacionConPagos: AplicaCancelacionConPagos);
|
if (UsuarioActual.TienePermisoProceso(269) && UsuarioActual.Empresa.Funcionalidad(109) == "1" && factura.TipoDocto == "Ing" && factura.SaldoAlmacen != 0)
|
||||||
|
{
|
||||||
|
factura.RealizarDevolucionAlmacen = true;
|
||||||
|
}
|
||||||
|
retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse, AplicaCancelacionConPagos: AplicaCancelacionConPagos);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5079,7 +5079,7 @@ Partial Class Ventas
|
|||||||
If DbRowVenta("Fecha").ToString.ToDate.ToShortDateString.ToDate < Now.ToShortDateString.ToDate Then
|
If DbRowVenta("Fecha").ToString.ToDate.ToShortDateString.ToDate < Now.ToShortDateString.ToDate Then
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
||||||
LkRefacturacion.Visible = True
|
LkRefacturacion.Visible = True
|
||||||
LbCancelarDocumento.Visible = False
|
LbCancelarDocumento.Visible = UsuarioActual.TienePermisoProceso(378)
|
||||||
Else
|
Else
|
||||||
LbCancelarDocumento.Visible = UsuarioActual.TienePermisoProceso(378)
|
LbCancelarDocumento.Visible = UsuarioActual.TienePermisoProceso(378)
|
||||||
End If
|
End If
|
||||||
@@ -19042,7 +19042,11 @@ Partial Class Ventas
|
|||||||
If dr Is Nothing Then
|
If dr Is Nothing Then
|
||||||
|
|
||||||
'verifica marca, si tiene asignada la promocion
|
'verifica marca, si tiene asignada la promocion
|
||||||
dr = DtPromociones.FiltroPrimero(String.Format("CvePS IS NULL AND CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {3} OR CveRinTamaño IS NULL) AND ((TipoPromocion <> 3 AND (CantidadMinima <= {4} OR CantidadMinima IS NULL)) OR (TipoPromocion = 3 AND CantidadMinima <= {4} )) ", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, Cantidad), Orderby:="CantidadMinima desc")
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
dr = DtPromociones.FiltroPrimero(String.Format("CvePS IS NULL AND (CveClasificacion = {0} OR CveClasificacion IS NULL) AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {3} OR CveRinTamaño IS NULL) AND ((TipoPromocion <> 3 AND (CantidadMinima <= {4} OR CantidadMinima IS NULL)) OR (TipoPromocion = 3 AND CantidadMinima <= {4} )) ", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, Cantidad), Orderby:="CantidadMinima desc")
|
||||||
|
Else
|
||||||
|
dr = DtPromociones.FiltroPrimero(String.Format("CvePS IS NULL AND CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {3} OR CveRinTamaño IS NULL) AND ((TipoPromocion <> 3 AND (CantidadMinima <= {4} OR CantidadMinima IS NULL)) OR (TipoPromocion = 3 AND CantidadMinima <= {4} )) ", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, Cantidad), Orderby:="CantidadMinima desc")
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user