--merge RepCancelacionesPorRespuesta.aspx

This commit is contained in:
2024-06-26 12:00:12 -07:00
25 changed files with 423 additions and 152 deletions

View File

@@ -517,7 +517,8 @@ Public Class ClsOS
Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer,
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional CveUsuario As Integer = -1,
Optional CveTipoVenta As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet") DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet")
@@ -537,7 +538,7 @@ Public Class ClsOS
.Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad .Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
End With End With
Try Try

View File

@@ -5426,12 +5426,12 @@ Public Class ClsPaginas
bytes = bytes bytes = bytes
Response.Buffer = True Response.Buffer = True
Response.Clear() Response.Clear()
Response.ClearHeaders()
If Formato = "PDF" Then If Formato = "PDF" Then
Response.ContentType = "application/pdf" Response.ContentType = "application/pdf"
Else Else
Response.ContentType = mimeType Response.ContentType = mimeType
End If End If
Response.ClearHeaders()
Dim fileExtension As String = "" Dim fileExtension As String = ""
If Not String.IsNullOrEmpty(Extension) Then If Not String.IsNullOrEmpty(Extension) Then
fileExtension = Extension fileExtension = Extension
@@ -10650,6 +10650,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/RepCostoPromedioVenta.aspx".ToUpper(), 532) PaginaDict.Add("/Ventas/RepCostoPromedioVenta.aspx".ToUpper(), 532)
PaginaDict.Add("/Ventas/RepVentasNetasResumen.aspx".ToUpper(), 533) PaginaDict.Add("/Ventas/RepVentasNetasResumen.aspx".ToUpper(), 533)
PaginaDict.Add("/Ventas/RepTopVentas.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepTopVentas.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepPedidosSTF.aspx".ToUpper(), 344)
PaginaDict.Add("/Ventas/RepSolicitudesCancelacion.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepSolicitudesCancelacion.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepCanceladasPendientes.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepCanceladasPendientes.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepCancelacionesPorAtender.aspx".ToUpper(), 750) PaginaDict.Add("/Ventas/RepCancelacionesPorAtender.aspx".ToUpper(), 750)

View File

@@ -1734,6 +1734,26 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetRepPedidosSTF(CveSubProyecto As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PedidosSTFRep")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los datos del reporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetRepTopCompras(GPO As Integer, CveEmpresa As Integer, TipoCambio As Integer, TipoCambioEspecifico As Decimal, CveUsuarioConsulta As Integer) As Boolean Public Function GetRepTopCompras(GPO As Integer, CveEmpresa As Integer, TipoCambio As Integer, TipoCambioEspecifico As Decimal, CveUsuarioConsulta As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Comp_GetTopRepPS") DataAdapter("PA_Comp_GetTopRepPS")

View File

@@ -330,7 +330,7 @@
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<br /> <br />
<div style="height: 450px; overflow-x: scroll"> <div style="height: 350px; overflow-x: scroll">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, Importe, SerieFolio,CveCuenta,CveSubProyecto" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%;" GridLines="None"> <asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, Importe, SerieFolio,CveCuenta,CveSubProyecto" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>

View File

