This commit is contained in:
2020-02-19 20:05:43 -07:00
19 changed files with 707 additions and 313 deletions

View File

@@ -72,15 +72,77 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate> <ContentTemplate>
<asp:GridView runat="server" ID="GvDatos" data-sort="true" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos con los filtros seleccionados" ToolTip="Listado de Movimientos" DataKeyNames="Codigo,Codigo_Clientes,Total" CssClass="Widthall table table-striped table-hover ScrollAD" GridLines="None"> <asp:GridView runat="server" ID="GvDatos" data-sort="true" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos con los filtros seleccionados"
ToolTip="Listado de Movimientos" DataKeyNames="Codigo,Codigo_Clientes,Total,CveCliente,NombreComercial" CssClass="Widthall table table-striped table-hover ScrollAD" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Tipo" DataField="Codigo"/> <asp:BoundField HeaderText="Tipo" DataField="Codigo" />
<asp:BoundField HeaderText="Clientes/Grupos" DataField="Codigo_Clientes"/> <asp:BoundField HeaderText="Clientes/Grupos" DataField="Codigo_Clientes" />
<asp:BoundField HeaderText="Cantidad" DataField="Total" DataFormatString="{0:N0}"/> <asp:BoundField HeaderText="Cantidad" DataField="Total" DataFormatString="{0:N0}" />
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:LinkButton ID="LnkCantidad" OnClick="CargarVentasGrupo" Text='<%# Eval("Total", "{0:N0}") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div id="ModalVentasAvance" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content" style="width: 700px;">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label Text="Ventas del agrupador" ID="LbTituloModalVentasAvance" runat="server" /></h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpVentasAvance" UpdateMode="Conditional">
<ContentTemplate>
<table>
<tr>
<td>Cliente: </td>
<td>
<asp:Label ID="LbCliente" Text="123" Font-Bold="true" runat="server" /></td>
</tr>
<tr>
<td>Tamaño: </td>
<td>
<asp:Label ID="LbTam" Text="123" Font-Bold="true" runat="server" /></td>
</tr>
</table>
<div style="overflow-y: auto; height: 400px;">
<asp:GridView ID="GvVentas" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Fecha" DataTextField="Fecha" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Sucursal" DataTextField="SubProyecto" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Cantidad" DataTextField="Cantidad" Target="_blank" ItemStyle-Width="5%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Total" DataTextField="Total" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Dim Acum As New ClsAcumuladores Dim Acum As New ClsAcumuladores
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar
DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'")
End If End If
@@ -61,18 +61,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
' e.Row.CssClass = "SubTotales2" e.Row.CssClass = "SubTotales2"
'End If End If
If e.Row.DBCampo("TipoHeader").ToString = "1" Then
e.Row.CssClass = "Totales"
ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then
e.Row.CssClass = "SubTotales"
ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then
e.Row.CssClass = "SubTotales2"
End If
End If
End If
End Sub End Sub
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
@@ -96,4 +89,19 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
End Sub End Sub
Public Sub CargarVentasGrupo(sender As Object, e As EventArgs)
Dim tempLink As LinkButton = CType(sender, LinkButton)
Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow)
LbCliente.Text = renglon.DataKey("NombreComercial")
LbTam.Text = renglon.DataKey("Codigo")
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetUsadosClasificacionVentas(renglon.DataKey("CveCliente"), renglon.DataKey("Codigo"), TxtFechaI.Text, TxtFechaF.Text) Then
GvVentas.DataSource = ObjAcum.DtResultados
End If
ObjAcum.Dispose()
GvVentas.DataBind()
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
End Sub
End Class End Class

View File

@@ -1039,6 +1039,29 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function End Function
Public Function GetUsadosClasificacionVentas(CveCliente As Integer, Codigo As String, FechaInicio As String, FechaFin As String) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Acum_UsadosClasificacionVentas")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region " IDisposable Support " #Region " IDisposable Support "

View File

@@ -1858,7 +1858,7 @@ Public Class ClsCompProveedores
Return Retorno Return Retorno
End Function End Function
Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer) As Boolean Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -1868,6 +1868,7 @@ Public Class ClsCompProveedores
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal .Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
End With End With

View File

@@ -1074,7 +1074,7 @@ Public Class ClsContPAQi
StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ") StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ")
StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ") StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ")
StrSQL.AppendLine(" INNER JOIN TiposPolizas t ON mp.TipoPol = t.Codigo ") StrSQL.AppendLine(" INNER JOIN TiposPolizas t ON mp.TipoPol = t.Codigo ")
StrSQL.AppendLine(" LEFT JOIN SIG_Resp_OIC.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ") StrSQL.AppendLine(" LEFT JOIN SERVIDOR.Ventas.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ")
StrSQL.AppendLine(" LEFT JOIN SegmentosNegocio s ON mp.IdSegNeg = s.id ") StrSQL.AppendLine(" LEFT JOIN SegmentosNegocio s ON mp.IdSegNeg = s.id ")
StrSQL.AppendLine(" WHERE (@IdPoliza = -1 OR mp.IdPoliza = @IdPoliza) ") StrSQL.AppendLine(" WHERE (@IdPoliza = -1 OR mp.IdPoliza = @IdPoliza) ")
StrSQL.AppendLine(" AND (@Eje = -1 OR mp.Ejercicio = @Eje) ") StrSQL.AppendLine(" AND (@Eje = -1 OR mp.Ejercicio = @Eje) ")

View File

