This commit is contained in:
2025-02-17 21:51:51 -07:00
17 changed files with 1679 additions and 131 deletions

View File

@@ -1950,12 +1950,14 @@ Public Class ClsBancos
Return Retorno Return Retorno
End Function End Function
Public Function GetIngresoEgresosDelDia(Fecha As Date, Tipo As String, Opcion As Integer, CveEmpresa As Integer) As Boolean Public Function GetIngresoEgresosDelDia(Grupo As Integer, FechaInicio As Date, FechaFin As Date, Tipo As String, Opcion As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_IngresoEgresosDiariosGet") DataAdapter("PA_Banc_IngresoEgresosDiariosGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@Grupo", SqlDbType.Int).Value = Grupo
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo 'Ing Ingresp Egs Egreso .Add("@Tipo", SqlDbType.VarChar).Value = Tipo 'Ing Ingresp Egs Egreso
.Add("@Opcion", SqlDbType.VarChar).Value = Opcion .Add("@Opcion", SqlDbType.VarChar).Value = Opcion

View File

@@ -4313,7 +4313,7 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer, Optional OpcionCuentas As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_AnexoCatalogoCCGet") DataAdapter("PA_Conta_AnexoCatalogoCCGet")
@@ -4326,6 +4326,7 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
End With End With
Try Try

View File

@@ -6426,6 +6426,26 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function GetVentasRemisionesInventario(Ventas As String, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_VentasRemisionesInventarioGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@Ventas", SqlDbType.VarChar).Value = Ventas
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el inventario de las remisiones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region " IDisposable Support " #Region " IDisposable Support "
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)

View File

@@ -4492,7 +4492,7 @@ Namespace Modelos
Private Function GuardarVentaInventarios(ByRef Resp As MMensajeFactura, ByRef factura As Modelos.Factura, ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, ObjVentas As ClsVentas, ObjAcum As ClsAcumuladores) As Boolean Private Function GuardarVentaInventarios(ByRef Resp As MMensajeFactura, ByRef factura As Modelos.Factura, ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, ObjVentas As ClsVentas, ObjAcum As ClsAcumuladores) As Boolean
Dim OcurrioError As Boolean = False Dim OcurrioError As Boolean = False
If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
If factura.GenerarSalidaAlmacen AndAlso factura.CveAlmacen > 0 AndAlso DtInventario.Rows.Count > 0 Then If factura.GenerarSalidaAlmacen AndAlso factura.CveAlmacen > 0 AndAlso DtInventario.Rows.Count > 0 Then
Dim CveMovimientoInventario As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, factura.DtInventario, factura.CveAlmacen, 3, factura.CveMoneda, factura.CveVenta, "Modelos/SA", MovimientoPrePoliza:=True, ObjConta:=ObjConta) Dim CveMovimientoInventario As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, factura.DtInventario, factura.CveAlmacen, 3, factura.CveMoneda, factura.CveVenta, "Modelos/SA", MovimientoPrePoliza:=True, ObjConta:=ObjConta)
@@ -4520,13 +4520,38 @@ Namespace Modelos
'End If 'End If
If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then
For Each CveRemision As Integer In RemisionesLista
'El almacen general es el Primer Almacen de Material en la Sucursal If factura.EsFacturaGlobal Then
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then Dim DtMovimientosRemisiones As DataTable = Nothing
OcurrioError = True
Exit For Dim SbRemisiones As New StringBuilder()
For Each CveRem In RemisionesLista
SbRemisiones.AppendFormat("{0},", CveRem)
Next
SbRemisiones.Remove(SbRemisiones.Length - 1, 1)
If ObjInventario.GetVentasRemisionesInventario(SbRemisiones.ToString(), UsuarioActual.CveEmpresa) Then
DtMovimientosRemisiones = ObjInventario.DtResultados.Copy()
End If End If
Next
If DtMovimientosRemisiones IsNot Nothing Then
If Not TraspasoAlmacenFacturaGlobal(DtMovimientosRemisiones, ObjInventario, ObjConta) Then
OcurrioError = True
End If
End If
Else
For Each CveRemision As Integer In RemisionesLista
'El almacen general es el Primer Almacen de Material en la Sucursal
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then
OcurrioError = True
Exit For
End If
Next
End If
End If End If
If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then
@@ -4879,6 +4904,37 @@ Namespace Modelos
End Try End Try
Return Not OcurrioError Return Not OcurrioError
End Function End Function
Private Function TraspasoAlmacenFacturaGlobal(DtMovimientosRemisiones As DataTable, ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad) As Boolean
Dim OcurrioError As Boolean = False
Try
Dim DtMovimientos As DataTable = DtMovimientosRemisiones.FiltraParametros("", DistinctColumns:={"CveMovimiento", "CveAlmacen"})
For Each RowMovto As DataRow In DtMovimientos.Rows
Dim CveAlmacenParaSalida As Integer = RowMovto("CveAlmacen").ToString().ToEntero()
Dim CveConceptoSalidaAlmacen As Integer = 40
Dim MovDetalle As DataTable = DtMovimientosRemisiones.FiltraParametros($"CveMovimiento = {RowMovto("CveMovimiento")}")
Dim CveMovimientoSalidaAlmacen As Integer = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, Me.CveMoneda, Me.CveVenta, AplicaMovimientoDetalleEntrada:=True, MovimientoPrePoliza:=True, ObjConta:=ObjConta)
Dim GeneroMovimientoAlmacen = CveMovimientoSalidaAlmacen > 0
If Not GeneroMovimientoAlmacen Then
OcurrioError = True
Exit For
End If
Next
Catch ex As Exception
OcurrioError = True
OnError("Ocurrió un error al realizar el traspaso", ex)
End Try
Return Not OcurrioError
End Function
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = True, Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = True,
Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False,
Optional CveAlmacenDestino As Integer = -1) As Integer Optional CveAlmacenDestino As Integer = -1) As Integer