@@ -194,8 +194,8 @@ Partial Class Bancos_DepositosCaja
TotalImporte = TotalImporte + Comision TotalImporte = TotalImporte + Comision
'Comision = -(Comision) ' se inverte el valor, va cargada 'Comision = -(Comision) ' se inverte el valor, va cargada
'Descuento = -(Descuento) ' se inverte el valor, va cargada 'Descuento = -(Descuento) ' se inverte el valor, va cargada
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Then
Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) Alert("Debes Seleccionar un Subproyecto ", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
End If End If
@@ -344,7 +344,7 @@ Partial Class Bancos_DepositosCaja
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
If Comision <> 0 Then If Comision <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, DdlClasificacion.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If

View File

@@ -17096,7 +17096,7 @@ Partial Class Compras_Compras
Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal
'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then 'If UsuarioActual.Empresa.Funcionalidad(532).Contiene( "1","2") Then
' Dim ObjCon As New ClsContratos ' Dim ObjCon As New ClsContratos
' Dim CvePresupuesto As Integer = 0 ' Dim CvePresupuesto As Integer = 0
' Dim Autorizado As Double = 0 ' Dim Autorizado As Double = 0
@@ -20760,7 +20760,7 @@ Partial Class Compras_Compras
Dim respuesta As Boolean = False Dim respuesta As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
If Opcion = 1 Or OCVinculada Or DdlTipoComprobante.SelectedValue <> "Fac" Then If Opcion = 1 Or OCVinculada Or DdlTipoComprobante.SelectedValue <> "Fac" Then
Return True Return True

View File

@@ -717,6 +717,7 @@
<asp:RequiredFieldValidator ID="RfvDdlComprasE" InitialValue="-1" runat="server" ControlToValidate="DdlComprasE" Display="None" ErrorMessage="El campo <b>''Compra''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvDdlComprasE" InitialValue="-1" runat="server" ControlToValidate="DdlComprasE" Display="None" ErrorMessage="El campo <b>''Compra''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CeRfvDdlComprasE" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlComprasE" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="CeRfvDdlComprasE" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlComprasE" Width="350px"></ajax:ValidatorCalloutExtender>
<i></i> <i></i>
<asp:HiddenField ID="HdnCveCompra" runat="server" Value="-1" />
</div> </div>
</div> </div>

View File

@@ -468,7 +468,7 @@ Partial Class ContabilidadC_RegPrePoliza
End If End If
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") DtMovimientos = ObjContabilidad.DtResultados
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then
BtnEliminar.Enabled = False BtnEliminar.Enabled = False
@@ -573,7 +573,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301, 3, 11) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288, 370, 371, 372, 373) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288, 370, 371, 372, 373) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
@@ -1309,7 +1309,7 @@ Partial Class ContabilidadC_RegPrePoliza
TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero
DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto) DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto)
HdnCveCompra.Value = CveCompra.ToString
DdlProveedoresE.SelectedValueExist(CveProveedor) DdlProveedoresE.SelectedValueExist(CveProveedor)
DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e) DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e)
DdlComprasE.SelectedValueExist(CveCompra) DdlComprasE.SelectedValueExist(CveCompra)
@@ -1551,13 +1551,13 @@ Partial Class ContabilidadC_RegPrePoliza
DdlProveedoresE.DataBind() DdlProveedoresE.DataBind()
DdlProveedoresE.Items.Insert(0, New ListItem(" - ", "-1")) DdlProveedoresE.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub End Sub
Private Sub CargaComprasE(CveProveedor As Integer) Private Sub CargaComprasE(CveProveedor As Integer, Optional tCveCompra As Integer = -1)
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
DdlComprasE.ClearSelection() DdlComprasE.ClearSelection()
If ObjCompras.GetCompras(-1, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then If ObjCompras.GetCompras(tCveCompra, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then
DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros("Saldo > 0") DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros($"Saldo > 0 OR CveCompra = {tCveCompra}")
DdlComprasE.DataBind() DdlComprasE.DataBind()
DdlComprasE.Items.Insert(0, New ListItem(" - ", "-1")) DdlComprasE.Items.Insert(0, New ListItem(" - ", "-1"))
Else Else
@@ -1618,7 +1618,7 @@ Partial Class ContabilidadC_RegPrePoliza
DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1")) DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub End Sub
Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero) CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero)
End Sub End Sub
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange

View File

@@ -717,6 +717,7 @@
<asp:RequiredFieldValidator ID="RfvDdlComprasE" InitialValue="-1" runat="server" ControlToValidate="DdlComprasE" Display="None" ErrorMessage="El campo <b>''Compra''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvDdlComprasE" InitialValue="-1" runat="server" ControlToValidate="DdlComprasE" Display="None" ErrorMessage="El campo <b>''Compra''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CeRfvDdlComprasE" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlComprasE" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="CeRfvDdlComprasE" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlComprasE" Width="350px"></ajax:ValidatorCalloutExtender>
<i></i> <i></i>
<asp:HiddenField ID="HdnCveCompra" runat="server" Value="-1" />
</div> </div>
</div> </div>

View File

@@ -1309,7 +1309,7 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero
DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto) DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto)
HdnCveCompra.Value = CveCompra.ToString
DdlProveedoresE.SelectedValueExist(CveProveedor) DdlProveedoresE.SelectedValueExist(CveProveedor)
DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e) DdlProveedoresE_SelectedIndexChanged(DdlProveedoresE, e)
DdlComprasE.SelectedValueExist(CveCompra) DdlComprasE.SelectedValueExist(CveCompra)
@@ -1551,13 +1551,13 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlProveedoresE.DataBind() DdlProveedoresE.DataBind()
DdlProveedoresE.Items.Insert(0, New ListItem(" - ", "-1")) DdlProveedoresE.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub End Sub
Private Sub CargaComprasE(CveProveedor As Integer) Private Sub CargaComprasE(CveProveedor As Integer, Optional tCveCompra As Integer = -1)
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 305, 308, 310, 311, 312) Then
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
DdlComprasE.ClearSelection() DdlComprasE.ClearSelection()
If ObjCompras.GetCompras(-1, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then If ObjCompras.GetCompras(tCveCompra, "-1", "-1", CveProveedor, -1, UsuarioActual.CveEmpresa) Then
DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros("Saldo > 0") DdlComprasE.DataSource = ObjCompras.DtResultados.FiltraParametros($"Saldo > 0 OR CveCompra = {tCveCompra}")
DdlComprasE.DataBind() DdlComprasE.DataBind()
DdlComprasE.Items.Insert(0, New ListItem(" - ", "-1")) DdlComprasE.Items.Insert(0, New ListItem(" - ", "-1"))
Else Else
@@ -1618,7 +1618,7 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1")) DdlClasificacionesE.Items.Insert(0, New ListItem(" - ", "-1"))
End Sub End Sub
Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged Private Sub DdlProveedoresE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedoresE.SelectedIndexChanged
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero) CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero, HdnCveCompra.Value.ToEntero)
End Sub End Sub
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange

View File

@@ -603,10 +603,20 @@ Partial Class Contratos_RepPresupuestos
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
params.Add(New ReportParameter("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}")) params.Add(New ReportParameter("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}"))
params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero()))
params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero()))
params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero())) params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero()))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then
Dim DrPresupuesto = DtPresupuestos.FiltroPrimero("Tipo = 0 AND CveAgrupador IS NULL")
Dim Comprometido = DrPresupuesto("Comprometido").ToString.ToDecimal
params.Add(New ReportParameter("Ejercido", Comprometido.ToString.FormatoNumero()))
Else
params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero()))
End If
params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532))) params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532)))

View File

@@ -756,7 +756,7 @@
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true"> <asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem> <asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem> <asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></asp:ListItem>
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem> <asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
</asp:RadioButtonList> </asp:RadioButtonList>

View File

@@ -537,6 +537,8 @@
<asp:BoundField HeaderText="Fecha Ejecución" DataField="FechaEjecucion" DataFormatString="{0:d}" Visible="false" /> <asp:BoundField HeaderText="Fecha Ejecución" DataField="FechaEjecucion" DataFormatString="{0:d}" Visible="false" />
<asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" Visible="false" /> <asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" Visible="false" />
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" Visible="false" /> <asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" Visible="false" />
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" Visible="false" />
<asp:BoundField HeaderText="Forma Pago" DataField="FormaPago" Visible="false" />
<asp:BoundField HeaderText="Contrato" DataField="NumeroContrato" Visible="false" /> <asp:BoundField HeaderText="Contrato" DataField="NumeroContrato" Visible="false" />
<asp:BoundField HeaderText="SubTotal Pend" DataField="SubTotalPendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" Visible="false" /> <asp:BoundField HeaderText="SubTotal Pend" DataField="SubTotalPendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" Visible="false" />
<asp:BoundField HeaderText="IVA Pend" DataField="IVAPendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" Visible="false" /> <asp:BoundField HeaderText="IVA Pend" DataField="IVAPendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" Visible="false" />
@@ -675,7 +677,8 @@
<asp:CheckBox ID="ChkMostrarDescripcionVenta" runat="server" Text="&nbsp;Descripción Venta" Checked="false" /></td> <asp:CheckBox ID="ChkMostrarDescripcionVenta" runat="server" Text="&nbsp;Descripción Venta" Checked="false" /></td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkContrato" runat="server" Text="&nbsp;Contrato" Checked="false" /></td> <asp:CheckBox ID="ChkContrato" runat="server" Text="&nbsp;Contrato" Checked="false" /></td>
<td style="text-align: left;"></td> <td style="text-align: left;">
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text="&nbsp;Método Pago" /></td>
</tr> </tr>
<tr> <tr>
@@ -685,7 +688,8 @@
<asp:CheckBox ID="ChkIVAPend" runat="server" Text="&nbsp;IVA Pendiente" Checked="false" /></td> <asp:CheckBox ID="ChkIVAPend" runat="server" Text="&nbsp;IVA Pendiente" Checked="false" /></td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkIEPSPend" runat="server" Text="&nbsp;IEPS Pendiente" Checked="false" /></td> <asp:CheckBox ID="ChkIEPSPend" runat="server" Text="&nbsp;IEPS Pendiente" Checked="false" /></td>
<td style="text-align: left;"></td> <td style="text-align: left;">
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="&nbsp;Forma Pago" /></td>
</tr> </tr>
<tr runat="server" id="trEnquebranto" visible="false"> <tr runat="server" id="trEnquebranto" visible="false">
<td style="text-align: left;"> <td style="text-align: left;">

View File