@@ -617,8 +617,8 @@ Partial Class Bancos_PopIECompras
MovimientoPagar = New IEMovimiento MovimientoPagar = New IEMovimiento
MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal
MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal
MovimientoPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal MovimientoPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal.RoundSQL
MovimientoPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal MovimientoPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal.RoundSQL
MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal
MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal
MovimientoPagar.Total = dr("Total").ToString.ToDecimal MovimientoPagar.Total = dr("Total").ToString.ToDecimal
@@ -1982,6 +1982,75 @@ Partial Class Bancos_PopIECompras
End If End If
End If End If
End If End If
Case 285 'Ret IVA x Acreditar Acreditable Servicios
If MovimientoPagar.ConceptoRetIVA = 5 Then
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
ImporteMovimiento = MovimientoPagar.RetIVA * PorcentajePago
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
ImporteMX = Math.Round(ImporteMX, 2)
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
'Conta ContPAQ
If IdCtaContRetIVA > 0 Then
IdCtaContable = IdCtaContRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
Case 286 'Ret IVA Acreditable Servicio
If MovimientoPagar.ConceptoRetIVA = 5 Then
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
ImporteMovimiento = MovimientoPagar.RetIVA * PorcentajePago
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
ImporteMX = Math.Round(ImporteMX, 2)
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
'Conta ContPAQ
If IdCtaContRetIVAAcreditable > 0 Then
IdCtaContable = IdCtaContRetIVAAcreditable
ElseIf UsuarioActual.Empresa.Funcionalidad(582).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(582).ToEntero
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
'Case 16 'Ret ISR X Acreditar 'Case 16 'Ret ISR X Acreditar
' If MovimientoPagar.ConceptoRetISR = 1 Then ' If MovimientoPagar.ConceptoRetISR = 1 Then
' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then ' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
@@ -2280,7 +2349,7 @@ Partial Class Bancos_PopIECompras
Else Else
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
ImporteMovimiento = MovimientoPagar.IVADeducible * PorcentajePago ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago).RoundSQL
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago) ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
@@ -2579,8 +2648,8 @@ Partial Class Bancos_PopIECompras
End If End If
ObjCreditos.Dispose() ObjCreditos.Dispose()
Else Else
IdCtaContable = CtaProveedor IdCtaContable = IdCuentaBancaria
CveCuenta = CveCuentaProveedor CveCuenta = CveCuentaCliente
End If End If
Else Else
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
@@ -2675,6 +2744,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = Math.Round(ImporteMX, 2)
TimpocambioGeneral = tipoCambioPago TimpocambioGeneral = tipoCambioPago
IdCtaContable = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("IdCtaContPersonal", "").ToEntero
Else Else
ImporteMovimiento = 0 ImporteMovimiento = 0
End If End If
@@ -3146,7 +3217,7 @@ Partial Class Bancos_PopIECompras
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If ObjMov.ValorPolizaDescuadre > 0 Then If ObjMov.ValorPolizaDescuadre > 0 Then
'MsgError = ObjMov.MensajePolizaDescuadre MsgError = ObjMov.MensajePolizaDescuadre
GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If End If
End If End If

View File

@@ -1261,6 +1261,72 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
End If End If
End If End If
Case 285 'Ret IVA x Acreditar Acreditable Servicios
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
importeMX = Math.Round(importeMX, 2)
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
'Conta ContPAQ
If IdCtaContRetIVA > 0 Then
IdCtaContable = IdCtaContRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
Case 286 'Ret IVA Acreditable Servicio
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
importeMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
importeMX = Math.Round(importeMX, 2)
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
'Conta ContPAQ
If IdCtaContRetIVAAcreditable > 0 Then
IdCtaContable = IdCtaContRetIVAAcreditable
ElseIf UsuarioActual.Empresa.Funcionalidad(582).ToEntero > 0 Then
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(582).ToEntero
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
'Case 16 'Ret ISR X Acreditar 'Case 16 'Ret ISR X Acreditar
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then ' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then ' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then

View File

