This commit is contained in:
Hector
2021-08-17 01:21:16 -07:00
36 changed files with 49959 additions and 864 deletions

View File

@@ -567,7 +567,7 @@ Public Class ClsClientes
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1) As Boolean
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -707,6 +707,8 @@ Public Class ClsClientes
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
End With
Try
@@ -755,7 +757,7 @@ Public Class ClsClientes
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
Optional CveSATEstado As Integer = -1) As Boolean
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -910,7 +912,7 @@ Public Class ClsClientes
.Add("@CorreoEntregaAlmacen", SqlDbType.VarChar).Value = CorreoEntregaAlmacen
.Add("@CveSATEstado", SqlDbType.Int).Value = CveSATEstado
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
End With
Try

View File

@@ -3231,7 +3231,7 @@ Public Class ClsGPS
Return retorno
End Function
Public Function DispositivosUsuariosGet(CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean
Public Function DispositivosUsuariosGet(CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1, Optional CveUsuario As Integer = -1, Optional ConcatenarDispuestos As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_GPS_DispositivosUsuariosGet")
With SqlAdapter.SelectCommand.Parameters
@@ -3240,6 +3240,7 @@ Public Class ClsGPS
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@ConcatenarDispuestos", SqlDbType.Bit).Value = ConcatenarDispuestos
End With
Try
SqlAdapter.Fill(Data)
@@ -5105,6 +5106,41 @@ Public Class ClsGPS
Return retorno
End Function
Public Function UpdateUnidadesDispuestas(CveDispositivo As Integer, Dispuesta As Boolean) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_GPS_UnidadesDispuestasUpdate", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
.Add("@Dispuesta", SqlDbType.Bit).Value = Dispuesta
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar las unidades dispuestas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function GetUnidadesDispuestas(CveDispositivo As Integer, CveCliente As Integer, CveEmpresa As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_GPS_UnidadesDispuestasGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las unidades dispuestas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
#End Region
#Region "G A S T O S"

View File

@@ -1,6 +1,7 @@
Option Explicit On
Option Strict On
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Extensiones
@@ -1753,6 +1754,33 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function RepExistenciasLote(CveEmpresa As Integer, FechaI As Date, FechaF As Date, CveProveedor As Integer, Almacenes As String,
CvePS As Integer, CveClasificacion As Integer, Optional CveMarca As Integer = -1, Optional CveTipoAlmacen As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_RepExistenciaLote")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener la lista de movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
'Nuevo R: 19/10/2017
Public Function RepMovimientosGen(CveEmpresa As Integer, FechaI As String, FechaF As String, CveProveedor As Integer, CveAlmacen As Integer,
CvePS As Integer, CveClasificacion As Integer, Agrupador As Integer, Optional CveClasificacion2 As Integer = -1) As Boolean

View File

@@ -2305,7 +2305,7 @@ Public Class ClsNominas
Dim retorno As Boolean = False
Try
DTSet = New DataSet()
DataAdapter("PA_Nom_NominaEmpleadoV2", CommandType.StoredProcedure)
DataAdapter("PA_Nom_NominaEmpleado", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto

View File

@@ -4716,6 +4716,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
PaginaDict.Add("/Inventarios/RecepcionDevolucion.aspx".ToUpper(), 696)
PaginaDict.Add("/Inventarios/RepExistenciaLote.aspx".ToUpper(), 109)
#End Region

View File

@@ -1661,6 +1661,40 @@ Partial Class Bancos_ProveedoresAbonar
End If
End If
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
'fluctuación.
Dim TCPago = TxtTCDolares.Text.ToDecimal
Dim ImporteFluctuacion As Decimal = 0 '((ImporteSeleccionado / TCPago) - TxtImporte.Text.ToDecimal)
Dim DtPrePoliza As DataTable = Nothing
If ObjMov.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
DtPrePoliza = ObjMov.DtResultados.Copy
End If
Dim PagoProveedoresME = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 312 AND TipoMovto = 0")
Dim Bancos = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 30 AND TipoMovto = 1")
Dim BancosComplementaria = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 204 AND TipoMovto = 1")
DtPrePoliza.Dispose()
ImporteFluctuacion = PagoProveedoresME - (Bancos + BancosComplementaria)
If ImporteFluctuacion.RoundSQL() <> 0 Then
'SI EL PAGO DE PROVEEDORES ME ES MAYOR QUE BANCOS METER EL CONCEPTO DE GANANCIA
If ImporteFluctuacion > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Referencia, 64, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
ElseIf ImporteFluctuacion < 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Referencia, 65, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
End If
End If
Else
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
TipoCambioPago = TxtTCDolares.Text.ToDecimal

View File

@@ -69,7 +69,7 @@
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
<asp:Label ID="LblTitulo" runat="server" Text="Catálogo de Ingreso / Egreso"></asp:Label>
<asp:Label ID="LblTitulo" runat="server" Text="Reporteador Ingresos - Egresos"></asp:Label>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>

View File

@@ -12426,6 +12426,7 @@ Partial Class Compras_Compras
TmpDT.AcceptChanges()
dr("CveCompraDetalle") = -1
dr("CveActivoFijo") = 0
dr("CodAF") = ""
dr("Cantidad") = Cantidad.ToDecimal

View File

@@ -338,6 +338,12 @@
<FontSize>9pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!FolioFiscal.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
@@ -358,51 +364,14 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<ColSpan>4</ColSpan>
<ColSpan>9</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell />
<TablixCell />
<TablixCell />
<TablixCell>
<CellContents>
<Textbox Name="Textbox195">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox195</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<ColSpan>5</ColSpan>
</CellContents>
</TablixCell>
<TablixCell />
<TablixCell />
<TablixCell />
<TablixCell />
@@ -720,7 +689,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Value>=Parameters!RFC.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
@@ -4121,7 +4090,7 @@
<Width>7.96802in</Width>
<Page>
<PageFooter>
<Height>0.55135cm</Height>
<Height>0.60882cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -4138,18 +4107,6 @@
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Today</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
@@ -4158,7 +4115,117 @@
<Top>0.08364cm</Top>
<Left>0.10282cm</Left>
<Height>0.46771cm</Height>
<Width>6.92282cm</Width>
<Width>2.66303cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox84">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Today</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>D</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>0.08364cm</Top>
<Left>2.8364cm</Left>
<Height>0.46771cm</Height>
<Width>3.93303cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox85">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Impreso en SIG</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>0.14111cm</Top>
<Left>8.46543cm</Left>
<Height>0.46771cm</Height>
<Width>2.66303cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox86">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Imprimio:</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Usuario.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>0.14111cm</Top>
<Left>14.37918cm</Left>
<Height>0.46771cm</Height>
<Width>5.85958cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -4283,6 +4350,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Usuario">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="FolioFiscal">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -104,7 +104,7 @@
<ul class="list-inline" style="font-size: 12px;">
<li>Vehículo:
<asp:DropDownList ID="DdlDispositivoFiltro" runat="server" Width="200px" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
<asp:DropDownList ID="DdlDispositivoFiltro" runat="server" Width="200px" DataTextField="DisplayCliente" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
</asp:DropDownList>
</li>
<li>Estatus:
@@ -209,7 +209,7 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDispositivo" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server"></asp:DropDownList>
<asp:DropDownList ID="DdlDispositivo" DataTextField="DisplayCliente" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" InitialValue="-1" CssClass="help-block errorimput" ControlToValidate="DdlDispositivo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dispositivo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTrayecto"></asp:RequiredFieldValidator>
<label for="<%= DdlDispositivo.ClientID.ToString()%>" style="width: 50%">Vehículo:</label>
</div>
@@ -318,7 +318,7 @@
<label for="<%=DdlTrayecto.ClientID.ToString()%>">Trayecto:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDispositivoNuevo" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server"></asp:DropDownList>
<asp:DropDownList ID="DdlDispositivoNuevo" DataTextField="DisplayCliente" DataValueField="CveDispositivo" CssClass="form-control select2me" runat="server" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" InitialValue="-1" CssClass="help-block errorimput" ControlToValidate="DdlDispositivoNuevo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dispositivo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpNuevo"></asp:RequiredFieldValidator>
<label for="<%= DdlDispositivoNuevo.ClientID.ToString()%>" style="width: 50%">Vehículo:</label>
</div>

View File

@@ -56,16 +56,24 @@ Partial Class GPS_Trayectos
CargaTrayectos()
End Sub
Public Sub CargaDispositivos()
DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
Dim DtDispositivos As DataTable = Nothing
Using ObjGPS As New ClsGPS
If ObjGPS.DispositivosUsuariosGet(-1, 1, UsuarioActual.CveCliente, CveUsuario:=UsuarioActual.CveUsuario, ConcatenarDispuestos:=True) Then
DtDispositivos = ObjGPS.DtResultados.Copy
End If
End Using
DdlDispositivo.DataSource = DtDispositivos 'GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
DdlDispositivo.DataBind()
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlDispositivoNuevo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
DdlDispositivoNuevo.DataSource = DtDispositivos 'GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
DdlDispositivoNuevo.DataBind()
DdlDispositivoNuevo.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlDispositivoFiltro.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
DdlDispositivoFiltro.DataSource = DtDispositivos 'GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario)
DdlDispositivoFiltro.DataBind()
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Seleccione", "-1"))

View File

@@ -2272,12 +2272,24 @@ Partial Class Inventarios_RecepcionUsados
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33
If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows.Count > 0 Then
Me.ObjRemisionNC.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows(0)("MetodoPago").ToString
Else
Me.ObjRemisionNC.CveMetodoPago = 1
Me.ObjRemisionNC.MetodoPago = "Efectivo"
If GlobalDTMetodosPago IsNot Nothing Then
Dim DtMetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
If DtMetodoPago IsNot Nothing Then
If DtMetodoPago.Rows.Count > 0 Then
Me.ObjRemisionNC.MetodoPago = DtMetodoPago.Rows(0)("MetodoPago").ToString
Else
Me.ObjRemisionNC.CveMetodoPago = 1
Me.ObjRemisionNC.MetodoPago = "Efectivo"
End If
DtMetodoPago.Dispose()
DtMetodoPago = Nothing
End If
End If
End If
End If

View File

@@ -0,0 +1,164 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepExistenciaLote.aspx.vb" Inherits="Inventarios_RepExistenciaLote" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
<style>
.dataTables_scrollHead{
background-color:#95A5A6;
color:white;
}
.table-scrollable{
margin-top:0px!important;
margin-bottom:0px!important;
}
.dataTables_scroll{
padding-top:0px;
}
.Totales a{
color: white;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
Reporte de Existencia Lote
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<%--Tabla con los campos para filtrar--%>
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
<div class="tools">
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption magindate">
<div class="row">
<div class="col-md-1 truncate">Almacén</div>
<div class="col-md-2">
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1 truncate">Fecha Inicio</div>
<div class="col-md-2 col-sm-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CVEIncio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="CVEIncio2" runat="server" HighlightCssClass="vco" TargetControlID="CVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">Fecha Fin</div>
<div class="col-md-2 col-sm-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CVEFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFin" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="CVEFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFin" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<div class="col-md-1 truncate">Proveedor</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
</div>
<div class="col-md-1 truncate">Clasificación</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
<div class="col-md-1 truncate" style="width:50px !important" >PS</div>
<div class="col-md-2">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
<%--<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="PS" DataValueField="CvePS"></asp:DropDownList>--%>
</div>
<div runat="Server" id="DivMarca">
<div class="col-md-1 truncate" style="width:50px !important" >Marca</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveMarca" DataTextField="Marca"></asp:DropDownList>
</div>
</div>
</div>
<div class="row">
<div class="col-md-1 truncate">Personal</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlPersonal" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CvePersonal" DataTextField="CodigoNombreCompleto"></asp:DropDownList>
</div>
<div class="col-md-1 truncate">Tipo Almacén:</div>
<div class="col-md-2">
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div class="row" >
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12" >
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="Codigo" HeaderText="Codigo" />
<asp:BoundField DataField="PS" HeaderText="PS" />
<asp:BoundField DataField="Cantidad" HeaderText="Existencia" />
<asp:BoundField DataField="Lote" HeaderText="Lote" />
<asp:BoundField DataField="FechaCaducidad" HeaderText="Fecha Caducidad" DataFormatString = "{0:dd/MM/yyyy}" ItemStyle-Width="100px" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,514 @@
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.IO
Partial Class Inventarios_RepExistenciaLote
Inherits ClsPaginas
#Region "propiedades"
'Private ReadOnly Property reporteador As Microsoft.Reporting.WebForms.ReportViewer
' Get
' Return CType(Master.FindControl("ReportMaster"), Microsoft.Reporting.WebForms.ReportViewer)
' End Get
'End Property
Private Property dt As DataTable
Get
Try
dt = DirectCast(ViewState("dt"), DataTable)
Return DirectCast(ViewState("dt"), DataTable)
Catch ex As Exception
Return Nothing
End Try
End Get
Set(value As DataTable)
ViewState("dt") = value
End Set
End Property
Public Property DtEquivalencias() As DataTable
Get
Return CType(ViewState("dtReporte"), DataTable)
End Get
Set(value As DataTable)
ViewState("dtReporte") = value
End Set
End Property
Public Property FechaInicial As String
Get
Return ViewState("FechaInicial").ToString
End Get
Set(value As String)
ViewState("FechaInicial") = value
End Set
End Property
Public Property FechaFinal As String
Get
Return ViewState("FechaFinal").ToString
End Get
Set(value As String)
ViewState("FechaFinal") = value
End Set
End Property
Private ReadOnly Property PermiteClasificacion2 As Boolean
Get
Return (UsuarioActual.CveEmpresa.Contiene(72, 80))
End Get
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString
TxtFechaF.Text = Now
FechaInicial = "-1"
FechaFinal = "-1"
CargaCombos()
GvM.DataBind()
If Not IsNothing(Request("CveAlmacen")) Then
DdlAlmacen.SelectedValue = Request("CveAlmacen").ToString()
TxtFechaI.Text = "01/01/2000"
If Not IsNothing(Request("FechaCorte")) Then
TxtFechaF.Text = Request("FechaCorte")
End If
If Not IsNothing(Request("FechaInicio")) And IsDate(Request("FechaInicio")) Then
TxtFechaI.Text = Request("FechaInicio")
End If
btConsultar_Click(Nothing, Nothing)
End If
End If
End Sub
Private Sub CargaCombos()
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
If Not IsNothing(Request("CveAlmacen")) Then
If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then
Dim CveAlmacen = Request("CveAlmacen").ToString
Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {Request("CveAlmacen").ToString}")
DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen))
End If
Else
DdlAlmacen.SelectedValuesIfExistM("-1")
End If
'Llenar dropdownlist de proveedores
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
'CARGA CLASIFICACIONES
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
End If
ObjClasificaciones.Dispose()
DdlClasificacion.DataBind()
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
'Carga Productos
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
DdlPS.SelectedText = ""
DdlPS.SelectedValue = "-1"
Else
DdlPS.ddl.Items.Clear()
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
DdlPS.ddl.DataBind()
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
'Llenar dropdownlist de personal
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlPersonal.DataBind()
DdlPersonal.Items.Insert(0, New ListItem("Todos", "-1"))
CargarMarcas()
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
DdlTipoAlmacen.DataBind()
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim Reporte As New ClsInventarios
Dim rpt As DataTable = Nothing
Dim CveMarca As Integer = -1
'Dim fechaI As String = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
'Dim fechaF As String = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
CveMarca = DdlMarca.SelectedValue.ToEntero
End If
If Reporte.RepExistenciasLote(UsuarioActual.CveEmpresa, FechaInicial.ToDate, FechaFinal.ToDate, DdlProveedor.SelectedValue.ToEntero, Almacenes, DdlPS.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, CveMarca, TipoAlmacen) Then
If Reporte.DtResultados.Rows.Count > 0 Then
GvM.DataSource = Reporte.DtResultados
GvM.DataBind()
ViewState("dtReporte") = Reporte.DtResultados
dt = Reporte.DtResultados
End If
End If
Reporte.Dispose()
UPPMov.Update()
End Sub
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
DdlPS.SelectedText = ""
DdlPS.SelectedValue = "-1"
Else
DdlPS.ddl.Items.Clear()
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
DdlPS.ddl.DataBind()
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
End Sub
Protected Sub GvM_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowCreated
'If e.Row.RowType = DataControlRowType.Header Then
' 'GENERO ENCABEZADO
' Dim FC As New SortedList
' FC.Add(0, "Código,1,2,Titulos")
' If ChkCodigoAlterno.Checked Then
' FC.Add(1, "Código Alterno,1,2,Titulos")
' End If
' FC.Add(10, "Descripción,1,2,Titulos")
' FC.Add(20, "CANTIDAD,4,1,Titulos")
' FC.Add(30, "IMPORTE,4,1,Titulos")
' Dim FC2 As New SortedList
' FC2.Add(0, "Exist. inicial,1,1,Titulos")
' FC2.Add(1, "Entradas,1,1S,Titulos")
' FC2.Add(2, "Salidas,1,1,Titulos")
' FC2.Add(3, "Exist. final,1,1,Titulos")
' FC2.Add(4, "Saldo inicial,1,1,Titulos")
' FC2.Add(5, "Entradas,1,1,Titulos")
' FC2.Add(6, "Salidas,1,1,Titulos")
' FC2.Add(7, "Saldo final,1,1,Titulos")
' GetMultiRowHeader(DirectCast(sender, GridView), e, FC2, "Titulosfijos")
' GetMultiRowHeader(DirectCast(sender, GridView), e, FC, "Titulosfijos")
''End If
End Sub
Protected Sub gvMovimientos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
End If
End Sub
#Region "MARCA"
Protected Sub CargarMarcas()
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
DivMarca.Visible = True
Dim ObjMarcas As New ClsProductosServicios
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
DdlMarca.DataSource = ObjMarcas.DtResultados
ObjMarcas.Dispose()
DdlMarca.DataBind()
End If
DdlMarca.Items.Insert(0, New ListItem(" Todas ", "-1"))
End Sub
#End Region
#Region " EXPORTAR - PDF - EXCEL "
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
' GvM.ExportToExcel("Reporte de Entradas y Salidas")
ImprimiReporte("EXCEL")
End Sub
Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
ImprimiReporte()
End Sub
Protected Sub ImprimiReporte(Optional Formato As String = "PDF", Optional FormatoInventario As Boolean = False)
Dim RutaPDF As String
Dim NombreArchivoDescarga = "ReporteExistenciaLotes"
RutaPDF = "Empresas/Grales/Formatos/RepExistenciaLotes.rdlc"
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("LogoPath", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
ImprimirPDF(RutaPDF, dt, params, NombreArchivoDescarga, Formato)
End Sub
#End Region
Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
Dim continuar = True
Try
Dim wb As New ClosedXML.Excel.XLWorkbook()
Dim libro As ClosedXML.Excel.IXLWorksheet = wb.AddWorksheet("Reporte de inventarios")
Dim Fila As Integer = 0
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
libro.Cell(Fila + 3, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
libro.Column(1).Width = 34.43
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
libro.Cell(Fila + 2, 1).Value = "RECORD Type"
libro.Cell(Fila + 3, 1).Value = "OBLIGATORIO"
libro.Column(2).Width = 24
libro.Cell(Fila + 1, 2).Value = "Codigo del Partner"
libro.Cell(Fila + 2, 2).Value = "Reporter_id "
libro.Cell(Fila + 3, 2).Value = "OBLIGATORIO"
libro.Column(3).Width = 28.71
libro.Cell(Fila + 1, 3).Value = "Nombre de la Empresa"
libro.Cell(Fila + 2, 3).Value = "Reporter Company Name"
libro.Cell(Fila + 3, 3).Value = "OBLIGATORIO"
libro.Column(4).Width = 23.57
libro.Cell(Fila + 1, 4).Value = "CÓDIGO DEL PAÍS"
libro.Cell(Fila + 2, 4).Value = "COUNTRY CD"
libro.Cell(Fila + 3, 4).Value = "OBLIGATORIO"
libro.Column(5).Width = 17.57
libro.Cell(Fila + 1, 5).Value = "Ubicación"
libro.Cell(Fila + 2, 5).Value = "LOCATION"
libro.Cell(Fila + 3, 5).Value = "OPCIONAL"
libro.Column(6).Width = 35.29
libro.Cell(Fila + 1, 6).Value = "FECHA DEL INVENTARIO"
libro.Cell(Fila + 2, 6).Value = "Period End Date"
libro.Cell(Fila + 3, 6).Value = "OBLIGATORIO"
libro.Column(7).Width = 23.43
libro.Cell(Fila + 1, 7).Value = "REENVIO"
libro.Cell(Fila + 2, 7).Value = "RESUBMIT"
libro.Cell(Fila + 3, 7).Value = "OBLIGATORIO"
libro.Column(8).Width = 29.29
libro.Column(9).Width = 25
libro.Column(10).Width = 18.14
libro.Column(11).Width = 32.71
libro.Column(12).Width = 13.57
libro.Column(13).Width = 13
libro.Column(14).Width = 32
libro.Column(15).Width = 12.71
libro.Column(16).Width = 13
Fila = Fila + 3
libro.Cell(Fila + 1, 1).Value = "IH"
libro.Cell(Fila + 1, 2).Value = "10245068"
libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
libro.Cell(Fila + 1, 4).Value = "MX"
libro.Cell(Fila + 1, 5).Value = ""
libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
libro.Cell(Fila + 1, 7).Value = "N"
Fila = Fila + 1
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
libro.Range(libro.Cell(Fila + 3, 3), libro.Cell(Fila + 3, 15)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
libro.Cell(Fila + 3, 7).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
libro.Cell(Fila + 3, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
libro.Cell(Fila + 1, 2).Value = "NÚMERO DEL PRODUCTO"
libro.Cell(Fila + 1, 3).Value = "OPCION DEL PRODUCTO"
libro.Cell(Fila + 1, 4).Value = "UPC"
libro.Cell(Fila + 1, 5).Value = "CODIGO SKU"
libro.Cell(Fila + 1, 6).Value = "ORDENES DE COMPRAS EN ABIERTO "
libro.Cell(Fila + 1, 7).Value = "INVENTARIO DISPONIBLE"
libro.Cell(Fila + 1, 8).Value = "DEVOLUCIONES"
libro.Cell(Fila + 1, 9).Value = "INVENTARIO RESERVADO"
libro.Cell(Fila + 1, 10).Value = "INVENTARIO TOTAL"
libro.Cell(Fila + 1, 11).Value = "EN TRANSITO"
libro.Cell(Fila + 1, 12).Value = "VALOR UNITARIO DEL PRODUCTO HP"
libro.Cell(Fila + 1, 13).Value = "VALOR TOTAL DEL INVENTARIO"
libro.Cell(Fila + 1, 14).Value = "NOMBRE DE LA TIENDA"
libro.Cell(Fila + 1, 15).Value = "Codigo de la tienda"
libro.Cell(Fila + 1, 16).Value = "MONEDA"
Fila = Fila + 1
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE "
libro.Cell(Fila + 1, 2).Value = "Partner Reported Product ID"
libro.Cell(Fila + 1, 3).Value = "PROD_OPTION"
libro.Cell(Fila + 1, 4).Value = "UPC"
libro.Cell(Fila + 1, 5).Value = "Reseller product number "
libro.Cell(Fila + 1, 6).Value = "Quantity on Order"
libro.Cell(Fila + 1, 7).Value = "Quantity on Hand"
libro.Cell(Fila + 1, 8).Value = "Quantity in stock allocated to be returned to supplier"
libro.Cell(Fila + 1, 9).Value = "Reserved Inventory"
libro.Cell(Fila + 1, 10).Value = "Quantity avail. for sale"
libro.Cell(Fila + 1, 11).Value = "Quantity in float (In transit between partner warehouses)"
libro.Cell(Fila + 1, 12).Value = "INVENTORY UNIT VALUE"
libro.Cell(Fila + 1, 13).Value = "INVENTORY VALUATION"
libro.Cell(Fila + 1, 14).Value = "Sell from name (For retailers, ""Store Name / Site Name"")"
libro.Cell(Fila + 1, 15).Value = "Sell From Location ID"
libro.Cell(Fila + 1, 16).Value = "CURRENCY"
Fila = Fila + 1
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
libro.Cell(Fila + 1, 3).Value = "OPCIONAL"
libro.Cell(Fila + 1, 4).Value = "OPCIONAL"
libro.Cell(Fila + 1, 5).Value = "OPCIONAL"
libro.Cell(Fila + 1, 6).Value = "OPCIONAL"
libro.Cell(Fila + 1, 7).Value = "OBLIGATORIO"
libro.Cell(Fila + 1, 8).Value = "OPCIONAL"
libro.Cell(Fila + 1, 9).Value = "OPCIONAL"
libro.Cell(Fila + 1, 10).Value = "OBLIGATORIO"
libro.Cell(Fila + 1, 11).Value = "OPCIONAL"
libro.Cell(Fila + 1, 12).Value = "OPCIONAL"
libro.Cell(Fila + 1, 13).Value = "OPCIONAL"
libro.Cell(Fila + 1, 14).Value = "OPCIONAL"
libro.Cell(Fila + 1, 15).Value = "OPCIONAL"
libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
Fila = Fila + 1
libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO TOTAL"
'libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
Next
End If
Fila = Fila + 1
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
libro.Cell(Fila + 1, 1).Value = "TIPO DEL REGISTRO"
libro.Cell(Fila + 1, 2).Value = "TOTAL DE REGISTROS"
libro.Cell(Fila + 1, 3).Value = "Suma del Inventario Disponible"
libro.Cell(Fila + 1, 4).Value = "Suma del Inventario Total"
Fila = Fila + 1
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE"
libro.Cell(Fila + 1, 2).Value = "COUNT OF RECORDS"
libro.Cell(Fila + 1, 3).Value = "SUM OF “"On Hand”""
libro.Cell(Fila + 1, 4).Value = "SUM OF “"Total Inventory"”"
Fila = Fila + 1
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
libro.Cell(Fila + 1, 3).Value = "OBLIGATORIO"
libro.Cell(Fila + 1, 4).Value = "OBLIGATORIO"
Dim Codigo As Double = 0
Dim SaldoFCant As Double = 0
Dim SaldoFImp As Double = 0
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
Codigo = dt.COUNT("Codigo", "CvePS>0")
SaldoFCant = dt.SUM("SaldoFCant", "CvePS>0")
SaldoFImp = dt.SUM("SaldoFImp", "CvePS>0")
End If
Fila = Fila + 1
libro.Cell(Fila + 1, 1).Value = "IT"
libro.Cell(Fila + 1, 2).Value = String.Format("{0}", Codigo)
'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
''Guarda streem y descarga
Dim fs As Stream = New MemoryStream()
wb.SaveAs(fs)
fs.Position = 0
Dim memoryStream As New MemoryStream()
Using input As Stream = fs
input.CopyTo(memoryStream)
End Using
memoryStream.Position = 0
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
Response.BinaryWrite(memoryStream.ToArray())
Response.End()
''endGuarda streem y descarga
Catch
continuar = False
End Try
If Not continuar Then
Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Class

View File

@@ -1441,6 +1441,10 @@ select option, select {
div.chksino input, span.chksino input {
display: none;
}
.chksino label {
line-height: 23px;
vertical-align: top;
}
div.chksino, span.chksino {
border: 1px solid #B8B8B8;
@@ -1472,7 +1476,7 @@ div.chksino, span.chksino {
.chksino label::before {
content: 'Si ';
padding: 3px;
padding: 1px;
padding-left: 15px !important;
padding-right: 14px !important;
font-size: 12px !important;
@@ -1485,7 +1489,7 @@ div.chksino, span.chksino {
.chksino label::after {
content: 'No';
padding: 3px;
padding: 1px;
padding-left: 12px;
padding-right: 12px;
margin-left: 45px;

View File

@@ -114,7 +114,7 @@
<div class="portlet-body dtosEmpleado">
<div class="row ">
<div class="col-sm-3">
<span class="bold">Codigo:</span>
<span class="bold">Código:</span>
<br />
<asp:HyperLink ID="HypCodigo" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
</div>
@@ -124,7 +124,10 @@
<asp:HyperLink ID="HypEmpleado" CssClass="LinkEmpleado TextLink" Text="--" runat="server"></asp:HyperLink>
</div>
<div class="col-sm-3">
<span class="bold">Area geografica:</span>
<span class="bold">Área geográfica
Corregido con https://www.corrector.co/es/:</span>
<br />
<asp:Literal ID="LtlAreaGeografica" runat="server">--</asp:Literal>
@@ -209,7 +212,7 @@
<ajax:ValidatorCalloutExtender ID="vcoTxtFechaBaja" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaBaja" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-3">
¿es liquidación?<br />
¿Es liquidación?<br />
<asp:CheckBox ID="ChkesLiquidacion" AutoPostBack="true" OnCheckedChanged="ChkesLiquidacion_CheckedChanged" CssClass="chksino" Text=" " runat="server" />
</div>
<div class="col-md-1">
@@ -225,13 +228,13 @@
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDiasTransAnio" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Dias trans. en el año: " AssociatedControlID="TxtDiasTransAnio"></asp:Label>
<asp:Label runat="server" Text="Días trans. en el año: " AssociatedControlID="TxtDiasTransAnio"></asp:Label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSalarioMinimo" runat="server" Enabled="false" Text="--" CausesValidation="True" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="Salario minimo: " AssociatedControlID="TxtSalarioMinimo"></asp:Label>
<asp:Label runat="server" Text="Salario mínimo: " AssociatedControlID="TxtSalarioMinimo"></asp:Label>
</div>
</div>
</div>
@@ -245,9 +248,9 @@
<div style="display:inline-block;width:30px;">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="Txtdiasindemnizacion" Text="90" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Label runat="server" Text="días" AssociatedControlID="Txtdiasindemnizacion"></asp:Label>
</div>
</div>
<asp:Label runat="server" Text="días" AssociatedControlID="Txtdiasindemnizacion"></asp:Label>
</div>
<div class="col-md-4 text-center">

View File

@@ -125,6 +125,7 @@ public partial class Nomina_Finiquito : ClsPaginas
}
private void CargaPersonal()
{
LnkFormatoRenuncia.Visible = false;
LnkCancelar.Visible = false;
using (ClsRH ObjPersonal = new ClsRH())
{
@@ -557,218 +558,228 @@ public partial class Nomina_Finiquito : ClsPaginas
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
{
if (dtConceptos != null)
{
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 AND SoloVisible =0");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND SoloVisible =0");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 AND SoloVisible =0");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND SoloVisible =0");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
foreach (DataRow row in dtper.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
foreach (DataRow row in dtper.Rows)
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtper.AcceptChanges();
foreach (DataRow row in dtded.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtded.AcceptChanges();
dtper = dtper.FiltraParametros("BorradoLogico=0");
dtded = dtded.FiltraParametros("BorradoLogico=0");
int maxper = dtper.Rows.Count;
int maxded = dtded.Rows.Count;
int i = 0;
List<NConcepto> lconc = new List<NConcepto>();
for (i = 0; i < maxper || i < maxded; i++)
{
NConcepto nConcepto = new NConcepto();
DataRow row;
if (maxper > i)
{
row = dtper.Rows[i];
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
nConcepto.CveConceptoP = CveConcepto;
nConcepto.ConceptoP = Concepto;
nConcepto.NoConceptoP = Codigo;
nConcepto.ImporteP = Importe;
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
if (maxded > i)
dtper.AcceptChanges();
foreach (DataRow row in dtded.Rows)
{
row = dtded.Rows[i];
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
nConcepto.CveConceptoD = CveConcepto;
nConcepto.ConceptoD = Concepto;
nConcepto.NoConceptoD = Codigo;
nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
lconc.Add(nConcepto);
}
lconc.Add(new NConcepto());
NConcepto SubTotales = new NConcepto();
SubTotales.CveConceptoP = 0;
SubTotales.ConceptoP = "Total Percepciones";
SubTotales.EstatusP = -2;
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", CvePersonal));
///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", CvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", CvePersonal));
lconc.Add(SubTotales);
lconc.Add(Totales);
DataTable dtCon = new DataTable();
dtCon.Columns.Add(new DataColumn("NoConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorP", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleP", typeof(int)));
dtCon.Columns.Add(new DataColumn("NoConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorD", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoD", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteD", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorD", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleD", typeof(int)));
foreach (NConcepto itc in lconc)
{
DataRow dr = dtCon.NewRow();
dr["NoConceptoP"] = itc.NoConceptoP;
dr["ConceptoP"] = itc.ConceptoP;
dr["LabelValorP"] = itc.LabelValorP;
dr["CveConceptoP"] = itc.CveConceptoP;
dr["ImporteP"] = itc.ImporteP;
dr["ValorP"] = itc.ValorP;
dr["EstatusP"] = itc.EstatusP;
dr["isEditedP"] = itc.isEditedP;
dr["isOnlyBisibleP"] = itc.isOnlyBisibleP;
dr["NoConceptoD"] = itc.NoConceptoD;
dr["ConceptoD"] = itc.ConceptoD;
dr["LabelValorD"] = itc.LabelValorD;
dr["CveConceptoD"] = itc.CveConceptoD;
dr["ImporteD"] = itc.ImporteD;
dr["ValorD"] = itc.ValorD;
dr["EstatusD"] = itc.EstatusD;
dr["isEditedD"] = itc.isEditedD;
dr["isOnlyBisibleD"] = itc.isOnlyBisibleD;
dtCon.Rows.Add(dr);
}
dtCon.AcceptChanges();
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
rds.Name = "DataSet1";
rds.Value = dtCon;// lconc;
lrds.Add(rds);
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
string CodigoEmpleado = "";
string NombreCompleto = "";
string RFC = "";
string CURP = "";
string TipoPeriodo = "";
string NSS = "";
string DiasLaborados = "";
string DiasFaltados = "";
string DiasVacaciones = "";
string FechaInicio = "";
string FechaFin = "";
string DiasRetardos = "";
string DiasIncapacidad = "";
string SubProyecto = "";
{
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal));
if (drow != null)
dtded.AcceptChanges();
dtper = dtper.FiltraParametros("BorradoLogico=0");
dtded = dtded.FiltraParametros("BorradoLogico=0");
int maxper = dtper.Rows.Count;
int maxded = dtded.Rows.Count;
int i = 0;
List<NConcepto> lconc = new List<NConcepto>();
for (i = 0; i < maxper || i < maxded; i++)
{
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
NConcepto nConcepto = new NConcepto();
DataRow row;
if (maxper > i)
{
row = dtper.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
nConcepto.CveConceptoP = CveConcepto;
nConcepto.ConceptoP = Concepto;
nConcepto.NoConceptoP = Codigo;
nConcepto.ImporteP = Importe;
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
}
if (maxded > i)
{
row = dtded.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
nConcepto.CveConceptoD = CveConcepto;
nConcepto.ConceptoD = Concepto;
nConcepto.NoConceptoD = Codigo;
nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
}
lconc.Add(nConcepto);
}
}
//string Codigo = "";
using (ClsRH objrh = new ClsRH())
{
if (objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
{
DataRow drow = objrh.DtResultados.Rows[0];
SubProyecto = drow["SubProyecto"].ToString();
CodigoEmpleado = drow["Codigo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString();
TipoPeriodo = drow["TipoPeriodo"].ToString();
NSS = drow["NSS"].ToString();
}
}
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasIncapacidad", DiasIncapacidad));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TipoPeriodo", TipoPeriodo));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NSS", NSS));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasLaborados", DiasLaborados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasFaltados", DiasFaltados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasVacaciones", DiasVacaciones));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaInicio", FechaInicio));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaFin", FechaFin));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasRetardos", DiasRetardos));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SubProyecto", SubProyecto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaPago", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
string urlfile = System.IO.Path.Combine(string.Format("{0}Formatos/SobreReciboFiniquito.rdlc", UsuarioActual.Empresa.Ruta));
if (!System.IO.File.Exists(urlfile))
{
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreReciboFiniquito.rdlc");
}
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);
lconc.Add(new NConcepto());
NConcepto SubTotales = new NConcepto();
SubTotales.CveConceptoP = 0;
SubTotales.ConceptoP = "Total Percepciones";
SubTotales.EstatusP = -2;
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", CvePersonal));
///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", CvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", CvePersonal));
lconc.Add(SubTotales);
lconc.Add(Totales);
DataTable dtCon = new DataTable();
dtCon.Columns.Add(new DataColumn("NoConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorP", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleP", typeof(int)));
dtCon.Columns.Add(new DataColumn("NoConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorD", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoD", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteD", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorD", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleD", typeof(int)));
foreach (NConcepto itc in lconc)
{
DataRow dr = dtCon.NewRow();
dr["NoConceptoP"] = itc.NoConceptoP;
dr["ConceptoP"] = itc.ConceptoP;
dr["LabelValorP"] = itc.LabelValorP;
dr["CveConceptoP"] = itc.CveConceptoP;
dr["ImporteP"] = itc.ImporteP;
dr["ValorP"] = itc.ValorP;
dr["EstatusP"] = itc.EstatusP;
dr["isEditedP"] = itc.isEditedP;
dr["isOnlyBisibleP"] = itc.isOnlyBisibleP;
dr["NoConceptoD"] = itc.NoConceptoD;
dr["ConceptoD"] = itc.ConceptoD;
dr["LabelValorD"] = itc.LabelValorD;
dr["CveConceptoD"] = itc.CveConceptoD;
dr["ImporteD"] = itc.ImporteD;
dr["ValorD"] = itc.ValorD;
dr["EstatusD"] = itc.EstatusD;
dr["isEditedD"] = itc.isEditedD;
dr["isOnlyBisibleD"] = itc.isOnlyBisibleD;
dtCon.Rows.Add(dr);
}
dtCon.AcceptChanges();
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
rds.Name = "DataSet1";
rds.Value = dtCon;// lconc;
lrds.Add(rds);
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
string CodigoEmpleado = "";
string NombreCompleto = "";
string RFC = "";
string CURP = "";
string TipoPeriodo = "";
string NSS = "";
string DiasLaborados = "";
string DiasFaltados = "";
string DiasVacaciones = "";
string FechaInicio = "";
string FechaFin = "";
string DiasRetardos = "";
string DiasIncapacidad = "";
string SubProyecto = "";
string Usuario = UsuarioActual.Nombre;
string FolioFiscal = "";
{
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal));
if (drow != null)
{
SubProyecto = drow["SubProyecto"].ToString();
FolioFiscal = string.Format("{0}", drow["FolioFiscal"]);
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
}
}
//string Codigo = "";
using (ClsRH objrh = new ClsRH())
{
if (objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
{
DataRow drow = objrh.DtResultados.Rows[0];
CodigoEmpleado = drow["Codigo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString();
TipoPeriodo = drow["TipoPeriodo"].ToString();
NSS = drow["NSS"].ToString();
}
}
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasIncapacidad", DiasIncapacidad));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TipoPeriodo", TipoPeriodo));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NSS", NSS));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasLaborados", DiasLaborados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasFaltados", DiasFaltados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasVacaciones", DiasVacaciones));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaInicio", FechaInicio));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaFin", FechaFin));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasRetardos", DiasRetardos));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SubProyecto", SubProyecto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaPago", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FolioFiscal", FolioFiscal));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Usuario", Usuario));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
string urlfile = System.IO.Path.Combine(string.Format("{0}Formatos/SobreReciboFiniquito.rdlc", UsuarioActual.Empresa.Ruta));
if (!System.IO.File.Exists(urlfile))
{
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreReciboFiniquito.rdlc");
}
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);
}
else
{
Alert("sin información disponible.");
}
}
protected void LnkCambiarEmpleado_Click(object sender, EventArgs e)
@@ -1085,7 +1096,7 @@ public partial class Nomina_Finiquito : ClsPaginas
ObjPersonal.RollBack();
}
if (continuar)
{ loadsobrerecibo(onom);LnkCancelar.Visible = true; LnkSimular.Visible = false; }
{ loadsobrerecibo(onom); LnkCancelar.Visible = true; LnkSimular.Visible = false; }
}
}
@@ -1118,6 +1129,7 @@ public partial class Nomina_Finiquito : ClsPaginas
{
dtempleados = objnom.DTSetResultados.Tables[3];
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0);
LnkFormatoRenuncia.Visible = true;
LnkGuardarDatos.Enabled = LnkAutorizar.Visible;
LnkTimbrar.Visible = !(LnkAutorizar.Visible) && (dtempleados.COUNT("CvePersonal", "SeTimbro=0") > 0);
UpAcciones.Update();
@@ -1291,6 +1303,7 @@ public partial class Nomina_Finiquito : ClsPaginas
protected void LnkCancelar_Click(object sender, EventArgs e)
{
LnkFormatoRenuncia.Visible = false;
using (ClsNominas onom = new ClsNominas())
{
if (onom.RemoveFiniquito(CvePersonal, UsuarioActual.CveEmpresa, CvePersonalAltas))
@@ -1345,7 +1358,7 @@ public partial class Nomina_Finiquito : ClsPaginas
protected void BtnAceptarMC_Click(object sender, EventArgs e)
{
int chkImporte = 1;
int chkImporteGravado = 1;
int chkImporteValor = 1;

View File

@@ -165,7 +165,7 @@
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Nominas
Nóminas
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
@@ -284,7 +284,7 @@
<asp:Button ID="BtnAutorizar" UseSubmitBehavior="false" runat="server" Text="Autorizar" Visible="False" class="btn btn-primary" />
<asp:Button ID="BtnGeneraPDF" UseSubmitBehavior="false" runat="server" Text="PDF" Visible="False" class="btn btn-primary" />
<asp:Button ID="BtnEmitir" UseSubmitBehavior="false" runat="server" Text="Timbrar" Visible="False" class="btn btn-primary" />
<asp:Button ID="BtnActualizaNomina" UseSubmitBehavior="false" runat="server" Text="Act Nomina" Visible="False" class="btn btn-primary" />
<asp:Button ID="BtnActualizaNomina" UseSubmitBehavior="false" runat="server" Text="Act Nómina" Visible="False" class="btn btn-primary" />
<a style="display: none;" href="/Coolings.docx">Recibos</a>
</div>
</div>
@@ -370,7 +370,7 @@
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Nomina
<span class="caption-subject font-yellow-gold bold uppercase">Nómina
<asp:Literal ID="LtlPeriodoseleccionado" runat="server"></asp:Literal></span>
</div>
@@ -595,7 +595,7 @@
<asp:TextBox ID="TxtasisFecha" CssClass="hidden" runat="server"></asp:TextBox>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtPersonal" runat="server" Text=""></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtPersonal" Enabled="false" runat="server" Text=""></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtPersonal" Enabled="false" Text="Empleado"></asp:Label>
</div>
<div class="row">
@@ -610,7 +610,7 @@
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtPorPago" runat="server" Text=""></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtPorPago" runat="server" Text="" type="number" min="0" max="100" step="0.01"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtPorPago" Text="Porcentaje Pago"></asp:Label>
</div>
</div>
@@ -759,7 +759,7 @@
</div>
</div>
<div class="row">
<div class="col-sm-3 bold">Curp</div>
<div class="col-sm-3 bold">CURP</div>
<div class="col-sm-3">
<asp:Label ID="LblCURP" runat="server"></asp:Label>
</div>
@@ -1211,7 +1211,7 @@
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Vacaciones registradas.</span>
<span class="caption-subject font-yellow-gold bold uppercase">Vacaciones registradas</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
@@ -1307,7 +1307,7 @@
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Vacaciones registradas.</span>
<span class="caption-subject font-yellow-gold bold uppercase">Agregar vacaciones</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
@@ -1431,7 +1431,7 @@
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Incapacidades registradas.</span>
<span class="caption-subject font-yellow-gold bold uppercase">Incapacidades registradas</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
@@ -1481,7 +1481,7 @@
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">captura de incapacidad</span>
<span class="caption-subject font-yellow-gold bold uppercase">Agregar incapacidades</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
@@ -1602,7 +1602,7 @@
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Forma de pago</span>
<span class="caption-subject font-yellow-gold bold uppercase">Agregar Forma de pago</span>
</div>
<div class="tools">
@@ -1695,7 +1695,7 @@
<div class="row">
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server" MaxLength="10"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server" MaxLength="10" type="number" step="any"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="Txtmcvalor" Enabled="false" Text="Valor"></asp:Label>
<i></i>
</div>
@@ -1707,7 +1707,7 @@
<div class="row">
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server" MaxLength="10"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server" MaxLength="10" type="number" step="any"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtmcImporte" Enabled="false" Text="Importe"></asp:Label>
<i></i>
</div>
@@ -1719,7 +1719,7 @@
<div class="row">
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server" MaxLength="10"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server" MaxLength="10" type="number" step="any"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtmcImporteGrabado" Enabled="false" Text="Gravado"></asp:Label>
<i></i>
</div>
@@ -1949,7 +1949,7 @@
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtValorUma" CssClass="form-control input-sm " runat="server"></asp:TextBox>
<asp:TextBox ID="TxtValorUma" CssClass="form-control input-sm " runat="server" type="number" step=".01"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvValorUma" runat="server" ControlToValidate="TxtValorUma" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGAddUma"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VcoValorUma" runat="server" HighlightCssClass="vco" TargetControlID="RfvValorUma"></ajax:ValidatorCalloutExtender>
</div>
@@ -2107,7 +2107,7 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Cargar Nomina de excel</h4>
<h4 class="modal-title" runat="server" style="text-align: left">Cargar Nómina de excel</h4>
</div>
<div class="modal-body">
@@ -2115,7 +2115,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-download font-green"></i>
<span class="caption-subject bold uppercase">Paso 1: Descargar Plantilla</span>
<span class="caption-subject bold uppercase">Paso 1: Descargar plantilla</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
@@ -2149,7 +2149,7 @@
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" BorderWidth="0" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
EmptyDataText="No se encontraron registros">
<Columns>
<asp:BoundField DataField="Codigo" HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Tipo" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-HorizontalAlign="center">
@@ -2172,11 +2172,11 @@
</div>
</div>
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
-No se debe editar el nombre de la hoja 'Nomina'.<br />
-No se debe editar el nombre de la hoja 'Nómina'.<br />
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.<br />
-si no desea insertar un concepto puede borrar la columna.<br />
-no se debe borrar la columna codigo.<br />--%>
-no se debe borrar la columna código.<br />--%>
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
@@ -2222,17 +2222,17 @@
<div class="modal-body">
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlEjerciciosCM" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlEjerciciosCM_SelectedIndexChanged" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
<asp:DropDownList ID="DdlEjerciciosCM" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlEjerciciosCM_SelectedIndexChanged" Style="width: 100% !important;" CssClass="form-control select2me input-sm" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlEjerciciosCM">Ejercicio:</asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlTipoPeriodoCM" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoPeriodoCM_SelectedIndexChanged" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="form-control select2me input-sm" Style="width: 100% !important;">
<asp:DropDownList ID="DdlTipoPeriodoCM" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoPeriodoCM_SelectedIndexChanged" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" CssClass="form-control select2me input-sm" Style="width: 100% !important;">
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlTipoPeriodoCM">Tipo:</asp:Label>
</div>
<div class="form-group form-md-line-input">
<asp:DropDownList ID="DdlPeriodoCM" runat="server" DataTextField="NominaEstatus" DataValueField="CvePeriodo" Class="form-control select2me input-sm" Style="width: 100% !important;">
<asp:DropDownList ID="DdlPeriodoCM" runat="server" DataTextField="NominaEstatus" DataValueField="CvePeriodo" CssClass="form-control select2me input-sm" Style="width: 100% !important;">
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlPeriodoCM">Periodo:</asp:Label>
</div>

View File

@@ -2379,10 +2379,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
string DiasRetardos = "";
string DiasIncapacidad = "";
string SubProyecto = "";
string Usuario = UsuarioActual.Nombre;
string FolioFiscal = "";
{
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
if (drow != null)
{
SubProyecto = drow["SubProyecto"].ToString();
FolioFiscal = string.Format("{0}", drow["FolioFiscal"]);
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
@@ -2398,7 +2402,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (objrh.GetPersonal(SRCvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
{
DataRow drow = objrh.DtResultados.Rows[0];
SubProyecto = drow["SubProyecto"].ToString();
CodigoEmpleado = drow["Codigo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
@@ -2411,7 +2414,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", CURP));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TipoPeriodo", TipoPeriodo));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NSS", NSS));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasLaborados", DiasLaborados));
@@ -2423,8 +2426,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SubProyecto", SubProyecto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaPago", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FolioFiscal", FolioFiscal));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Usuario", Usuario));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
@@ -4866,7 +4869,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
ImporteValor = rcon["Valor"].ToString().ToDecimal();
if (continuar)
{
@@ -6580,7 +6583,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename=incidencias del al{0}.xlsx", ""));
Response.AddHeader("content-disposition", string.Format("attachment;filename=incidencias del {0:dd-MM-yyyy} al {1:dd-MM-yyyy}.xlsx", fechai, fechaf));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}

View File

@@ -0,0 +1,55 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ChecadorAsistencia.aspx.cs" Inherits="RH_ChecadorAsistencia" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
ASistencia Cheador
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
<asp:UpdatePanel ID="upDatosPA_R" runat ="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:GridView ID="GVGetAsistenciaChecador" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
datakeynames="CveEmpresa,CodigoNombreCompleto,SubProyecto,Checador,Fecha,FechaIng">
<Columns>
<asp:TemplateField HeaderText=" Nombre">
<ItemTemplate>
<asp:Label ID="lblcodigoNombreCompleto" runat="server" Text='<%# Eval("CodigoNombreCompleto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Centro de costos">
<ItemTemplate>
<asp:Label ID="lblsubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Checador">
<ItemTemplate>
<asp:Label ID="lblchecador" runat="server" Text='<%# Eval("Checador")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Label ID="lblfecha" runat="server" Text='<%# Eval("Fecha","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha ingreso">
<ItemTemplate>
<asp:Label ID="lblfechaIng" runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
</asp:Content>

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class RH_ChecadorAsistencia : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
using(ClsClaseBase objbase = new ClsClaseBase())
{
try
{
Usuario user = (Usuario)Context.Session["UsuarioSIG"];
if(objbase.runQuerystr(string.Format("EXEC PA_RH_GetAsistenciaChecador {0}", user.CveEmpresa))){
GVGetAsistenciaChecador.DataSource = objbase.DtResultados;
GVGetAsistenciaChecador.DataBind();
}
}
catch (Exception)
{
}
}
}
}
}

View File

@@ -173,10 +173,9 @@
}
.orange{
color:orange;
background-color:orange;
.orange {
color: orange;
background-color: orange;
}
</style>
</asp:Content>
@@ -879,6 +878,56 @@
</asp:UpdatePanel>
</div>
</div>
<div class="portlet light xspadding bordered" id="DivTrayectos" runat="server" visible="false">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">CONFIGURACIÓN DE TRAYECTOS:</span>
</div>
<div class="actions">
</div>
</div>
<div class="portlet-body form">
<asp:UpdatePanel runat="server" ID="UpTrayectos" UpdateMode="Conditional">
<ContentTemplate>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAdminTrayecto" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlAdminTrayecto_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Value="1" Text="Administrador de Trayectos"></asp:ListItem>
<asp:ListItem Value="2" Text="Solo dispone unidades"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAdminTrayecto" runat="server" InitialValue="-1" ControlToValidate="DdlAdminTrayecto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Administración''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlAdminTrayecto.ClientID.ToString()%>">Tipo Administración:</label>
<i></i>
</div>
<div id="DivUnidadesDisponibles" class="row" runat="server" visible="false">
<div class="col-md-12">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">UNIDADES DISPONIBLES:</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body form">
<asp:GridView ID="GvUnidadesDisponibles" runat="server" AutoGenerateColumns="False" Width="100%"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None">
<Columns>
<asp:BoundField DataField="Display" ItemStyle-Width="40%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Cliente" ItemStyle-Width="60%" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
@@ -3222,8 +3271,8 @@
</Triggers>--%>
</asp:UpdatePanel>
<div style="text-align:right;">
<span id="Contadorgps"><%=GvDatosGPS.Rows.Count %> </span> dispositivos
<div style="text-align: right;">
<span id="Contadorgps"><%=GvDatosGPS.Rows.Count %> </span>dispositivos
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatosGPS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatosGPS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -3233,7 +3282,7 @@
<ContentTemplate>
<asp:HiddenField ID="hdnArrayDispositivo" runat="server" Value="" ClientIDMode="Static" />
<asp:Button ID="btnCargaArrayDisp" runat="server" Text="" Style="display: none" ClientIDMode="Static"></asp:Button>
<asp:GridView ID="GvDatosGPS" runat="server" GridLines="None" ShowFooter="true" DataKeyNames="CveDispositivo,CveModelo,CveProveedorComunicacionCuenta,Display,Modelo,IMEI"
<asp:GridView ID="GvDatosGPS" runat="server" GridLines="None" ShowFooter="true" DataKeyNames="CveDispositivo,CveModelo,CveProveedorComunicacionCuenta,Display,Modelo,IMEI,Dispuesto"
CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Dispositivos">
<Columns>
@@ -3255,6 +3304,17 @@
<asp:Label ID="LblEstatus" runat="server" Text=""></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField HeaderText="Dispuesto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" FooterStyle-VerticalAlign="Middle" Visible="false">
<ItemTemplate>
<asp:Label ID="LblDisponible" runat="server" Text=""></asp:Label>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="Disponible Trayectos" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:Label ID="LblDisponible" runat="server" Text=""></asp:Label>
<asp:LinkButton ID="imgDisponer" OnClick="imgDisponer_Click" HeaderText="Disponer" runat="server" AlternateText="Disponer" CssClass="" Text="" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="imgE" HeaderText="Eliminar" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
@@ -3960,7 +4020,7 @@
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoad_ClickDocumentacion" runat="server"
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" />
</ItemTemplate>

View File

@@ -715,7 +715,7 @@ Partial Class Clientes
TdBusqueda.Visible = True
HyperLink7.Visible = False
ChkSist.Visible = False
DivTrayectos.Visible = True
CargaEmpresasUsuario(UsuarioActual.CveEmpresa)
End If
@@ -1633,14 +1633,15 @@ Partial Class Clientes
End If
DdlMotivoTraslado.SelectedValueExist(ObjClientes.CveMotivoTraslado)
TxtNumRegIdTrib.Text = ObjClientes.NumRegIdTrib
'If ObjClientes.CveUsoCFDI > 0 Then DdlUsoCFDI.Items.RemoveAt(0)
'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0)
'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0)
'DIAS DE PAGO
TxtNumRegIdTrib.Text = ObjClientes.NumRegIdTrib
DdlAdminTrayecto.SelectedValueExist(ObjClientes.DtResultados(0)("CveAdminTrayecto").ToString())
DdlAdminTrayecto_SelectedIndexChanged(DdlAdminTrayecto, EventArgs.Empty)
'If ObjClientes.CveUsoCFDI > 0 Then DdlUsoCFDI.Items.RemoveAt(0)
'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0)
'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0)
'DIAS DE PAGO
If ObjClientes.RecepcionPagos <> "" AndAlso ObjClientes.RecepcionPagos.Length = 11 Then
Dim array As String() = ObjClientes.RecepcionPagos.Split(New Char() {"-"c})
If array(0) = "1" Then ChkLunes.Checked = True
@@ -2573,7 +2574,7 @@ Partial Class Clientes
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero()) Then
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=DdlAdminTrayecto.SelectedValue.ToEntero()) Then
ViewState("CveCliente") = ObjClientes.CveCliente
@@ -2668,7 +2669,7 @@ Partial Class Clientes
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero()) Then
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=DdlAdminTrayecto.SelectedValue.ToEntero()) Then
ObjClientes.LimpiaImpuestosLocales(CveCliente)
@@ -5124,7 +5125,11 @@ Partial Class Clientes
GvDatosGPS.DataSource = Nothing
End If
ObjGPS.Dispose()
GvDatosGPS.DataBind()
GvDatosGPS.DataBind()
GvDatosGPS.Columns(9).Visible = DdlAdminTrayecto.SelectedValue = "2"
'GvDatosGPS.Columns(10).Visible = DdlAdminTrayecto.SelectedValue = "2"
UpDispositivos.Update()
End Sub
Private Sub CargaGlobalDispositos()
@@ -5153,8 +5158,22 @@ Partial Class Clientes
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
e.Row.FCLabel("LblEstatus").CssClass = "label label-danger"
e.Row.FindControl("imgD").Visible = False
End If
If CBool(e.Row.DBCampo("Dispuesto")) Then
e.Row.FCLabel("LblDisponible").Text = "Si"
e.Row.FCLabel("LblDisponible").CssClass = "label label-success"
e.Row.FCLinkButton("imgDisponer").CssClass = "btn btn-circle btn-sm red"
e.Row.FCLinkButton("imgDisponer").Text = "<i class='fa fa-refresh'></i>"
Else
e.Row.FCLabel("LblDisponible").Text = "No"
e.Row.FCLabel("LblDisponible").CssClass = "label label-default"
e.Row.FCLinkButton("imgDisponer").CssClass = "btn btn-circle btn-sm blue"
e.Row.FCLinkButton("imgDisponer").Text = "<i class='fa fa-refresh'></i>"
End If
End If
e.Row.FCLinkButton("imgE").Attributes.Add("onclick", $"javascript:AbrirVentana('/GPS/WizardDispositivos.aspx?CveDispositivo={e.Row.DBCampo("CveDispositivo").ToString()}&CveCliente={CveCliente}&EsPopup=1', 801, 701);")
End If
End Sub
@@ -10577,6 +10596,36 @@ Partial Class Clientes
End Using
Return retorno
End Function
End Function
Protected Sub DdlAdminTrayecto_SelectedIndexChanged(sender As Object, e As EventArgs)
DivUnidadesDisponibles.Visible = DdlAdminTrayecto.SelectedValue = "1"
GvDatosGPS.Columns(9).Visible = DdlAdminTrayecto.SelectedValue = "2"
If DivUnidadesDisponibles.Visible AndAlso Me.CveCliente > 0 Then
Using ObjGPS As New ClsGPS
If ObjGPS.GetUnidadesDispuestas(-1, -1, UsuarioActual.CveEmpresa) Then
GvUnidadesDisponibles.DataSource = ObjGPS.DtResultados
End If
End Using
GvUnidadesDisponibles.DataBind()
End If
UpTrayectos.Update()
UpDispositivos.Update()
End Sub
Protected Sub imgDisponer_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim CveDispositivo As Integer = GvRow.DataKey("CveDispositivo").ToEntero()
Dim ValorDisposicion As Boolean = CBool(GvRow.DataKey("Dispuesto"))
Using ObjGPS As New ClsGPS
If ObjGPS.UpdateUnidadesDispuestas(CveDispositivo, Not ValorDisposicion) Then
Alert("Se cambió el estatus de disposición")
End If
End Using
CargaDispositivos(DdlEstatusDispositivos.SelectedValue.ToEntero())
End Sub
End Class