View File

@@ -2393,6 +2393,28 @@ Namespace Extensiones
Dim worksheet As ExcelWorksheet = excel.Worksheets(0) Dim worksheet As ExcelWorksheet = excel.Worksheets(0)
worksheet.Rows.InsertEmpty(0, TotalRowHeader) worksheet.Rows.InsertEmpty(0, TotalRowHeader)
'2025-02-15 OIC Este for es para que las celdas tomen formato numerico y se puedan sumar
For Each row In worksheet.Rows
For Each cell In row.AllocatedCells
If cell.Value IsNot Nothing Then
Dim valorTexto As String = cell.Value.ToString().Trim()
Dim numero As Decimal
' Intentar convertir a número
If Decimal.TryParse(valorTexto, System.Globalization.NumberStyles.Any,
System.Globalization.CultureInfo.InvariantCulture,
numero) Then
' Si se pudo convertir exitosamente, reasignar como Double
cell.Value = numero
End If
End If
Next
Next
Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True) Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True)
If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error
celdasConTexto.Style.Font.Name = "Calibri Light" celdasConTexto.Style.Font.Name = "Calibri Light"

View File

@@ -73,12 +73,12 @@ Partial Class Bancos_FlujoDiario
End If End If
'Se Llena TmpDTIngresosDelDia 'Se Llena TmpDTIngresosDelDia
If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Ing", OpcionSaldo, UsuarioActual.CveEmpresa) Then If Ban.GetIngresoEgresosDelDia(1, TxtFecha.Text.ToDate, TxtFecha.Text.ToDate, "Ing", OpcionSaldo, UsuarioActual.CveEmpresa) Then
TmpDTIngresosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 8") TmpDTIngresosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 8")
End If End If
'Se Llena TmpDTGastosDelDia 'Se Llena TmpDTGastosDelDia
If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Egs", OpcionSaldo, UsuarioActual.CveEmpresa) Then If Ban.GetIngresoEgresosDelDia(1, TxtFecha.Text.ToDate, TxtFecha.Text.ToDate, "Egs", OpcionSaldo, UsuarioActual.CveEmpresa) Then
TmpDTGastosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 2") TmpDTGastosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 2")
End If End If

View File