@@ -104,6 +104,15 @@ Partial Class Compras_Compras
Set(ByVal value As List(Of String)) Set(ByVal value As List(Of String))
ViewState("ListaDocumentos") = value ViewState("ListaDocumentos") = value
End Set End Set
End Property
Public Property TieneAnticiposXML As Boolean
Get
TieneAnticiposXML = DirectCast(ViewState("TieneAnticiposXML"), Boolean)
End Get
Set(ByVal value As Boolean)
ViewState("TieneAnticiposXML") = value
End Set
End Property End Property
Private Property DTOCTemp As DataTable Private Property DTOCTemp As DataTable
@@ -873,6 +882,7 @@ Partial Class Compras_Compras
Private Property Descuentos As Decimal = 0 Private Property Descuentos As Decimal = 0
Private Property Amortizaciones As Decimal = 0
Private Property EmisorRFC As String Private Property EmisorRFC As String
Private Property ReceptorRFC As String Private Property ReceptorRFC As String
Private Property TrasladoIVA As Decimal = 0 Private Property TrasladoIVA As Decimal = 0
@@ -1116,6 +1126,7 @@ Partial Class Compras_Compras
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip") 'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
'ImgBtnBuscarOC.Attributes.Add("data-placement", "top") 'ImgBtnBuscarOC.Attributes.Add("data-placement", "top")
CargaDatosAgregarPS() CargaDatosAgregarPS()
TieneAnticiposXML = False
Modalidad = "" Modalidad = ""
Version = "" Version = ""
CveMetodoPago = -1 CveMetodoPago = -1
@@ -1405,8 +1416,11 @@ Partial Class Compras_Compras
End If End If
'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
LblSaldoFactura.Text = If(CveCompra > 0, Saldo.FormatoNumero, TxtTotal.Text.FormatoNumero) LblSaldoFactura.Text = If(CveCompra > 0, Saldo.FormatoNumero, TxtTotal.Text.FormatoNumero)
'cuando es factura con amortizacion, el importe a descontar es el saldo que se debe de aplicar para la amortizacion
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 Then
LblSaldoFactura.Text = TmpDT.SUMD("Descuento").ToString
End If
If UsuarioActual.CveEmpresa = 126 And CveCompra > 0 Then If UsuarioActual.CveEmpresa = 126 And CveCompra > 0 Then
LnkExportaGv.Visible = True LnkExportaGv.Visible = True
@@ -1829,6 +1843,20 @@ Partial Class Compras_Compras
VerVales.Visible = True VerVales.Visible = True
End If End If
If TieneAnticiposXML Then 'si tiene anticipos, limpia los descuentos
'LblAmortizacion.Text = ImporteAnticipo.FormatoNumero
TxtDescuento.Text = "0.00"
LblAmortizacion.Text = Descuentos.FormatoNumero
'limpia los descuentos
For Each drr As DataRow In TmpDT.Rows
'drr("Total") = drr("Total").ToString.ToDecimal + drr("Descuento").ToString.ToDecimal
drr("Amortizacion") = drr("Descuento") 'pasamos el importe de descuento a amortizacion
drr("Descuento") = 0.00
Next
Amortizaciones = Descuentos
Descuentos = 0
End If
Dim Msg As String = "" Dim Msg As String = ""
@@ -2127,7 +2155,7 @@ Partial Class Compras_Compras
Private Sub ValidacionesTotalesXml() Private Sub ValidacionesTotalesXml()
Dim Msg As String = "" Dim Msg As String = ""
Dim SubtotalTemp = TmpDT.SUM("Total") + Math.Round(TmpDT.SUM("Descuento"), 2) Dim SubtotalTemp = TmpDT.SUM("Total") + Math.Round(TmpDT.SUM("Descuento") + Math.Round(TmpDT.SUM("Amortizacion")), 2)
Dim DescuentosTemp = TmpDT.SUM("Descuento") Dim DescuentosTemp = TmpDT.SUM("Descuento")
Dim Subtotal2Temp = TmpDT.SUM("Total") Dim Subtotal2Temp = TmpDT.SUM("Total")
Dim IVATemp = TmpDT.SUM("IVA") Dim IVATemp = TmpDT.SUM("IVA")
@@ -4369,7 +4397,7 @@ Partial Class Compras_Compras
'METODO DE PREPOLIZA DE ALMACEN 'METODO DE PREPOLIZA DE ALMACEN
If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
If ImporteAlmacen > 0 Then If ImporteAlmacen > 0 Then
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
If (CveImportacion > 0 Or CveFlete > 0) Then If (CveImportacion > 0 Or CveFlete > 0) Then
@@ -4403,10 +4431,17 @@ Partial Class Compras_Compras
End If End If
'hay amortización directa como descuento. RMF Temporal 'hay amortización directa como descuento. RMF Temporal
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.CveEmpresa = 119 Then
If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then 'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
TxtDescuento.Text = LblAmortizacion.Text ' TxtDescuento.Text = LblAmortizacion.Text
LblAmortizacion.Text = "0.00" ' LblAmortizacion.Text = "0.00"
End If 'End If
'o si el descuento es igual a la amortizacion
'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then
' TxtDescuento.Text = LblAmortizacion.Text
' LblAmortizacion.Text = "0.00"
'End If
End If End If
'Compra 'Compra
@@ -6175,36 +6210,31 @@ Partial Class Compras_Compras
Else Else
importeMovimiento = 0 importeMovimiento = 0
End If End If
Case 285 'Perdida Case 285 'Ret IVA 6% Servicios
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjConta.DtResultados.Rows.Count > 0 Then 'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero ' If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
' End If
'End If
If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
If CveMoneda = 2 Then
importeMN = TmpDT.SUMD("RetIVA") * TxtTC.Text.ToDecimal
Else
importeMN = TmpDT.SUMD("RetIVA")
importeMovimiento = TmpDT.SUMD("RetIVA")
End If End If
Else
importeMovimiento = 0
End If End If
If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
If CveMoneda = 2 Then
importeMN = TmpDT.SUMD("RetIVA") * TxtTC.Text.ToDecimal
Else
importeMN = TmpDT.SUMD("RetIVA")
importeMovimiento = TmpDT.SUMD("RetIVA")
End If
Else
importeMovimiento = 0
End If
Case 6 'Compra Case 6 'Compra
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
@@ -6784,6 +6814,7 @@ Partial Class Compras_Compras
Else Else
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
Exit For
End If End If
' FLUCTUACION CAMBIARIA ' FLUCTUACION CAMBIARIA
@@ -7014,7 +7045,7 @@ Partial Class Compras_Compras
Exit For Exit For
End If End If
If TxtTotal.Text.ToDouble > 0 Then If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then
importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador importeMNNC = importeMovimientoNC * tipoCambioActual * Multiplicador
IdCtaContable = CtaProveedorExtranjera ' CtaProveedorAnticiposExtranjera IdCtaContable = CtaProveedorExtranjera ' CtaProveedorAnticiposExtranjera
CveCuenta = CveCuentaProveedorExtranjera 'CveCuentaProveedorAnticiposExtranjera CveCuenta = CveCuentaProveedorExtranjera 'CveCuentaProveedorAnticiposExtranjera
@@ -7116,7 +7147,7 @@ Partial Class Compras_Compras
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
If TxtTotal.Text.ToDouble > 0 Then If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then
Dim IdCtaContablePago As Integer = CtaProveedor Dim IdCtaContablePago As Integer = CtaProveedor
Dim CveCuentaPago As Integer = CveCuentaProveedor Dim CveCuentaPago As Integer = CveCuentaProveedor
Dim usacomplementariaProveedor As Boolean = False Dim usacomplementariaProveedor As Boolean = False
@@ -7177,15 +7208,19 @@ Partial Class Compras_Compras
Dim PorcentajePagoAnt As Decimal = importeMovimiento / If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDecimal) Dim PorcentajePagoAnt As Decimal = importeMovimiento / If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDecimal)
Dim ImporteIVA As Decimal = Math.Round(PorcentajePagoAnt * TxtIVA.Text.ToDecimal, 2) Dim ImporteIVA As Decimal = Math.Round(PorcentajePagoAnt * TxtIVA.Text.ToDecimal, 2)
'Agregamos el 14
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
'Agregamos el 19 If ImporteIVA <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then 'Agregamos el 14
ErrorPrepoliza = True If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), CveCuenta:=CveCuentaIvaxAcreditar, PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
End If ErrorPrepoliza = True
End If
'Agregamos el 19
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
End If End If
@@ -7502,10 +7537,11 @@ Partial Class Compras_Compras
End Select End Select
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Ant.Importe, " ", CveConceptoAnt, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Ant.Importe, " ", CveConceptoAnt, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then
' ImporteAnticipo += Ant.Importe ' RESTO DEL IMPORTE POR SI QUEDA DIFERENCIA DE LA SUMA DE LOS ANTICIPOS Y EL PROVEEDOR TIENE QUE PAGAR ' ImporteAnticipo += Ant.Importe ' RESTO DEL IMPORTE POR SI QUEDA DIFERENCIA DE LA SUMA DE LOS ANTICIPOS Y EL PROVEEDOR TIENE QUE PAGAR
'movimiento de pago proveedor, --no se regisra porque no se registra el total de la compra como deuda del proveedor, solo lo que queda a deber 'movimiento de pago proveedor, --no se regisra porque no se registra el total de la compra como deuda del proveedor, solo lo que queda a deber
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then 'si es l moviemiento es de amortizacion con descuento, no registra el pago, ya esta descontado
If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then
ErrorMovtosCxP = True ErrorMovtosCxP = True
End If End If
PorcentajePago = (Ant.Importe) / TxtTotal.Text.ToDecimal PorcentajePago = (Ant.Importe) / TxtTotal.Text.ToDecimal
@@ -8131,9 +8167,11 @@ Partial Class Compras_Compras
Contador += 1 Contador += 1
'If gvr.DataKey("Fecha").ToDate > Fecha Then Fecha = gvr.DataKey("Fecha").ToDate 'guardo la fecha mayor 'If gvr.DataKey("Fecha").ToDate > Fecha Then Fecha = gvr.DataKey("Fecha").ToDate 'guardo la fecha mayor
Importe += gvr.FCTextBox("TxtAnticipo").Text.ToDouble Importe += gvr.FCTextBox("TxtAnticipo").Text.ToDouble
If Math.Round(Importe, 2) - Math.Round(CompraSaldo, 2) > 0.01 Then gvr.FCTextBox("TxtAnticipo").Text = "" : gvr.FCCheckBox("Chk").Checked = False If Math.Round(Importe, 2) - Math.Round(CompraSaldo, 2) > 0.01 Then gvr.FCTextBox("TxtAnticipo").Text = "" : gvr.FCCheckBox("Chk").Checked = False
End If End If
Next Next
Else Else
Contador = 1 Contador = 1
End If End If
@@ -9067,7 +9105,8 @@ Partial Class Compras_Compras
Next Next
End If End If
LblAmortizacion.Text = ImporteAnticipo.FormatoNumero LblAmortizacion.Text = ImporteAnticipo.FormatoNumero
UpPS.Update() UpPS.Update()
End If End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAnticipos")) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAnticipos"))
@@ -10119,6 +10158,7 @@ Partial Class Compras_Compras
If documento.Attributes("UUID").Value <> "" Then If documento.Attributes("UUID").Value <> "" Then
ListaDocumentos.Add(documento.Attributes("UUID").Value) ListaDocumentos.Add(documento.Attributes("UUID").Value)
End If End If
TieneAnticiposXML = True
Next Next
End If End If
End If End If
@@ -10287,10 +10327,11 @@ Partial Class Compras_Compras
e.Row.BackColor = Drawing.Color.LightGray e.Row.BackColor = Drawing.Color.LightGray
Else Else
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(3).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(3).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("Saldo").ToDouble = 0 Then e.Row.FCLiteral("LtlAnticipos").Text = "" If e.Row.DBCampo("Saldo").ToDouble = 0 Then e.Row.FCLiteral("LtlAnticipos").Text = ""
Dim ImporteAmortizacion As Decimal = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDecimal)
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1},{2});", e.Row.FCTextBox("TxtAnticipo").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDouble)), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1},{2});", e.Row.FCTextBox("TxtAnticipo").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDouble)), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
If ChkNCInv.Checked Then If ChkNCInv.Checked Then
e.Row.FCCheckBox("Chk").CssClass = "ChkAntNC" e.Row.FCCheckBox("Chk").CssClass = "ChkAntNC"
@@ -10303,6 +10344,8 @@ Partial Class Compras_Compras
Entro = True Entro = True
End If End If
Next Next
'permite vincular otro folio fiscal.
Entro = True
If Not Entro Then e.Row.FCCheckBox("Chk").Enabled = False If Not Entro Then e.Row.FCCheckBox("Chk").Enabled = False
End If End If
End If End If
@@ -10614,6 +10657,7 @@ Partial Class Compras_Compras
DTConceptos.Columns.Add("Descuento", GetType(Double)) DTConceptos.Columns.Add("Descuento", GetType(Double))
DTConceptos.Columns.Add("IVA", GetType(Double)) DTConceptos.Columns.Add("IVA", GetType(Double))
DTConceptos.Columns.Add("Total", GetType(Double)) DTConceptos.Columns.Add("Total", GetType(Double))
DTConceptos.Columns.Add("Amortizacion", GetType(Double))
End Sub End Sub
'Private Sub AddPS(Cantidad As Double, UM As String, PS As String, PU As Double, IVA As Double, Descuento As Double, Optional Total As Double = 0) 'Private Sub AddPS(Cantidad As Double, UM As String, PS As String, PU As Double, IVA As Double, Descuento As Double, Optional Total As Double = 0)
' Dim Row As DataRow = Nothing ' Dim Row As DataRow = Nothing
@@ -11961,14 +12005,19 @@ Partial Class Compras_Compras
#End Region #End Region
#Region " AJUSTA IMPORTES " #Region " AJUSTA IMPORTES "
Private Sub AjustaImporteUltimoConcepto(ImporteAjuste As Decimal, Optional EsCarga As Boolean = False) Private Sub AjustaImporteUltimoConcepto(ImporteAjuste As Decimal, Optional EsCarga As Boolean = False)
'Dim TempSubTotal = TxtSubTotal.Text.ToDouble 'Dim TempSubTotal = TxtSubTotal.Text.ToDouble
Dim Amortizacion As Decimal = 0
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
Amortizacion = LblAmortizacion.Text.ToDecimal
End If
If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste
'Dim ImporteAjuste As Decimal = Total - (SubTotal2 + IVA - RetencionIVA - RetencionIVA - RetencionISR + IEPS + OtrosImpuestos) 'Dim ImporteAjuste As Decimal = Total - (SubTotal2 + IVA - RetencionIVA - RetencionIVA - RetencionISR + IEPS + OtrosImpuestos)
Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1) Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1)
Dim tPU As Decimal Dim tPU As Decimal
If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then
tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal
Else Else
@@ -11985,7 +12034,7 @@ Partial Class Compras_Compras
Descuentos = TmpDT.SUM("Descuento").ToString.ToDecimal Descuentos = TmpDT.SUM("Descuento").ToString.ToDecimal
End If End If
TxtSubTotal.Text = (SubTotal + Descuentos).FormatoNumero() TxtSubTotal.Text = (SubTotal + Descuentos).FormatoNumero()
TxtSubTotal2.Text = SubTotal.FormatoNumero TxtSubTotal2.Text = (SubTotal - Amortizacion).FormatoNumero
TxtDescuento.Text = Descuentos.FormatoNumero() TxtDescuento.Text = Descuentos.FormatoNumero()
SubTotalConceptos = SubTotal SubTotalConceptos = SubTotal
GvPS.DataSource = TmpDT : GvPS.DataBind() GvPS.DataSource = TmpDT : GvPS.DataBind()
@@ -14863,8 +14912,12 @@ Partial Class Compras_Compras
'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub 'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub
'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub 'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub
Dim SubTotalGV = 0.0D Dim SubTotalGV = 0.0D
Dim SubTotalCompra = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteSinImpuestos"), TmpDT.SUM("Total").ToString.ToDecimal) Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
Amortizacion = TmpDT.SUMD("ImporteSinImpuestos")
End If
Dim SubTotalCompra As Decimal = Amortizacion
Dim DiferenciaPermitida = 1 Dim DiferenciaPermitida = 1
Dim Cont = 0 Dim Cont = 0
For Each gvr As GridViewRow In GvOC1.Rows For Each gvr As GridViewRow In GvOC1.Rows
@@ -14931,7 +14984,14 @@ Partial Class Compras_Compras
If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Or VinculacionCompleta Then If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Or VinculacionCompleta Then
TotalRows += 1 TotalRows += 1
End If End If
Next Next
Dim TieneAmortizacion As Boolean = False
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
TieneAmortizacion = True
End If
For Each gvr As GridViewRow In GvOC1.Rows For Each gvr As GridViewRow In GvOC1.Rows
If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Or VinculacionCompleta Then If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Or VinculacionCompleta Then
dr = DTOCGV.Rows(gvr.RowIndex) dr = DTOCGV.Rows(gvr.RowIndex)
@@ -14963,7 +15023,7 @@ Partial Class Compras_Compras
Dim RetISR As Double = dr("RetISRPorcentaje").ToString.ToDecimal Dim RetISR As Double = dr("RetISRPorcentaje").ToString.ToDecimal
Dim IEPSPS As Double = dr("IEPSPSPorcentaje").ToString.ToDecimal Dim IEPSPS As Double = dr("IEPSPSPorcentaje").ToString.ToDecimal
Dim IEPSPSIVA As Double = dr("IEPSPSIVAPorcentaje").ToString.ToDecimal Dim IEPSPSIVA As Double = dr("IEPSPSIVAPorcentaje").ToString.ToDecimal
Dim Descuento As Double = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TxtDescuento.Text.ToDouble / TotalRows, gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal) Dim Descuento As Double = If(TieneAmortizacion, TxtDescuento.Text.ToDouble / TotalRows, gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal)
'Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal 'Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal
Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero
Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero
@@ -15012,11 +15072,10 @@ Partial Class Compras_Compras
AddPS2(False) AddPS2(False)
'AJUSTE DE REDONDEO O DIFERENCIA PERMITIDA DE IMPORTE 'AJUSTE DE REDONDEO O DIFERENCIA PERMITIDA DE IMPORTE
AjustaImporteUltimoConcepto((If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteSinImpuestos"), TxtSubTotal2.Text.ToDouble) + TxtOtrosImpuestos.Text.ToDouble).ToDecimal - If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUM("ImporteSinImpuestos").ToString.ToDecimal, TmpDT.SUM("Total").ToString.ToDecimal)) AjustaImporteUltimoConcepto((If(TieneAmortizacion, TmpDT.SUMD("ImporteSinImpuestos"), TxtSubTotal2.Text.ToDouble) + TxtOtrosImpuestos.Text.ToDouble).ToDecimal - If(TieneAmortizacion, TmpDT.SUM("ImporteSinImpuestos").ToString.ToDecimal, TmpDT.SUM("Total").ToString.ToDecimal))
'AjustaImporteUltimoConcepto(TxtSubTotal2.Text.ToDecimal + TxtOtrosImpuestos.Text.ToDecimal - (TmpDT.SUM("Total").ToString.ToDecimal)) 'AjustaImporteUltimoConcepto(TxtSubTotal2.Text.ToDecimal + TxtOtrosImpuestos.Text.ToDecimal - (TmpDT.SUM("Total").ToString.ToDecimal))
BtnGuardar.Enabled = True BtnGuardar.Enabled = True
If Not CierrePeriodo Then If Not CierrePeriodo Then
BtnGuardar.Visible = True BtnGuardar.Visible = True
@@ -16492,6 +16551,16 @@ Partial Class Compras_Compras
Dim Amortizacion As Decimal = 0 Dim Amortizacion As Decimal = 0
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.CveEmpresa = 119 Then
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
End If
Dim TieneAmortizacion As Boolean = False
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
TieneAmortizacion = True
End If
If CveCompra < 0 AndAlso Not TieneAmortizacion Then
LblAmortizacion.Text = "0.00"
End If End If
TempSubTotal = TxtSubTotal.Text.ToDouble TempSubTotal = TxtSubTotal.Text.ToDouble
@@ -16503,7 +16572,7 @@ Partial Class Compras_Compras
TempIEPS = TxtIEPS.Text.ToDouble TempIEPS = TxtIEPS.Text.ToDouble
TempRetIVA = TxtRetIVA.Text.ToDouble TempRetIVA = TxtRetIVA.Text.ToDouble
TempRetISR = TxtRetISR.Text.ToDouble TempRetISR = TxtRetISR.Text.ToDouble
TempTotal = Math.Round(TempSubTotal2 + TempIVA + TempIEPS - TempRetIVA - TempRetISR - TxtOtrosImpuestos.Text.ToDouble, 2) TempTotal = Math.Round(TempSubTotal2 + TempIVA + TempIEPS - TempRetIVA - TempRetISR - TxtOtrosImpuestos.Text.ToDouble - Amortizacion, 2)
DifTotales = TxtTotal.Text.ToDouble - TempTotal DifTotales = TxtTotal.Text.ToDouble - TempTotal
Dim DiferenciaPermitida = 0.6 Dim DiferenciaPermitida = 0.6

View File

@@ -603,6 +603,51 @@
</div> </div>
</div> </div>
</div>--%> </div>--%>
<div class="portlet light smmallpadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Representastes Legales</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="reload" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
<a href="javascript:;" class="remove" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal" EmptyDataText="No se encontraron Representantes" Width="100%"
ToolTip="Listado de representantes" CssClass="table table-striped table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Representante" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlProveedor" runat="server" Text='<%# Eval("RepresentanteLegal") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%--
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvRepresentantesEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</div>
</div> </div>

View File

@@ -380,6 +380,9 @@ Partial Class Compras_Proveedores
End If End If
HlEvento.Visible = True HlEvento.Visible = True
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;" HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;"
CargaRepresentantes()
Else Else
'Configuración de Modalidad Insert 'Configuración de Modalidad Insert
@@ -500,6 +503,30 @@ Partial Class Compras_Proveedores
'ViewState("OUsuario") = "Usuario DESC" 'ViewState("OUsuario") = "Usuario DESC"
End Sub End Sub
Private Sub CargaRepresentantes()
If CveProveedor > 0 Then
Dim ObjProveedores As New ClsCompProveedores
If ObjProveedores.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa, CveProveedor) Then
GvRepresentante.DataSource = ObjProveedores.DtResultados
Else
GvRepresentante.DataSource = Nothing
End If
ObjProveedores.Dispose()
GvRepresentante.DataBind()
End If
End Sub
Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1) Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1)
If UsuarioActual.Empresa.UsaContabilidad Then If UsuarioActual.Empresa.UsaContabilidad Then
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)