@@ -627,13 +627,15 @@ Partial Class RepCxCDetalle
ActivaColumna(44, ChkFechaEjecucion.Checked) ActivaColumna(44, ChkFechaEjecucion.Checked)
ActivaColumna(45, ChkMostrarLineaAdicional.Checked) ActivaColumna(45, ChkMostrarLineaAdicional.Checked)
ActivaColumna(46, ChkMostrarDescripcionVenta.Checked) ActivaColumna(46, ChkMostrarDescripcionVenta.Checked)
ActivaColumna(47, ChkContrato.Checked) ActivaColumna(47, ChkMetodoPago.Checked)
ActivaColumna(48, ChkSubTotalPend.Checked) ActivaColumna(48, ChkFormaPago.Checked)
ActivaColumna(49, ChkIVAPend.Checked) ActivaColumna(49, ChkContrato.Checked)
ActivaColumna(50, ChkIEPSPend.Checked) ActivaColumna(50, ChkSubTotalPend.Checked)
ActivaColumna(51, ChkEnQuebranto.Checked) ActivaColumna(51, ChkIVAPend.Checked)
ActivaColumna(52, ChkEnDemanda.Checked) ActivaColumna(52, ChkIEPSPend.Checked)
ActivaColumna(53, ChkRegistroFirmas.Checked) ActivaColumna(53, ChkEnQuebranto.Checked)
ActivaColumna(54, ChkEnDemanda.Checked)
ActivaColumna(55, ChkRegistroFirmas.Checked)
If SePersonalizo = 1 Then If SePersonalizo = 1 Then
ImgExcelPersonalizado.Visible = True ImgExcelPersonalizado.Visible = True
@@ -641,18 +643,15 @@ Partial Class RepCxCDetalle
ImgExcelPersonalizado.Visible = False ImgExcelPersonalizado.Visible = False
End If End If
CargaDatos() CargaDatos()
RegistraScript("$('#DivPersonalizar').modal('hide');") RegistraScript("$('#DivPersonalizar').modal('hide');")
End Sub End Sub
Private Sub ActivaColumna(Indice As Integer, Activo As Boolean) Private Sub ActivaColumna(Indice As Integer, Activo As Boolean)
If Activo Then If GvDatos.Columns(Indice).Visible <> Activo Then
GvDatos.Columns(Indice).Visible = True GvDatos.Columns(Indice).Visible = Activo
SePersonalizo = 1 SePersonalizo = 1
'Else
' SePersonalizo = 0
End If End If
End Sub End Sub

View File

@@ -25,6 +25,10 @@
<DataField>Autorizado</DataField> <DataField>Autorizado</DataField>
<rd:TypeName>System.Double</rd:TypeName> <rd:TypeName>System.Double</rd:TypeName>
</Field> </Field>
<Field Name="Comprometido">
<DataField>Comprometido</DataField>
<rd:TypeName>System.Double</rd:TypeName>
</Field>
<Field Name="Ejercido"> <Field Name="Ejercido">
<DataField>Ejercido</DataField> <DataField>Ejercido</DataField>
<rd:TypeName>System.Double</rd:TypeName> <rd:TypeName>System.Double</rd:TypeName>
@@ -245,7 +249,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>= IIF( Parameters!PresupuestoRestrictivo.Value = "2", IIF(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value),IIF(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value))</Value> <Value>= IIF( Parameters!PresupuestoRestrictivo.Value = "2", iif(CDec(Fields!Comprometido.Value)=0,"-",Fields!Comprometido.Value), iif(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value))</Value>
<Style> <Style>
<Format>#,0.00</Format> <Format>#,0.00</Format>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color> <Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>

View File

