-
This commit is contained in:
@@ -2633,7 +2633,7 @@ Public Class ClsOC
|
||||
|
||||
End Function
|
||||
|
||||
Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer) As Boolean
|
||||
Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_PendientesCompra")
|
||||
|
||||
@@ -2641,6 +2641,7 @@ Public Class ClsOC
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2653,7 +2654,7 @@ Public Class ClsOC
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer) As Boolean
|
||||
Public Function CancelarPartidaPendiente(CveOrdenCompraDetalle As Integer, NuevaCantidad As Decimal, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_CancelarPartidaPendiente")
|
||||
|
||||
@@ -2661,6 +2662,7 @@ Public Class ClsOC
|
||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
|
||||
.Add("@NuevaCantidad", SqlDbType.Decimal).Value = NuevaCantidad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -849,53 +849,6 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
'SI ES REFACTURACION
|
||||
'Dim ObjNC As List(Of Object) = Nothing
|
||||
'If ErrorList.Count = 0 Then
|
||||
' If NuevaFactura = 1 AndAlso FacturaDevolucion IsNot Nothing Then
|
||||
|
||||
' ObjNC = GeneraNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, ObjEventos)
|
||||
|
||||
' If ObjNC Is Nothing Then
|
||||
' ErrorList.Add("No se pudo Cancelar la Factura")
|
||||
' End If
|
||||
|
||||
' 'Esquema viejo, evitamos que aparezca por surtir
|
||||
' If ErrorList.Count = 0 Then
|
||||
' If Not ObjInventario.ActualizarEsDevolucionVenta(CveVenta, 2) Then
|
||||
' ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'SI ES amortizacion 3.3
|
||||
'Dim Obj2 As New List(Of Object)
|
||||
|
||||
'If ErrorList.Count = 0 Then
|
||||
' ' cambiar la condicion para saber si hay seleccionado
|
||||
' If TieneAnticipo AndAlso Me.CveTipoAmortizacionAnticipo = 2 Then
|
||||
|
||||
' If TieneAnticipo Then
|
||||
' Try
|
||||
' 'DESCOMENTAR
|
||||
' If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, Nothing, Nothing) Then
|
||||
' Obj2.Add(FacturaDevolucion)
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' ErrorList.Add("No se pudo generarse la nota de crédito de amortización")
|
||||
' End Try
|
||||
|
||||
|
||||
' End If
|
||||
|
||||
' If Obj2 Is Nothing AndAlso Obj2.Count = 0 Then
|
||||
' ErrorList.Add("No se pudo generarse la nota de crédito de amortización")
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'MARCA PARA NO SURTIR VENTA DE COTNRATO DE CONSIGNACION DE VENTA | [IPP] : PARCHE
|
||||
If ErrorList.Count = 0 Then
|
||||
If Me.CveVenta > 0 And Me.CveAlmacenExistenciasContrato > 0 And Me.TipoDocto = "Ing" Then
|
||||
@@ -1065,17 +1018,6 @@ Namespace Modelos
|
||||
|
||||
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, Me, CvePACEspecial:=CvePAC)
|
||||
|
||||
'NOTA DE CREDITO - REFACTURADA - CASO ESPECIAL, TIMBRADO E IMPRESION
|
||||
'If Not IsNothing(Obj2) AndAlso Obj2.Count > 0 Then
|
||||
' Dim ofa As Modelos.Factura = CType(Obj2(0), Modelos.Factura)
|
||||
' 'asigna el foliofiscal del ingreso que se acaba de timbrar, cuando es amortización de anticipo con NC
|
||||
' If TieneAnticipo AndAlso CveTipoAmortizacionAnticipo = 2 Then
|
||||
' ofa.Timbre.CFDIRelacionados.UUID.Clear()
|
||||
' ofa.Timbre.CFDIRelacionados.UUID.Add(ObjTimbrado.UUID)
|
||||
' End If
|
||||
' ObjTimbrado.TimbrarFactura(UsuarioActual, ofa)
|
||||
'End If
|
||||
|
||||
If SeTimbro AndAlso Me.TipoDocto.Contiene("Ing") Then
|
||||
EstatusSMS = EnviarSMSTimbrado(ObjEventos)
|
||||
End If
|
||||
@@ -1085,14 +1027,6 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'NOTA DE CREDITO DE REFACTURACION
|
||||
'If RefacturacionGeneroNC Then
|
||||
' If Not IsNothing(ObjNC) AndAlso ObjNC.Count > 0 Then
|
||||
' Dim ofa As Modelos.Factura = CType(ObjNC(0), Modelos.Factura)
|
||||
' SeTimbroNC = ObjTimbrado.TimbrarFactura(UsuarioActual, ofa)
|
||||
' End If
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1337,7 +1271,7 @@ Namespace Modelos
|
||||
|
||||
End Function
|
||||
|
||||
Private Shared Function CreaDTFactura() As DataTable
|
||||
Public Shared Function CreaDTFactura() As DataTable
|
||||
Dim TmpDT As New DataTable
|
||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||
@@ -1454,6 +1388,12 @@ Namespace Modelos
|
||||
TmpDT.Columns.Add("CantidadConversion", GetType(Decimal))
|
||||
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||
|
||||
'COLUMNAS DE PV.aspx
|
||||
TmpDT.Columns.Add("PUOriginal", GetType(Decimal))
|
||||
TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer))
|
||||
TmpDT.Columns.Add("EliminarDB", GetType(Boolean))
|
||||
TmpDT.Columns("EliminarDB").DefaultValue = False
|
||||
|
||||
Return TmpDT
|
||||
End Function
|
||||
|
||||
@@ -3111,7 +3051,7 @@ Namespace Modelos
|
||||
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||
Pago.AplicaTraslado = False
|
||||
Pago.Referencia = DrPago("Folio").ToString()
|
||||
Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero()
|
||||
Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero()
|
||||
Pago.TipoPago = DrPago("TipoPago").ToString()
|
||||
Pago.CveClientePago = ObjFactura.CveCliente
|
||||
|
||||
@@ -3132,11 +3072,10 @@ Namespace Modelos
|
||||
|
||||
Dim DT As DataTable
|
||||
Dim CvePlantilaPoliza As Integer
|
||||
Dim PorcentajeAmortizacion As Decimal = 0
|
||||
Dim sumaAmorticaciones As Decimal = 0
|
||||
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Integer = 1
|
||||
Dim CveCuentaContabilizacion As Integer = 1
|
||||
|
||||
Dim tipoCambio As Decimal
|
||||
Dim CuentasContablesInvalidas As New StringBuilder
|
||||
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
||||
@@ -3764,13 +3703,13 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
'PorcentajeAmortizacion = sumaAmorticaciones / TxtTotal.Text.ToDecimal
|
||||
importeMovimiento = 0
|
||||
|
||||
Case 91 'Amortizacion Nota de Credito
|
||||
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
||||
|
||||
If ValorMultiplicador = -1 Then
|
||||
'CANCELACION
|
||||
If Not ErrorPrepoliza AndAlso ValorMultiplicador = -1 Then
|
||||
Dim TipoCambioNC As Decimal = 1
|
||||
|
||||
If ObjFactura.CveMoneda = 2 Then
|
||||
@@ -3785,7 +3724,7 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
'cuando es cancelación
|
||||
'CANCELA LA APLICACION DEL PAGO DE LA NC EN LA FACTURA APLICADA
|
||||
If ObjFactura.DtNCVinculadas IsNot Nothing Then
|
||||
For Each row2 As DataRow In ObjFactura.DtNCVinculadas.Rows
|
||||
|
||||
@@ -3895,76 +3834,54 @@ Namespace Modelos
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
'VENTA NUEVA
|
||||
If Not ErrorPrepoliza AndAlso ValorMultiplicador = 1 AndAlso ObjFactura.CveTipoAmortizacionAnticipo = 4 Then
|
||||
importeMovimiento = 0
|
||||
importeMX = 0
|
||||
|
||||
If ObjFactura.DtAnticiposAplicados IsNot Nothing Then
|
||||
Dim VentaActual As New ClsPaginas.Venta(ObjFactura, UsuarioActual)
|
||||
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticiposAplicados.Rows
|
||||
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 12 Then
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal()
|
||||
sumaAmorticaciones += importeMovimiento
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio,
|
||||
ConceptoContable, Referencia, Concepto,
|
||||
CveVenta:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente,
|
||||
CveVentaAmortizacion:=ObjFactura.CveVenta,
|
||||
ImporteME:=If(tipoCambio = 1, 0, importeMovimiento),
|
||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Dim Pago As New ClsPaginas.VentaPago
|
||||
Pago.Fecha = Now
|
||||
Pago.FechaDocumentoRelacionado = row2("Fecha").ToString().ToDateTime()
|
||||
Pago.ImportePagoVenta = importeMovimiento
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = row2("CveIE").ToString().ToEntero()
|
||||
Pago.CveMonedaPago = row2("CveMoneda").ToString().ToEntero()
|
||||
Pago.TCPago = row2("TipoCambioPago").ToString().ToDecimal()
|
||||
Pago.AplicaTraslado = False
|
||||
Pago.Referencia = row2("Folio").ToString()
|
||||
Pago.CveVentaAmortizacion = row2("CveVenta").ToString().ToEntero()
|
||||
Pago.TipoPago = "NC"
|
||||
Pago.CveClientePago = ObjFactura.CveCliente
|
||||
|
||||
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaActual, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'SI ES PAGO CON DEVOLUCION
|
||||
If Not ErrorPrepoliza AndAlso ObjFactura.CveTipoAmortizacionAnticipo = 4 Then
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 277 Then
|
||||
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal()
|
||||
importeMX = importeMovimiento * tipoCambio
|
||||
sumaAmorticaciones += importeMovimiento
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If ErrorPrepoliza Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorPrepoliza AndAlso sumaAmorticaciones <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, sumaAmorticaciones * tipoCambio, 251, Referencia, Concepto,
|
||||
CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento),
|
||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
importeMovimiento = 0
|
||||
importeMX = 0
|
||||
|
||||
Case 4 'Venta Clasificacion
|
||||
|
||||
@@ -4318,7 +4235,7 @@ Namespace Modelos
|
||||
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||
Pago.AplicaTraslado = False
|
||||
Pago.Referencia = DrPago("Folio").ToString()
|
||||
Pago.CveVentaAmortizacion = -1
|
||||
Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero()
|
||||
Pago.TipoPago = DrPago("TipoPago").ToString()
|
||||
Pago.CveClientePago = ObjFactura.CveCliente
|
||||
|
||||
@@ -4370,7 +4287,7 @@ Namespace Modelos
|
||||
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||
Pago.AplicaTraslado = False
|
||||
Pago.Referencia = DrPago("Folio").ToString()
|
||||
Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero()
|
||||
Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero()
|
||||
Pago.TipoPago = DrPago("TipoPago").ToString()
|
||||
Pago.CveClientePago = ObjFactura.CveCliente
|
||||
|
||||
|
||||
@@ -3292,10 +3292,8 @@
|
||||
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||
<asp:ListItem Value="1" Selected="True">Fecha Factura</asp:ListItem>
|
||||
<asp:ListItem Value="2">Fecha Entrada</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlTipoFechaVencimiento" InitialValue="-1" runat="server" ControlToValidate="DdlTipoFechaVencimiento" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Fecha Vencimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlTipoFechaVencimiento" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoFechaVencimiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</asp:DropDownList>
|
||||
|
||||
<label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -221,7 +221,7 @@ table.adssigscroll {
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="True" EmptyDataText=""
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
CssClass="table table-striped table-advance table-hover Widthall adssigrid-scroll adssigrid-order" data-cols="1" data-rows="2"
|
||||
data-sort="true" GridLines="None">
|
||||
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -425,42 +425,17 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-5">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
||||
<ContentTemplate>
|
||||
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:UpdatePanel runat="server" ID="UpAddWishList" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="DVWishList" visible="false">
|
||||
<table style="width:170px!important" >
|
||||
<td style="width:70px!important">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox runat="server" ID="TxtCantidad" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td style="width:100px!important">
|
||||
<asp:LinkButton ID="LnkAgrgarWishList" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkAgrgarWishList_Click" Width="91px"><i class="fa fa-shopping-cart" aria-hidden="true"></i> Agregar</asp:LinkButton>
|
||||
</td>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-1" style="text-align:right!important">
|
||||
<div id="DivIndicadorL1" runat="server" visible="false" >
|
||||
@@ -497,11 +472,51 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="col-md-2">
|
||||
<asp:UpdatePanel runat="server" ID="UpAddWishList" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="DVWishList" visible="false" style="margin-top:-3PX">
|
||||
<table style="width: 220px!important">
|
||||
<td style="width: 50px!important">
|
||||
|
||||
<div>
|
||||
<div style="color: gray; font-size: 12px; font-weight: bold;">
|
||||
REQ
|
||||
</div>
|
||||
<div style="color: blue; font-size: 20px; font-weight: bold;">
|
||||
<asp:LinkButton ID="LnkIndicador_REQ" Text="0" OnClick="LnkIndicador_REQ_Click" runat="server" CssClass="Texto" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td style="width: 70px!important">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox runat="server" ID="TxtCantidad" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td style="width: 100px!important">
|
||||
<asp:LinkButton ID="LnkAgrgarWishList" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkAgrgarWishList_Click" Width="91px"><i class="fa fa-shopping-cart"></i> Agregar</asp:LinkButton>
|
||||
</td>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -651,7 +666,7 @@
|
||||
<div class="modal-content" style="width:500px;">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal3" Text="OC Pendientes por Recibir" runat="server"> </asp:Literal></h4>
|
||||
<asp:Literal ID="LtlModalOC" Text="OC Pendientes por Recibir" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" >
|
||||
|
||||
@@ -32,6 +32,20 @@ Partial Class Inventarios_Kardex
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property TipoCancelacion As Integer
|
||||
Get
|
||||
If ViewState("TipoCancelacion") Is Nothing Then
|
||||
ViewState("TipoCancelacion") = -1
|
||||
End If
|
||||
Return ViewState("TipoCancelacion").ToString.ToEntero
|
||||
End Get
|
||||
Set
|
||||
ViewState("TipoCancelacion") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -334,22 +348,40 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargarOCPendientesCompra()
|
||||
|
||||
Private Sub CargarOCPendientesCompra(Opcion As Integer, Optional CargaGrid As Boolean = False) ' Opcion1 OC, 2 REQ
|
||||
|
||||
|
||||
Dim tCveSubProyectos As String = "-1"
|
||||
If ddlAlmacen.SelectedValue <> "" Then
|
||||
Dim tt As String = ddlAlmacen.GetSelectedValues()
|
||||
tCveSubProyectos = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen IN ({tt})").DataColumnToString("CveSubProyecto")
|
||||
End If
|
||||
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then
|
||||
GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc")
|
||||
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa, Opcion:=Opcion) Then
|
||||
|
||||
If CargaGrid Then
|
||||
GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc")
|
||||
End If
|
||||
|
||||
If Opcion = 1 Then
|
||||
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
|
||||
ElseIf Opcion = 2 Then
|
||||
LnkIndicador_REQ.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString().ToDecimal.RoundSQL(2).ToString("###,###.##")
|
||||
If LnkIndicador_REQ.Text = "" Then
|
||||
LnkIndicador_REQ.Text = "0"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjOC.Dispose()
|
||||
GvOC.DataBind()
|
||||
UpModalOC.Update()
|
||||
UpOCS.Update()
|
||||
UpAddWishList.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -463,7 +495,8 @@ Partial Class Inventarios_Kardex
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
CargarOCPendientesCompra()
|
||||
CargarOCPendientesCompra(1)
|
||||
CargarOCPendientesCompra(2)
|
||||
CargaPreciosLista(CvePS)
|
||||
DivIndicadorOC.Visible = True
|
||||
DivIndicadorOC2.Visible = True
|
||||
@@ -833,8 +866,19 @@ Partial Class Inventarios_Kardex
|
||||
End Function
|
||||
|
||||
Protected Sub LnkIndicador_OC_Click(sender As Object, e As EventArgs)
|
||||
UpModalOC.Update()
|
||||
TipoCancelacion = 1
|
||||
LtlModalOC.Text = "OC Pendientes por Recibir"
|
||||
CargarOCPendientesCompra(1, True)
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
|
||||
UpModalOC.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkIndicador_REQ_Click(sender As Object, e As EventArgs)
|
||||
TipoCancelacion = 2
|
||||
LtlModalOC.Text = "Requisiciones"
|
||||
CargarOCPendientesCompra(2, True)
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalOC"))
|
||||
UpModalOC.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCancelarOCDetalle_Click(sender As Object, e As EventArgs)
|
||||
@@ -848,8 +892,14 @@ Partial Class Inventarios_Kardex
|
||||
End If
|
||||
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa) Then
|
||||
CargarOCPendientesCompra()
|
||||
If ObjOC.CancelarPartidaPendiente(CveOrdenCompraDetalle, NuevaCantidad, UsuarioActual.CveEmpresa, Opcion:=TipoCancelacion) Then
|
||||
If TipoCancelacion = 1 Then
|
||||
CargarOCPendientesCompra(1, True)
|
||||
Else
|
||||
CargarOCPendientesCompra(2, True)
|
||||
End If
|
||||
|
||||
|
||||
Alert("La partida se cancelo correctamente.")
|
||||
End If
|
||||
|
||||
@@ -910,7 +960,9 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
|
||||
Protected Sub LnkAgrgarWishList_Click(sender As Object, e As EventArgs)
|
||||
AgregarAWishList()
|
||||
If AgregarAWishList() Then
|
||||
CargarOCPendientesCompra(2)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function AgregarAWishList() As Boolean
|
||||
@@ -922,6 +974,7 @@ Partial Class Inventarios_Kardex
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
Dim FolioOrdenCompra As String = ""
|
||||
Dim CveOrdenCompra As Integer = -1
|
||||
Dim CveOrdenCompraDetalle As Integer = -1
|
||||
Dim UltimoCosto As Decimal = 0D
|
||||
Dim CveProveedorCompra As Integer = -1
|
||||
Dim Cantidad As Decimal = TxtCantidad.Text.ToDecimal
|
||||
@@ -1001,15 +1054,32 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
If respuesta AndAlso CveOrdenCompra > 0 Then
|
||||
|
||||
If ObjOC.GetOrdenesDetalle(CveOrdenCompra, UsuarioActual.CveEmpresa) Then
|
||||
Dim drOcDetalle As DataRow = ObjOC.DtResultados.FiltroPrimero($"CvePs={CvePS}")
|
||||
If drOcDetalle IsNot Nothing Then
|
||||
CveOrdenCompraDetalle = drOcDetalle("CveOrdenCompraDetalle").ToString.ToEntero
|
||||
Cantidad = drOcDetalle("Cantidad").ToString.ToDecimal + Cantidad
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Total As Decimal = (Cantidad * UltimoCosto).RoundSQL
|
||||
Dim IVA As Decimal = (Total * PorcentajeIVA).RoundSQL
|
||||
RetIVA = IVA * PorcentajeRetIVA
|
||||
RetISR = Total * PorcentajeRetISR
|
||||
|
||||
If Not ObjOC.AddOrdenCompraDetalle(CveOrdenCompra, Cantidad, CveUnidadMedida, CvePS, UltimoCosto, CveSubProyecto, -1, "Obs", UsuarioActual.CveUsuario,
|
||||
IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR, Total:=Total, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=PorcentajeRetIVA, RetISRPorcentaje:=PorcentajeRetISR) Then
|
||||
respuesta = False
|
||||
If CveOrdenCompraDetalle > 0 Then
|
||||
If Not ObjOC.UpdateOrdenCompraDetalle(Cantidad, CveUnidadMedida, CvePS, UltimoCosto, CveSubProyecto, -1, "Obs", UsuarioActual.CveUsuario, CveOrdenCompraDetalle, -1, 0, IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR,
|
||||
Total:=Total, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=PorcentajeRetIVA, RetISRPorcentaje:=PorcentajeRetISR) >= 0 Then
|
||||
respuesta = False
|
||||
|
||||
End If
|
||||
Else
|
||||
If Not ObjOC.AddOrdenCompraDetalle(CveOrdenCompra, Cantidad, CveUnidadMedida, CvePS, UltimoCosto, CveSubProyecto, -1, "Obs", UsuarioActual.CveUsuario,
|
||||
IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR, Total:=Total, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=PorcentajeRetIVA, RetISRPorcentaje:=PorcentajeRetISR) Then
|
||||
respuesta = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -165,18 +165,18 @@ table.adssigscroll {
|
||||
background-color: inherit; /* Para que no se superponga con otros elementos */
|
||||
z-index: 4; /* Asegura que esté sobre otros elementos */
|
||||
}
|
||||
.tr_order tr > th::after {
|
||||
.adssigrid-order tr > th::after {
|
||||
content: "\f0dc";
|
||||
font:normal normal normal 14px / 1 FontAwesome;
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
color: #32A1CF;
|
||||
}
|
||||
.tr_order tr > th.asce::after {
|
||||
.adssigrid-order tr > th.asce::after {
|
||||
content: "\f0de";
|
||||
}
|
||||
|
||||
.tr_order tr > th.desc::after {
|
||||
.adssigrid-order tr > th.desc::after {
|
||||
content: "\f0dd";
|
||||
}
|
||||
/*END ScrollADS V2*/
|
||||
@@ -353,7 +353,7 @@ table.adssigscroll {
|
||||
|
||||
<div class="divContainerads">
|
||||
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True" ShowHeaderWhenEmpty="true"
|
||||
DataKeyNames="CvePS" CssClass="adssigscrollJS tr_order table table-striped table-advance table-hover " data-cols="2" data-rows="2" data-heightmenos="300" GridLines="None" >
|
||||
DataKeyNames="CvePS" CssClass="adssigrid-scroll adssigrid-order table table-striped table-advance table-hover " data-cols="2" data-rows="2" data-heightmenos="300" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="120px">
|
||||
<HeaderTemplate>
|
||||
|
||||
@@ -58,6 +58,7 @@ Partial Class Inventarios_RepAlmacen
|
||||
|
||||
If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero,
|
||||
Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then
|
||||
|
||||
GVAlmacen.DataSource = objInv.DtResultados
|
||||
TmpDT = objInv.DtResultados
|
||||
End If
|
||||
|
||||
@@ -195,7 +195,11 @@ table > tr > th.adsCol, table.table > tr > th.adsCol {
|
||||
}
|
||||
|
||||
.Totales, .table-striped > tbody > tr.Totales {
|
||||
background: rgba(103, 128, 159, 0.65) !important;
|
||||
background: #9cacc1 !important;
|
||||
border-color: #9cacc1;
|
||||
}
|
||||
.Totales td, .table-striped > tbody > tr.Totales td{
|
||||
border-color: #9cacc1;
|
||||
}
|
||||
|
||||
.btnopaco {
|
||||
@@ -3004,4 +3008,50 @@ div.mypaste * {
|
||||
|
||||
table > tbody > tr.hidetrad {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*Begin ScrollADS V2*/
|
||||
|
||||
.divContainerads {
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 260px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
table.adssigscroll {
|
||||
min-width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table.adssigscroll tbody, table.adssigscroll thead {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table.adssigscroll tr {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
table.adssigscroll tr.stickyRow {
|
||||
position: sticky;
|
||||
top: 0; /* Se mantiene pegado en la parte superior */
|
||||
background-color: inherit; /* Para que no se superponga con otros elementos */
|
||||
z-index: 4; /* Asegura que esté sobre otros elementos */
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th::after {
|
||||
content: "\f0dc";
|
||||
font: normal normal normal 14px / 1 FontAwesome;
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
color: #32A1CF;
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th.asce::after {
|
||||
content: "\f0de";
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th.desc::after {
|
||||
content: "\f0dd";
|
||||
}
|
||||
/*END ScrollADS V2*/
|
||||
@@ -207,9 +207,13 @@ table > tr > th.adsCol ,table.table > tr > th.adsCol{
|
||||
z-index: 550;
|
||||
}
|
||||
.Totales, .table-striped > tbody > tr.Totales {
|
||||
background: rgba(103, 128, 159, 0.65) !important;
|
||||
background: #9cacc1 !important;
|
||||
border-color: #9cacc1 !important;
|
||||
}
|
||||
|
||||
.Totales td, .table-striped > tbody > tr.Totales td{
|
||||
border-color: #9cacc1;
|
||||
}
|
||||
.btnopaco {
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
color: #FFF;
|
||||
|
||||
@@ -15,6 +15,7 @@ using System.Text.RegularExpressions;
|
||||
using iTextSharp.text.pdf.parser;
|
||||
using Profact.TimbraCFDI40;
|
||||
using Ionic.Zip;
|
||||
using DocumentFormat.OpenXml.Drawing;
|
||||
|
||||
public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
@@ -5098,7 +5099,27 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
var dedcborderColor = ClosedXML.Excel.XLColor.FromArgb(99, 37, 35);
|
||||
ClosedXML.Excel.XLColor colorperp = ClosedXML.Excel.XLColor.FromArgb(51, 153, 102);
|
||||
ClosedXML.Excel.XLColor colorded = ClosedXML.Excel.XLColor.FromArgb(150, 54, 52);
|
||||
ClosedXML.Excel.XLColor colororange = ClosedXML.Excel.XLColor.FromArgb(247, 150, 70);
|
||||
ClosedXML.Excel.IXLCell celda;
|
||||
DataTable dtConceptos = this.dtConceptos.FiltraParametros("(Tipo ='P' AND EsPadre = 1 AND EsFormula =0) OR (Tipo = 'D' AND EsPadre = 1 AND EsFormula =0) OR Tipo = 'O' AND EsPadre = 1 AND EsFormula =0");
|
||||
DataTable dtFiltrado = dtConceptos.Clone(); // Clonar la estructura del DataTable
|
||||
|
||||
foreach (GridViewRow row in GvPersonalizarExcel.Rows)
|
||||
{
|
||||
string columnaDB = row.DataKey("ColumnaDB").Replace("[","").Replace("]",""); // Suponiendo que la columna "ColumnaDB" está en la segunda celda (index 1)
|
||||
string tipoDB = row.DataKey("TipoDB"); // Suponiendo que la columna "TipoDB" está en la cuarta celda (index 3)
|
||||
//string tipo = tipoDB == "P" ? "1" : (tipoDB == "D" ? "2" : (tipoDB == "O" ? "3" : "5"));
|
||||
// Filtrar dtConceptos basado en los valores del GridView
|
||||
var filasFiltradas = dtConceptos.AsEnumerable()
|
||||
.Where(r => string.Format("V_{0}" , r["CveConcepto"]) == columnaDB //&& r["Tipo"].ToString() == tipoDB
|
||||
);
|
||||
|
||||
if (filasFiltradas.Any())
|
||||
{
|
||||
dtFiltrado.Merge(filasFiltradas.CopyToDataTable());
|
||||
}
|
||||
}
|
||||
dtConceptos = dtFiltrado;
|
||||
var libro = wb.AddWorksheet("Nomina");
|
||||
int column = 1;
|
||||
int filainicio = 3;
|
||||
@@ -5136,32 +5157,37 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Titlecell(libro, "Pago", filainicio + 3, column, false, true, PercborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 AND EsFormula =0").Rows)
|
||||
if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0)
|
||||
{
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P'").Rows)
|
||||
{
|
||||
column++;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, PercborderColor);
|
||||
Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, PercborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
}
|
||||
}
|
||||
column++;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, PercborderColor);
|
||||
Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, PercborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
}
|
||||
}
|
||||
column++;
|
||||
|
||||
|
||||
TitleRange(libro, "Percepciones", filainicio + 2, column, filainicio + 3, column, true, true, PercborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
TitleRange(libro, "Percepciones", filainicio + 1, iniciotipe + 1, filainicio + 1, column, true, true, PercborderColor);
|
||||
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Percepciones";
|
||||
TitleRange(libro, "Percepciones", filainicio + 2, column, filainicio + 3, column, true, true, PercborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, PercborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
TitleRange(libro, "Percepciones", filainicio + 1, iniciotipe + 1, filainicio + 1, column, true, true, PercborderColor);
|
||||
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Percepciones";
|
||||
}
|
||||
|
||||
}
|
||||
iniciotipe = column;
|
||||
int finPercepciones = iniciotipe;
|
||||
@@ -5172,33 +5198,37 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
TitleRange(libro, "Perm. Faltas", filainicio + 3, column, filainicio + 3, column, false, true, dedcborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 AND EsFormula =0").Rows)
|
||||
if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D'").Rows)
|
||||
{
|
||||
column++;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, dedcborderColor);
|
||||
Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, dedcborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
column++;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
TitleRange(libro, "Deducciones", filainicio + 2, column, filainicio + 3, column, true, true, dedcborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, dedcborderColor);
|
||||
Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, dedcborderColor);
|
||||
libro.Range(filainicio + 1, iniciotipe + 2, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
TitleRange(libro, "Deducciones", filainicio + 1, iniciotipe + 2, filainicio + 1, column, true, true, dedcborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
column++;
|
||||
TitleRange(libro, "Deducciones", filainicio + 2, column, filainicio + 3, column, true, true, dedcborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
TitleRange(libro, "Deducciones", filainicio + 1, iniciotipe + 1, filainicio + 1, column, true, true, dedcborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor);
|
||||
}
|
||||
|
||||
int findeducciones = column;
|
||||
|
||||
//column++;
|
||||
@@ -5209,6 +5239,46 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
libro.Cell(filainicio + 1, column).Value = " ";
|
||||
libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Total";
|
||||
libro.Column(column).Width = 15;
|
||||
|
||||
int iniciotiob = column;
|
||||
|
||||
|
||||
if (dtConceptos.FiltraParametros("Tipo ='O'").Rows.Count > 0)
|
||||
{
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' ").Rows)
|
||||
{
|
||||
column++;
|
||||
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
|
||||
{
|
||||
libro.Column(column).Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Titlecell(libro, row["Concepto"].ToString(), filainicio + 2, column, true, false, dedcborderColor);
|
||||
Titlecell(libro, row["Codigo"].ToString(), filainicio + 3, column, false, true, dedcborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
column++;
|
||||
TitleRange(libro, "Obligaciones", filainicio + 2, column, filainicio + 3, column, true, true, dedcborderColor);
|
||||
libro.Column(column).Width = 15;
|
||||
if (iniciotipe < column)
|
||||
{
|
||||
libro.Range(filainicio + 1, iniciotiob + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
|
||||
TitleRange(libro, "Obligaciones", filainicio + 1, iniciotiob + 1, filainicio + 1, column, true, true, dedcborderColor);
|
||||
Titlecell(libro, "", filainicio + 4, column, true, true, dedcborderColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
iniciotipe = column;
|
||||
|
||||
|
||||
@@ -5216,8 +5286,21 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int maxnocolumn = column;
|
||||
libro.Range(filainicio + 1, 1, filainicio + 4, maxnocolumn).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Range(filainicio + 1, 1, filainicio + 4, maxnocolumn).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||
libro.Range(filainicio + 1, incioConceptos, filainicio + 4, finPercepciones).Style.Fill.SetBackgroundColor(colorperp);
|
||||
libro.Range(filainicio + 1, finPercepciones + 1, filainicio + 4, findeducciones).Style.Fill.SetBackgroundColor(colorded);
|
||||
|
||||
if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0)
|
||||
{
|
||||
libro.Range(filainicio + 1, incioConceptos, filainicio + 4, finPercepciones).Style.Fill.SetBackgroundColor(colorperp);
|
||||
}
|
||||
|
||||
if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0)
|
||||
{
|
||||
libro.Range(filainicio + 1, finPercepciones + 2, filainicio + 4, findeducciones).Style.Fill.SetBackgroundColor(colorded);
|
||||
}
|
||||
|
||||
if (dtConceptos.FiltraParametros("Tipo ='O'").Rows.Count > 0)
|
||||
{
|
||||
libro.Range(filainicio + 1, findeducciones + 2, filainicio + 4, maxnocolumn).Style.Fill.SetBackgroundColor(colororange);
|
||||
}
|
||||
|
||||
int Fila = filainicio + 3;
|
||||
int cveSupProyecto = -5;
|
||||
@@ -5269,70 +5352,80 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = "";
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' AND EsPadre = 1 AND EsFormula =0").Rows)
|
||||
|
||||
if (dtConceptos.FiltraParametros("Tipo ='P'").Rows.Count > 0)
|
||||
{
|
||||
column++;
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
|
||||
|
||||
if (newsubproyecto)
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' ").Rows)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
column++;
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
|
||||
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
column++;
|
||||
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
Titlecell(libro, erow["SumaPercepciones"], Fila, column, false, false, PercborderColor);
|
||||
libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
Titlecell(libro, "", Fila - 2, column, false, false, PercborderColor);
|
||||
libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
Titlecell(libro, dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, PercborderColor);
|
||||
//libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
Titlecell(libro, erow["SumaPercepciones"], Fila, column, false, false, PercborderColor);
|
||||
libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
Titlecell(libro, "", Fila - 2, column, false, false, PercborderColor);
|
||||
libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorperp);
|
||||
libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
Titlecell(libro, dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, PercborderColor);
|
||||
//libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Value = "";
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 AND EsFormula =0").Rows)
|
||||
{
|
||||
column++;
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
|
||||
if (dtConceptos.FiltraParametros("Tipo ='D'").Rows.Count > 0)
|
||||
{
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' ").Rows)
|
||||
{
|
||||
column++;
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
}
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorded);
|
||||
Titlecell(libro, erow["SumaDeducciones"], Fila, column, false, false, dedcborderColor);
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorded);
|
||||
Titlecell(libro, "", Fila - 2, column, false, false, dedcborderColor);
|
||||
libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorded);
|
||||
libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
Titlecell(libro, dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, dedcborderColor);
|
||||
//libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colorded);
|
||||
Titlecell(libro, erow["SumaDeducciones"], Fila, column, false, false, dedcborderColor);
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colorded);
|
||||
Titlecell(libro, "", Fila - 2, column, false, false, dedcborderColor);
|
||||
libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colorded);
|
||||
libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
Titlecell(libro, dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, dedcborderColor);
|
||||
//libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
//column++;
|
||||
//libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166));
|
||||
//libro.Cell(Fila, column).Value = erow["SumaEspecie"];
|
||||
@@ -5352,25 +5445,43 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("Total", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
|
||||
//foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' AND EsPadre = 1 ").Rows)
|
||||
//{
|
||||
// column++;
|
||||
// string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
// libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
|
||||
// if (newsubproyecto)
|
||||
// {
|
||||
// libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
// }
|
||||
//}
|
||||
|
||||
//column++;
|
||||
//libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166));
|
||||
//libro.Cell(Fila, column).Value = erow["SumaObligaciones"];
|
||||
//if (newsubproyecto)
|
||||
//{
|
||||
// libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaObligaciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
//}
|
||||
//libro.Cell(Fila, column).Value = "";
|
||||
|
||||
if (dtConceptos.FiltraParametros("Tipo ='O'").Rows.Count > 0)
|
||||
{
|
||||
|
||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' ").Rows)
|
||||
{
|
||||
column++;
|
||||
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
|
||||
libro.Cell(Fila, column).Value = erow[Concepto];
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
}
|
||||
}
|
||||
|
||||
column++;
|
||||
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(colororange);
|
||||
Titlecell(libro, erow["SumaObligaciones"], Fila, column, false, false, dedcborderColor);
|
||||
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
|
||||
libro.Cell(Fila, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
if (newsubproyecto)
|
||||
{
|
||||
libro.Cell(Fila - 2, column).Style.Fill.SetBackgroundColor(colororange);
|
||||
Titlecell(libro, "", Fila - 2, column, false, false, dedcborderColor);
|
||||
libro.Cell(Fila - 3, column).Style.Fill.SetBackgroundColor(colororange);
|
||||
libro.Cell(Fila - 3, column).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
libro.Cell(Fila - 3, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;";
|
||||
Titlecell(libro, dtempleados.SUM("SumaObligaciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto)), Fila - 3, column, true, true, dedcborderColor);
|
||||
//libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libro.Rows(Fila - 2, Fila).Delete();
|
||||
|
||||
@@ -403,7 +403,7 @@ setswitch = function () {
|
||||
};
|
||||
function adssigscrollJSLoad() {
|
||||
|
||||
$('table.adssigscrollJS:not(.adssigscroll)').each(function () {
|
||||
$('table.adssigrid-scroll:not(.adssigscroll)').each(function () {
|
||||
try {
|
||||
let Tthis = $(this);
|
||||
let Tid = Tthis.attr('id');
|
||||
@@ -428,7 +428,7 @@ function adssigscrollJSLoad() {
|
||||
let Trowthis = $(this);
|
||||
stylosrow = `${stylosrow}
|
||||
table#${Tid}.adssigscroll tr:nth-child(${numberitem}) { top: ${top}px; }`;
|
||||
top = top + Trowthis.outerHeight(true);
|
||||
top = top + (Trowthis.outerHeight(true)-1);
|
||||
numberitem = numberitem + 1;
|
||||
});
|
||||
}
|
||||
@@ -474,14 +474,14 @@ table#${Tid}.adssigscroll tr:nth-child(${numberitem}) { top: ${top}px; }`;
|
||||
|
||||
}
|
||||
catch (err) {
|
||||
console.log("adssigscrollJS Error:" + err.message);
|
||||
console.log("adssigrid-scroll Error:" + err.message);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
function LoadSortSticky() {
|
||||
$('body').on('click', 'table.adssigscroll.tr_order tr:not(.tsorterblock) > th ', function (e) {
|
||||
$('body').on('click', 'table.adssigscroll.adssigrid-order tr:not(.tsorterblock) > th ', function (e) {
|
||||
var tthis = $(this);
|
||||
if (tthis.closest('.NoClick').length == 0 && !($(e.target).is('a,input'))) {
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ table.adssigscroll {
|
||||
z-index: 4; /* Asegura que est<73> sobre otros elementos */
|
||||
}
|
||||
|
||||
.tr_order tr > th::after {
|
||||
.adssigrid-order tr > th::after {
|
||||
content: "\f0dc";
|
||||
font: normal normal normal 14px / 1 FontAwesome;
|
||||
display: inline-block;
|
||||
@@ -65,11 +65,11 @@ table.adssigscroll {
|
||||
color: #32A1CF;
|
||||
}
|
||||
|
||||
.tr_order tr > th.asce::after {
|
||||
.adssigrid-order tr > th.asce::after {
|
||||
content: "\f0de";
|
||||
}
|
||||
|
||||
.tr_order tr > th.desc::after {
|
||||
.adssigrid-order tr > th.desc::after {
|
||||
content: "\f0dd";
|
||||
}
|
||||
/*END ScrollADS V2*/
|
||||
@@ -183,4 +183,51 @@ float:none;
|
||||
.portlet {
|
||||
margin-bottom :10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*Begin ScrollADS V2*/
|
||||
/*
|
||||
.divContainerads {
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 260px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
table.adssigscroll {
|
||||
min-width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table.adssigscroll tbody, table.adssigscroll thead {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table.adssigscroll tr {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
table.adssigscroll tr.stickyRow {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: inherit;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th::after {
|
||||
content: "\f0dc";
|
||||
font: normal normal normal 14px / 1 FontAwesome;
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
color: #32A1CF;
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th.asce::after {
|
||||
content: "\f0de";
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th.desc::after {
|
||||
content: "\f0dd";
|
||||
}
|
||||
*/
|
||||
/*END ScrollADS V2*/
|
||||
@@ -91,6 +91,7 @@ a.cerrar_sesion:hover {
|
||||
|
||||
.Titulos {
|
||||
background-color: #DDD;
|
||||
border-color:#DDD;
|
||||
color:#333;
|
||||
font-size:14px;
|
||||
text-align:center;
|
||||
@@ -350,18 +351,19 @@ div.truncate:hover {
|
||||
width: 1px;
|
||||
height: 3px;
|
||||
}
|
||||
.Totales
|
||||
{
|
||||
background:rgba(103, 128, 159, 0.65);
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
font-style:normal;
|
||||
|
||||
.Totales {
|
||||
background: #9cacc1;
|
||||
border-color: #9cacc1;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
tr.Totales:hover{
|
||||
|
||||
background:rgba(103, 128, 159, 0.65) !important;
|
||||
.Totales td{
|
||||
border-color: #9cacc1;
|
||||
}
|
||||
tr .Totales:hover {
|
||||
background: #9cacc1 !important;
|
||||
}
|
||||
a.Totales
|
||||
{
|
||||
@@ -696,3 +698,48 @@ input[type=date]
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*Begin ScrollADS V2*/
|
||||
|
||||
.divContainerads {
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 260px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
table.adssigscroll {
|
||||
min-width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table.adssigscroll tbody, table.adssigscroll thead {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table.adssigscroll tr {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
table.adssigscroll tr.stickyRow {
|
||||
position: sticky;
|
||||
top: 0; /* Se mantiene pegado en la parte superior */
|
||||
background-color: inherit; /* Para que no se superponga con otros elementos */
|
||||
z-index: 4; /* Asegura que esté sobre otros elementos */
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th::after {
|
||||
content: "\f0dc";
|
||||
font: normal normal normal 14px / 1 FontAwesome;
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
color: #32A1CF;
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th.asce::after {
|
||||
content: "\f0de";
|
||||
}
|
||||
|
||||
.adssigrid-order tr > th.desc::after {
|
||||
content: "\f0dd";
|
||||
}
|
||||
/*END ScrollADS V2*/
|
||||
@@ -242,7 +242,7 @@ Partial Class Ventas_FacturacionGlobal
|
||||
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
Try
|
||||
Retorno = ObjFactura.EmitirFactura(True)
|
||||
Retorno = ObjFactura.EmitirFactura(True, Modulo:="FGlobal/GuardarVenta")
|
||||
|
||||
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
||||
SbAlert.AppendFormat("{0}", Retorno.Mensajes(Retorno.Mensajes.Count - 1))
|
||||
|
||||
@@ -15313,8 +15313,7 @@ Partial Class Ventas
|
||||
Try
|
||||
Dim DT As DataTable
|
||||
Dim CvePlantilaPoliza As Integer
|
||||
Dim PorcentajeAmortizacion As Decimal = 0
|
||||
Dim sumaAmorticaciones As Decimal = 0
|
||||
|
||||
Dim ErrorPrepoliza As Boolean = False
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim CveCuentaContabilizacion As Integer = 1
|
||||
@@ -15891,133 +15890,46 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'PorcentajeAmortizacion = sumaAmorticaciones / TxtTotal.Text.ToDecimal
|
||||
importeMovimiento = 0
|
||||
|
||||
Case 91 'Amortizacion Nota de Credito
|
||||
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
||||
|
||||
If ValorMultiplicador = -1 Then
|
||||
'cuando es cancelación
|
||||
For Each row2 As GridViewRow In GvNC.Rows
|
||||
|
||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 91 Then
|
||||
|
||||
importeMovimiento = row2.DataKey("Importe").ToDecimal * ValorMultiplicador
|
||||
sumaAmorticaciones += importeMovimiento
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, importeMovimiento * tipoCambio, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=row2.DataKey("CveVentaNC").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimiento, importeMovimiento * tipoCambio, 91, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2.DataKey("CveVentaNC").ToString().ToEntero(), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
|
||||
'If DdlTipoAmortizacionAnticipo.SelectedValue <> "4" Then
|
||||
|
||||
'End If
|
||||
If Not ErrorPrepoliza AndAlso ValorMultiplicador = 1 Then
|
||||
Dim VentaRef As New ClsPaginas.Venta(ObjFactura, UsuarioActual)
|
||||
importeMovimiento = 0
|
||||
|
||||
For Each row2 As GridViewRow In GVAnticipos.Rows
|
||||
|
||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
||||
|
||||
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||
|
||||
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal
|
||||
sumaAmorticaciones += importeMovimiento
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, ConceptoContable, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=row2.DataKey("CveCliente").ToString().ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Dim Pago As New ClsPaginas.VentaPago
|
||||
Pago.Fecha = Now
|
||||
Pago.FechaDocumentoRelacionado = row2.DataKey("Fecha").ToString().ToDateTime()
|
||||
Pago.ImportePagoVenta = importeMovimiento
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = row2.DataKey("CveIE").ToString().ToEntero()
|
||||
Pago.CveMonedaPago = row2.DataKey("CveMoneda").ToString().ToEntero()
|
||||
Pago.TCPago = row2.DataKey("TipoCambioPago").ToString().ToDecimal()
|
||||
Pago.AplicaTraslado = False
|
||||
Pago.Referencia = row2.DataKey("Folio").ToString()
|
||||
Pago.CveVentaAmortizacion = row2.DataKey("CveVenta").ToString().ToEntero()
|
||||
Pago.TipoPago = "NC"
|
||||
Pago.CveClientePago = ObjFactura.CveCliente
|
||||
Pago.Referencia = Referencia
|
||||
|
||||
End If
|
||||
|
||||
'SI ES PAGO CON DEVOLUCION
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 277 Then
|
||||
|
||||
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal() * Multiplicador
|
||||
importeMX = importeMovimiento * tipoCambio
|
||||
sumaAmorticaciones += importeMovimiento
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaRef, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If ObjFactura.AplicaDevolucion AndAlso ObjFactura.TipoDocto = "RNC" AndAlso CveVentaDevolucion > 0 Then
|
||||
Dim importeMovimientoDev As Decimal = TxtTotal.Text.ToDecimal
|
||||
importeMovimientoDev = If(SaldoVentaDevolucion < importeMovimientoDev, SaldoVentaDevolucion, importeMovimientoDev)
|
||||
|
||||
importeMovimiento = importeMovimientoDev * Multiplicador
|
||||
importeMX = importeMovimiento * tipoCambio
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If Not ErrorPrepoliza Then
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, importeMX, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then
|
||||
Dim ListaNC As List(Of Modelos.Factura) = Nothing
|
||||
@@ -16087,19 +15999,6 @@ Partial Class Ventas
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
If sumaAmorticaciones <> 0 Then
|
||||
|
||||
Dim CveConceptoPagoNC As Integer = 251
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
CveConceptoPagoNC = 301
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, sumaAmorticaciones * tipoCambio, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
importeMovimiento = 0
|
||||
|
||||
Reference in New Issue
Block a user