View File

@@ -424,7 +424,7 @@ Partial Class Compras_ReembolsosComprobaciones
If UsuarioActual.CveEmpresa.Contiene(119) Then If UsuarioActual.CveEmpresa.Contiene(119) Then
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveCajaChica > 0 Then If CveCajaChica > 0 Then
If ObjMov.GetRetCuenta(30, CveCajaChica) Then If ObjMov.GetRetCuenta(30, CveCajaChica) Then
@@ -448,7 +448,7 @@ Partial Class Compras_ReembolsosComprobaciones
Else Else
If drp IsNot Nothing Then If drp IsNot Nothing Then
If drp("IdPoliza").ToString.ToEntero > 0 Then If drp("IdPoliza").ToString.ToEntero > 0 Then
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
IdPoliza = drp("IdPoliza").ToString.ToEntero IdPoliza = drp("IdPoliza").ToString.ToEntero
Else Else
CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero
@@ -464,14 +464,14 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
If ChkChequeExcedente.Checked Then If ChkChequeExcedente.Checked Then
CvePrePolizaExcedente = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaExcedente = ObjMov.AddPrePolizas("Compras/Comprobaciones3", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIEExcedente = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaExcedente, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False)) CveIEExcedente = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaExcedente, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False))
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, If(CveCajaChica > 0, 30, 29), TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEExcedente, CvePersonal:=CvePersonal, CveCompra:=-1, CveProveedor:=-1, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, If(CveCajaChica > 0, 30, 29), TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEExcedente, CvePersonal:=CvePersonal, CveCompra:=-1, CveProveedor:=-1, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
MsgError = "Error al registrar detalle de concepto bancario" MsgError = "Error al registrar detalle de concepto bancario"
End If End If
End If End If
ElseIf Not ChkReembolsarSinBancos.Checked Then ElseIf Not ChkReembolsarSinBancos.Checked Then
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones4", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIERegistrado = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False)) CveIERegistrado = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False))
'AGREGO PREPOLIZA IE BANCOS 'AGREGO PREPOLIZA IE BANCOS
@@ -506,7 +506,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
Else Else
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones5", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA 'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
If CveCajaChica > 0 Then If CveCajaChica > 0 Then
@@ -635,7 +635,7 @@ Partial Class Compras_ReembolsosComprobaciones
CvePrePolizaPago = CvePrePolizaIERegistrado CvePrePolizaPago = CvePrePolizaIERegistrado
'SE USARA PARA PODER ELIMINAR UNA COMPROBACION 'SE USARA PARA PODER ELIMINAR UNA COMPROBACION
CvePrePolizaPagoOriginal = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaPagoOriginal = ObjMov.AddPrePolizas("Compras/Comprobaciones6", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'registramos el nuevo IE 'registramos el nuevo IE
@@ -979,7 +979,7 @@ Partial Class Compras_ReembolsosComprobaciones
ImporteMovto = ImportePagar ImporteMovto = ImportePagar
If ImportePagar = ImporteOriginal Then If ImportePagar = ImporteOriginal Then
CvePrePolizaPago = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaPago = ObjMov.AddPrePolizas("Compras/Comprobaciones7", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'registramos el nuevo IE 'registramos el nuevo IE
If CveCajaChica > 0 Then If CveCajaChica > 0 Then
CveIEPago = 0 CveIEPago = 0

View File

@@ -1,4 +1,4 @@
<%@ Page Title="RH - Catálogo de Documentos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatDocumentos.aspx.vb" Inherits="RH_CatDocumentos" %> <%@ Page Title="Catálogo de Documentos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatDocumentos.aspx.vb" Inherits="RH_CatDocumentos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">

View File

@@ -230,7 +230,7 @@
<div class="modal-header "> <div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button> <button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"> <h4 class="modal-title">
<asp:Literal ID="Literal1" runat="server">Tipo contrato</asp:Literal></h4> <asp:Literal ID="Literal1" runat="server">Representante Legal</asp:Literal></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View File

@@ -72,6 +72,7 @@ Partial Class Proveedores_Contratos
End If End If
ObjProveedor.Dispose() ObjProveedor.Dispose()
DdlTipoContrato.DataBind() DdlTipoContrato.DataBind()
DdlTipoContrato.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -163,6 +164,7 @@ Partial Class Proveedores_Contratos
If Not ErrorProceso Then If Not ErrorProceso Then
ObjProv.Commit() ObjProv.Commit()
ObjProv.Dispose()
If CveContrato > 0 Then If CveContrato > 0 Then
Alert("Contrato Actualizado Correctamente.") Alert("Contrato Actualizado Correctamente.")
@@ -177,9 +179,11 @@ Partial Class Proveedores_Contratos
Else Else
ObjProv.RollBack() ObjProv.RollBack()
ObjProv.Dispose()
End If End If
ObjProv.Dispose()
@@ -198,12 +202,14 @@ Partial Class Proveedores_Contratos
ErrorProceso = True ErrorProceso = True
End If End If
ObjProv.Dispose()
If Not ErrorProceso Then If Not ErrorProceso Then
CargaDatos() CargaDatos()
End If End If
ObjProv.Dispose()
End Sub End Sub
Protected Sub BtnCatRepresentantes_Click(sender As Object, e As EventArgs) Protected Sub BtnCatRepresentantes_Click(sender As Object, e As EventArgs)

View File

@@ -51,7 +51,7 @@ Partial Class CatUnidadesMedida
TxtAlias.Text = "" TxtAlias.Text = ""
Alert("El nueva Alias Unidad de Medida se guardó correctamente.", TipoMensaje.MsgInformacion) Alert("El nueva Alias Unidad de Medida se guardó correctamente.", TipoMensaje.MsgInformacion)
UpDatosAlias.Update() UpDatosAlias.Update()
GlobalDTUnidadesMedidaAlias = ObjUnidadesMedida.DtResultados GlobalDTUnidadesMedidaAlias(UsuarioActual.CveEmpresa) = Nothing
ViewState("DTUnidadesMedidaAlias") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa).FiltraParametros("CveUnidadMedida = " & cve) ViewState("DTUnidadesMedidaAlias") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa).FiltraParametros("CveUnidadMedida = " & cve)
End If End If
CargaGridAlias() CargaGridAlias()
@@ -281,7 +281,7 @@ Partial Class CatUnidadesMedida
TxtAbreviatura.Text = "" TxtAbreviatura.Text = ""
Alert("La nueva Unidad de Medida se guardó correctamente.", TipoMensaje.MsgInformacion) Alert("La nueva Unidad de Medida se guardó correctamente.", TipoMensaje.MsgInformacion)
UpAddUnidadMedida.Update() UpAddUnidadMedida.Update()
GlobalDTUnidadesMedida = ObjUnidadesMedida.DtResultados GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa) = Nothing
ViewState("DTUnidadesMedida") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTUnidadesMedida") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
If ViewState("Orden").ToString() <> String.Empty Then If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid() CargaGrid()
@@ -344,7 +344,7 @@ Partial Class CatUnidadesMedida
UpDatos.Update() UpDatos.Update()
If ObjUnidadesMedida.RemoveUnidadMedida(HdnID.Value.ToEntero) Then If ObjUnidadesMedida.RemoveUnidadMedida(HdnID.Value.ToEntero) Then
GvDatos.EditIndex = -1 GvDatos.EditIndex = -1
GlobalDTUnidadesMedida = ObjUnidadesMedida.DtResultados GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa) = Nothing
ViewState("DTUnidadesMedida") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTUnidadesMedida") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
Alert("La Unidad de Medida se eliminó correctamente.", TipoMensaje.MsgInformacion) Alert("La Unidad de Medida se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If End If

View File

@@ -2503,7 +2503,7 @@ Partial Class Ventas_ClientesAbonar
If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero
If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero
If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = 0 If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(581).ToEntero
If CveConceptoDeduccion = 78 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.IdCuentaOtrosIngresos If CveConceptoDeduccion = 78 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.IdCuentaOtrosIngresos
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then

View File

@@ -2576,7 +2576,8 @@ Partial Class PV
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1")) Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
Else Else
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue) Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString) 'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
If AplicaAlmacen Then If AplicaAlmacen Then
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas") Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
Else Else