View File

@@ -6968,7 +6968,10 @@ Partial Class Ventas
Dim CuentaPredial As String
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
PU = (GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal).RoundSQL(6)
ObjDescuento.ImporteDescuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
Dim DescuentoManual As Decimal = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
ObjDescuento.ImporteDescuento = DescuentoManual
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
If PU <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
@@ -6980,6 +6983,11 @@ Partial Class Ventas
ObjDescuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero(), Cantidad, PU)
End If
'SI ESTA HABILITADO LA OPCION DE DESCUENTO, SE AGREGO UN DESCUENTO MANUAL Y NO TIENE PROMOCION
If GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Enabled AndAlso (ObjDescuento.CvePromocionDetalle <= 0 AndAlso ObjDescuento.ImporteDescuento <= 0) AndAlso DescuentoManual > 0 Then
ObjDescuento.ImporteDescuento = DescuentoManual
End If
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
Dim DatarowPS As DataRow = Nothing
@@ -25055,6 +25063,14 @@ Partial Class Ventas
End Sub
Protected Sub RblRNCTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
ChkMostarProductosRNC.Checked = False
DivRNCCargosDetalle.Visible = False
DivRNCCargos.Visible = True
ChkMostarProductosRNCBon.Checked = False
DivRNCBonificacionesDetalle.Visible = False
DivRNCBonificaciones.Visible = True
Select Case RblRNCTipo.SelectedValue
Case "1" 'CARGOS
LtlCargos.Text = "CARGOS"
@@ -25130,7 +25146,7 @@ Partial Class Ventas
If ChkMostarProductosRNC.Checked Then
DivRNCCargos.Visible = False
DivRNCCargosDetalle.Visible = True
CargaRNCDetalle(DdlVentaUsado.SelectedValue.ToEntero())
CargaRNCDetalle(DdlVentaUsado.SelectedValue.ToEntero(), CargaSoloGarantias:=RblRNCTipo.SelectedValue = "3")
Else
DivRNCCargos.Visible = True
DivRNCCargosDetalle.Visible = False
@@ -25202,26 +25218,38 @@ Partial Class Ventas
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
Else
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
If CargarSoloGarantias Then
Dim SaldoMaximo As Decimal = DtNC.SUMD("Saldo", "TipoRNC = 1 AND EsGarantia = True")
If SaldoMaximo > 0 Then
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
HdnSaldoMaximoUsados.Value = SaldoMaximo.ToString()
LtlSMU.Text = SaldoMaximo.FormatoNumero(2)
Else
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
Else
'DivSMU.Visible = False
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
If SaldoMaximo > 0 Then
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
Else
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
Else
'DivSMU.Visible = False
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
ObjAcum.Dispose()
End If
ObjAcum.Dispose()
End If
Else
HdnSaldoMaximoUsados.Value = "0"
@@ -25271,7 +25299,7 @@ Partial Class Ventas
UpDescNC.Update()
End Sub
Private Sub CargaRNCDetalle(Optional CveVentaUsado As Integer = -1)
Private Sub CargaRNCDetalle(Optional CveVentaUsado As Integer = -1, Optional CargaSoloGarantias As Boolean = False)
Dim DtNC As DataTable = Nothing
Dim ObjMovtos As New ClsMovimientos()
@@ -25280,6 +25308,12 @@ Partial Class Ventas
End If
ObjMovtos.Dispose()
If CargaSoloGarantias Then
TmpDTRNCDetalle = TmpDTRNCDetalle.FiltraParametros("EsGarantia = True")
Else
TmpDTRNCDetalle = TmpDTRNCDetalle.FiltraParametros("EsGarantia = False")
End If
Me.TmpDTRNCDetalle.Columns.Add(New DataColumn("CveVentaDetalleNCGenerada", GetType(Integer)))
Me.TmpDTRNCDetalleSelecciondas = Nothing
@@ -25311,18 +25345,30 @@ Partial Class Ventas
End If
Else
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
If CargaSoloGarantias Then
Dim SaldoMaximo As Decimal = TmpDTRNCDetalle.SUMD("Total", "TipoRNC = 1")
If SaldoMaximo > 0 Then
HdnSaldoMaximoUsados.Value = SaldoMaximo.ToString()
LtlSMU.Text = SaldoMaximo.FormatoNumero(2)
Else
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
Else
'DivSMU.Visible = False
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
Else
'DivSMU.Visible = False
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
ObjAcum.Dispose()
End If
ObjAcum.Dispose()
End If
UpModalRemisionesNC.Update()
@@ -25344,9 +25390,9 @@ Partial Class Ventas
Me.TmpDTRNCDetalleSelecciondas.Clear()
If CargarSoloGarantias Then
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1")
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1 AND EsGarantia = True")
Else
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1")
GvDescNCCargosDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 1 AND EsGarantia = False")
End If
GvDescNCCargosDetalle.DataBind()
@@ -25394,28 +25440,31 @@ Partial Class Ventas
GvRemisionesNCBonDetalle.DataSource = TmpDTRNCDetalle.FiltraParametros("TipoRNC = 2")
GvRemisionesNCBonDetalle.DataBind()
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(5)
DivSMU.Visible = True
HdnSMUBon.Value = RowUsadosNC("ValorConImpuestos").ToString()
LtlSMUBon.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
If DdlVentaUsado.SelectedValue.ToEntero() > 0 Then
Dim DtDetalleFactura As DataTable = Nothing
Using ObjVentas As New ClsVentas
If ObjVentas.GetVentaDetalle(DdlVentaUsado.SelectedValue.ToEntero()) Then
DtDetalleFactura = ObjVentas.DtResultados.FiltraParametros("EsCargo = True")
End If
End Using
Dim ImporteBon As Decimal = DtDetalleFactura.SUMD("PUBonificacion") * (1 + DtDetalleFactura.MAX("PorcentajeIVA").ToDecimal())
LtlSMUBon.Text = String.Format("{0:N2}", ImporteBon)
HdnSMUBon.Value = ImporteBon.ToString()
DtDetalleFactura.Dispose()
Else
'DivSMU.Visible = False
HdnSMUBon.Value = "0"
LtlSMUBon.Text = "0"
If TmpDTRNCBonificacionesSeleccionadas IsNot Nothing Then
Dim SaldoMaximo As Decimal = TmpDTRNCBonificacionesSeleccionadas.SUMD("Saldo")
If SaldoMaximo > 0 Then
HdnSMUBon.Value = SaldoMaximo.ToString()
LtlSMUBon.Text = SaldoMaximo.FormatoNumero(2)
Else
HdnSMUBon.Value = "0"
LtlSMUBon.Text = "0"
End If
End If
End If
ObjAcum.Dispose()
'Dim SaldoMaximoUsados As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal() + Me.TmpDT.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
'If SaldoMaximoUsados > 0 Then
' HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
' LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUsados)
'Else
' HdnSaldoMaximoUsados.Value = "0"
' LblSaldoMaximoUsados.Text = "0"
'End If
UpModalRemisionesNC.Update()
End Sub
@@ -25528,17 +25577,30 @@ Partial Class Ventas
'LtlSMUBon.Text = String.Format("{0:N2}", SMUBon)
'HdnSMUBon.Value = SMUBon.ToString()
If DdlVentaUsado.SelectedValue.ToEntero() > 0 Then
Dim DtDetalleFactura As DataTable = Nothing
Using ObjVentas As New ClsVentas
If ObjVentas.GetVentaDetalle(DdlVentaUsado.SelectedValue.ToEntero()) Then
DtDetalleFactura = ObjVentas.DtResultados.FiltraParametros("EsCargo = True")
End If
End Using
Dim ImporteBon As Decimal = DtDetalleFactura.SUMD("PUBonificacion") * (1 + DtDetalleFactura.MAX("PorcentajeIVA").ToDecimal())
Dim ObjAcum2 As New ClsAcumuladores
If ObjAcum2.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum2.DtResultados.Rows(5)
HdnSMUBon.Value = RowUsadosNC("ValorConImpuestos").ToString()
LtlSMUBon.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
LtlSMUBon.Text = String.Format("{0:N2}", ImporteBon)
HdnSMUBon.Value = ImporteBon.ToString()
DtDetalleFactura.Dispose()
Else
HdnSMUBon.Value = "0"
LtlSMUBon.Text = "0"
Dim SaldoMaximo As Decimal = TmpDTRNCBonificacionesSeleccionadas.SUMD("Saldo")
If SaldoMaximo > 0 Then
HdnSMUBon.Value = SaldoMaximo.ToString()
LtlSMUBon.Text = SaldoMaximo.FormatoNumero(2)
Else
HdnSMUBon.Value = "0"
LtlSMUBon.Text = "0"
End If
End If
ObjAcum2.Dispose()
UpModalRemisionesNC.Update()
End If
@@ -26301,8 +26363,14 @@ Partial Class Ventas
'SI ES ACUMULADOR LAS OBSERVACIOENS DEBEN SER EL NOMBRE DEL ACUMULADOR
If GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo = {CvePSCargo}") IsNot Nothing Then
Obs = RowUsado("CodigoPS").ToString()
'Else
' Obs = RowUsado("Obs").ToString()
End If
'SI TIENE BCI EN LAS OBSERVACIONES AGREGARLO A LA FACTURA
If Not String.IsNullOrEmpty(RowUsado("Observaciones").ToString()) Then
If String.IsNullOrEmpty(Obs) Then
Obs = RowUsado("Observaciones").ToString()
Else
Obs = String.Format("{0} - {1}", Obs, RowUsado("Observaciones").ToString())
End If
End If
If Not String.IsNullOrEmpty(TxtNCObservaciones.Text.Trim()) Then

View File

@@ -298,6 +298,10 @@