-- filtrado de gv, de facturas NC
-- mejora en el mensaje de vinculación de NC, con docs relacionados
This commit is contained in:
@@ -156,10 +156,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.centrarUM {
|
|
||||||
line-height: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
select.selecthidden {
|
select.selecthidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -766,7 +762,7 @@
|
|||||||
<%-- 2 --%>
|
<%-- 2 --%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-Width="70px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-Width="70px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlUnidadMedida" CssClass="centrarUM" runat="server" Text='<%# Eval("UM") %>'></asp:Label>
|
<asp:Label ID="LtlUnidadMedida" runat="server" Text='<%# Eval("UM") %>'></asp:Label>
|
||||||
<asp:LinkButton ID="LBAplicarEquivalencia" OnClick="LBAplicarEquivalencia_Click" data-toggle="tooltip" title="Aplicar conversión de equivalencia" Text="" runat="server" Visible="false"> <i class="fa fa-magic"></i></asp:LinkButton>
|
<asp:LinkButton ID="LBAplicarEquivalencia" OnClick="LBAplicarEquivalencia_Click" data-toggle="tooltip" title="Aplicar conversión de equivalencia" Text="" runat="server" Visible="false"> <i class="fa fa-magic"></i></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -4126,9 +4122,6 @@
|
|||||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -4136,9 +4129,6 @@
|
|||||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -4813,14 +4803,15 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label ID="LblAplicado" runat="server"></asp:Label>
|
<asp:Label ID="LblAplicado" runat="server"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row form-group">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 text-right">
|
<div class="col-md-6 text-right">
|
||||||
|
<input type="text" id="TxtBusquedaNC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNC','{0}')", GvFacturaNC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 120px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNC','{0}')", GvFacturaNC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-right">
|
||||||
<asp:UpdatePanel ID="UpChkNCInvNC" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpChkNCInvNC" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:CheckBox ID="ChkNCInvNC" Text="Afecta Rep Sin Entrada" runat="server" />
|
<asp:CheckBox ID="ChkNCInvNC" Text="Afecta Rep Sin Entrada" runat="server" />
|
||||||
@@ -4828,7 +4819,6 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvFacturaNC" OnRowDataBound="GvFacturaNC_RowDataBound"
|
<asp:GridView ID="GvFacturaNC" OnRowDataBound="GvFacturaNC_RowDataBound"
|
||||||
@@ -4837,6 +4827,7 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="ChkFacturaNC" runat="server" />
|
<asp:CheckBox ID="ChkFacturaNC" runat="server" />
|
||||||
|
<span style='display: none'><%# Eval("UUID")%></span>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:HyperLinkField DataTextField="SerieFolio" HeaderText="Folio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField DataTextField="SerieFolio" HeaderText="Folio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||||
@@ -4844,7 +4835,7 @@
|
|||||||
<asp:BoundField HeaderText="Importe/Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe/Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtImporte" runat="server" Width="100%" />
|
<asp:TextBox ID="TxtImporte" runat="server" Width="100%" CssClass="text-right" />
|
||||||
<ajax:FilteredTextBoxExtender ID="FTETxtImporte" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FTETxtImporte" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -3586,7 +3586,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Private Sub CargaPSAlias()
|
Private Sub CargaPSAlias()
|
||||||
|
|
||||||
DdlPSAlias2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
DdlPSAlias2.setEsWebService(True)
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 66 Then
|
If UsuarioActual.CveEmpresa = 66 Then
|
||||||
DdlPSAlias2.ddlWS.Attributes.Add("data-subfamilia", "-1")
|
DdlPSAlias2.ddlWS.Attributes.Add("data-subfamilia", "-1")
|
||||||
@@ -6940,8 +6940,9 @@ Partial Class Compras_Compras
|
|||||||
For Each rw As GridViewRow In GvDeudores.Rows
|
For Each rw As GridViewRow In GvDeudores.Rows
|
||||||
If rw.FCCheckBox("Chk").Checked Then
|
If rw.FCCheckBox("Chk").Checked Then
|
||||||
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||||
IdCtaContable = CtaProveedorDeudores
|
IdCtaContable = CtaProveedorDeudores
|
||||||
|
Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero
|
||||||
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If IdCtaContable = 0 Then
|
If IdCtaContable = 0 Then
|
||||||
@@ -6949,7 +6950,7 @@ Partial Class Compras_Compras
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True : Exit For
|
ErrorPrepoliza = True : Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -6961,10 +6962,11 @@ Partial Class Compras_Compras
|
|||||||
For Each rw As GridViewRow In GvDeudores.Rows
|
For Each rw As GridViewRow In GvDeudores.Rows
|
||||||
If rw.FCCheckBox("Chk").Checked Then
|
If rw.FCCheckBox("Chk").Checked Then
|
||||||
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||||
IdCtaContable = CtaProveedorDeudores
|
IdCtaContable = CtaProveedorDeudores
|
||||||
|
Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -20133,35 +20135,24 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacioandos As List(Of String))
|
Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacioandos As List(Of String))
|
||||||
|
|
||||||
|
|
||||||
If UUIDSListRelacioandos.Count > 0 Then
|
If UUIDSListRelacioandos.Count > 0 Then
|
||||||
Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal
|
Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal
|
||||||
Dim SaldoNotaPorAplicar As Decimal = SaldoNota
|
Dim SaldoNotaPorAplicar As Decimal = SaldoNota
|
||||||
Dim CountAplicacion As Integer = 0
|
Dim CountAplicacion As Integer = 0
|
||||||
|
|
||||||
Dim sbNoencontrados As New StringBuilder
|
Dim sbNoencontrados As New StringBuilder
|
||||||
|
|
||||||
|
|
||||||
For Each UUID As String In UUIDSListRelacioandos
|
For Each UUID As String In UUIDSListRelacioandos
|
||||||
|
|
||||||
UUID = UUID.ToUpper
|
UUID = UUID.ToUpper
|
||||||
Dim UUIDEncontrado As Boolean = False
|
Dim UUIDEncontrado As Boolean = False
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvFacturaNC.Rows
|
For Each GvRow As GridViewRow In GvFacturaNC.Rows
|
||||||
Dim UUIDGv As String = GvRow.DataKey("UUID").Trim.ToUpper
|
Dim UUIDGv As String = GvRow.DataKey("UUID").Trim.ToUpper
|
||||||
|
If UUID.Trim.ToUpper = UUIDGv Then
|
||||||
|
|
||||||
If UUID.Trim.ToUpper = GvRow.DataKey("UUID").Trim.ToUpper Then
|
|
||||||
UUIDEncontrado = True
|
UUIDEncontrado = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
If Not UUIDEncontrado Then sbNoencontrados.Append($"{UUID}, <br/>")
|
||||||
If Not UUIDEncontrado Then
|
|
||||||
sbNoencontrados.Append($"{UUID},")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim TeminarAmortizacion As Boolean = False
|
Dim TeminarAmortizacion As Boolean = False
|
||||||
@@ -20176,19 +20167,18 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If SaldoFactura <= SaldoNotaPorAplicar Then
|
If SaldoFactura <= SaldoNotaPorAplicar Then
|
||||||
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
|
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
|
||||||
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.ToString("###,###,###.00")
|
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
|
||||||
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If SaldoFactura >= SaldoNotaPorAplicar Then
|
If SaldoFactura >= SaldoNotaPorAplicar Then
|
||||||
|
|
||||||
GvRow.FCTextBox("TxtImporte").Text = SaldoNotaPorAplicar.ToString("###,###,###.00")
|
GvRow.FCTextBox("TxtImporte").Text = SaldoNotaPorAplicar.FormatoNumero
|
||||||
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
||||||
SaldoNotaPorAplicar = 0
|
SaldoNotaPorAplicar = 0
|
||||||
TeminarAmortizacion = True
|
TeminarAmortizacion = True
|
||||||
|
|
||||||
Else
|
Else
|
||||||
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.ToString("###,###,###.00")
|
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
|
||||||
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
||||||
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
|
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
|
||||||
|
|
||||||
@@ -20198,36 +20188,28 @@ Partial Class Compras_Compras
|
|||||||
CountAplicacion = CountAplicacion + 1
|
CountAplicacion = CountAplicacion + 1
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If SaldoNotaPorAplicar <= 0 Then
|
If SaldoNotaPorAplicar <= 0 Then
|
||||||
TeminarAmortizacion = True
|
TeminarAmortizacion = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If TeminarAmortizacion Then
|
If TeminarAmortizacion Then
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
Dim TipoMensaje As TipoMensaje = TipoMensaje.ToastInformacion
|
||||||
|
|
||||||
Dim TipoMesaje As TipoMensaje = TipoMensaje.ToastInformacion
|
TipoMensaje = If(sbNoencontrados.ToString.Length > 0 Or (SaldoNotaPorAplicar <> 0), TipoMensaje.ToastAdventencia, TipoMensaje)
|
||||||
|
|
||||||
TipoMesaje = If(sbNoencontrados.ToString.Length > 0 Or (SaldoNotaPorAplicar <> 0), TipoMensaje.ToastAdventencia, TipoMesaje)
|
|
||||||
|
|
||||||
|
|
||||||
Dim MsgSalida As String = ""
|
Dim MsgSalida As String = ""
|
||||||
If sbNoencontrados.ToString.Length > 0 Then
|
If sbNoencontrados.ToString.Length > 0 Then
|
||||||
MsgSalida = $"UUIDS no encotradas o sin saldo: {sbNoencontrados.ToString()} <br/>"
|
MsgSalida = $"Folios Fiscales no encontradas o sin saldo: {sbNoencontrados } <br/><br/>"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MsgSalida = $"{MsgSalida}Se seleccionó {(SaldoNota - SaldoNotaPorAplicar).ToString("###,###,###.00")} de {SaldoNota.ToString("###,###,###.00")} a {CountAplicacion} factura{If(CountAplicacion > 0, "s", "")}."
|
MsgSalida = $"{MsgSalida} Se seleccionó $ {(SaldoNota - SaldoNotaPorAplicar).FormatoNumero} de $ {SaldoNota.FormatoNumero} a {CountAplicacion} factura {If(CountAplicacion > 0, "s", "")}."
|
||||||
|
|
||||||
Alert(MsgSalida, TipoMesaje)
|
Alert(MsgSalida, TipoMensaje)
|
||||||
|
|
||||||
If CountAplicacion > 0 Then
|
If CountAplicacion > 0 Then
|
||||||
BtnFacturaNC_Click(Nothing, Nothing)
|
BtnFacturaNC_Click(Nothing, Nothing)
|
||||||
@@ -20235,8 +20217,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -20244,8 +20224,6 @@ End Class
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Class MMensajeDevolucion
|
Public Class MMensajeDevolucion
|
||||||
Public Property CveMovimiento As Integer
|
Public Property CveMovimiento As Integer
|
||||||
Public Property TieneError As Boolean
|
Public Property TieneError As Boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user