@@ -298,7 +298,7 @@ Partial Public Class General_SaldosMenores
Dim ImporteTotalGasto As Decimal = 0 Dim ImporteTotalGasto As Decimal = 0
Dim MsgError As String = "" Dim MsgError As String = ""
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) CvePrePoliza = ObjConta.AddPrePolizas("SaldosMenores/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3)
Dim tMovto As Boolean = True Dim tMovto As Boolean = True
Dim tConceptoSaldar As Integer = 78 Dim tConceptoSaldar As Integer = 78
@@ -536,7 +536,7 @@ Partial Public Class General_SaldosMenores
End If End If
End If End If
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ClientesAbonar/SaldarI", 47, 0, 0, 1, TxtFecha.Text.ToDate, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("SaldosMenores/SaldarI", 47, 0, 0, 1, TxtFecha.Text.ToDate, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each gr As GridViewRow In GvCxC.Rows For Each gr As GridViewRow In GvCxC.Rows
@@ -722,7 +722,7 @@ Partial Public Class General_SaldosMenores
Dim EsContabilizable As Boolean = If(UsuarioActual.CveEmpresa.Contiene(13, 83), False, True) Dim EsContabilizable As Boolean = If(UsuarioActual.CveEmpresa.Contiene(13, 83), False, True)
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, 0, 0, 1, TxtFecha.Text.ToDate, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("SaldosMenores/SaldarE", 98, 0, 0, 1, TxtFecha.Text.ToDate, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each gr As GridViewRow In GvCxP.Rows For Each gr As GridViewRow In GvCxP.Rows
If gr.FCCheckBox("Chk").Checked Then If gr.FCCheckBox("Chk").Checked Then

View File

@@ -3553,7 +3553,7 @@ Partial Class OC_OC
End If End If
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
If Not GeneraPrePolizaPresupuesto(objOrdenCompra.CveOrdenCompra, objOrdenCompra.IniciaTransacSQL) Then If Not GeneraPrePolizaPresupuesto(objOrdenCompra.CveOrdenCompra, objOrdenCompra.IniciaTransacSQL) Then
HuboError = True HuboError = True
@@ -3717,7 +3717,7 @@ Partial Class OC_OC
TieneError = True TieneError = True
End If End If
If (UsuarioActual.Empresa.Funcionalidad(532) = "1") Then If (UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2")) Then
GeneraPrePolizaPresupuesto(CveOrdenCompra, objOrdenCompra.IniciaTransacSQL, True) GeneraPrePolizaPresupuesto(CveOrdenCompra, objOrdenCompra.IniciaTransacSQL, True)
End If End If
@@ -4190,7 +4190,7 @@ Partial Class OC_OC
Proyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedItem.Text Proyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedItem.Text
End If End If
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
Dim ObjCon As New ClsContratos Dim ObjCon As New ClsContratos
Dim CvePresupuesto As Integer = 0 Dim CvePresupuesto As Integer = 0
Dim Autorizado As Decimal = 0 Dim Autorizado As Decimal = 0
@@ -9090,7 +9090,7 @@ Partial Class OC_OC
Dim respuesta As Boolean = False Dim respuesta As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
Dim ObjCon As New ClsContratos Dim ObjCon As New ClsContratos
Dim CvePresupuesto As Integer = 0 Dim CvePresupuesto As Integer = 0
@@ -9202,7 +9202,7 @@ Partial Class OC_OC
Dim Respuesta As Boolean = True Dim Respuesta As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
Dim CveMonedaPresupuesto As Integer = DdlMoneda.SelectedValue.ToEntero Dim CveMonedaPresupuesto As Integer = DdlMoneda.SelectedValue.ToEntero
Dim TC As Decimal = If(CveMonedaPresupuesto = 1, 1, GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal) Dim TC As Decimal = If(CveMonedaPresupuesto = 1, 1, GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal)

View File

@@ -111,9 +111,6 @@
DataTextField="EstatusOrdenServicio" DataValueField="CveEstatusOrdenServicio" Class="input-sm select2me"> DataTextField="EstatusOrdenServicio" DataValueField="CveEstatusOrdenServicio" Class="input-sm select2me">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -132,29 +129,28 @@
<div runat="server" id="DivSubProyecto" class="col-md-1"> <div runat="server" id="DivSubProyecto" class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass=" input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyecto" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass=" input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Médico:</label> <label class="col-md-1 ">Médico:</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%"> <asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem> <asp:ListItem Value="-1">Todos</asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Especialidad:</label> <label class="col-md-1 ">Especialidad:</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlEspecialidad" CssClass="form-control input-sm select2me" runat="server" DataTextField="Especialidad" Width="100%" DataValueField="CveMedicoEspecialidad"></asp:DropDownList> <asp:DropDownList ID="DdlEspecialidad" CssClass="form-control input-sm select2me" runat="server" DataTextField="Especialidad" Width="100%" DataValueField="CveMedicoEspecialidad"></asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Procedimiento:</label> <label class="col-md-1 ">Procedimiento:</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%"> <asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem> <asp:ListItem Value="-1">Todos</asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Tipo Venta:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlTipoVenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoVenta" DataValueField="CveTipoVenta" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
<div class="row"> <div class="row">

View File

@@ -87,7 +87,8 @@ Partial Class OS_RepOSMedicas
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ") DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
DdlProcedimiento.DataBind() DdlProcedimiento.DataBind()
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa)
DdlTipoVenta.DataBind
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
@@ -102,22 +103,10 @@ Partial Class OS_RepOSMedicas
DdlEspecialidad.DataBind() DdlEspecialidad.DataBind()
DdlEspecialidad.Items.Insert(0, New ListItem("Todas", "-1")) DdlEspecialidad.Items.Insert(0, New ListItem("Todas", "-1"))
DdlClienteSucursal.DataSource = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa)
Dim objcliente As New ClsClientes
If objcliente.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
DdlClienteSucursal.DataSource = objcliente.DtResultados
Else
DdlClienteSucursal.DataSource = Nothing
End If
objcliente.Dispose()
DdlClienteSucursal.DataBind() DdlClienteSucursal.DataBind()
DdlClienteSucursal.Items.Insert(0, New ListItem("Todos", "-1")) DdlClienteSucursal.Items.Insert(0, New ListItem("Todos", "-1"))
'Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) 'Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
'If EsWS Then 'If EsWS Then
' DdlCliente.setEsWebService(True) ' DdlCliente.setEsWebService(True)
@@ -152,7 +141,7 @@ Partial Class OS_RepOSMedicas
If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero,
CveClienteSucursal:=CveClienteSucursal, CveUsuario:=UsuarioActual.CveUsuario) Then CveClienteSucursal:=CveClienteSucursal, CveUsuario:=UsuarioActual.CveUsuario, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjOS.DtResultados GvDatos.DataSource = ObjOS.DtResultados
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
LnkPersonalizar.Visible = True LnkPersonalizar.Visible = True

