Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -138,29 +138,29 @@
|
||||
<asp:Literal ID="LblTipoFolio" runat="server" Text='<%# Eval("tipoFolio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Límite">
|
||||
<asp:TemplateField HeaderText="Límite" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblLimite" runat="server" Text='<%# Eval("Limite") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px">
|
||||
<asp:TemplateField HeaderText="SubProyecto" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<asp:TemplateField HeaderText="Estatus" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="AreaTexto" ItemStyle-Width="100px" HeaderText="Área" />
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
||||
<asp:BoundField DataField="AreaTexto" HeaderText="Área" />
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total">
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblTotal" runat="server" Text='<%# Eval("NumRegistros") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -170,23 +170,16 @@
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Mov. Salida" DataTextField="CveMovimiento" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ControlStyle-CssClass="Texto"/>
|
||||
<asp:HyperLinkField HeaderText="Mov. Salida" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ControlStyle-CssClass="Texto"/>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="120px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgVer" OnClick="ImgVer_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-primary btn-circle btn-sm" Text="<i class='fa fa-bars'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -2293,6 +2293,23 @@ Public Class ClsNominas
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function ValidaFechaFinPersonal(CvePersonal As Integer, CveEmpresa As Integer, FechaFin As String)
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_ValidaFechaFinPersonal")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||
'.Add("@Limpiar", SqlDbType.Int).Value = Limpiar
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al validar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetFiniquitosPersonal(CvePersonal As Integer, CveEmpresa As Integer, Optional Limpiar As Integer = 0, Optional diasindemnizacion As Integer = 90) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_FiniquitosGET")
|
||||
|
||||
@@ -7651,10 +7651,10 @@ Public Class ClsPaginas
|
||||
ImportePagoMN = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
||||
End If
|
||||
'movimiento de pago proveedor
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, ConPreP.CveConcepto, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, ConPreP.CveConcepto, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
||||
'movimiento de pago proveedor Complementaria
|
||||
If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 AndAlso UsaComplementaria Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, ConPreP.CveConceptoComplementario, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, ConPreP.CveConceptoComplementario, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
||||
End If
|
||||
If Pago.AplicaAcreditable Then
|
||||
'si tiene iva y su proporcion
|
||||
@@ -7739,12 +7739,12 @@ Public Class ClsPaginas
|
||||
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
If Pago.TipoPago.Contiene("NC", "DEV") AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
||||
@@ -7760,22 +7760,21 @@ Public Class ClsPaginas
|
||||
End If
|
||||
End If
|
||||
If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O
|
||||
'Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
'Dim Ret As New ConceptosRetenciones
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
' If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
'End If
|
||||
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(17, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
If Pago.TipoPago = "Venta" AndAlso Not ErrorMovtos Then ' V E N T A
|
||||
TCValuacionPago = TCValuacionCompra
|
||||
tImportePago = tImporteCompra
|
||||
End If
|
||||
|
||||
If Not ErrorMovtos AndAlso TCValuacionCompra <> TCValuacionPago Then
|
||||
Dim ConceptoContable, IdCtaContable As Integer
|
||||
@@ -7820,7 +7819,9 @@ Public Class ClsPaginas
|
||||
Public Property CveCompraAmortizacion As Integer = 0
|
||||
Public Property OtroGastoIngreso As Decimal = 0
|
||||
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
||||
Public Property CveProveedor As Integer = -1
|
||||
Public Property CveCreditoDetalle As Integer = -1
|
||||
Public Property CveVentaRelacionada As Integer = -1
|
||||
Public Property Referencia As String = ""
|
||||
Public Property AplicaAcreditable As Boolean = True
|
||||
End Class
|
||||
@@ -7994,6 +7995,14 @@ Public Class ClsPaginas
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 342, 344)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 235, 235)
|
||||
End Select
|
||||
Case 17 ' deudores
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 37, 37)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 37, 37)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 256, 256)
|
||||
End Select
|
||||
End Select
|
||||
Else 'cuando es la provisión
|
||||
Select Case CveTipoSaldo
|
||||
@@ -8021,6 +8030,14 @@ Public Class ClsPaginas
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 341, 343)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 234, 234)
|
||||
End Select
|
||||
Case 17 ' deudores
|
||||
Select Case CveMoneda
|
||||
Case 1 'pesos
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 43, 43)
|
||||
Case 2 'dólares
|
||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 43, 43)
|
||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 256, 256)
|
||||
End Select
|
||||
End Select
|
||||
|
||||
End If
|
||||
@@ -8246,6 +8263,7 @@ Public Class ClsPaginas
|
||||
Public Property OtroGastoIngreso As Decimal = 0
|
||||
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
||||
Public Property CveCreditoDetalle As Integer = -1
|
||||
Public Property CveCompraRelacionada As Integer = -1
|
||||
Public Property AplicaTraslado As Boolean = True
|
||||
Public Property Referencia As String
|
||||
Public Property ImporteFluctuacionAdicional As Decimal = 0
|
||||
|
||||
@@ -5606,13 +5606,15 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateVentaLineaAdicional(CveLineaAdicional As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function UpdateVentaLineaAdicional(CveLineaAdicional As Integer, CveVenta As Integer, LineaAdicionalComprobante As String, CveLineaAdicionalEstatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_LineasAdicionalesVentaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@LineaAdicionalComprobante", SqlDbType.VarChar).Value = LineaAdicionalComprobante
|
||||
.Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -2397,11 +2397,39 @@ Namespace Extensiones
|
||||
|
||||
excel.Worksheets.AddCopy(NombreTabla, worksheetDTExtra)
|
||||
excel.Worksheets(0).Name = Titulo
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim indexRow As Integer = 8
|
||||
Dim indexRowGV As Integer = 0
|
||||
Dim cssClassRow As String = ""
|
||||
|
||||
For indexRow = 8 To worksheet.Rows.Count - 4
|
||||
|
||||
Try
|
||||
cssClassRow = GridView.Rows(indexRowGV).CssClass.Trim()
|
||||
|
||||
Select Case cssClassRow
|
||||
Case "SubTotales2"
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow - 1, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#c0c0c0"))
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow - 1, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow - 1, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#000077")
|
||||
Case "SubTotales"
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow - 1, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#dddddd"))
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow - 1, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow - 1, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#67809F")
|
||||
Case Else
|
||||
End Select
|
||||
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
indexRowGV += 1
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||
|
||||
@@ -1472,38 +1472,9 @@ Partial Class Bancos_IE
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("TipoDocto") = "Egsc" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
||||
' e.Row.CssClass = "Totales TextCenter"
|
||||
' e.Row.Cells(1).Text = "Egreso Por Comprobar"
|
||||
'End If
|
||||
|
||||
'If e.Row.DBCampo("TipoDocto") = "Ant" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
||||
' e.Row.CssClass = "Totales TextCenter"
|
||||
' e.Row.Cells(1).Text = "Anticipos"
|
||||
'End If
|
||||
|
||||
If e.Row.DBCampo("TipoDocto") = "NC" AndAlso e.Row.DataKey("CveCompra").ToString.ToEntero > 0 Then
|
||||
e.Row.FCCheckBox("Chk").InputAttributes.Add("data-saldo", e.Row.DataKey("Saldo"))
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("TipoDocto") = "DEV" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
||||
' e.Row.CssClass = "Totales TextCenter"
|
||||
' e.Row.Cells(0).Text = "Devolución"
|
||||
'End If
|
||||
|
||||
'If e.Row.DBCampo("CveProveedor") = "" Then
|
||||
' e.Row.BackColor = Drawing.Color.LightGray
|
||||
'End If
|
||||
|
||||
'If UsuarioActual.TienePermisoProceso(273) Then
|
||||
' If CType(sender, GridView).ID = "GvA" And e.Row.DBCampo("CveCompra").ToEntero > 0 And e.Row.DBCampo("TipoDocto") = "NC" Then
|
||||
' Dim Parametros = Encripta($"CveCompra={e.Row.DBCampo("CveCompra").ToEntero}&SerieFolio={e.Row.DBCampo("SerieFolio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveProveedor={CveProveedor}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}&FechaCompra={e.Row.DBCampo("Fecha")}")
|
||||
' e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||
' e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinC&P={Parametros}"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1562,15 +1533,18 @@ Partial Class Bancos_IE
|
||||
|
||||
#Region " CARGA PERSONAL "
|
||||
Protected Sub CargaDDLPersonal()
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjPersonal.DtResultados.Rows.Count > 0 Then
|
||||
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
||||
End If
|
||||
End If
|
||||
ObjPersonal.Dispose()
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
||||
'Dim ObjPersonal As New ClsRH
|
||||
'If ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjPersonal.DtResultados.Rows.Count > 0 Then
|
||||
' DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||
' DdlPersonal.DataBind()
|
||||
' DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
||||
' End If
|
||||
'End If
|
||||
'ObjPersonal.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -306,7 +306,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
{
|
||||
decimal ImporteBanco = TxtImporte.Text.ToDecimal();
|
||||
decimal ImporteMNBanco = ImporteBanco;
|
||||
decimal ImporteComplementaria = 0;
|
||||
decimal ImporteComplementaria = 0;
|
||||
decimal TCPago = TxtTCPago.Text.ToDecimal();
|
||||
string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||
string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||
@@ -328,6 +328,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
decimal ImporteComision;
|
||||
decimal ImporteComisionMN;
|
||||
decimal AcumImporteMN = 0;
|
||||
decimal ImportePago, ImporteAcreedor;
|
||||
bool TipoMovtoComision = false;
|
||||
int IdCtaContableOtrosGastos = 0;
|
||||
int CveConceptoDiferenciaCambiaria = 0;
|
||||
@@ -338,8 +339,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
Importe = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
|
||||
ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal();
|
||||
ImporteMN = Importe;
|
||||
ImporteAcreedor = Importe; ImportePago = Importe;
|
||||
ImporteComisionMN = ImporteComision;
|
||||
ImporteComplementaria = 0;
|
||||
ImporteComplementaria = 0;
|
||||
|
||||
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() < 0)
|
||||
{
|
||||
@@ -352,7 +354,6 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
{
|
||||
TipoMovtoComision = false;
|
||||
IdCtaContableOtrosGastos = UsuarioActual.Empresa.Funcionalidad(266).ToEntero();
|
||||
|
||||
}
|
||||
|
||||
Decimal TC = gvr.DataKey("TipoCambio").ToDecimal();
|
||||
@@ -364,24 +365,26 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
|
||||
if (gvr.FCCheckBox("Chk").Checked)
|
||||
{
|
||||
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
|
||||
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
|
||||
if (CveMonedaPago == 1 && tCveMoneda == 1)
|
||||
{
|
||||
ImporteMN = Importe;
|
||||
ImporteComisionMN = ImporteComision;
|
||||
ImportePago = Importe;
|
||||
}
|
||||
else if (CveMonedaPago == 1 && tCveMoneda == 2)
|
||||
{
|
||||
ImporteComisionMN = ImporteComision;
|
||||
ImportePago = (Importe * TCPago).RoundSQL();
|
||||
if (UsaComplementaria)
|
||||
{
|
||||
ImporteMN = Importe;
|
||||
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||
}
|
||||
else
|
||||
{
|
||||
ImporteMN = Importe * TC;
|
||||
ImporteComplementaria = 0;
|
||||
ImporteComplementaria = 0;
|
||||
}
|
||||
}
|
||||
else if (CveMonedaPago == 2 && tCveMoneda == 1)
|
||||
@@ -389,6 +392,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
|
||||
ImporteMN = Importe;
|
||||
ImporteComisionMN = ImporteComision;
|
||||
ImporteComplementaria = 0;
|
||||
}
|
||||
else if (CveMonedaPago == 2 && tCveMoneda == 2)
|
||||
{
|
||||
@@ -422,37 +426,37 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
break;
|
||||
}
|
||||
|
||||
if (UsaComplementaria)
|
||||
if (UsaComplementaria && tCveMoneda > 1 && MsgError == "")
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
MsgError = "No se pudo insertar concepto de acreedor complementaria";
|
||||
}
|
||||
|
||||
if (TCPago != TC)
|
||||
{
|
||||
bool TipoMovto = false;
|
||||
int IdCtaContableDiferenciaCambiaria = 0;
|
||||
if (TCPago > TC)
|
||||
{
|
||||
CveConceptoDiferenciaCambiaria = 65;
|
||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
|
||||
TipoMovto = false;
|
||||
Importe = (Importe * TCPago) - (Importe * TC);
|
||||
}
|
||||
else if (TCPago < TC)
|
||||
{
|
||||
CveConceptoDiferenciaCambiaria = 64;
|
||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
|
||||
TipoMovto = true;
|
||||
Importe = (Importe * TC) - (Importe * TCPago);
|
||||
}
|
||||
ImporteMN = Importe;
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Ref, CveConceptoDiferenciaCambiaria, Conc, DateTime.Now, IdCtaContableDiferenciaCambiaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
|
||||
if (ImportePago != ImporteAcreedor && MsgError == "")
|
||||
{
|
||||
bool TipoMovto = false;
|
||||
int IdCtaContableDiferenciaCambiaria = 0;
|
||||
if (TCPago > TC)
|
||||
{
|
||||
CveConceptoDiferenciaCambiaria = 65;
|
||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
|
||||
TipoMovto = false;
|
||||
Importe = (Importe * TCPago) - (Importe * TC);
|
||||
}
|
||||
else if (TCPago < TC)
|
||||
{
|
||||
CveConceptoDiferenciaCambiaria = 64;
|
||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
|
||||
TipoMovto = true;
|
||||
Importe = (Importe * TC) - (Importe * TCPago);
|
||||
}
|
||||
ImporteMN = Importe;
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Ref, CveConceptoDiferenciaCambiaria, Conc, DateTime.Now, IdCtaContableDiferenciaCambiaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
|
||||
}
|
||||
|
||||
if (ImporteComisionMN > 0)
|
||||
if (ImporteComisionMN > 0 && MsgError == "")
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, Ref, 255, Conc, DateTime.Now, IdCtaContableOtrosGastos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComisionMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
{
|
||||
@@ -477,10 +481,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 30, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMNBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
|
||||
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 30, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMNBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
|
||||
|
||||
//movimiento de ajuste por sino se aplicó en el proceso anterior
|
||||
if (CveMonedaPago != 1 && UsaComplementaria )
|
||||
if (MsgError == "" && CveMonedaPago != 1 && UsaComplementaria )
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 204, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||
|
||||
@@ -499,7 +503,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
tCveConceptoOtIngresos = 64; TipoMovtoOt = true;
|
||||
}
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de ajuste en redondeo";
|
||||
}
|
||||
@@ -517,7 +521,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
}
|
||||
|
||||
//VALIDA QUE CUADRE LA PREPOLIZA
|
||||
if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
|
||||
if (MsgError == "" && ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
|
||||
{
|
||||
if (ObjMov.ValorPolizaDescuadre > 0)
|
||||
{
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<div class="col-xs-12">
|
||||
<asp:UpdatePanel ID="UpIngresos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,CveTipoConcepto"
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,CveTipoConcepto,TipoCambio"
|
||||
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -308,7 +308,7 @@
|
||||
<div class="col-xs-12">
|
||||
<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,IdCtaContDeudor"
|
||||
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,IdCtaContDeudor,TipoCambio"
|
||||
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -379,7 +379,7 @@
|
||||
<div class="col-xs-12">
|
||||
<asp:UpdatePanel ID="UpAcreedores" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAcreedores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,CveMoneda,IdCtaContAcreedor"
|
||||
<asp:GridView ID="GvAcreedores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,CveMoneda,IdCtaContAcreedor,TipoCambio"
|
||||
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,6 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
Partial Class Bancos_RepIE
|
||||
Inherits ClsPaginas
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property Conciliacion As Boolean
|
||||
@@ -76,7 +75,7 @@ Partial Class Bancos_RepIE
|
||||
TipoPagina = Request("Tipo")
|
||||
|
||||
DdlEstatusIE.SelectedValueExist("1")
|
||||
DdlEstatusIE.Enabled = False
|
||||
' DdlEstatusIE.Enabled = False
|
||||
|
||||
'habilita especificar otros ingresos en conciliaciones
|
||||
AceptaOtrosIngresos = If(UsuarioActual.Empresa.Funcionalidad(124) = "1", True, False)
|
||||
|
||||
BIN
Bin/GoPdf.dll
Normal file
BIN
Bin/GoPdf.dll
Normal file
Binary file not shown.
@@ -2864,7 +2864,7 @@
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GVAnticipos" runat="server" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCompra,TipoDocto,CveIE,Fecha,CvePrePoliza,CveMoneda,TCCompra" EmptyDataText="No se encontraron Anticipos/NC del Proveedor" CssClass="table table-striped table-hover table-advance Widthall">
|
||||
<asp:GridView ID="GVAnticipos" runat="server" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCompra,TipoDocto,CveIE,Fecha,CvePrePoliza,CveMoneda,TCCompra,CveProveedor" EmptyDataText="No se encontraron Anticipos/NC del Proveedor" CssClass="table table-striped table-hover table-advance Widthall">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="30px">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -8736,6 +8736,7 @@ Partial Class Compras_Compras
|
||||
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
||||
Pago.CveMonedaPago = CveMonedaAnticipo
|
||||
Pago.TCPago = TipoCambioAnt
|
||||
Pago.CveProveedor = gvr.DataKey("CveProveedor").ToEntero
|
||||
|
||||
Select Case gvr.DataKey("TipoDocto")
|
||||
Case "NC", "DEV"
|
||||
@@ -8750,6 +8751,7 @@ Partial Class Compras_Compras
|
||||
CveConceptoCompraComplementaria = 266
|
||||
IdCtaContable = If(CveMonedaAnticipo = 1, CtaProveedorAnticipos, CtaProveedorAnticiposExtranjera)
|
||||
IdCtaContableComp = CtaProveedorAnticiposComplementaria
|
||||
|
||||
'vinculo la compra actual, y no la compra como si fuera nota de credito
|
||||
CveCompraNC = -1
|
||||
CveIE = gvr.DataKey("CveIE").ToEntero
|
||||
|
||||
@@ -230,7 +230,7 @@ Partial Class RepCxPDetalle
|
||||
Me.CveProveedor = CveProveedor
|
||||
|
||||
If DdlProveedores.SelectedValue.ToEntero > 0 Then
|
||||
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {CveProveedor}").Rows(0)("RazonSocial").ToString
|
||||
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor).FiltroPrimeroValor("RazonSocial").ToString
|
||||
Else
|
||||
DdlProveedores.SelectedText = "-"
|
||||
End If
|
||||
|
||||
@@ -4247,132 +4247,172 @@ Partial Class Compras_eFacturas
|
||||
Protected Sub LnkRegenerarPdfnew_Click(sender As Object, e As EventArgs)
|
||||
Dim gvrow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim objxml As XmlSatCFDI = XmlSatCFDI.readXML(String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("XML")))
|
||||
If Not IsNothing(objxml) Then
|
||||
Dim rutaReporte As String = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\Grales\Formatos\CFDIV3.rdlc")
|
||||
If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
rutaReporte = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\Grales\Formatos\CFDIV3Pago.rdlc")
|
||||
|
||||
|
||||
Dim XmlRutaArchivo As String = File.ReadAllText(String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("XML")))
|
||||
Dim PDFRutaArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
|
||||
Dim RutaRDLC = String.Format("{0}{1}", DirectorioBaseEmpresas, "Empresas\Grales\Formatos\ReciboDePagoGOPDF.rdlc")
|
||||
|
||||
|
||||
|
||||
'ModExtensiones.GuardaLog(" '--------PDF GenGoPdf Inicia ")
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim Inicio As DateTime = DateTime.Now
|
||||
Dim goPdf As GoPdf.GoPdf = New GoPdf.GoPdf()
|
||||
Dim logotipo As Byte() = Nothing
|
||||
|
||||
Try
|
||||
Dim result = goPdf.ExportarPdf(XmlRutaArchivo, logotipo, "", RutaRDLC, New GoPdf.Modelos.DatosAdicionales() With {
|
||||
.DomicilioReceptor = ""
|
||||
})
|
||||
Dim Fin As DateTime = DateTime.Now
|
||||
|
||||
If result IsNot Nothing Then
|
||||
File.WriteAllBytes(PDFRutaArchivo, result)
|
||||
Respuesta = True
|
||||
Alert($"PDF Generado")
|
||||
Else
|
||||
Alert($"PDF Error se genero nulo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Dim NombreArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
|
||||
|
||||
Catch ex As Exception
|
||||
Alert($"PDF Error {ex.Message} -- > {ex.StackTrace}", TipoMensaje.MsgAdvertencia)
|
||||
End Try
|
||||
|
||||
Alert("PDF Finaliza", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
|
||||
Dim QR As ClbNegBICFDv3_2.ClsNegCBBGenerar = New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
Dim cQr As Byte() = QR.GenerarCBBBytes(objxml.emisor.Rfc, objxml.receptor.Rfc, If(IsNothing(objxml.complemento.Pagos), objxml.comprobante.Total, objxml.complemento.Pagos.Monto), objxml.complemento.UUID)
|
||||
Dim parametros As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
parametros.Add(New ReportParameter("comprobante_Certificado", objxml.comprobante.Certificado))
|
||||
parametros.Add(New ReportParameter("comprobante_CondicionesDePago", objxml.comprobante.CondicionesDePago))
|
||||
parametros.Add(New ReportParameter("comprobante_Confirmacion", objxml.comprobante.Confirmacion))
|
||||
parametros.Add(New ReportParameter("comprobante_Fecha", objxml.comprobante.Fecha))
|
||||
parametros.Add(New ReportParameter("comprobante_Serie", objxml.comprobante.Serie))
|
||||
parametros.Add(New ReportParameter("comprobante_Folio", objxml.comprobante.Folio))
|
||||
parametros.Add(New ReportParameter("comprobante_Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_SubTotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_Total", objxml.comprobante.Total.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_Version", objxml.comprobante.Version))
|
||||
parametros.Add(New ReportParameter("comprobante_TipoDeComprobante", objxml.comprobante.TipoDeComprobanteTexto))
|
||||
parametros.Add(New ReportParameter("comprobante_FormaPago", objxml.comprobante.FormaPagoTexto))
|
||||
parametros.Add(New ReportParameter("comprobante_LugarExpedicion", objxml.comprobante.LugarExpedicion))
|
||||
parametros.Add(New ReportParameter("comprobante_NoCertificado", objxml.comprobante.NoCertificado))
|
||||
parametros.Add(New ReportParameter("comprobante_Sello", objxml.comprobante.Sello))
|
||||
parametros.Add(New ReportParameter("comprobante_Moneda", objxml.comprobante.Moneda))
|
||||
parametros.Add(New ReportParameter("comprobante_TipoCambio", objxml.comprobante.TipoCambio.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_MetodoPago", objxml.comprobante.MetodoPagoTexto))
|
||||
parametros.Add(New ReportParameter("emisor_Rfc", objxml.emisor.Rfc))
|
||||
parametros.Add(New ReportParameter("emisor_Nombre", objxml.emisor.Nombre))
|
||||
parametros.Add(New ReportParameter("emisor_RegimenFiscal", objxml.emisor.RegimenFiscalTexto))
|
||||
parametros.Add(New ReportParameter("receptor_Rfc", objxml.receptor.Rfc))
|
||||
parametros.Add(New ReportParameter("receptor_Nombre", objxml.receptor.Nombre))
|
||||
parametros.Add(New ReportParameter("receptor_NumRegIdTrib", objxml.receptor.NumRegIdTrib))
|
||||
parametros.Add(New ReportParameter("receptor_ResidenciaFiscal", objxml.receptor.ResidenciaFiscal))
|
||||
parametros.Add(New ReportParameter("receptor_UsoCFDI", objxml.receptor.UsoCFDITexto))
|
||||
parametros.Add(New ReportParameter("complemento_FechaTimbrado", objxml.complemento.FechaTimbrado))
|
||||
parametros.Add(New ReportParameter("complemento_NoCertificadoSAT", objxml.complemento.NoCertificadoSAT))
|
||||
parametros.Add(New ReportParameter("complemento_RfcProvCertif", objxml.complemento.RfcProvCertif))
|
||||
parametros.Add(New ReportParameter("complemento_SelloCFD", objxml.complemento.SelloCFD))
|
||||
parametros.Add(New ReportParameter("complemento_SelloSAT", objxml.complemento.SelloSAT))
|
||||
parametros.Add(New ReportParameter("complemento_UUID", objxml.complemento.UUID))
|
||||
parametros.Add(New ReportParameter("complemento_CadenaOriginal", objxml.complemento.CadenaOriginal))
|
||||
If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
parametros.Add(New ReportParameter("CPFechaPago", objxml.complemento.Pagos.FechaPago))
|
||||
parametros.Add(New ReportParameter("CPFormaDePagoP", objxml.complemento.Pagos.FormaDePagoP))
|
||||
parametros.Add(New ReportParameter("CPFormaDePagoPText", objxml.complemento.Pagos.FormaDePagoPText))
|
||||
parametros.Add(New ReportParameter("CPMonedaP", objxml.complemento.Pagos.MonedaP))
|
||||
parametros.Add(New ReportParameter("CPMonto", objxml.complemento.Pagos.Monto.ToString()))
|
||||
parametros.Add(New ReportParameter("CPTipoCambioP", objxml.complemento.Pagos.TipoCambioP.ToString()))
|
||||
parametros.Add(New ReportParameter("CPNumOperacion", objxml.complemento.Pagos.NumOperacion))
|
||||
parametros.Add(New ReportParameter("CPNomBancoOrdExt", objxml.complemento.Pagos.NomBancoOrdExt))
|
||||
parametros.Add(New ReportParameter("CPRfcEmisorCtaOrd", objxml.complemento.Pagos.RfcEmisorCtaOrd))
|
||||
parametros.Add(New ReportParameter("CPCtaOrdenante", objxml.complemento.Pagos.CtaOrdenante))
|
||||
parametros.Add(New ReportParameter("CPRfcEmisorCtaBen", objxml.complemento.Pagos.RfcEmisorCtaBen))
|
||||
parametros.Add(New ReportParameter("CPCtaBeneficiario", objxml.complemento.Pagos.CtaBeneficiario))
|
||||
|
||||
End If
|
||||
Using MR As ReportViewer = New ReportViewer()
|
||||
Dim rdsTotales As ReportDataSource = New ReportDataSource()
|
||||
Dim ltotales As List(Of utilValores) = New List(Of utilValores)()
|
||||
ltotales.Add(New utilValores("Subtotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
|
||||
If objxml.comprobante.Descuento > 0 Then
|
||||
ltotales.Add(New utilValores("Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
End If
|
||||
'If Not IsNothing(objxml) Then
|
||||
' Dim rutaReporte As String = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\Grales\Formatos\CFDIV3.rdlc")
|
||||
' If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
' rutaReporte = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\Grales\Formatos\CFDIV3Pago.rdlc")
|
||||
' End If
|
||||
' Dim NombreArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
|
||||
|
||||
For Each item As CFDIImpuesto In objxml.Impuestos
|
||||
|
||||
If item.Importe > 0 Then
|
||||
Dim TasaOCuota As Decimal = 0
|
||||
Decimal.TryParse(item.TasaOCuota, TasaOCuota)
|
||||
ltotales.Add(New utilValores($"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}", item.Importe.ToString("N2")))
|
||||
End If
|
||||
Next
|
||||
' Dim QR As ClbNegBICFDv3_2.ClsNegCBBGenerar = New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
' Dim cQr As Byte() = QR.GenerarCBBBytes(objxml.emisor.Rfc, objxml.receptor.Rfc, If(IsNothing(objxml.complemento.Pagos), objxml.comprobante.Total, objxml.complemento.Pagos.Monto), objxml.complemento.UUID)
|
||||
' Dim parametros As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
' parametros.Add(New ReportParameter("comprobante_Certificado", objxml.comprobante.Certificado))
|
||||
' parametros.Add(New ReportParameter("comprobante_CondicionesDePago", objxml.comprobante.CondicionesDePago))
|
||||
' parametros.Add(New ReportParameter("comprobante_Confirmacion", objxml.comprobante.Confirmacion))
|
||||
' parametros.Add(New ReportParameter("comprobante_Fecha", objxml.comprobante.Fecha))
|
||||
' parametros.Add(New ReportParameter("comprobante_Serie", objxml.comprobante.Serie))
|
||||
' parametros.Add(New ReportParameter("comprobante_Folio", objxml.comprobante.Folio))
|
||||
' parametros.Add(New ReportParameter("comprobante_Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
' parametros.Add(New ReportParameter("comprobante_SubTotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
' parametros.Add(New ReportParameter("comprobante_Total", objxml.comprobante.Total.ToString("N2")))
|
||||
' parametros.Add(New ReportParameter("comprobante_Version", objxml.comprobante.Version))
|
||||
' parametros.Add(New ReportParameter("comprobante_TipoDeComprobante", objxml.comprobante.TipoDeComprobanteTexto))
|
||||
' parametros.Add(New ReportParameter("comprobante_FormaPago", objxml.comprobante.FormaPagoTexto))
|
||||
' parametros.Add(New ReportParameter("comprobante_LugarExpedicion", objxml.comprobante.LugarExpedicion))
|
||||
' parametros.Add(New ReportParameter("comprobante_NoCertificado", objxml.comprobante.NoCertificado))
|
||||
' parametros.Add(New ReportParameter("comprobante_Sello", objxml.comprobante.Sello))
|
||||
' parametros.Add(New ReportParameter("comprobante_Moneda", objxml.comprobante.Moneda))
|
||||
' parametros.Add(New ReportParameter("comprobante_TipoCambio", objxml.comprobante.TipoCambio.ToString("N2")))
|
||||
' parametros.Add(New ReportParameter("comprobante_MetodoPago", objxml.comprobante.MetodoPagoTexto))
|
||||
' parametros.Add(New ReportParameter("emisor_Rfc", objxml.emisor.Rfc))
|
||||
' parametros.Add(New ReportParameter("emisor_Nombre", objxml.emisor.Nombre))
|
||||
' parametros.Add(New ReportParameter("emisor_RegimenFiscal", objxml.emisor.RegimenFiscalTexto))
|
||||
' parametros.Add(New ReportParameter("receptor_Rfc", objxml.receptor.Rfc))
|
||||
' parametros.Add(New ReportParameter("receptor_Nombre", objxml.receptor.Nombre))
|
||||
' parametros.Add(New ReportParameter("receptor_NumRegIdTrib", objxml.receptor.NumRegIdTrib))
|
||||
' parametros.Add(New ReportParameter("receptor_ResidenciaFiscal", objxml.receptor.ResidenciaFiscal))
|
||||
' parametros.Add(New ReportParameter("receptor_UsoCFDI", objxml.receptor.UsoCFDITexto))
|
||||
' parametros.Add(New ReportParameter("complemento_FechaTimbrado", objxml.complemento.FechaTimbrado))
|
||||
' parametros.Add(New ReportParameter("complemento_NoCertificadoSAT", objxml.complemento.NoCertificadoSAT))
|
||||
' parametros.Add(New ReportParameter("complemento_RfcProvCertif", objxml.complemento.RfcProvCertif))
|
||||
' parametros.Add(New ReportParameter("complemento_SelloCFD", objxml.complemento.SelloCFD))
|
||||
' parametros.Add(New ReportParameter("complemento_SelloSAT", objxml.complemento.SelloSAT))
|
||||
' parametros.Add(New ReportParameter("complemento_UUID", objxml.complemento.UUID))
|
||||
' parametros.Add(New ReportParameter("complemento_CadenaOriginal", objxml.complemento.CadenaOriginal))
|
||||
' If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
' parametros.Add(New ReportParameter("CPFechaPago", objxml.complemento.Pagos.FechaPago))
|
||||
' parametros.Add(New ReportParameter("CPFormaDePagoP", objxml.complemento.Pagos.FormaDePagoP))
|
||||
' parametros.Add(New ReportParameter("CPFormaDePagoPText", objxml.complemento.Pagos.FormaDePagoPText))
|
||||
' parametros.Add(New ReportParameter("CPMonedaP", objxml.complemento.Pagos.MonedaP))
|
||||
' parametros.Add(New ReportParameter("CPMonto", objxml.complemento.Pagos.Monto.ToString()))
|
||||
' parametros.Add(New ReportParameter("CPTipoCambioP", objxml.complemento.Pagos.TipoCambioP.ToString()))
|
||||
' parametros.Add(New ReportParameter("CPNumOperacion", objxml.complemento.Pagos.NumOperacion))
|
||||
' parametros.Add(New ReportParameter("CPNomBancoOrdExt", objxml.complemento.Pagos.NomBancoOrdExt))
|
||||
' parametros.Add(New ReportParameter("CPRfcEmisorCtaOrd", objxml.complemento.Pagos.RfcEmisorCtaOrd))
|
||||
' parametros.Add(New ReportParameter("CPCtaOrdenante", objxml.complemento.Pagos.CtaOrdenante))
|
||||
' parametros.Add(New ReportParameter("CPRfcEmisorCtaBen", objxml.complemento.Pagos.RfcEmisorCtaBen))
|
||||
' parametros.Add(New ReportParameter("CPCtaBeneficiario", objxml.complemento.Pagos.CtaBeneficiario))
|
||||
|
||||
ltotales.Add(New utilValores("Total", objxml.comprobante.Total.ToString("N2")))
|
||||
rdsTotales.Name = "dsTotales"
|
||||
rdsTotales.Value = ltotales
|
||||
MR.LocalReport.DataSources.Add(rdsTotales)
|
||||
Dim rds2 As ReportDataSource = New ReportDataSource()
|
||||
Dim limagenes As List(Of utilImage) = New List(Of utilImage)()
|
||||
limagenes.Add(New utilImage(cQr))
|
||||
rds2.Name = "dsImagenes"
|
||||
rds2.Value = limagenes
|
||||
MR.LocalReport.DataSources.Add(rds2)
|
||||
Dim rdsrelacionados As ReportDataSource = New ReportDataSource()
|
||||
rdsrelacionados.Name = "dsRelacionados"
|
||||
rdsrelacionados.Value = objxml.cFDIRelacionados
|
||||
MR.LocalReport.DataSources.Add(rdsrelacionados)
|
||||
Dim rds1 As ReportDataSource = New ReportDataSource()
|
||||
rds1.Name = "dsConceptos"
|
||||
rds1.Value = objxml.GetConceptosforpdf()
|
||||
MR.LocalReport.DataSources.Add(rds1)
|
||||
' End If
|
||||
' Using MR As ReportViewer = New ReportViewer()
|
||||
' Dim rdsTotales As ReportDataSource = New ReportDataSource()
|
||||
' Dim ltotales As List(Of utilValores) = New List(Of utilValores)()
|
||||
' ltotales.Add(New utilValores("Subtotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
|
||||
If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
' If objxml.comprobante.Descuento > 0 Then
|
||||
' ltotales.Add(New utilValores("Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
' End If
|
||||
|
||||
Dim rdsp As ReportDataSource = New ReportDataSource()
|
||||
rdsp.Name = "dsPagos"
|
||||
rdsp.Value = objxml.complemento.Pagos.doctosRelacionados
|
||||
MR.LocalReport.DataSources.Add(rdsp)
|
||||
End If
|
||||
' For Each item As CFDIImpuesto In objxml.Impuestos
|
||||
|
||||
' If item.Importe > 0 Then
|
||||
' Dim TasaOCuota As Decimal = 0
|
||||
' Decimal.TryParse(item.TasaOCuota, TasaOCuota)
|
||||
' ltotales.Add(New utilValores($"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}", item.Importe.ToString("N2")))
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' ltotales.Add(New utilValores("Total", objxml.comprobante.Total.ToString("N2")))
|
||||
' rdsTotales.Name = "dsTotales"
|
||||
' rdsTotales.Value = ltotales
|
||||
' MR.LocalReport.DataSources.Add(rdsTotales)
|
||||
' Dim rds2 As ReportDataSource = New ReportDataSource()
|
||||
' Dim limagenes As List(Of utilImage) = New List(Of utilImage)()
|
||||
' limagenes.Add(New utilImage(cQr))
|
||||
' rds2.Name = "dsImagenes"
|
||||
' rds2.Value = limagenes
|
||||
' MR.LocalReport.DataSources.Add(rds2)
|
||||
' Dim rdsrelacionados As ReportDataSource = New ReportDataSource()
|
||||
' rdsrelacionados.Name = "dsRelacionados"
|
||||
' rdsrelacionados.Value = objxml.cFDIRelacionados
|
||||
' MR.LocalReport.DataSources.Add(rdsrelacionados)
|
||||
' Dim rds1 As ReportDataSource = New ReportDataSource()
|
||||
' rds1.Name = "dsConceptos"
|
||||
' rds1.Value = objxml.GetConceptosforpdf()
|
||||
' MR.LocalReport.DataSources.Add(rds1)
|
||||
|
||||
' If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
|
||||
' Dim rdsp As ReportDataSource = New ReportDataSource()
|
||||
' rdsp.Name = "dsPagos"
|
||||
' rdsp.Value = objxml.complemento.Pagos.doctosRelacionados
|
||||
' MR.LocalReport.DataSources.Add(rdsp)
|
||||
' End If
|
||||
|
||||
' MR.LocalReport.ReportPath = rutaReporte
|
||||
' MR.ProcessingMode = ProcessingMode.Local
|
||||
' MR.LocalReport.EnableExternalImages = True
|
||||
' MR.LocalReport.SetParameters(parametros)
|
||||
' MR.LocalReport.Refresh()
|
||||
' Dim warnings As Warning() = Nothing
|
||||
' Dim streamids As String() = Nothing
|
||||
' Dim mimeType As String = Nothing
|
||||
' Dim encoding As String = Nothing
|
||||
' Dim extension As String = Nothing
|
||||
' Dim bytes As Byte() = Nothing
|
||||
' bytes = MR.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
|
||||
|
||||
' Using fs As FileStream = New FileStream(NombreArchivo, FileMode.Create)
|
||||
' fs.Write(bytes, 0, bytes.Length)
|
||||
' fs.Close()
|
||||
' End Using
|
||||
' End Using
|
||||
' Alert("PDF Generado!")
|
||||
'Else
|
||||
' Alert("no se pudo procesar el archivo xml")
|
||||
'End If
|
||||
|
||||
MR.LocalReport.ReportPath = rutaReporte
|
||||
MR.ProcessingMode = ProcessingMode.Local
|
||||
MR.LocalReport.EnableExternalImages = True
|
||||
MR.LocalReport.SetParameters(parametros)
|
||||
MR.LocalReport.Refresh()
|
||||
Dim warnings As Warning() = Nothing
|
||||
Dim streamids As String() = Nothing
|
||||
Dim mimeType As String = Nothing
|
||||
Dim encoding As String = Nothing
|
||||
Dim extension As String = Nothing
|
||||
Dim bytes As Byte() = Nothing
|
||||
bytes = MR.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
|
||||
|
||||
Using fs As FileStream = New FileStream(NombreArchivo, FileMode.Create)
|
||||
fs.Write(bytes, 0, bytes.Length)
|
||||
fs.Close()
|
||||
End Using
|
||||
End Using
|
||||
Alert("PDF Generado!")
|
||||
Else
|
||||
Alert("no se pudo procesar el archivo xml")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub VinculacionMasivaComplementos()
|
||||
|
||||
|
||||
138
Global.asax
138
Global.asax
@@ -99,54 +99,6 @@
|
||||
End Using
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 9:{0}", DateTime.Now))
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R O S P E C T O S
|
||||
|
||||
'GuardaLogAsax(String.Format("Globalasax 10:{0}", DateTime.Now))
|
||||
'Using ObjProspectos As New ClsProspectos
|
||||
'If ObjProspectos.GetClasificacion Then Application("GlobalDTProspectosClasificaciones") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosClasificaciones") = Nothing
|
||||
'If ObjProspectos.GetClasificacion Then Application("GlobalDTProspectosClasificacionesCaracteristicas") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosClasificacionesCaracteristicas") = Nothing
|
||||
'If ObjProspectos.GetCoordinadores(-1) Then Application("GlobalDTProspectosCoordinadores") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosCoordinadores") = Nothing
|
||||
'If ObjProspectos.GetSupervisores(-1) Then Application("GlobalDTProspectosSupervisores") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosSupervisores") = Nothing
|
||||
'If ObjProspectos.GetProspectosSolicitudes(-1, -1, -1, -1, -1) Then Application("GlobalDTProspectosSolicitudes") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosSolicitudes") = Nothing
|
||||
'If ObjProspectos.GetSolicitudTipo Then Application("GlobalDTProspectosSolicitudesTipos") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosSolicitudesTipos") = Nothing
|
||||
'If ObjProspectos.GetApoyoTipo Then Application("GlobalDTProspectosApoyosTipos") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosApoyosTipos") = Nothing
|
||||
'If ObjProspectos.GetProspectoApoyo Then Application("GlobalDTProspectosApoyos") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosApoyos") = Nothing
|
||||
'If ObjProspectos.GetSolicitudEstatus Then Application("GlobalDTProspectosSolicitudesEstatus") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosSolicitudesEstatus") = Nothing
|
||||
'If ObjProspectos.GetEventosTipo(-1) Then Application("GlobalDTProspectosEventosTipo") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosEventosTipo") = Nothing
|
||||
'If ObjProspectos.GetProspectosEventos(-1, -1) Then Application("GlobalDTProspectosEvento") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosEvento") = Nothing
|
||||
'If ObjProspectos.GetProspectosTipos() Then Application("GlobalDTProspectosTipos") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosTipos") = Nothing
|
||||
'If ObjProspectos.GetProspectosEstatus() Then Application("GlobalDTProspectosEstatus") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosEstatus") = Nothing
|
||||
'If ObjProspectos.GetCaracteristicasClasificaciones(-1) Then Application("GlobalDTProspectosCaracteristicasClasificaciones") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosCaracteristicasClasificaciones") = Nothing
|
||||
'If ObjProspectos.GetTiposCaracteristicas(-1) Then Application("GlobalDTProspectosTiposCaracteristicas") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosTiposCaracteristicas") = Nothing
|
||||
'If ObjProspectos.GetCaracteristicas(-1) Then Application("GlobalDTProspectosCaracteristicas") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosCaracteristicas") = Nothing
|
||||
'If ObjProspectos.GetCaracteristicasOpciones(-1, -1) Then Application("GlobalDTProspectosCaracteristicasOpciones") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosCaracteristicasOpciones") = Nothing
|
||||
'If ObjProspectos.GetEncuestas(-1, -1) Then Application("GlobalDTProspectosEncuestas") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosEncuestas") = Nothing
|
||||
'If ObjProspectos.GetPreguntas(-1, -1, -1) Then Application("GlobalDTProspectosEncuestasPreguntas") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosEncuestasPreguntas") = Nothing
|
||||
'If ObjProspectos.GetRespuestas(-1, -1) Then Application("GlobalDTProspectosEncuestasRespuestas") = ObjProspectos.DtResultados Else Application("GlobalDTProspectosEncuestasRespuestas") = Nothing
|
||||
'End Using
|
||||
|
||||
'GuardaLogAsax(String.Format("Globalasax 11:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C L A S I F I C A C I O N E S
|
||||
|
||||
'Using ObjClasificaciones As New ClsClasificaciones()
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'F A M I L I A S
|
||||
'If ObjClasificaciones.GetClasificaciones(Tipo:=2) Then Application("GlobalDTSubFamilias") = ObjClasificaciones.DtResultados Else Application("GlobalDTSubFamilias") = Nothing
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R E S U P U E S T O
|
||||
'If ObjClasificaciones.GetClasificaciones(Tipo:=3) Then Application("GlobalDTClasificacionesPresupuestos") = ObjClasificaciones.DtResultados Else Application("GlobalDTClasificacionesPresupuestos") = Nothing
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C L A S I F I C A C I O N E S 2
|
||||
'If ObjClasificaciones.GetClasificaciones(Tipo:=4) Then Application("GlobalDTClasificaciones2") = ObjClasificaciones.DtResultados Else Application("GlobalDTClasificaciones2") = Nothing
|
||||
'End Using
|
||||
'GuardaLogAsax(String.Format("Globalasax 20:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'------------------------------------------------------------------------------S I S T E M A ----------------------------------------------------------------------------------
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -158,14 +110,6 @@
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 35:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C O M B U S T I B L E S
|
||||
|
||||
'Using ObjFlotillas As New ClsFlotillas
|
||||
'If ObjFlotillas.GetCombustibles() Then Application("GlobalDTCombustibles") = ObjFlotillas.DtResultados Else Application("GlobalDTCombustibles") = Nothing
|
||||
'If ObjFlotillas.GetCombustiblesTipos(-1) Then Application("GlobalDTCombustiblesTipos") = ObjFlotillas.DtResultados Else Application("GlobalDTCombustiblesTipos") = Nothing
|
||||
'End Using
|
||||
'GuardaLogAsax(String.Format("Globalasax 39:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -194,26 +138,26 @@
|
||||
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
' R A S T R E O
|
||||
Using ObjGPS As New ClsGPS
|
||||
If ObjGPS.DispositivosGet(-1, -1, -1, -1) Then
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
Application("GlobalDTDispositivos") = ObjGPS.DtResultados
|
||||
Else
|
||||
Application("GlobalDTDispositivos") = Nothing
|
||||
End If
|
||||
End If
|
||||
''------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'' R A S T R E O
|
||||
'Using ObjGPS As New ClsGPS
|
||||
' If ObjGPS.DispositivosGet(-1, -1, -1, -1) Then
|
||||
' If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
' Application("GlobalDTDispositivos") = ObjGPS.DtResultados
|
||||
' Else
|
||||
' Application("GlobalDTDispositivos") = Nothing
|
||||
' End If
|
||||
' End If
|
||||
|
||||
If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados
|
||||
Else
|
||||
Application("GlobalDTDispositivosUsuarios") = Nothing
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
GuardaLogAsax(String.Format("Globalasax 42:{0}", DateTime.Now))
|
||||
' If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then
|
||||
' If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
' Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados
|
||||
' Else
|
||||
' Application("GlobalDTDispositivosUsuarios") = Nothing
|
||||
' End If
|
||||
' End If
|
||||
'End Using
|
||||
'GuardaLogAsax(String.Format("Globalasax 42:{0}", DateTime.Now))
|
||||
|
||||
|
||||
'If EsProduccion = "1" Then
|
||||
@@ -277,48 +221,6 @@
|
||||
'sessionData.Remove(HttpContext.Current.Session.SessionID)
|
||||
'Application("s") = sessionData
|
||||
End Sub
|
||||
|
||||
#Region "S Q L D E P E N D E N C Y"
|
||||
|
||||
'Public Sub RegisterNotification()
|
||||
' Try
|
||||
' 'Get the connection string from the Web.Config file. Make sure that the key exists and it is the connection string for the Notification Database and the NotificationList Table that we created
|
||||
' Dim connectionString As String = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
' 'We have selected the entire table as the command, so SQL Server executes this script and sees if there is a change in the result, raise the event
|
||||
' Dim commandText As String = "SELECT [FechaNotificacion] FROM dbo.Sis_NotificacionesActualizaciones"
|
||||
' 'Start the SQL Dependency
|
||||
' SqlDependency.Start(connectionString)
|
||||
' Using connection As New SqlConnection(connectionString)
|
||||
' Using command As New SqlCommand(commandText, connection)
|
||||
' connection.Open()
|
||||
' Dim sqlDependency = New SqlDependency(command)
|
||||
' AddHandler sqlDependency.OnChange, AddressOf sqlDependency_OnChange
|
||||
' ' NOTE: You have to execute the command, or the notification will never fire.
|
||||
' Using reader As SqlDataReader = command.ExecuteReader()
|
||||
' End Using
|
||||
' End Using
|
||||
' End Using
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub sqlDependency_OnChange(sender As Object, e As SqlNotificationEventArgs)
|
||||
' If e.Info = SqlNotificationInfo.Update Then
|
||||
' Try
|
||||
' Dim ObjNotificaciones As New ClsSisNotificaciones
|
||||
' ObjNotificaciones.ObtenerNotificaciones()
|
||||
' ObjNotificaciones.Dispose()
|
||||
' 'System.Threading.Thread.Sleep(5000)
|
||||
' RegisterNotification()
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
' End If
|
||||
' 'Call the RegisterNotification method again
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -3941,12 +3941,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -461,25 +461,12 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||
|
||||
<asp:UpdatePanel ID="UPInv" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS" clientidmode="Static" visible="false">
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
<%-- <td>
|
||||
<asp:TextBox Width="35px" Text="1" ID="TxtCantidadCodigoBarras" runat="server" />
|
||||
</td>--%>
|
||||
<div runat="server" id="DivCodigoSeriePS" clientidmode="Static" visible="false">
|
||||
<table >
|
||||
<tr>
|
||||
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
|
||||
<td>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
@@ -494,15 +481,22 @@
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||
<asp:UpdatePanel ID="UPInv" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvInv" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño,Lote,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="58px" />
|
||||
<HeaderStyle Height="28px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -513,17 +507,17 @@
|
||||
<asp:BoundField HeaderText="Original" DataField="CantidadC" DataFormatString="{0:#,##0.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Recibidó" DataField="CantidadS" DataFormatString="{0:#,##0.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Por Recibir" DataField="CantidadF" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" Visible="false" />
|
||||
<asp:TemplateField HeaderText="Cant. a Recibir" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Cant. a Recibir" ItemStyle-Width="12.5%">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" Text="0"></asp:TextBox>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" Text="0" Style="text-align: right; "></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidadF" runat="server" TargetControlID="TbCantidadF" FilterType="Numbers,custom" ValidChars="." />
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-sm" runat="server" Visible="false" />
|
||||
<asp:Button Text="Lote" ID="BtnLote" CssClass="btn btn-primary" OnClick="BtnLote_Click" runat="server" Visible="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
||||
<asp:HyperLinkField HeaderText="Producto o Servicio" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
||||
<asp:HyperLinkField HeaderText="Producto" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
|
||||
|
||||
@@ -1478,7 +1478,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
e.Row.FCCheckBox("cbInv").Enabled = True
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(345) Then 'carga la cantidad con el rol AD
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal().ToString("{#,###.##}")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
@@ -1105,18 +1106,32 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
bool continuar = false;
|
||||
bool continuar = true;
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||
{
|
||||
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"));
|
||||
if (onom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
continuar = false;
|
||||
StringBuilder strbuild = new StringBuilder();
|
||||
strbuild.Append("No es posible guardar el finiquito ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.");
|
||||
foreach (DataRow drow in onom.DtResultados.Rows)
|
||||
{
|
||||
strbuild.AppendFormat("<br/> {0}", drow["PeriodoTexto"]);
|
||||
}
|
||||
Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
if (continuar && ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||
// Alert(string.Format("{0}: {1}", CvePeriodoIndemnizacion, CvePeriodoFiniquito));
|
||||
}
|
||||
else { continuar = false; }
|
||||
if (continuar)
|
||||
{
|
||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero());
|
||||
@@ -1160,7 +1175,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
dtempleadosConceptos = null;
|
||||
dtempleados = null;
|
||||
LnkAutorizar.Visible = true;
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal,Neto:1) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal, Neto: 1) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5783,7 +5783,7 @@ Partial Class RH_Personal
|
||||
ViewState("FilesMoveimgNew") = filemove
|
||||
End If
|
||||
End If
|
||||
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
|
||||
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
|
||||
Next
|
||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
||||
@@ -7480,9 +7480,28 @@ Partial Class RH_Personal
|
||||
|
||||
End If
|
||||
End If
|
||||
If continuar Then
|
||||
|
||||
Using onom As ClsNominas = New ClsNominas()
|
||||
onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, fecha.ToString("yyyy/MM/dd"))
|
||||
|
||||
If onom.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
continuar = False
|
||||
Dim strbuild As StringBuilder = New StringBuilder()
|
||||
strbuild.Append("No es posible desactivar con esta fecha ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.")
|
||||
|
||||
For Each drow As DataRow In onom.DtResultados.Rows
|
||||
strbuild.AppendFormat("<br/> {0}", drow("PeriodoTexto"))
|
||||
Next
|
||||
Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Using
|
||||
End If
|
||||
If continuar Then
|
||||
Using objrh As New ClsRH
|
||||
continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(),)
|
||||
continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(), Txobservacionesbaja.Text)
|
||||
End Using
|
||||
End If
|
||||
|
||||
|
||||
@@ -716,14 +716,17 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
'DdlSubProyectos.SelectedValueExist(CveSubProyecto)
|
||||
End Sub
|
||||
Private Sub CargaPersonal()
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
Dim RH As New ClsRH
|
||||
If RH.GetPersonal(-1, DdlEmpresaAsignaciones.SelectedValue.ToEntero) Then
|
||||
dt = RH.DtResultados
|
||||
End If
|
||||
RH.Dispose()
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
'Dim RH As New ClsRH
|
||||
'If RH.GetPersonal(-1, DdlEmpresaAsignaciones.SelectedValue.ToEntero) Then
|
||||
' dt = RH.DtResultados
|
||||
'End If
|
||||
'RH.Dispose()
|
||||
If DdlEmpresaAsignaciones.SelectedValue.ToEntero > 0 Then
|
||||
dt = GlobalDTRHPersonal(DdlEmpresaAsignaciones.SelectedValue.ToEntero)
|
||||
End If
|
||||
|
||||
DdlPersonal.Items.Clear()
|
||||
DdlPersonal.DataSource = dt
|
||||
DdlPersonal.DataBind()
|
||||
|
||||
@@ -3356,8 +3356,9 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="TipoDispositivoDisplay" ItemStyle-Width="15%" HeaderText="Tipo Dispositivo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Display" ItemStyle-Width="15%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="AsignadoEn" ItemStyle-Width="15%" HeaderText="Asignación" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Modelo" ItemStyle-Width="10%" HeaderText="Modelo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Serie" ItemStyle-Width="15%" HeaderText="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--<asp:BoundField DataField="Serie" ItemStyle-Width="15%" HeaderText="Serie" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:BoundField DataField="IMEI" ItemStyle-Width="20%" HeaderText="IMEI" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="NumeroTelefono" ItemStyle-Width="20%" HeaderText="Número Teléfono" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
@@ -1001,8 +1001,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim IdCtaContable As Integer = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente)
|
||||
If VentaActual.CveMoneda = 2 Then IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera)
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, VentaActual.SerieFolio, 3, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, VentaActual.SerieFolio, 95, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -122,20 +122,19 @@
|
||||
</asp:GridView>
|
||||
|
||||
<asp:GridView ID="GvLAPO" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveLineaAdicionalEstatus,LineaAdicionalComprobante,CveVenta,CveCliente"
|
||||
DataKeyNames="CveLineaAdicional,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveLineaAdicionalEstatus,LineaAdicionalComprobante,CveVenta,CveCliente,CveProveedor"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm mysmallbtn" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
||||
OnRowCommand="GvLAPO_RowCommand"
|
||||
OnRowDataBound="GvLAPO_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Agrupador" HeaderText="Agrupador" />
|
||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
|
||||
<asp:BoundField DataField ="Agrupador" HeaderText="Agrupador" />
|
||||
<asp:BoundField DataField="LineaAdicional" HeaderText="PO" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe PO" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" />
|
||||
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" />
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="D.Plazo" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="DiasTranscurridos" HeaderText="D.Trans" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="FechaVenta" HeaderText="F. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="FechaVencimientoVenta" HeaderText="F. Venc. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
@@ -152,12 +151,12 @@
|
||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click"
|
||||
ToolTip="Descargar Comprobante" />
|
||||
</div>
|
||||
<div class="col-md-4" style="max-width:26px!important" title="Cambiar esatatus a Enviado">
|
||||
<div class="col-md-4" style="max-width:26px!important" title="Cambiar estatus a Enviado">
|
||||
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" Visible="false" AlternateText="CambiarEstatus"
|
||||
CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si"
|
||||
ToolTip="Cambiar esatatus a Enviado" />
|
||||
ToolTip="Cambiar estatus a Enviado" />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -3,6 +3,16 @@ using System.Collections.Generic;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using ListItem = System.Web.UI.WebControls.ListItem;
|
||||
using System.Web.UI;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using System.Activities.Expressions;
|
||||
using System.EnterpriseServices.Internal;
|
||||
using iTextSharp.text.pdf;
|
||||
using GemBox.Spreadsheet;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using AjaxControlToolkit;
|
||||
@@ -194,8 +204,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
{
|
||||
bool errorCargaComprobante = false;
|
||||
string FileExtension = "-1";
|
||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||
string filemove = "";
|
||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||
string filemove = "";
|
||||
FileInfo fiNuevo;
|
||||
|
||||
@@ -235,7 +244,6 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
|
||||
string RutaArchivoTemp = "";
|
||||
foreach (Archivo fileItem in filesgral)
|
||||
{
|
||||
{
|
||||
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
||||
filemove = fileItem.filename;
|
||||
@@ -247,24 +255,21 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
{
|
||||
fiNuevo = new FileInfo(RutaArchivoTemp);
|
||||
|
||||
if (fiNuevo.Exists)
|
||||
if (fiNuevo.Exists)
|
||||
{
|
||||
try
|
||||
|
||||
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
||||
{
|
||||
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
||||
{
|
||||
File.Delete($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
||||
}
|
||||
File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
||||
errorCargaComprobante = false;
|
||||
}
|
||||
catch
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorCargaComprobante = true;
|
||||
|
||||
}
|
||||
if (!errorCargaComprobante)
|
||||
{
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
@@ -279,54 +284,46 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
}
|
||||
|
||||
if (!errorCargaComprobante)
|
||||
{
|
||||
{
|
||||
CargaDatos();
|
||||
Anexo.Text = "[]";
|
||||
Anexo.Text = "[]";
|
||||
RegistraScript("$('#ModalComprobante').modal('hide');", "");
|
||||
Alert("Comprobante actualizado correctamente.");
|
||||
}
|
||||
UpAddComprobancte.Update();
|
||||
}
|
||||
|
||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
||||
{
|
||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
|
||||
bool errorCambioEstatus = false;
|
||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToEntero();
|
||||
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||
bool errorCambioEstatus = false;
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
if (!objVentas.UpdateLineasAdicionales(CveLineaAdicionalActualzarEstatus, "-1", -1, -1, -1, -1, -1, MinFecha, UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa,CveVenta:CveVenta,CveLineaAdicionalEstatus:2))
|
||||
if (!objVentas.UpdateVentaLineaAdicional(CveLineaAdicional, CveVenta, "", 2, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
errorCambioEstatus = true;
|
||||
}
|
||||
if (!errorCambioEstatus)
|
||||
{
|
||||
CargaDatos();
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
objVentas.Dispose();
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
GridView gvTemp = GvLineasAdicionales;
|
||||
//gvTemp.ExportToExcelX("RepLineasAdicionales" + DateTime.Now.ToShortDateString());
|
||||
gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
|
||||
}
|
||||
else if(TipoLinea == 2)
|
||||
{
|
||||
GridView gvTemp = GvLAPO;
|
||||
}
|
||||
else if(TipoLinea == 2)
|
||||
{
|
||||
GridView gvTemp = GvLAPO;
|
||||
gvTemp.Columns[12].Visible = false;
|
||||
gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
||||
}
|
||||
|
||||
//gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
||||
gvTemp.ExportToExcelGembox( "ReportePO", UsuarioActual, "Reporte PO ", AnchoImagen:150);
|
||||
}
|
||||
}
|
||||
@@ -336,12 +333,15 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
||||
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||
|
||||
if (e.Row.DataKey("CveLineaAdicional")=="")
|
||||
if (e.Row.DataKey("CveLineaAdicional")=="")
|
||||
{
|
||||
if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "")
|
||||
{
|
||||
e.Row.CssClass = "SubTotales2";
|
||||
if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "" && e.Row.DataKey("CveProveedor") != "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "<a href='/Compras/Proveedores.aspx?CveProveedor="+ e.Row.DBCampo("CveProveedor") + "' >"+ e.Row.DBCampo("Proveedor") +"</a>";
|
||||
@@ -355,7 +355,8 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
LnkCargarComprobante.Visible = false;
|
||||
LnkDescargaComprobante.Visible = false;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1)
|
||||
{
|
||||
|
||||
@@ -368,8 +369,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}");
|
||||
|
||||
if (fi.Exists)
|
||||
{
|
||||
LnkDescargaComprobante.Visible = true;
|
||||
{
|
||||
LnkDescargaComprobante.Visible = true;
|
||||
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante);
|
||||
}
|
||||
@@ -404,8 +404,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
int CveLineaAdicionalActualizarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
||||
|
||||
bool errorCambioEstatus = false;
|
||||
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
||||
bool errorCambioEstatus = false;
|
||||
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
@@ -416,4 +415,10 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
objVentas.Dispose();
|
||||
if (!errorCambioEstatus)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void VerifyRenderingInServerForm(Control control ) { }
|
||||
|
||||
@@ -135,7 +135,7 @@ Partial Class Ventas_RepVentas
|
||||
DdlGrupo.Items.Insert(2, New ListItem("Año/Mes", "3"))
|
||||
DdlGrupo.Items.Insert(3, New ListItem("Fecha", "4"))
|
||||
DdlGrupo.Items.Insert(4, New ListItem("Cliente", "5"))
|
||||
DdlGrupo.Items.Insert(4, New ListItem("SubProyecto", "6"))
|
||||
DdlGrupo.Items.Insert(4, New ListItem(LblSubProyecto.Text, "6"))
|
||||
DdlGrupo.Items.Insert(5, New ListItem("Corte", "16"))
|
||||
DdlGrupo.Items.Insert(6, New ListItem("Vendedor", "7"))
|
||||
DdlGrupo.Items.Insert(7, New ListItem("Usuario", "8"))
|
||||
|
||||
@@ -36504,8 +36504,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), Me.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Se actualizo la linea adicional de crédito de la venta")
|
||||
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", -1, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Se actualizó la linea adicional de crédito de la venta")
|
||||
End If
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user