Local
This commit is contained in:
@@ -3390,6 +3390,28 @@ Public Class ClsCGame
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "INDICADORES"
|
||||
|
||||
Public Function GetIndicadores(CveEmpresa As Integer, FechaI As Date, FechaF As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Citrus_IndicadoresGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los indicadores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
@@ -9801,13 +9801,13 @@ Public Class ClsPaginas
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 266, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 266, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -2452,7 +2452,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpPersonalAltas(CvePersonal As Integer, fechaInicio As String, fechaFin As String, CvePeriodoFiniquito As Integer, CveMotivoBaja As Integer, esLiquidacion As Boolean, ValIndemnizacion As Boolean, ValSeparacionunica As Boolean, ValPrimadeantiguedad As Boolean) As Boolean
|
||||
Public Function UpPersonalAltas(CvePersonal As Integer, fechaInicio As String, fechaFin As String, CvePeriodoFiniquito As Integer, CveMotivoBaja As Integer, esLiquidacion As Boolean, ValIndemnizacion As Boolean, ValSeparacionunica As Boolean, ValPrimadeantiguedad As Boolean, Optional Observaciones As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_RH_PersonalAltasUp")
|
||||
|
||||
@@ -2466,6 +2466,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
.Add("@ValIndemnizacion", SqlDbType.Bit).Value = If(ValIndemnizacion, 1, 0)
|
||||
.Add("@ValSeparacionunica", SqlDbType.Bit).Value = If(ValSeparacionunica, 1, 0)
|
||||
.Add("@ValPrimadeantiguedad", SqlDbType.Bit).Value = If(ValPrimadeantiguedad, 1, 0)
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -7397,7 +7398,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function estatusPersonalUp(Fecha As DateTime, CvePersonal As Integer, CveEstatusPersonal As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||
Public Function estatusPersonalUp(Fecha As DateTime, CvePersonal As Integer, CveEstatusPersonal As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional CveMotivoBaja As Integer = -1, Optional Observaciones As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
SqlDataAdapter("PA_RH_EstatusPersonalUp")
|
||||
@@ -7407,6 +7408,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveMotivoBaja", SqlDbType.Int).Value = CveMotivoBaja '
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -196,6 +196,8 @@ Public Class E119 : Implements IHttpHandler
|
||||
TieneError = True
|
||||
End If
|
||||
End Using
|
||||
Dim Msg As String = "Consultado día: " & Fecha.ToShortDateString
|
||||
Msg.GuardaLogAD("LogE119")
|
||||
Else
|
||||
RespuestaError.message = "la fecha no es leida correctamente"
|
||||
TieneError = True
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
'Imports System.Diagnostics
|
||||
'Imports System.Globalization
|
||||
'Imports System.IO
|
||||
'Imports System.Threading.Tasks
|
||||
'Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
'Imports Extensiones
|
||||
'Imports Stimulsoft.Base
|
||||
|
||||
Imports System.Activities
|
||||
Imports System.Data
|
||||
Imports System.Xml
|
||||
Imports System.Diagnostics
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Xml
|
||||
Imports Extensiones
|
||||
Imports Newtonsoft.Json
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Compras_Compras
|
||||
@@ -1778,7 +1769,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If Validada And Not EnListadoEFOS Then
|
||||
Try
|
||||
XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", ""))
|
||||
XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", ""))
|
||||
Catch ex As Exception
|
||||
Try
|
||||
Dim oReader = New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1"))
|
||||
@@ -8317,7 +8308,7 @@ Partial Class Compras_Compras
|
||||
Dim IndicePrimero As Integer = 0
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If dRow("IEPSPS").ToString.ToDecimal > 0 Then
|
||||
If Boolean.Parse(dRow("AplicaIEPS").ToString) And dRow("IEPSPS").ToString.ToDecimal > 0 Then
|
||||
IndicePrimero = IndiceContador
|
||||
Exit For
|
||||
End If
|
||||
@@ -8325,8 +8316,11 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
|
||||
If DiferenciaIEPSPS.RoundAD(2) <> 0 Then
|
||||
|
||||
|
||||
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -8581,34 +8575,23 @@ Partial Class Compras_Compras
|
||||
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
|
||||
|
||||
|
||||
'Se comento por que ya se aplica el pago en AplicaPrePolizaPagoCompra
|
||||
'Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo)
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
' ErrorMovtosCxP = 1
|
||||
'End If
|
||||
|
||||
|
||||
If gvr.DataKey("TipoDocto").Contiene("Egsc") Then
|
||||
CompraActual.IdCtaContableAnticipoProv = IdCtaContable
|
||||
End If
|
||||
|
||||
If gvr.DataKey("TipoDocto").Contiene("DD") Then
|
||||
CompraActual.IdCtaContableProv = IdCtaContable
|
||||
Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo)
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
|
||||
If CveMonedaAnticipo > 1 Then
|
||||
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
|
||||
Pago.CveIE = CveIE
|
||||
Pago.CveCompraAmortizacion = CveCompraNC
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaNueva, ObjConta)
|
||||
End If
|
||||
|
||||
Pago.CveIE = CveIE
|
||||
Pago.CveCompraAmortizacion = CveCompraNC
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaNueva, ObjConta)
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
@@ -9804,38 +9787,12 @@ Partial Class Compras_Compras
|
||||
#Region "CargaXML"
|
||||
|
||||
Private Function ValorXML(n As XmlNode, Campo As String, Optional Retorno As String = "") As String
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
|
||||
Try
|
||||
|
||||
Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0)
|
||||
If o Is Nothing Then
|
||||
Return Retorno
|
||||
Else
|
||||
Return o.Value
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
Alert($"Error al leer valor nodo campo:{Campo}")
|
||||
|
||||
Return ""
|
||||
End Try
|
||||
|
||||
Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0)
|
||||
If o Is Nothing Then
|
||||
Return Retorno
|
||||
Else
|
||||
|
||||
Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0)
|
||||
If o Is Nothing Then
|
||||
Return Retorno
|
||||
Else
|
||||
Return o.Value
|
||||
End If
|
||||
|
||||
Return o.Value
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub CargaComprobanteXML(XMLDoc As XmlDocument)
|
||||
@@ -12289,30 +12246,8 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnContado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
TxtRembolsoNumero.Text = TxtNumeroReembolso.Text
|
||||
|
||||
If RBLContado.SelectedValue.ToEntero = 6 Then ' Caja chica
|
||||
DdlFuncionarioEmpleado.SelectedValueExist(-1)
|
||||
DdlCuentaCajaChicaReembolso.SelectedValueExist(-1)
|
||||
TxtDocumentoImporteFE.Text = ""
|
||||
TextBox3.Text = ""
|
||||
ViewState("CvePersonal") = -1
|
||||
End If
|
||||
|
||||
If RBLContado.SelectedValue.ToEntero = 2 Then ' viaticos personal
|
||||
DdlTipoTransaccionCaja.SelectedValueExist(-1)
|
||||
DdlCuentaCaja.SelectedValueExist(-1)
|
||||
TxtDocumentoFolioCaja.Text = ""
|
||||
TxtDocumentoImporteCaja.Text = ""
|
||||
TxtDocumentoObservacionesCaja.Text = ""
|
||||
ViewState("CveCajaChica") = -1
|
||||
End If
|
||||
|
||||
UpContado.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub RblRembolso_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
BIN
General/CONTRATO.doc
Normal file
BIN
General/CONTRATO.doc
Normal file
Binary file not shown.
@@ -127,7 +127,8 @@
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -183,9 +184,14 @@
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<%--<asp:GridView ID="GridView1" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="True" AllowPaging="False" ShowFooter="False">
|
||||
</asp:GridView>--%>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -239,7 +245,8 @@
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -294,7 +301,8 @@
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Cliente" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
<asp:BoundField DataField="CveMoneda" ItemStyle-CssClass="margenbound" HeaderText="" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -348,8 +356,9 @@
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Cliente" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Proveedor" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
<asp:BoundField DataField="CveMoneda" ItemStyle-CssClass="margenbound" HeaderText="" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -381,6 +390,66 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPIndicadores" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span10" runat="server" class="caption-subject bold uppercase">Indicadores por Proveedor Productor</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<asp:GridView ID="GvIndicadores" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="PUPromedioKG" ItemStyle-CssClass="margenbound" HeaderText="PUnit/KG" />
|
||||
<asp:BoundField DataFormatString="{0:n}" DataField="Merma" ItemStyle-CssClass="margenbound" HeaderText="Merma" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<%--<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPGraficaIndicadores" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span11" runat="server" class="caption-subject bold uppercase">Indicadores por Proveedor Productor- Gráfica </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<div id="chartdiv_indicadores"></div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="btnConsultar" EventName="Click" />
|
||||
@@ -435,6 +504,7 @@
|
||||
AmCharts.makeChart("chartdiv_cxp192", { ...chartconfig, dataProvider: json["CxP192"] }); // Compras x Producto ProveedorClasificacion 192
|
||||
AmCharts.makeChart("chartdiv_ccxc", { ...chartconfig, dataProvider: json["CCxC"] }); // Cuentas por Cobrar x Cliente
|
||||
AmCharts.makeChart("chartdiv_cpxp", { ...chartconfig, dataProvider: json["CPxP"] }); // Cuentas por Pagar x Proveedor
|
||||
// AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor Productor
|
||||
|
||||
document.getElementById('amChartsAttribution').style.visibility = 'visible';
|
||||
}
|
||||
|
||||
@@ -77,6 +77,36 @@ Partial Class General_RepIndicadorResumen
|
||||
ViewState("CPxP") = value
|
||||
End Set
|
||||
End Property
|
||||
#If False Then
|
||||
Private Property gv1 As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("gv1") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("gv1"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("gv1") = value
|
||||
End Set
|
||||
End Property
|
||||
#End If
|
||||
Private Property Indicadores As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("Indicadores") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("Indicadores"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("Indicadores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtColor As DataTable
|
||||
Get
|
||||
@@ -126,11 +156,14 @@ Partial Class General_RepIndicadorResumen
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
Dim ObjMovtos As New ClsMovimientos
|
||||
Dim ObjCitrus As New ClsCGame
|
||||
|
||||
If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1,
|
||||
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then
|
||||
VxP = ObjVentas.DtResultados
|
||||
VxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
VxP = VxP.DefaultView.ToTable
|
||||
GvVxP.DataSource = VxP
|
||||
Else
|
||||
GvVxP.DataSource = Nothing
|
||||
@@ -140,6 +173,8 @@ Partial Class General_RepIndicadorResumen
|
||||
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
|
||||
CxP192 = ObjCompras.DtResultados
|
||||
CxP192.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
CxP192 = CxP192.DefaultView.ToTable
|
||||
GvCxP192.DataSource = CxP192
|
||||
Else
|
||||
GvCxP192.DataSource = Nothing
|
||||
@@ -149,6 +184,8 @@ Partial Class General_RepIndicadorResumen
|
||||
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=1) Then
|
||||
CxP = ObjCompras.DtResultados
|
||||
CxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
CxP = CxP.DefaultView.ToTable
|
||||
GvCxP.DataSource = CxP
|
||||
Else
|
||||
GvCxP.DataSource = Nothing
|
||||
@@ -161,6 +198,8 @@ Partial Class General_RepIndicadorResumen
|
||||
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
CCxC = ObjMovtos.DtResultados
|
||||
CCxC.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
CCxC = CCxC.DefaultView.ToTable
|
||||
GvCCxC.DataSource = CCxC
|
||||
Else
|
||||
GvCCxC.DataSource = Nothing
|
||||
@@ -171,23 +210,48 @@ Partial Class General_RepIndicadorResumen
|
||||
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
CPxP = ObjMovtos.DtResultados
|
||||
CPxP.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
CPxP = CPxP.DefaultView.ToTable
|
||||
GvCPxP.DataSource = CPxP
|
||||
Else
|
||||
GvCPxP.DataSource = Nothing
|
||||
CPxP = Nothing
|
||||
End If
|
||||
|
||||
'If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
' UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
|
||||
' gv1 = ObjCompras.DtResultados
|
||||
' GridView1.DataSource = gv1
|
||||
'Else
|
||||
' GridView1.DataSource = Nothing
|
||||
' gv1 = Nothing
|
||||
'End If
|
||||
|
||||
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text) Then
|
||||
|
||||
Indicadores = ObjCitrus.DtResultados
|
||||
Indicadores.DefaultView.Sort = "Saldo DESC"
|
||||
Indicadores = Indicadores.DefaultView.ToTable
|
||||
GvIndicadores.DataSource = Indicadores
|
||||
Else
|
||||
GvIndicadores.DataSource = Nothing
|
||||
Indicadores = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
ObjCompras.Dispose()
|
||||
ObjMovtos.Dispose()
|
||||
ObjCitrus.Dispose()
|
||||
|
||||
GvVxP.DataBind()
|
||||
GvCxP192.DataBind()
|
||||
GvCxP.DataBind()
|
||||
'GridView1.DataBind()
|
||||
GvCCxC.DataBind()
|
||||
GvCPxP.DataBind()
|
||||
GvIndicadores.DataBind()
|
||||
|
||||
' Mostrar gráficos solo si hay datos en su respectiva tabla
|
||||
'Mostrar gráficos solo si hay datos en su respectiva tabla
|
||||
If GvVxP.Rows.Count > 0 Then
|
||||
UPGraficaVxP.Visible = True
|
||||
Else
|
||||
@@ -213,8 +277,13 @@ Partial Class General_RepIndicadorResumen
|
||||
Else
|
||||
UPGraficaCPxP.Visible = False
|
||||
End If
|
||||
'If GvIndicadores.Rows.Count > 0 Then
|
||||
' UPGraficaIndicadores.Visible = True
|
||||
'Else
|
||||
' UPGraficaIndicadores.Visible = False
|
||||
'End If
|
||||
|
||||
' Si no había datos en ninguna tabla no cargar función de gráficos
|
||||
'Si no había datos en ninguna tabla no cargar función de gráficos
|
||||
If (GvVxP.Rows.Count = 0 AndAlso GvCxP.Rows.Count = 0 AndAlso GvCxP192.Rows.Count = 0 AndAlso GvCCxC.Rows.Count = 0 AndAlso GvCPxP.Rows.Count = 0) Then Exit Sub
|
||||
GraficasPastel()
|
||||
'GraficasBarras()
|
||||
@@ -228,8 +297,19 @@ Partial Class General_RepIndicadorResumen
|
||||
End Sub
|
||||
Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
|
||||
If e.Row.DBCampo("Orden") = "00ND" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvCxP192_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP192.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
|
||||
If e.Row.DBCampo("Orden") = "00ND" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -238,6 +318,8 @@ Partial Class General_RepIndicadorResumen
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
|
||||
e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvCPxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCPxP.RowDataBound
|
||||
@@ -245,8 +327,17 @@ Partial Class General_RepIndicadorResumen
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
|
||||
e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvIndicadores_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvIndicadores.RowDataBound
|
||||
'If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' If e.Row.DBCampo("Orden") = "" Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub CreaDataTableColor()
|
||||
DtColor = New DataTable
|
||||
DtColor.Columns.Add("Color")
|
||||
@@ -339,7 +430,7 @@ Partial Class General_RepIndicadorResumen
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = Dr("Moneda").ToString
|
||||
Row("Moneda") = Dr("Abreviatura").ToString
|
||||
DtVxP.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
@@ -347,7 +438,7 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_vxp = From s In DtVxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim query_vxp = From s In DtVxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
|
||||
'Compras x Producto TipoProveedor=1
|
||||
DtCxP.Reset()
|
||||
@@ -357,13 +448,13 @@ Partial Class General_RepIndicadorResumen
|
||||
DtCxP.Columns.Add("Moneda")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In CxP.Rows
|
||||
If Not Dr("Orden").ToString = "" Then
|
||||
If Not Dr("Orden").ToString = "00ND" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCxP.NewRow()
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = Dr("Moneda").ToString
|
||||
Row("Moneda") = Dr("Abreviatura").ToString
|
||||
DtCxP.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
@@ -371,7 +462,7 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_cxp = From s In DtCxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim query_cxp = From s In DtCxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
|
||||
'Compras x Producto ProveedorClasificacion=192
|
||||
DtCxP192.Reset()
|
||||
@@ -381,13 +472,13 @@ Partial Class General_RepIndicadorResumen
|
||||
DtCxP192.Columns.Add("Moneda")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In CxP192.Rows
|
||||
If Not Dr("Orden").ToString = "" Then
|
||||
If Not Dr("Orden").ToString = "00ND" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCxP192.NewRow()
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = Dr("Moneda").ToString
|
||||
Row("Moneda") = Dr("Abreviatura").ToString
|
||||
DtCxP192.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
@@ -395,7 +486,7 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_cxp192 = From s In DtCxP192.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim query_cxp192 = From s In DtCxP192.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
|
||||
'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CCxC.Rows))
|
||||
|
||||
@@ -413,7 +504,7 @@ Partial Class General_RepIndicadorResumen
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("Saldo").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = Dr("Moneda").ToString
|
||||
Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
DtCCxC.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
@@ -421,7 +512,7 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_ccxc = From s In DtCCxC.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim query_ccxc = From s In DtCCxC.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
|
||||
'Cuentas por pagar x Proveedor
|
||||
DtCPxP.Reset()
|
||||
@@ -437,7 +528,7 @@ Partial Class General_RepIndicadorResumen
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("Saldo").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = Dr("Moneda").ToString
|
||||
Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
DtCPxP.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
@@ -445,9 +536,11 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_cpxp = From s In DtCPxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim query_cpxp = From s In DtCPxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
|
||||
'Serializar datos agrupándolos en su respectivo DataTable, todos en un solo JSON
|
||||
'TODO: Indicadores x Proveedor -- Determinar qué poner en la gráfica con E172
|
||||
|
||||
'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON
|
||||
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CxP = query_cxp, .CxP192 = query_cxp192, .CCxC = query_ccxc, .CPxP = query_cpxp})
|
||||
'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CCxC = New String() {}})
|
||||
'Alert(json)
|
||||
|
||||
@@ -2610,6 +2610,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (objnom.GETPersonalVacResumen(UsuarioActual.Empresa.CveEmpresa, SRCvePersonal))
|
||||
{
|
||||
DdlVacPeriodo.DataSource = objnom.DtResultados;
|
||||
DdlVacPeriodo.DataBind();
|
||||
DataRow drow = objnom.DtResultados.FiltroPrimero("Selected =1");
|
||||
if (drow != null)
|
||||
{
|
||||
@@ -2618,6 +2620,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
UPSRModalVacaciones.Update();
|
||||
RegistraScript("$('#ModalSRVacaciones').modal()");
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,14 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModsalario" OnClick="LnkModsalario_Click" runat="server"><i class="fa fa-pencil"></i> Modificar salario </asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkContratoAgropecuaria" OnClick="LnkContratoAgropecuaria_Click" runat="server"><i class="fa fa-list-alt"></i> Contrato </asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkContratoAgropecuaria" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
@@ -847,7 +847,7 @@ Partial Class RH_Personal
|
||||
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
||||
pnlSalarioIMSS.Visible = False
|
||||
End If
|
||||
'
|
||||
LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158))
|
||||
Using objno = New ClsNominas
|
||||
objno.GetConceptos()
|
||||
dtNomConceptos = objno.DtResultados
|
||||
@@ -7478,6 +7478,68 @@ Partial Class RH_Personal
|
||||
Alert("Se guardo correctamente", TipoMensaje.MsgInformacion)
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkContratoAgropecuaria_Click(sender As Object, e As EventArgs)
|
||||
Dim RutaArchivo As String = "C:\Proyectos\SIGGIT\General\CONTRATO.doc"
|
||||
|
||||
Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
|
||||
|
||||
Dim ObjRH As New ClsRH
|
||||
|
||||
If ObjRH.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) Then
|
||||
Dim Tags As New List(Of TagsDocumentos)
|
||||
|
||||
Tags.Add(New TagsDocumentos("{NombreCompleto}", ObjRH.NombreCompleto))
|
||||
Tags.Add(New TagsDocumentos("{años}", (DateTime.Now.Year - ObjRH.FechaNacimiento.Year).ToString()))
|
||||
Tags.Add(New TagsDocumentos("{SubProyecto}", DdlSubProyectoAsignado.SelectedItem.Text))
|
||||
Tags.Add(New TagsDocumentos("{EstadoCivil}", DdlEstadoCivil.SelectedItem.Text))
|
||||
|
||||
Tags.Add(New TagsDocumentos("{CiudadOrigen}", TxtCiudad.Text))
|
||||
Tags.Add(New TagsDocumentos("{RFC}", ObjRH.RFC))
|
||||
|
||||
Tags.Add(New TagsDocumentos("{NumeroDia}", String.Format("{0:dd}", ObjRH.FechaIngreso)))
|
||||
Tags.Add(New TagsDocumentos("{MesLetra}", String.Format("{0:MMMM}", ObjRH.FechaIngreso)))
|
||||
Tags.Add(New TagsDocumentos("{Ejercicio}", String.Format("{0:yyyy}", ObjRH.FechaIngreso)))
|
||||
objGemBoxDocument.SustituirTags(Tags)
|
||||
|
||||
End If
|
||||
ObjRH.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
objGemBoxDocument.GuardarStreamPDF()
|
||||
|
||||
|
||||
Dim objbyte = objGemBoxDocument.GetBytesDocumento
|
||||
|
||||
|
||||
|
||||
|
||||
Try
|
||||
Response.Buffer = True
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/pdf"
|
||||
Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", "attachment", "Contrato.pdf", "pdf"))
|
||||
Response.BinaryWrite(objbyte) ' create the file
|
||||
Response.Flush() ' send it to the client to download
|
||||
objbyte = Nothing
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
'HttpContext.Current.Response.End()
|
||||
Catch ex As Exception
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
Alert($"Error: {ex.Message} | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))}", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod:'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -985,7 +985,7 @@ Partial Class RepVentaDetalle
|
||||
Response.End()
|
||||
End Sub
|
||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer) As Byte()
|
||||
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "http://localhost:85/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "https://sig.adssistemas.mx/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim File As Byte() = Nothing
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
|
||||
@@ -8657,10 +8657,10 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not LblRFC.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue = "23" Then
|
||||
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
'If Not LblRFC.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue = "23" Then
|
||||
' Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
Dim EsPersonaMoral As Boolean = Me.TipoPersona
|
||||
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}")
|
||||
@@ -22787,6 +22787,8 @@ Partial Class Ventas
|
||||
|
||||
DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales()
|
||||
DdlRegimenFiscalCliente.DataBind()
|
||||
DdlRegimenFiscalCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
CargaComboCFDICliente()
|
||||
|
||||
End If
|
||||
@@ -33452,7 +33454,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ObjFactura.SetSubProyecto()
|
||||
'EnviarPolizaVentaWS(obj, CvePolizaVirtual, ObjFactura.SubProyecto.Acum_PortalUsuario, ObjFactura.SubProyecto.Acum_PortalContrasena)
|
||||
EnviarPolizaVentaWS(obj, CvePolizaVirtual, ObjFactura.SubProyecto.Acum_PortalUsuario, ObjFactura.SubProyecto.Acum_PortalContrasena)
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user