View File

@@ -456,7 +456,7 @@ Partial Class Sistemas_UsuarioDetalle
TabAsignar.Visible = False TabAsignar.Visible = False
End If End If
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382).ToString = "1" Then
TrDescuentoAutorizado.Visible = True TrDescuentoAutorizado.Visible = True
TrLimiteAutorizacion.Visible = True TrLimiteAutorizacion.Visible = True
DivDatosAutorizacion.Visible = True DivDatosAutorizacion.Visible = True

View File

@@ -17,8 +17,6 @@ Partial Class Ventas_PVCobranza
End Set End Set
End Property End Property
Private Property DineroCaja As Double Private Property DineroCaja As Double
Get Get
Return If(IsNothing(ViewState("DineroCaja")), 0, ViewState("DineroCaja").ToString().ToDecimal()) Return If(IsNothing(ViewState("DineroCaja")), 0, ViewState("DineroCaja").ToString().ToDecimal())
@@ -183,7 +181,7 @@ Partial Class Ventas_PVCobranza
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then If ObjPVenta.DtResultados.Rows.Count > 0 Then
Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString.ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble
DineroCaja = Total DineroCaja = Total
LblEfectivoEsperado.Text = Total.FormatoNumero(2) LblEfectivoEsperado.Text = Total.FormatoNumero(2)
LblEfectivoBloqueo.Text = Total.FormatoNumero(2) LblEfectivoBloqueo.Text = Total.FormatoNumero(2)
@@ -388,6 +386,7 @@ Partial Class Ventas_PVCobranza
End If End If
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal
Dim tCveCorte As Integer = CveCorte
If PagadoSinEfectivo > LtlSaldo.Text.ToDecimal() Then If PagadoSinEfectivo > LtlSaldo.Text.ToDecimal() Then
Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia) Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia)
@@ -422,9 +421,10 @@ Partial Class Ventas_PVCobranza
VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal
VentaActual.UsuarioActual = UsuarioActual VentaActual.UsuarioActual = UsuarioActual
VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
If tCveCorte <= 0 AndAlso DbRowVenta("CveCorte").ToString.ToEntero > 0 Then tCveCorte = DbRowVenta("CveCorte").ToString.ToEntero
Dim CvePrePoliza As Integer Dim CvePrePoliza As Integer
Dim Fecha As Date = NowADS() Dim Fecha As Date = DbRowVenta("Fecha").ToString.ToDate 'NowADS()
Dim MsgError As String = "" Dim MsgError As String = ""
Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal Dim SaldoPendiente As Decimal = DbRowVenta("Saldo").ToString.ToDecimal
@@ -440,75 +440,76 @@ Partial Class Ventas_PVCobranza
Try Try
'FACTURAR LA REMISION PARA HACER EL PAGO 'FACTURAR LA REMISION PARA HACER EL PAGO
If UsuarioActual.CveEmpresa = 189 AndAlso VentaActual.TipoDocto = "Rem" Then If UsuarioActual.CveEmpresa.Contiene(189, 197) AndAlso VentaActual.TipoDocto = "Rem" Then
respFactura = GenerarFactura(VentaActual, ObjVentas2, ObjClientes) respFactura = GenerarFactura(VentaActual, ObjVentas2, ObjClientes)
If respFactura Is Nothing Then If respFactura Is Nothing Then
MsgError = "Ocurrío un error al generar la factura" MsgError = "Ocurrió un error al generar la factura"
ElseIf (respFactura IsNot Nothing AndAlso respFactura.Mensajes.Count > 0) AndAlso respFactura.TieneError Then ElseIf (respFactura IsNot Nothing AndAlso respFactura.Mensajes.Count > 0) AndAlso respFactura.TieneError Then
MsgError = respFactura.Mensajes(0) MsgError = respFactura.Mensajes(0)
End If End If
'REALIZAR EL PAGO EN LA FACTURA 'REALIZAR EL PAGO EN LA FACTURA
If respFactura IsNot Nothing AndAlso Not respFactura.TieneError Then If respFactura IsNot Nothing AndAlso Not respFactura.TieneError Then
CveVenta = respFactura.CveVenta CveVenta = respFactura.CveVenta
End If End If
End If End If
CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) If MsgError = "" Then
CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2) MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
SaldoPendiente -= TxtImporteCredito.Text.ToDecimal SaldoPendiente -= TxtImporteCredito.Text.ToDecimal
PagoAplicado += TxtImporteCredito.Text.ToDecimal PagoAplicado += TxtImporteCredito.Text.ToDecimal
End If
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
SaldoPendiente -= TxtImporteDebito.Text.ToDecimal
PagoAplicado += TxtImporteDebito.Text.ToDecimal
End If
If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
SaldoPendiente -= TxtImporteCheque.Text.ToDecimal
PagoAplicado += TxtImporteCheque.Text.ToDecimal
End If
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
End If
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
PagoAplicado += PagoEfectivo
If PagoAplicado >= SaldoTotalInicial Then
TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero
PagoEfectivo = SaldoPendiente
End If End If
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
SaldoPendiente -= PagoEfectivo
End If
If SaldoPendiente > 0 Then If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
MsgError = "Tiene saldo pendiente por aplicar" MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
End If SaldoPendiente -= TxtImporteDebito.Text.ToDecimal
PagoAplicado += TxtImporteDebito.Text.ToDecimal
End If
If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then
MsgError = "Error al aplicar el corte" MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
End If SaldoPendiente -= TxtImporteCheque.Text.ToDecimal
PagoAplicado += TxtImporteCheque.Text.ToDecimal
End If
If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaTicketImpreso(CveVenta, 0) Then If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
MsgError = "No se pudo desmarcar la impresión" MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
End If SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
End If
Else If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then
MsgError = "Error al registrar prepólizas" Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
PagoAplicado += PagoEfectivo
If PagoAplicado >= SaldoTotalInicial Then
TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero
PagoEfectivo = SaldoPendiente
End If
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
SaldoPendiente -= PagoEfectivo
End If
If SaldoPendiente > 0 Then
MsgError = "Tiene saldo pendiente por aplicar"
End If
If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, tCveCorte) Then
MsgError = "Error al aplicar el corte"
End If
If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaTicketImpreso(CveVenta, 0) Then
MsgError = "No se pudo desmarcar la impresión"
End If
Else
MsgError = "Error al registrar prepólizas"
End If
End If End If
Catch ex As Exception Catch ex As Exception
MsgError = "Error al registrar el pago" MsgError = "Error al registrar el pago"
@@ -517,16 +518,14 @@ Partial Class Ventas_PVCobranza
If MsgError = "" Then If MsgError = "" Then
ObjVentas2.Commit() ObjVentas2.Commit()
Dim msBuild As New StringBuilder()
'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 respFactura IsNot Nothing Then If respFactura IsNot Nothing Then
If Not respFactura.Factura.TimbrarFactura() Then If Not respFactura.Factura.TimbrarFactura() Then
Alert("La factura no se pudo timbrar", TipoMensaje.MsgAdvertencia) msBuild.Append("La factura no se pudo timbrar<br/> ")
End If End If
End If End If
Dim msBuild As New StringBuilder()
If respFactura IsNot Nothing Then If respFactura IsNot Nothing Then
msBuild.Append($"Pago Registrado correctamente.") msBuild.Append($"Pago Registrado correctamente.")
For Each m In respFactura.Mensajes For Each m In respFactura.Mensajes
@@ -632,7 +631,7 @@ Partial Class Ventas_PVCobranza
ObjFactura.GenerarSalidaAlmacen = True ObjFactura.GenerarSalidaAlmacen = True
ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy() ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy()
ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}").ToString().ToEntero() ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero()
ObjFactura.CalculaTotales() ObjFactura.CalculaTotales()
ObjFactura.PreparaTimbre() ObjFactura.PreparaTimbre()
@@ -706,11 +705,11 @@ Partial Class Ventas_PVCobranza
Return Retorno Return Retorno
End Function End Function
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas) As String Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer) As String
Dim Retorno As String = "" Dim Retorno As String = ""
Dim CveIEPago As Integer = 0 Dim CveIEPago As Integer = 0
Dim ErrorConta As Boolean Dim ErrorConta As Boolean
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte) CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte)
If CveIEPago > 0 Then If CveIEPago > 0 Then
Dim Pago As New VentaPago Dim Pago As New VentaPago
Pago.ImportePagoVenta = ImportePago Pago.ImportePagoVenta = ImportePago