@@ -33,6 +33,10 @@
.ajax__tab_xp .ajax__tab_body { .ajax__tab_xp .ajax__tab_body {
font-size: 12px !important; font-size: 12px !important;
} }
.addropzone {
min-height: 170px;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
@@ -265,10 +269,10 @@
<div class="col-md-4"> <div class="col-md-4">
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin: auto" AutoPostBack="True" RepeatColumns="3"> <asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin: auto" AutoPostBack="True" RepeatColumns="3">
<asp:ListItem Value="6" Selected="True" >Caja Chica</asp:ListItem> <asp:ListItem Value="6" Selected="True" >Caja Chica</asp:ListItem>
<asp:ListItem Value="2">Viáticos</asp:ListItem> <asp:ListItem Value="2">Viáticos</asp:ListItem>
<asp:ListItem Value="4">Deudores</asp:ListItem>
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
@@ -295,7 +299,7 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group form-md-line-input input-iconright" style="padding-top:14px"> <div class="form-group form-md-line-input input-iconright" style="padding-top:14px">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClass="form-control input-sm DdlPS" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" /> <ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClass="form-control input-sm DdlPS" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
<label for="<%= DdlPS.ClientID.ToString()%>"> <label for="<%= DdlPS.ClientID.ToString()%>">
Productos / Servicio:<label> Productos / Servicio:<label>
</div> </div>
@@ -334,6 +338,7 @@
</asp:RequiredFieldValidator> </asp:RequiredFieldValidator>
</div> </div>
<asp:LinkButton runat="server" ID="LnlMostarProrateo" OnClick="LnlMostarProrateo_Click" CssClass="btn btn-primary" ><i class="fa fa-percent"></i></asp:LinkButton>
</div> </div>
@@ -352,7 +357,7 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="DivPersonalReembolso" runat="server" visible="false" > <div class="form-group form-md-line-input input-iconright" id="DivPersonalReembolso" runat="server" visible="false" >
<asp:DropDownList ID="DdlPersonalReembolso" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" Width="100%" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlPersonalReembolso" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" Width="100%" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
@@ -362,7 +367,87 @@
</asp:RequiredFieldValidator> </asp:RequiredFieldValidator>
</div> </div>
<div class="row" id="DivDeudores" runat="server" visible="false" >
<div class="row" id="RowChkTipoCambio" runat="server">
<div class="col-xs-4">
<asp:CheckBox Text="Pagar con pesos" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarPesos" OnCheckedChanged="ChkPagarPesos_CheckedChanged" runat="server" ClientIDMode="Static" />
<asp:CheckBox Text="Pagar con dolares" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarDolares" OnCheckedChanged="ChkPagarDolares_CheckedChanged" runat="server" ClientIDMode="Static" />
</div>
</div>
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDeudor" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="RazonSocialSaldo" DataValueField="ConcatCveIE"
Width="100%" ValidationGroup="GrpGuardar">
</asp:DropDownList>
<label runat="server" id="Label2" for="<%= DdlDeudor.ClientID.ToString()%>">Deudor:</label>
<asp:RequiredFieldValidator ID="RFVDeudores" runat="server" ControlToValidate="DdlDeudor" InitialValue="-1" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Deudor''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpRegistraCompra"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVDeudores" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<asp:UpdatePanel ID="UpDeudores" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,TipoCambio"
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="Chk" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Folio</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo Abonar</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblTotalDeudores" runat="server" ClientIDMode="Static" Text="0.00" Visible="false"></asp:Label>
<asp:TextBox ID="TxtSaldoDeudor" runat="server" CausesValidation="true" MaxLength="12" Width="76px"></asp:TextBox>
<asp:CompareValidator ID="CVAmortAnti" runat="server" ControlToValidate="TxtSaldoDeudor" Display="None" ErrorMessage="El campo <b>''Importe Deudor''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOAmortAnti" runat="server" HighlightCssClass="vco" TargetControlID="CVAmortAnti" Width="300px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtSaldoMonedaOriginal" runat="server" CausesValidation="true" Enabled="False" MaxLength="12" Width="70px" Text="0.00" Style="text-align: right;" BackColor="Transparent" BorderStyle="None" ForeColor="White"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="LbTipoMoneda" runat="server" Style="text-align: left;" Width="30px" Enabled="False" BackColor="Transparent" BorderStyle="None" ForeColor="White" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div> </div>
@@ -827,6 +912,162 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<%--PRORRATE INICIO--%>
<div id="DVModalProrrateoGasolina" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:UpdatePanel runat="server" ID="UpProrratearTitulo" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label runat="server" id="LblRiruloProrrareo">Prorratear</asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpModalProrrateoGasolina" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoProrrateoGasolina" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label runat="server" id="Label10" for="<%= DdlSubProyectoProrrateoGasolina.ClientID.ToString()%>">
<asp:Label runat="server" ID="LblSubProyectoProrrateoGasolina"></asp:Label>:
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrecioProrrateoGasolina" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPSProrateo"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioProrrateoGasolina" runat="server" TargetControlID="TxtPrecioProrrateoGasolina" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RfvTxtPrecioProrrateoGasolina" runat="server" ControlToValidate="TxtPrecioProrrateoGasolina" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPSProrateo">
</asp:RequiredFieldValidator>
<label for="<%= TxtPrecioProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblTotalProrrateoGasolina" CssClass="form-control" Text="100%"></asp:Label>
<label for="<%= LblTotalProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblRestoProrrateoGasolina" CssClass="form-control"></asp:Label>
<label for="<%= LblRestoProrrateoGasolina.ClientID.ToString()%>">% Restante:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="margin-top:10px;text-align:center">
<asp:LinkButton ID="LnkAgregarProrrateoGasolina" OnClick="LnkAgregarProrrateoGasolina_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GprAgregaPSProrateo" > </asp:LinkButton>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-6" style="text-align:right">
<asp:LinkButton runat="server" ID="LnkDecargaPlatilla" OnClick="LnkDecargaPlatilla_Click" CssClass="btn btn-warning"><i class="fa fa-arrow-down" aria-hidden="true"></i> Formato</asp:LinkButton>
</div>
<div class="col-md-6" style="text-align:left">
<asp:Button Text="Agregar" CssClass="btn btn-success" ID="BrnAgregarPlantilla" OnClick="BrnAgregarPlantilla_Click" runat="server" />
</div>
</div>
<div class="row">
<div class="col-md-21" style="margin-left: 5px; margin-right: 5px;">
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top:10px">
</div>
<div class="row" style="margin-top:10px">
</div>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvProrrateoGasolina" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0" Width="100%"
DataKeyNames=""
CssClass="table table-striped table-hover table-advance ScrollAD mysmallbtn">
<Columns>
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
<asp:BoundField DataField="Subtotal" HeaderText="Subtotal" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
<asp:BoundField DataField="IVA" HeaderText="IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.######}" Visible="false" />
<asp:BoundField DataField="RetIVA" HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
<asp:BoundField DataField="RetISR" HeaderText="RetISR" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00##}" HeaderText="Total" ItemStyle-HorizontalAlign="Right" Visible="false" />
<asp:BoundField DataField="Porcentaje" DataFormatString="{0:#,##0.00##}" HeaderText="%" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="LnkEliminarProrrateoGasolina" runat="server" Width="22px"
CssClass="btn btn-circle btn-xs red" OnClick="LnkEliminarProrrateoGasolina_Click"
data-toggle="confirmation"
data-popout="true" data-original-title="¿Seguro que desea eliminar el prorrateo?" data-btn-ok-label="si">
<i style="margin-left:-2px!important" class='icon-trash'></i>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDecargaPlatilla" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnGuardarProrrateoGasolina" OnClick="BtnGuardarProrrateoGasolina_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
<%--PRORRATEO FIN--%>
<div id="divDescripcion" class="modal ADS fade" role="dialog"> <div id="divDescripcion" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional"> <asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -1356,9 +1597,6 @@
<ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial"> <ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GVSolicitudesHistorial" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False" OnRowDataBound="GVSolicitudesHistorial_RowDataBound" <asp:GridView ID="GVSolicitudesHistorial" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False" OnRowDataBound="GVSolicitudesHistorial_RowDataBound"
@@ -1425,26 +1663,11 @@
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div> </div>
</div> </div>
@@ -1529,8 +1752,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -1552,9 +1774,173 @@
$('#BtnCargaCompraComplementoTraslado').click(); $('#BtnCargaCompraComplementoTraslado').click();
} }
//function VinculacionManual(v) {
// $get("HdnCveIE").value = v; function CambioTipoMoneda() {
// $('#BtnVincularManualmente').click();
//}
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
AjustaTextboxDeudores();
if (chkPesosBancos) {
CambiaPesosDolares()
} else if (chkDolaresBancos) {
CambiaDolaresPesos()
} else {
CambiaPesosDolares()
}
}
// CAMBIO DOLARES-PESOS
function CambiaPesosDolares() {
debugger;
if ($("#LbImporteME").length) {
if ($("#TxtTipoCambio").length) {
$get('LbImporteME').value = '$ ' + FormatoNumero(ToDouble(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTipoCambio').value)), 2) + ' USD';
} else {
$get('LbImporteME').value = '';
}
}
}
function CambiaDolaresPesos() {
debugger;
if ($("#LbImporteMN").length) {
if ($("#TxtTipoCambio").length) {
$get('LbImporteMN').value = '$ ' + FormatoNumero(ToDouble(ToDouble($get('TxtImporte').value) * ToDouble($get('TxtTipoCambio').value)), 2) + ' MXN';
} else {
$get('LbImporteMN').value = ''
}
}
}
function AjustaTextboxDeudores() {
if (!(($("#C_RBLContado_2") && $("#C_RBLContado_2").is(':checked')) || ($("#C_RBLContado_3") && $("#C_RBLContado_3").is(':checked')) || ($("#C_RBLContado_4") && $("#C_RBLContado_4").is(':checked')))) {
return false;
}
var totalPoints = 0.00;
var TC = 1.00;
if ($get("TxtTipoCambio") && ToDouble($get("TxtTipoCambio").value) > 0) {
TC = ToDouble($get("TxtTipoCambio").value);
}
$('input[name*=TxtSaldoDeudor]').each(function () {
totalPoints += ToDouble($(this).val());
if ($("#LbImporteME").length) {
if ($("#TxtTipoCambio").length) {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val(FormatoNumero(ToDouble($(this).val()) / TC, 2));
} else {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val('0.00');
}
} else if ($("#LbImporteMN").length) {
if ($("#TxtTipoCambio").length) {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val(FormatoNumero(ToDouble($(this).val()) * TC, 2));
} else {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val('0.00');
}
}
});
$get('TxtImporte').value = FormatoNumero(totalPoints, 2);
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
if (chkPesosBancos) {
CambiaPesosDolares()
} else if (chkDolaresBancos) {
CambiaDolaresPesos()
} else {
CambiaPesosDolares()
}
}
// ajuste Ingresos x comprobar y Deudores
function ClickDeudorChk(Chk, Obj, total, saldo) {
if ($("#" + Chk.id).is(":checked")) {
$('#' + Obj).val(saldo);
}else{
$('#' + Obj).val("");
}
/*
total = ToDouble(ToDouble(total).toFixed(2));
saldo = ToDouble(ToDouble(saldo).toFixed(2));
var totalTC = total;
var TC = 1.00;
if ($get("TxtTipoCambio") && ToDouble($get("TxtTipoCambio").value) > 0) {
TC = ToDouble($get("TxtTipoCambio").value);
total = total * TC;
}
if ($("#" + Chk.id).is(":checked")) {
$('#' + Obj).attr('disabled', false);
if (ToDouble($get('TxtImporte').value) != total) {
if ((ToDouble($get('TxtImporte').value) + saldo) > total) {
$('#' + Obj).val(saldo - (ToDouble($get('TxtImporte').value) + saldo - total));
$get('TxtImporte').value = (total / TC).toFixed(2)
}
else {
if (total > saldo) {
$('#' + Obj).val(saldo);
}
else {
$('#' + Obj).val(total);
}
if (ToDouble($get('TxtImporte').value) >= total) {
$('#' + Obj).val($get(total - 'TxtImporte').value);
$get('TxtImporte').value = (total / TC).toFixed(2)
} else {
$get('TxtImporte').value = (ToDouble($get('TxtImporte').value) + ToDouble($get(Obj).value) / TC).toFixed(2);
}
}
}
else {
$('#' + Obj).val(0);
}
}
else {
$('#' + Obj).attr('disabled', true);
if (ToDouble($get(Obj).value) > 0) {
$get('TxtImporte').value = ToDouble(ToDouble($get('TxtImporte').value) - ToDouble($get(Obj).value)).toFixed(2);
if ($get('TxtImporte').value < 0) {
$get('TxtImporte').value = 0
}
}
$('#' + Obj).val(0);
}
$('#' + Obj).val(ToDouble($get(Obj).value).toFixed(2));
CambioTipoMoneda();
*/
}
</script> </script>
</asp:Content> </asp:Content>

File diff suppressed because it is too large Load Diff

View File

@@ -103,6 +103,19 @@
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row"> <div class="row">
<div class="col-md-1 truncate">
Tipo Movto
</div>
<div class="col-md-2 truncate">
<asp:DropDownList ID="DdlOpcionCuenta" runat="server" CssClass="form-control input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Sin Saldo" Value="1"></asp:ListItem>
<asp:ListItem Text="Con Saldo" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate"> <div class="col-md-1 truncate">
<asp:Label ID="LblSubProyecto" runat="server" Text="Label"></asp:Label> <asp:Label ID="LblSubProyecto" runat="server" Text="Label"></asp:Label>
</div> </div>
@@ -156,7 +169,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" Visible="false" />
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
@@ -346,7 +359,13 @@
let currentid = 1; let currentid = 1;
function HandlerGraf(obj, evt) { function HandlerGraf(obj, evt) {
$("#DivModalGrafica").modal(); $("#DivModalGrafica").modal();
cdatos = $(obj).data('values');
//cdatos = $(obj).data('values');
cdatos = $(obj).data('values').sort(function (a, b) {
return b.Valor - a.Valor;
});
if (currentid == 1) { if (currentid == 1) {
CargaGraficaBarras(); CargaGraficaBarras();
} else { } else {
@@ -356,6 +375,9 @@
} }
function CargaGraficaBarras() { function CargaGraficaBarras() {
let data = cdatos; let data = cdatos;
//let data = cdatos.sort(function (a, b) {
// return b.Valor - a.Valor;
//});
var chart = AmCharts.makeChart("chartdiv", { var chart = AmCharts.makeChart("chartdiv", {
"type": "serial", "type": "serial",
"theme": "light", "theme": "light",
@@ -393,6 +415,11 @@
function CargaGraficaPastel() { function CargaGraficaPastel() {
let data = cdatos; let data = cdatos;
//let data = cdatos.sort(function (a, b) {
// return b.Valor - a.Valor;
//});
var chart = AmCharts.makeChart("chartdiv", { var chart = AmCharts.makeChart("chartdiv", {
"type": "pie", "type": "pie",
"theme": "light", "theme": "light",

View File

@@ -146,7 +146,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
DTDatos = New DataTable DTDatos = New DataTable
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
OpcionCuentas:=DdlOpcionCuenta.SelectedValue.ToEntero) Then
DTHeaders = Conta.DSResultados.Tables(0) DTHeaders = Conta.DSResultados.Tables(0)
DTDatos = Conta.DSResultados.Tables(1) DTDatos = Conta.DSResultados.Tables(1)
@@ -235,9 +236,15 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
Next Next
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
If e.Row.Cells(2).Text.ToDecimal <> 0 Then
e.Row.Cells(2).Text = $"<a { If(e.Row.Cells(2).Text.ToDecimal < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={txtFechaF.Text}&FI={txtFechaI.Text}&ER=1&CveSubProyecto=-1&OpcionCuenta=3' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, e.Row.Cells(2).Text.ToDecimal.ToString("###,###,##0"), e.Row.Cells(2).Text.ToDecimal.ToString("###,###,###.00")) }</a>"
Else
e.Row.Cells(2).Text = $"-"
End If
Dim inicial As Boolean = True Dim inicial As Boolean = True
Index = 4 Index = 4
For Each DRow As DataRow In DTHeaders.Rows For Each DRow As DataRow In DTHeaders.Rows
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
@@ -248,7 +255,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
End If End If
If Importe <> 0 Then If Importe <> 0 Then
'' pendiente.. ' e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>" e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={txtFechaF.Text}&FI={txtFechaI.Text}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}&OpcionCuenta=3' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
End If End If
Index += 1 Index += 1

View File

@@ -51,7 +51,7 @@
<div class="col-md-1"> <div class="col-md-1">
Cuenta: Cuenta:
</div> </div>
<div class="col-md-3"> <div class="col-md-2">
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false"> <asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
@@ -97,11 +97,11 @@
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row"> <div class="row">
<div class="col-md-1 truncate"> <div class="col-md-1 ">
Tipo Movto Tipo Movto
</div> </div>
<div class="col-md-2 truncate"> <div class="col-md-2 ">
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%"> <asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem> <asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem> <asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
@@ -109,7 +109,7 @@
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem> <asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server"> <div class="col-md-1 " id="tdTipoReporte" visible="false" runat="server">
Tipo Tipo
</div> </div>
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server"> <div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">

View File

@@ -129,7 +129,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
' DdlTipoReporte.SelectedValue = TipoReporte.ToString ' DdlTipoReporte.SelectedValue = TipoReporte.ToString
End If End If
DdlOpcionCuentas.SelectedValueExist(IfNull(Request("OpcionCuenta"), "-1")) 'OpcionCuenta
''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then ''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
'' DdlTipoCuentas.SelectedValue = IdCuenta.ToString '' DdlTipoCuentas.SelectedValue = IdCuenta.ToString
''Else ''Else

Binary file not shown.

View File

@@ -7629,6 +7629,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
//DdlTipo.Items.Insert(2, new ListItem("Obligaciones", "O")); //DdlTipo.Items.Insert(2, new ListItem("Obligaciones", "O"));
//DdlTipo.SelectedValueExist("-1"); //DdlTipo.SelectedValueExist("-1");
CargaConcepto(); CargaConcepto();
} }
protected void CargaConcepto() protected void CargaConcepto()
@@ -7637,11 +7638,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
DdlConcepto.Items.Clear(); DdlConcepto.Items.Clear();
if (DdlTipo.SelectedValue.Contiene("P", "D", "O")) if (DdlTipo.SelectedValue.Contiene("P", "D", "O"))
{ {
DdlConcepto.DataSource = dt.FiltraParametros(string.Format("Tipo ='{0}'", DdlTipo.SelectedValue)); dt = dt.FiltraParametros(string.Format("Tipo ='{0}'", DdlTipo.SelectedValue));
} }
DataRow drow = dt.NewRow(); DataRow drow = dt.NewRow();
drow["CveConcepto"] = "-1"; drow["CveConcepto"] = "-1";
drow["Concepto"] = "Seleccione"; drow["Concepto"] = "Seleccione";
drow["CodigoConcepto"] = "Seleccione";
dt.Rows.InsertAt(drow, 0); dt.Rows.InsertAt(drow, 0);
DdlConcepto.DataSource = dt; DdlConcepto.DataSource = dt;
DdlConcepto.SelectedValueExist("-1"); DdlConcepto.SelectedValueExist("-1");
@@ -7663,10 +7665,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
protected void DdlTipo_SelectedIndexChanged(object sender, EventArgs e) protected void DdlTipo_SelectedIndexChanged(object sender, EventArgs e)
{ {
CargaConcepto(); CargaConcepto();
UpMovtosPermanentesModal.Update();
} }
protected void LnkAddMovtoPermanente_Click(object sender, EventArgs e) protected void LnkAddMovtoPermanente_Click(object sender, EventArgs e)
{ {
DdlTipo.SelectedValue = "D";
CargaConcepto(); CargaConcepto();
DdlTipoDescto_SelectedIndexChanged(null, null); DdlTipoDescto_SelectedIndexChanged(null, null);
pnlAddupMovto.Visible = true; pnlAddupMovto.Visible = true;

View File

@@ -135,7 +135,7 @@
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkConvertirDeudor" OnClick="LnkConvertirDeudor_Click" runat="server" Visible="false"> <asp:LinkButton ID="LnkConvertirDeudor" OnClick="LnkConvertirDeudor_Click" runat="server" Visible="false">
<i class="fa fa-share-square-o" aria-hidden="true"></i> Convertir en Deudor <i class="fa fa-share-square-o" ></i> Convertir en Deudor
</asp:LinkButton> </asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
@@ -403,9 +403,9 @@
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtCorreo" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtCorreo" runat="server" MaxLength="150"></asp:TextBox>
<label for="<%= TxtCorreo.ClientID.ToString()%>">Correo personal: </label> <label for="<%= TxtCorreo.ClientID.ToString()%>">Correo personal: </label>
<asp:RegularExpressionValidator ID="REVCorreo" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" CssClass="help-block errorimput" ControlToValidate="TxtCorreo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo - Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator> <asp:RegularExpressionValidator ID="REVCorreo" runat="server" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" CssClass="help-block errorimput" ControlToValidate="TxtCorreo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo - Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright" style="display:none;"> <div class="form-group form-md-line-input input-iconright" style="display:none;">
@@ -1007,7 +1007,7 @@
<div class="btn-group"> <div class="btn-group">
<asp:UpdatePanel ID="UpBtnUniformes" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpBtnUniformes" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:LinkButton ID="LnkSurtir" runat="server" CssClass="btn btn-circle btn-sm blue"><i class="fa fa-th" aria-hidden="true"></i> Resguardar </asp:LinkButton> <asp:LinkButton ID="LnkSurtir" runat="server" CssClass="btn btn-circle btn-sm blue"><i class="fa fa-th" ></i> Resguardar </asp:LinkButton>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -5505,7 +5505,7 @@
<ContentTemplate> <ContentTemplate>
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span >&times;</span>
</button> </button>
<h4 class="modal-title" id="LabelLicencia" runat="server">Agregar Licencia</h4> <h4 class="modal-title" id="LabelLicencia" runat="server">Agregar Licencia</h4>
</div> </div>
@@ -5655,7 +5655,7 @@
<div class="modal-content rowpadding"> <div class="modal-content rowpadding">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span >&times;</span>
</button> </button>
<h4 class="modal-title" runat="server" style="text-align: left">Calcular factor de integración</h4> <h4 class="modal-title" runat="server" style="text-align: left">Calcular factor de integración</h4>
</div> </div>
@@ -5712,7 +5712,7 @@
<div class="modal-content rowpadding"> <div class="modal-content rowpadding">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span >&times;</span>
</button> </button>
<h4 class="modal-title" runat="server" style="text-align: left">Modificar salario</h4> <h4 class="modal-title" runat="server" style="text-align: left">Modificar salario</h4>
</div> </div>
@@ -5776,7 +5776,7 @@
<div class="modal-content rowpadding"> <div class="modal-content rowpadding">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span >&times;</span>
</button> </button>
<h4 class="modal-title" runat="server" style="text-align: left">Modificar salario</h4> <h4 class="modal-title" runat="server" style="text-align: left">Modificar salario</h4>
</div> </div>
@@ -5830,7 +5830,7 @@
<div class="modal-content rowpadding"> <div class="modal-content rowpadding">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span >&times;</span>
</button> </button>
<h4 class="modal-title" runat="server" style="text-align: left">Parametros</h4> <h4 class="modal-title" runat="server" style="text-align: left">Parametros</h4>
</div> </div>

View File

@@ -634,6 +634,7 @@ Partial Class RH_Personal
#End Region #End Region
#Region "Desorden Antres del load"
#Region "PROPIEDADES FAMILIARES" #Region "PROPIEDADES FAMILIARES"
@@ -900,6 +901,7 @@ Partial Class RH_Personal
Return UsuarioActual.Empresa.Funcionalidad(701) = "1" Return UsuarioActual.Empresa.Funcionalidad(701) = "1"
End Get End Get
End Property End Property
#End Region
'Configuración 'Configuración
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
@@ -994,7 +996,6 @@ Partial Class RH_Personal
divBitacora.Visible = True divBitacora.Visible = True
CargaGvBitacora() CargaGvBitacora()
CargaCuentasBancarias()
CarcaConceptosNomina() CarcaConceptosNomina()
CargaFonacot() CargaFonacot()
End If End If
@@ -1017,6 +1018,7 @@ Partial Class RH_Personal
End If End If
CargaCuentasBancarias()
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
CrearEstructuraFamiliares() CrearEstructuraFamiliares()
@@ -2039,7 +2041,7 @@ Partial Class RH_Personal
If ObjPersonal.AddPersonal(TxtCodigo.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtFechaIngreso.Text.ToDate, If ObjPersonal.AddPersonal(TxtCodigo.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtFechaIngreso.Text.ToDate,
DdlTipoPeriodo.SelectedValue.ToEntero(), TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble, DdlTipoPeriodo.SelectedValue.ToEntero(), TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero(), TxtSalarioDiarioM.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero(),
TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlFormaPago.SelectedValue.ToEntero(), TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"), TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlFormaPago.SelectedValue.ToEntero(), TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
DdlTipoContrato.SelectedValue.ToEntero(), TxtUbicacion.Text.Trim, DdlTipoContrato.SelectedValue.ToEntero(), TxtUbicacion.Text.Trim,
DdlTurno.SelectedValue.ToEntero(), DdlPuesto.SelectedValue.ToEntero(), DdlTurno.SelectedValue.ToEntero(), DdlPuesto.SelectedValue.ToEntero(),
@@ -3434,15 +3436,16 @@ Partial Class RH_Personal
Dim Row As DataRow Dim Row As DataRow
If CvePersonal > 0 Then If CvePersonal > 0 Then
Dim ObjCuentasBancos As New ClsGenerales Using ObjCuentasBancos As New ClsGenerales()
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion) If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
End If Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
ObjCuentasBancos.Dispose() End If
End Using
CargaGvBitacora()
Else Else
Row = TempDTCuentasBancos.NewRow Row = TempDTCuentasBancos.NewRow
@@ -3457,6 +3460,8 @@ Partial Class RH_Personal
Row("Referencia") = Referencia Row("Referencia") = Referencia
Row("CveMoneda") = CveMoneda Row("CveMoneda") = CveMoneda
Row("Moneda") = Moneda Row("Moneda") = Moneda
Row("BBVAAlias") = BBVAAlias
Row("CveSATBanco") = CveSATBanco
Row("EstatusPagoElectronico") = EstatusPagoElectronico Row("EstatusPagoElectronico") = EstatusPagoElectronico
TempDTCuentasBancos.Rows.Add(Row) TempDTCuentasBancos.Rows.Add(Row)
End If End If
@@ -3464,9 +3469,6 @@ Partial Class RH_Personal
LimpiaCuentasBancarias() LimpiaCuentasBancarias()
CargaGridCuentasBancos("") CargaGridCuentasBancos("")
If CvePersonal > 0 Then
CargaGvBitacora()
End If
End Sub End Sub
Private Sub LimpiaCuentasBancarias() Private Sub LimpiaCuentasBancarias()
@@ -7079,43 +7081,40 @@ Partial Class RH_Personal
End Using End Using
End Sub End Sub
Protected Sub LnkModificarSalarioGuardar_Click(sender As Object, e As EventArgs) Protected Sub LnkModificarSalarioGuardar_Click(sender As Object, e As EventArgs)
If CvePersonal > 0 Then
getdatosFI() getdatosFI()
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text calcularSDI()
calcularSDI() TxtSalarioDiarioImSS.Text = (TxtFISalarioDiarioIntegrado.Text.ToDecimal() + salarioVariable).ToString()
TxtSalarioDiarioImSS.Text = (TxtFISalarioDiarioIntegrado.Text.ToDecimal() + salarioVariable).ToString() TxtSalarioDiarioIntegrado.Text = TxtFISalarioDiarioIntegrado.Text
TxtSalarioDiarioIntegrado.Text = TxtFISalarioDiarioIntegrado.Text Using ObjPersonal As ClsRH = New ClsRH()
Using ObjPersonal As ClsRH = New ClsRH() ObjPersonal.IniciaTransacSQL()
ObjPersonal.IniciaTransacSQL() If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtSalarioDiarioM.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioImSS.Text.ToDecimal(),
TxtSalarioDiarioM.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioImSS.Text.ToDecimal(), TxtSalarioDiarioM.Text.ToDecimal(), False, False, "A") Then
TxtSalarioDiarioM.Text.ToDecimal(), False, False, "A") Then ObjPersonal.Commit()
TxtSalarioDiario.Text = TxtSalarioDiarioM.Text
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text
ObjPersonal.Commit() TxtSalarioCotizado.Text = TxtSalarioDiarioImSS.Text
TxtSDI.Text = TxtSalarioDiarioIntegrado.Text
TxtSalarioDiario.Text = TxtSalarioDiarioM.Text TxtFISalarioDiarioIntegrado.Text = TxtSalarioDiarioIntegrado.Text
TxtFISalariodiario.Text = TxtSalarioDiarioM.Text UpModSalario.Update()
TxtSalarioCotizado.Text = TxtSalarioDiarioImSS.Text UpDatos.Update()
TxtSDI.Text = TxtSalarioDiarioIntegrado.Text Alert("Se ha actualizado el salario", TipoMensaje.ToastInformacion)
TxtFISalarioDiarioIntegrado.Text = TxtSalarioDiarioIntegrado.Text Else
ObjPersonal.RollBack()
UpModSalario.Update() End If
UpDatos.Update() End Using
Alert("Se ha actualizado el salario", TipoMensaje.ToastInformacion) End If
Else RegistraScript("$('#Dmodamodificarsalario').modal('hide')")
ObjPersonal.RollBack()
End If
End Using
End Sub End Sub
Protected Sub LnkModsalario_Click(sender As Object, e As EventArgs) Protected Sub LnkModsalario_Click(sender As Object, e As EventArgs)
If CvePersonal > 0 Then
TxtFechamodSalario.Text = NowADS().ToString("dd/MM/yyyy") TxtFechamodSalario.Text = NowADS().ToString("dd/MM/yyyy")
TxtSalarioDiarioM.Text = TxtSalarioDiario.Text TxtSalarioDiarioM.Text = TxtSalarioDiario.Text
TxtSalarioDiarioImSS.Text = TxtSalarioCotizado.Text TxtSalarioDiarioImSS.Text = TxtSalarioCotizado.Text
TxtSalarioDiarioIntegrado.Text = TxtSDI.Text TxtSalarioDiarioIntegrado.Text = TxtSDI.Text
End If
RegistraScript("$('#Dmodamodificarsalario').modal()") RegistraScript("$('#Dmodamodificarsalario').modal()")
UpModSalario.Update() UpModSalario.Update()
End Sub End Sub

View File

@@ -21192,9 +21192,24 @@ Partial Class Ventas
End If End If
End If End If
Dim DescAdicional As Decimal = 0
Dim CvePromoDetalle As Integer = -1
Dim ObjDesc As New VentaDescuentos
If PrecioSugerido > 0 Then If PrecioSugerido > 0 Then
PU = PrecioSugerido PU = PrecioSugerido
ObjDesc = CalcularDescuentos(CvePSAdicional, DrPoliza("Cantidad").ToString().ToDecimal(), PU)
If ObjDesc IsNot Nothing Then
If ObjDesc.EsPUModificado Then
PU = ObjDesc.PU
End If
DescAdicional = ObjDesc.ImporteDescuento
CvePromoDetalle = ObjDesc.CvePromocionDetalle
End If
End If End If
PU = PU.RoundSQL(6) PU = PU.RoundSQL(6)
DrPoliza("PU") = PU DrPoliza("PU") = PU
@@ -21214,7 +21229,7 @@ Partial Class Ventas
DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje") DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje")
DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
DrPoliza("IEPS") = DrPoliza("ImporteIEPS") DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
DrPoliza("Descuento") = 0 ' Descuento DrPoliza("Descuento") = DescAdicional ' Descuento
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU) DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales) DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
@@ -21222,7 +21237,7 @@ Partial Class Ventas
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS") DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida") DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
DrPoliza("CveActivoFijo") = -1 DrPoliza("CveActivoFijo") = -1
DrPoliza("CvePromocionDetalle") = -1 DrPoliza("CvePromocionDetalle") = CvePromoDetalle
TmpDT.Rows.Add(DrPoliza) TmpDT.Rows.Add(DrPoliza)
End If End If