View File

@@ -1,201 +1,214 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIngresos.aspx.vb" Inherits="Ventas_RepIngresos" %> <%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIngresos.aspx.vb" Inherits="Ventas_RepIngresos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
.btnopaco { .btnopaco {
background-color: rgba(0,0,0,0.2); background-color: rgba(0,0,0,0.2);
color: #FFF; color: #FFF;
} }
.btnopaco:hover { .btnopaco:hover {
background-color: rgba(0,0,0,0.4); background-color: rgba(0,0,0,0.4);
color: #FFF; color: #FFF;
font-weight: bold; font-weight: bold;
} }
.select2 .select2-selection__rendered { .select2 .select2-selection__rendered {
line-height: 1; line-height: 1;
color: #111; color: #111;
} }
.select2 .select2-selection--multiple { .select2 .select2-selection--multiple {
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
display: block; display: block;
min-height: 20px; min-height: 20px;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
} }
.select2-container--default .select2-selection--multiple .select2-selection__choice { .select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 10px; margin-top: 10px;
} }
.select2-selection__rendered { .select2-selection__rendered {
margin-top: 0px; margin-top: 0px;
height: 25px; height: 25px;
} }
.select2-selection { .select2-selection {
margin-top: 0px; margin-top: 0px;
height: 31px; height: 31px;
} }
.select2-container--default.select2-container--focus .select2-selection--multiple { .select2-container--default.select2-container--focus .select2-selection--multiple {
border: none; border: none;
outline: 0; outline: 0;
} }
#chartdiv { #chartdiv {
width: 100%; width: 100%;
height: 500px; height: 500px;
} }
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte de Ingresos Reporte de Ingresos
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar"> <asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkPDF" OnClick="LnkPDF_Click" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton> <asp:LinkButton ID="LnkPDF" OnClick="LnkPDF_Click" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton> <asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="LnkPDF" /> <asp:PostBackTrigger ControlID="LnkPDF" />
<asp:PostBackTrigger ControlID="LnkExcel" /> <asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatosRepI" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="upDatosRepI" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria"> <div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="LnkFiltrar" OnClick="LnkFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Text="Consultar" ValidationGroup="GrpFiltrar"></asp:Button> <asp:Button ID="LnkFiltrar" OnClick="LnkFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Text="Consultar" ValidationGroup="GrpFiltrar"></asp:Button>
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a> <a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" /> <asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row " style="height: 32px;" > <div class="row " style="height: 32px;">
<div class="col-md-1 lbltitle"> <div class="col-md-1 lbltitle">
<asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="TxtFechaInicio"></asp:Label> <asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="TxtFechaInicio"></asp:Label>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;"> <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 ID="TxtFechaInicio" Width="80" CssClass="form-control" runat="server"></asp:TextBox> <asp:TextBox ID="TxtFechaInicio" Width="80" CssClass="form-control" runat="server"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
</div> </div>
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkFechaInicio" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkFechaInicio" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
</div> </div>
<div class="col-md-1 lbltitle"> <div class="col-md-1 lbltitle">
<asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="TxtFechaFin"></asp:Label> <asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="TxtFechaFin"></asp:Label>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;"> <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 ID="TxtFechaFin" Width="80" CssClass="form-control" runat="server"></asp:TextBox> <asp:TextBox ID="TxtFechaFin" Width="80" CssClass="form-control" runat="server"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
</div> </div>
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkFechaFin" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkFechaFin" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
</div> </div>
<div class="col-md-1 lbltitle"> <div class="col-md-1 lbltitle">
<asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipoDocto"></asp:Label> <asp:Label runat="server" Text="Tipo" AssociatedControlID="DdlTipoDocto"></asp:Label>
</div> </div>
<div class="col-md-1">
<asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%"> <div class="col-md-2">
<asp:ListBox ID="DdlTipoDocto" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
</asp:ListBox>
<%-- <asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<div class="col-md-1 lbltitle ">
<asp:Label runat="server" Text="Sub Proyecto" AssociatedControlID="DdlSubProyecto"></asp:Label>
</div>
<div class="col-md-2">
<%-- <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem> </asp:DropDownList>--%>
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem> <asp:ListBox 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:ListBox>
</asp:DropDownList>
</div> </div>
<div class="col-md-1 lbltitle "> </div>
<asp:Label runat="server" Text="Sub Proyecto" AssociatedControlID="DdlSubProyecto"></asp:Label> </div>
</div> </div>
<div class="col-md-2" > </div>
<%-- <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%> <asp:GridView ID="GVRepIngresos" runat="server" GridLines="None" CssClass="table table-hover table-striped GVRepIngresos ScrollAD Widthall" AutoGenerateColumns="False"
DataKeyNames="Importe,Descuento,Amortizacion,IVA,IEPS,ImpuestoLocal,Total">
<Columns>
<asp:ListBox 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:ListBox> <asp:TemplateField HeaderText="Titulo">
<ItemTemplate>
</div> <asp:HyperLink runat="server" Text='<%# Eval("ConceptoContable")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
</div> </ItemTemplate>
</div> </asp:TemplateField>
</div> <asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
</div> <ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("Importe", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
</ItemTemplate>
<asp:GridView ID="GVRepIngresos" runat="server" GridLines="None" CssClass="table table-hover table-striped GVRepIngresos ScrollAD Widthall" AutoGenerateColumns="False" </asp:TemplateField>
DataKeyNames="Importe,Descuento,Amortizacion,IVA,IEPS,ImpuestoLocal,Total"> <asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
<Columns> <ItemTemplate>
<asp:TemplateField HeaderText="Titulo"> <asp:HyperLink runat="server" Text='<%# Eval("Descuento", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<ItemTemplate> </ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("ConceptoContable")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> </asp:TemplateField>
</ItemTemplate> <asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField> <ItemTemplate>
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right"> <asp:HyperLink runat="server" Text='<%# Eval("Amortizacion", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<ItemTemplate> </ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("Importe", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> </asp:TemplateField>
</ItemTemplate> <asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField> <ItemTemplate>
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right"> <asp:HyperLink runat="server" Text='<%# Eval("IVA", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<ItemTemplate> </ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("Descuento", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> </asp:TemplateField>
</ItemTemplate> <asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField> <ItemTemplate>
<asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right"> <asp:HyperLink runat="server" Text='<%# Eval("IEPS", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
<ItemTemplate> </ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("Amortizacion", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> </asp:TemplateField>
</ItemTemplate> <asp:TemplateField HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField> <ItemTemplate>
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right"> <asp:HyperLink runat="server" Text='<%# Eval("ImpuestoLocal", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink>
<ItemTemplate> </ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("IVA", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> </asp:TemplateField>
</ItemTemplate> <asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField> <ItemTemplate>
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right"> <asp:HyperLink runat="server" Text='<%# Eval("Total", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink>
<ItemTemplate> </ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("IEPS", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink> </asp:TemplateField>
</ItemTemplate> </Columns>
</asp:TemplateField> </asp:GridView>
<asp:TemplateField HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Right"> </ContentTemplate>
<ItemTemplate> </asp:UpdatePanel>
<asp:HyperLink runat="server" Text='<%# Eval("ImpuestoLocal", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink> </asp:Content>
</ItemTemplate> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:TemplateField> </asp:Content>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:HyperLink runat="server" Text='<%# Eval("Total", "${0:N2}")%>' NavigateUrl='<%# Eval("CveConceptoContable", String.Format("/Ventas/RepIngresosDetalle.aspx?GTipoDocto={{0}}{0}", Filtros))%>'> </asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -83,12 +83,14 @@ Partial Class Ventas_RepIngresos
End Sub End Sub
Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1) Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1)
Dim ObjRepI As New ClsVentas() Dim ObjRepI As New ClsVentas()
Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM) Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TipoDoc, Cves_Subprotectos) ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos)
GVRepIngresos.DataSource = ObjRepI.DtResultados GVRepIngresos.DataSource = ObjRepI.DtResultados
DtDatos = ObjRepI.DtResultados DtDatos = ObjRepI.DtResultados
ObjRepI.Dispose() ObjRepI.Dispose()