View File

@@ -571,11 +571,12 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
{ {
factura.RealizarDevolucionAlmacen = true; factura.RealizarDevolucionAlmacen = true;
} }
if (UsuarioActual.TienePermisoProceso(269) && UsuarioActual.Empresa.Funcionalidad(109) == "1" && factura.TipoDocto == "Ing" && factura.SaldoAlmacen != 0) bool AplicaCancelacionConPagos = false;
if (UsuarioActual.Empresa.Funcionalidad(382) == "1")
{ {
factura.RealizarDevolucionAlmacen = true; AplicaCancelacionConPagos = true;
} }
retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse); retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse,AplicaCancelacionConPagos: AplicaCancelacionConPagos);
} }

198
Ventas/RepPedidosSTF.aspx Normal file
View File

@@ -0,0 +1,198 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPedidosSTF.aspx.vb" Inherits="Ventas_RepPedidosSTF" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.SegundoNivel, .SegundoNivel:hover {
background-color: rgba(172, 195, 222, 0.65) !important;
}
#chartdiv {
width: 100%;
height: 500px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<%-- <li>
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>--%>
<li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li>
<%-- <asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkVerGrafica" runat="server">Ver Grafica</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>--%>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="btn-group pull-right btn-separete">
<%-- <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-fit-height btnopaco" />--%>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div runat="server" id="DivProyecto" class="col-md-2">
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
</div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
<%-- <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<label class="col-md-1 truncate">Vendedor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
<Columns>
<asp:BoundField HeaderText="Grupo" DataField="GPO" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-Width="20%">
<HeaderTemplate>
<asp:Literal runat="server" Text='<%# NowADS().Year %>'></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal runat="server" Text='<%# Eval("Anio1", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="20%">
<HeaderTemplate>
<asp:Literal runat="server" Text='<%# (NowADS().Year - 1) %>'></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal runat="server" Text='<%# Eval("Anio2", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="20%">
<HeaderTemplate>
<asp:Literal runat="server" Text='<%# (NowADS().Year - 2) %>'></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal runat="server" Text='<%# Eval("Anio3", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivTipoCambio" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label></h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
<ContentTemplate>
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
Especifico:
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:Button ID="BtnTipoCambio" runat="server" Text="Aceptar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2"></div>
<label class="col-md-1 truncate">Grafica:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlGrafica" runat="server" AutoPostBack="true" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">&nbsp;&nbsp;&nbsp;Ver:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Total" Value="1"></asp:ListItem>
<asp:ListItem Text="SubTotal" Value="2"></asp:ListItem>
<asp:ListItem Text="IVA" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<br />
<div id="chartdiv"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,50 @@
Option Explicit On
Option Strict On
Imports Extensiones
Partial Class Ventas_RepPedidosSTF
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
End If
End Sub
Private Sub CargaCombos()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
'Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
End Sub
Protected Sub CargaDatos()
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
GvDatos.DataBind()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Select Case e.Row.DBCampo("TipoFila")
Case "1"
e.Row.CssClass = "Totales"
Case "2"
e.Row.CssClass = "SubTotales"
Case "3"
e.Row.CssClass = "Texto"
End Select
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos()
UPDatos.Update()
End Sub
End Class

