This commit is contained in:
caudillochon
2025-03-19 13:19:48 -07:00
9 changed files with 809 additions and 774 deletions

View File

@@ -9717,12 +9717,12 @@ Public Class ClsPaginas
'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
If Pago.CveMonedaPago > 1 Then
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 296, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, 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, 296, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=Pago.CveVentaNC, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 227, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
Else
'Agregamos Nacional
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 11, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 11, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=Pago.CveVentaNC, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
End If
End If
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' N O T A D E C R E D I T O
@@ -9832,6 +9832,7 @@ Public Class ClsPaginas
Public Property CveMonedaPago As Integer = 1
Public Property TCPago As Decimal = 1
Public Property CveVentaAmortizacion As Integer = 0
Public Property CveVentaNC As Integer = -1
Public Property OtroGastoIngreso As Decimal = 0
'Public Property CveConceptoPago As Integer = -1 'no definido de inicio
Public Property CveCreditoDetalle As Integer = -1

View File

@@ -3547,6 +3547,7 @@ Namespace Modelos
PagoAnt.CveMonedaPago = CveMonedaAnticipo
PagoAnt.TipoPago = "A"
PagoAnt.Fecha = ObjFactura.Fecha
PagoAnt.CveVentaNC = ObjFactura.CveVenta
PagoAnt.CveVentaAmortizacion = RowAnticipo("CveVenta").ToString().ToEntero()
PagoAnt.TCPago = RowAnticipo("TipoCambioPago").ToString().ToDecimal()
PagoAnt.AplicaTraslado = False

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportar" />
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
@@ -127,7 +127,7 @@
<div style="text-align: center;" class="col-sm-12">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnRecibir" runat="server" Text="Devolver Préstamo" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />
<asp:Button ID="BtnRecibir" runat="server" Text="Devolver Préstamo" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" Visible="false" />
</ContentTemplate>
</asp:UpdatePanel>
</div>

View File

@@ -22,12 +22,17 @@ Partial Class Inventarios_PrestamosdeProveedor
End Property
Private Sub Inventarios_PrestamosdeProveedor_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not Page.IsPostBack Then
CargaCombos()
CveMovimiento = 0
CveProveedor = 0
CargaDatos()
If UsuarioActual.TienePermisoProceso(409) Then
BtnRecibir.Visible = True
End If
End If
End Sub

View File

@@ -144,7 +144,7 @@
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1 truncate" style="text-align: right!important">Aplica Almacen</div>
<div class="col-md-1">
<div class="col-md-2">
<asp:DropDownList ID="DdlAplicaInventario" runat="server" CssClass="input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1" Selected="True"> </asp:ListItem>
<asp:ListItem Text="Inventariable" Value="1"></asp:ListItem>
@@ -157,7 +157,7 @@
<div class="col-md-1 truncate" style="text-align: right!important">Grupo:</div>
<div class="col-md-1">
<div class="col-md-2">
<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="Clasificación" Value="2"></asp:ListItem>
@@ -178,7 +178,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None"
DataKeyNames="Gpo,CveAlmacen,CveClasificacion" >
DataKeyNames="Gpo,CveAlmacen,CveClasificacion,FechaInicio,FechaFin" >
<Columns>
<asp:TemplateField HeaderText="Almacén">
<ItemTemplate>

View File