View File

@@ -9330,6 +9330,7 @@ Partial Class Ventas
e.Row.CssClass = "SubTotales" e.Row.CssClass = "SubTotales"
End If End If
Else Else
e.Row.FCLiteral("LtlPS").Text = String.Format("<a Class='Texto' target='_blank' href='/Inventarios/Kardex.aspx?CvePS={0}&CveAlmacen={1}&FechaI={2}&FechaF={3}'> {4}</a>", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveAlmacen"), e.Row.DBCampo("Fecha").ToDate.AddDays(-7).ToShortDateString, e.Row.DBCampo("Fecha").ToDate.AddDays(7).ToShortDateString, e.Row.DBCampo("PS"))
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
e.Row.FCCheckBox("cbInv").Visible = True e.Row.FCCheckBox("cbInv").Visible = True
@@ -24500,6 +24501,11 @@ Partial Class Ventas
If Not DtTemporal.Columns.Contains("Serie") Then If Not DtTemporal.Columns.Contains("Serie") Then
DtTemporal.Columns.Add("Serie", Type.GetType("System.String")) DtTemporal.Columns.Add("Serie", Type.GetType("System.String"))
End If End If
If Not DtTemporal.Columns.Contains("CveAlmacen") Then DtTemporal.Columns.Add("CveAlmacen", GetType(Integer))
If Not DtTemporal.Columns.Contains("Fecha") Then
Dim colNew As DataColumn = New DataColumn("Fecha", GetType(Date)) With {.DefaultValue = NowADS()}
DtTemporal.Columns.Add(colNew)
End If
GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0 GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> "" GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
@@ -37637,16 +37643,7 @@ Partial Class Ventas
Private Sub CargaDdlClientesSucursal() Private Sub CargaDdlClientesSucursal()
Dim objcliente As New ClsClientes DdlClienteSucursal.DataSource = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa)
If objcliente.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
DdlClienteSucursal.DataSource = objcliente.DtResultados
Else
DdlClienteSucursal.DataSource = Nothing
End If
objcliente.Dispose()
DdlClienteSucursal.DataBind() DdlClienteSucursal.DataBind()
DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1")) DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))