@@ -44,8 +44,11 @@ Partial Class Inventarios_RepAlmacen
End Sub
Private Sub CargaDatos()
Dim objInv As New ClsInventarios
Dim objInv As New ClsInventarios
GVAlmacen.Columns(1).Visible = If(DdlGrupo.SelectedValue.ToEntero = 1, True, False)
GVAlmacen.Columns(1).HeaderText = If(DdlGrupo.SelectedValue.ToEntero = 1, "Almacen", "Clasificación")
Dim FechaI, FechaF As String
FechaI = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim(), "-1")
@@ -98,7 +101,10 @@ Partial Class Inventarios_RepAlmacen
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/RepAlmacen.rdlc", TmpDT, params, "ReporteAlmacen", Formato)
Dim Archivo As String = If(DdlGrupo.SelectedValue.ToEntero = 1, "RepAlmacen.rdlc", "RepAlmacenClasificacion.rdlc")
ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", TmpDT, params, "ReporteAlmacen", Formato)
End Sub
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
GenerarPDF()
@@ -111,18 +117,22 @@ Partial Class Inventarios_RepAlmacen
' e.Row.CssClass = "Totales"
'End If
If e.Row.Cells(0).Text = "" Then
If e.Row.DataKey("Gpo") = "Total" Then
e.Row.CssClass = "Totales"
End If
If e.Row.DataKey("CveAlmacen").ToEntero > 0 Then
Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&FechaInicio={1:d}&FechaCorte={2:d}&Tipo=-1"
e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
<asp:HyperLink ID = "HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}&Tipo=-1", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>-
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"
e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
'If DdlGrupo.SelectedValue.ToEntero = 1 Then
' Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&FechaInicio={e.Row.DataKey("FechaInicio").ToDate.ToString("dd/MM/yyyy")}&FechaCorte={e.Row.DataKey("FechaFin").ToDate.ToString("dd/MM/yyyy")}&Tipo=-1"
' e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
'Else
' 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"
' e.Row.Cells(0).Text = $"<a href='{Liga}' target='_blank' >{e.Row.DataKey("Gpo")}</a>"
'End If
End If
End Sub

View File

@@ -74,31 +74,42 @@ Partial Class Inventarios_ReporteEntradasSalidas
FechaFinal = "-1"
CargaCombos()
GvM.DataBind(True)
If Not IsNothing(Request("CveAlmacen")) Then
DdlAlmacen.SelectedValue = Request("CveAlmacen").ToString()
TxtFechaI.Text = "01/01/2000"
If Not IsNothing(Request("FechaCorte")) Then
TxtFechaF.Text = Request("FechaCorte")
End If
If Not IsNothing(Request("FechaInicio")) And IsDate(Request("FechaInicio")) Then
TxtFechaI.Text = Request("FechaInicio")
End If
If Not IsNothing(Request("Tipo")) Then
DdlMovs.SelectedValueExist(Request("Tipo").ToEntero)
End If
btConsultar_Click(Nothing, Nothing)
End If
CargaRequest()
CargaPermisos()
CargaGvBitacora()
' Lnkcompuxlsinventarios.Visible = UsuarioActual.CveEmpresa = 72
End If
End Sub
Private Sub CargaRequest()
Dim CveAlmacen As Integer = If(Not IsNothing(Request("CveAlmacen")) AndAlso Request("CveAlmacen").ToEntero > 0, Request("CveAlmacen").ToEntero, -1)
Dim CveClasificacion As Integer = If(Not IsNothing(Request("CveClasificacion")) AndAlso Request("CveClasificacion").ToEntero > 0, Request("CveClasificacion").ToEntero, -1)
If CveAlmacen > 0 Or CveClasificacion > 0 Then ' CveClasificacion
DdlAlmacen.SelectedValuesIfExist(CveAlmacen.ToString)
DdlClasificacion.SelectedValueExist(CveClasificacion)
TxtFechaI.Text = "01/01/2000"
If Not IsNothing(Request("FechaCorte")) Then
TxtFechaF.Text = Request("FechaCorte")
End If
If Not IsNothing(Request("FechaInicio")) And IsDate(Request("FechaInicio")) Then
TxtFechaI.Text = Request("FechaInicio")
End If
If Not IsNothing(Request("Tipo")) Then
DdlMovs.SelectedValueExist(Request("Tipo").ToEntero)
End If
CargaDatos()
End If
End Sub
Private Sub CargaPermisos()
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)

View File

@@ -264,7 +264,7 @@
</div>
<div class="col-md-3" style="display:flex; align-items:center">
<div style="width: 240px; display: flex; align-items: center">
<label style="width:100px;">Fecha Inicio:</label>
<label style="width:80px;">Fecha Inicio:</label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -280,7 +280,7 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div style="width: 210px; display: flex; align-items: center">
<label style="width:100px;">Fecha Fin:</label>
<label style="width:80px;">Fecha Fin:</label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">