Compras marcar partidas con PSSAT diferente entre xml y producto alias

This commit is contained in:
Rakcsle Supertramp
2020-07-22 18:36:18 -07:00
parent d25ea575c1
commit 6a08571130
9 changed files with 99 additions and 40 deletions

View File

@@ -118,7 +118,7 @@
Proyecto:
</div>
<div class="col-md-1" runat="server" id="Div1">Aplica NC:</div>
<div class="col-md-1" runat="server" id="Div1">Aplica NC/Dev:</div>
<div class="col-md-1" id="ds" style="width: 120px;">
<asp:DropDownList CssClass="form-control select2me input-sm" ID="DdlAplicaNC" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>

View File

@@ -137,7 +137,7 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" data-toggle="tooltip" data-placement="left" title="Aplica Nota de Crédito">Aplica NC:</div>
<div class="col-md-1" data-toggle="tooltip" data-placement="left" title="Aplica Nota de Crédito">Aplica NC/Dev:</div>
<div class="col-md-2">
<asp:DropDownList CssClass="form-control input-sm" ID="AplicaNC" runat="server" AppendDataBoundItems="true" Style="height: 30px;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>

View File

@@ -682,7 +682,7 @@
</asp:Panel>
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible,DifPSSat" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
<Columns>
<%-- 0 --%>
<asp:TemplateField ItemStyle-Width="15px">

View File

@@ -1511,6 +1511,8 @@ Partial Class Compras_Compras
CargaFletesAgregados()
End If
InicializaOC()
'Valida si el IVA del XML es está bien calculado
@@ -2396,6 +2398,8 @@ Partial Class Compras_Compras
EstatusAlmacen = dr("EstatusAlmacen").ToString.ToEntero
DdlTipoCompra.SelectedValueExist(dr("CveTipoCompra"))
CveTipoConcepto = dr("CveTipoConcepto").ToString.ToEntero
ChkEsNoDeducible.Checked = Boolean.Parse(dr("NoDeducible").ToString)
'Select Case dr("PorcentajeIVA").ToString.ToDouble
' Case 0
' DdlIVA.SelectedValue = "1"
@@ -2620,6 +2624,7 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveContrato", GetType(Integer))
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
@@ -3612,6 +3617,7 @@ Partial Class Compras_Compras
tPSCodigo = String.Format("{1} - {0}", ValorXML(node, "descripcion").ToUpper.Trim.Replace(vbCrLf, " ").Replace(vbLf, " ").Replace("'", "''"), ValorXML(node, "noIdentificacion").Trim)
End If
'Alert(ValorXML(node, "ClaveProdServ").Trim)
If Version = "3.3" Then
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
@@ -3721,6 +3727,8 @@ Partial Class Compras_Compras
'AGREGA A TMPDT
AddPS(ValorXML(node, "cantidad").ToDouble, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CveSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS)
Next
End If
@@ -4484,6 +4492,17 @@ Partial Class Compras_Compras
'si el registro es manual, toma el mismo dato
If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal
For Each GvRow As GridViewRow In GvPS.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkEsNoDeduciblePS").Checked = False Then
EsNoDeducible = False
Exit For
End If
End If
Next
'Compra
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
LblAmortizacion.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtIEPS.Text.ToDouble, TxtOtrosImpuestos.Text.ToDouble,
@@ -10755,6 +10774,14 @@ Partial Class Compras_Compras
End If
If e.Row.DataKey("DifPSSat").ToEntero = 1 Then
'#e35b5a
e.Row.BackColor = Drawing.Color.FromArgb(1, 227, 91, 90)
e.Row.Attributes.Add("data-toggle", "tooltip")
e.Row.Attributes.Add("title", "El código del producto del SAT no es igual al código del producto registrado.")
End If
End If
End Sub
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting
@@ -11018,6 +11045,8 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("ImporteConImpuestos", GetType(Double))
TmpDT.Columns.Add("NoDeducible", GetType(Boolean))
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
TmpDTOriginal = New DataTable
TmpDTOriginal.Columns.Add("Consec", GetType(Integer))
TmpDTOriginal.Columns.Add("Cantidad", GetType(Decimal))

View File

@@ -329,7 +329,7 @@ Partial Class RH_CatCursos
Dim Archivo As String = $"Empresas/{UsuarioActual.CveEmpresa}/Formatos/CursosInvitados.rdlc"
If Not File.Exists($"{Server.MapPath("~")}/{Archivo}") Then
If Not File.Exists($"{Extensiones.DirectorioBaseEmpresas}/{Archivo}") Then
Archivo = "Empresas/Grales/Formatos/CursosInvitados.rdlc"
End If
@@ -613,7 +613,7 @@ Partial Class RH_CatCursos
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim objConstancias As New ClsConstancias
Dim DocumenBitArray As Byte() = Nothing
Dim RutaBase As String = Server.MapPath("~")
Dim RutaBase As String = Extensiones.DirectorioBaseEmpresas
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
@@ -650,7 +650,7 @@ Partial Class RH_CatCursos
Dim Contenido As String = "Buen día. Estimado(a) " & _Nombres & vbLf & vbLf & vbLf & vbLf & " Por medio de la presente, el departamento de Capital Humano de esta " & UsuarioActual.Empresa.Empresa & " le hace la cordial invitación para asistir al curso " & _Curso & " impartido por el capacitador " & _Capacitador & ", el día " & dia & " de " & mesArray(mes - 1) & " de " & año & " en lugar " & _Ubicacion & "." & vbLf & vbLf & vbLf & vbLf & "Esperamos contar con su asistencia."
If Not File.Exists(RutaArchivo) Then
RutaArchivo = $"{Server.MapPath("~")}\Empresas\Grales\Formatos\CursoInvitacion.docx"
RutaArchivo = $"{ Extensiones.DirectorioBaseEmpresas }\Empresas\Grales\Formatos\CursoInvitacion.docx"
End If
Dim params As New List(Of ReportParameter)
@@ -658,24 +658,22 @@ Partial Class RH_CatCursos
params.Add(New ReportParameter("Contenido", Contenido))
params.Add(New ReportParameter("Fecha", Today.ToString))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
Dim DtDatos As New DataTable
Return StreamPDF("Empresas/72/Formatos/CursoInvitacion.rdlc", DtDatos, params, "Invitación a curso", "PDF")
'Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
'Dim Tags As New List(Of TagsDocumentos)
Dim DtDatos As New DataTable
Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
Dim Tags As New List(Of TagsDocumentos)
Tags.Add(New TagsDocumentos("{Curso}", _Curso))
Tags.Add(New TagsDocumentos("{Contenido}", Contenido))
objGemBoxDocument.SustituirTags(Tags)
objGemBoxDocument.GuardarStreamPDF()
'Tags.Add(New TagsDocumentos("{Curso}", _Curso))
'Tags.Add(New TagsDocumentos("{Contenido}", Contenido))
''objGemBoxDocument.AgregarImagen(RutaLogo, 61.0, 53.0)
'objGemBoxDocument.SustituirTags(Tags)
'objGemBoxDocument.GuardarStream()
'Return objGemBoxDocument.GetBytesDocumento
Return objGemBoxDocument.GetBytesDocumento
End Function
@@ -795,12 +793,9 @@ Partial Class RH_CatCursos
ContenidoSB.AppendLine("")
ContenidoSB.AppendLine("</table>")
Dim BytesDocumento As Byte() = GenerarImvitacion(_Curso, _Capacitador, _Nombres, _CvePersonal, _Fecha, _Ubicacion)
MandaCorreo("Invitación a Curso " & Curso, _Correo, "", ContenidoSB.ToString, BytesDocumento)
Dim BytesDocumento As Byte() = GenerarImvitacion(_Curso, _Capacitador, _Nombres, _CvePersonal, _Fecha, _Ubicacion)
MandaCorreo("Invitación a Curso " & Curso, _Correo, "", ContenidoSB.ToString, BytesDocumento)
Contador = Contador + 1
Dim valor As Boolean = False

View File

@@ -1523,10 +1523,10 @@
<asp:DropDownList ID="DdlInfoTipoAplicacion" AutoPostBack="true" runat="server" Class="form-control select2me" Width="100%">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Infonavit(Movto Permanente)" Value="5000"></asp:ListItem>
<asp:ListItem Text="Infonavit(Porcentaje)" Value="5001"></asp:ListItem>
<asp:ListItem Text="Infonavit(Factor Descuento)" Value="5002"></asp:ListItem>
<asp:ListItem Text="Infonavit(Cuota Fija)" Value="5003"></asp:ListItem>
<asp:ListItem Text="Infonavit (Movto Permanente)" Value="5000"></asp:ListItem>
<asp:ListItem Text="Infonavit (Porcentaje)" Value="5001"></asp:ListItem>
<asp:ListItem Text="Infonavit (Factor Descuento)" Value="5002"></asp:ListItem>
<asp:ListItem Text="Infonavit (Cuota Fija)" Value="5003"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
@@ -1602,8 +1602,8 @@
<asp:DropDownList ID="DdlFonTipoAplicacion" runat="server" Class="form-control select2me" Width="100%">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Fonacot(Importe fijo)" Value="3001"></asp:ListItem>
<asp:ListItem Text="Fonacot(Por días Labarados)" Value="3002"></asp:ListItem>
<asp:ListItem Text="Fonacot (Importe fijo)" Value="3001"></asp:ListItem>
<asp:ListItem Text="Fonacot (Por días Laborados)" Value="3002"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
@@ -3538,7 +3538,7 @@
<asp:GridView ID="GvLicencias" Width="100%" runat="server" GridLines="None" BorderWidth="0" data-heighterror="330" data-freezecols="0" data-freezerows="1"
DataKeyNames="CveLicencia,Licencia,FechaExpedicion,FechaVencimiento"
DataKeyNames="CveLicencia,Licencia,FechaExpedicion,FechaVencimiento,Estatus"
CssClass=" table table-striped table-advance table-hover Widthall" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>

View File

@@ -4671,12 +4671,17 @@ Partial Class RH_Personal
Dim Fecha As String = DateTime.Now.ToString("dd/MM/yyyy")
Dim Solicitante As String = UsuarioActual.Nombre
Dim anio As Integer = GvRow.DataKey("FechaInicio").ToDate().Year
Dim FechaPeriodo As String = GvRow.DataKey("Periodo")
If Periodoingreso > PeriodoInicio Then
anio = anio - 1
End If
Dim FechaPeriodo As String = String.Format("{0:dd/MM}/{1}", fechaIngreso, anio)
End If
If File.Exists(RutaFormato) Then
Dim objGemDocument As New clsGemBoxDocument(RutaFormato)
@@ -6123,10 +6128,36 @@ Partial Class RH_Personal
End If
If TxtFIPrimaVacacional.Text = "0" Or TxtFIPrimaVacacional.Text = "" Or TxtFIAguinaldo.Text = "-1" Then
TxtFIPrimaVacacional.Text = "25"
End If
End If
TxtFISalariodiarioImss.Text = TxtSalarioCotizado.Text
TxtFactordeIntegracion.Text = ""
TxtFISalarioDiarioIntegrado.Text = ""
TxtFISalarioDiarioIntegrado.Text = ""
Dim objRH As New ClsRH
If objRH.VacacionesResumenGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
If objRH.DtResultados.Rows.Count > 0 Then
If objRH.DtResultados.Rows.Count > 0 Then
TxtFIDiasVacaciones.Text = objRH.DtResultados(0)("Dias").ToString
Else
TxtFIDiasVacaciones.Text = "6"
End If
Else
End If
End If
objRH.Dispose()
RegistraScript("$('#DmodalFactordeIntegraccion').modal()")
UpFactordeintegracion.Update()
End Sub

View File

@@ -181,7 +181,7 @@ Partial Class RH_RepPersonalInconsistencias
Dim ObjAF As New ClsAF()
If ObjAF.GetLicenciasVencidas(-1, -1, UsuarioActual.CveEmpresa, Estatus:=1) Then
GvLicencias.DataSource = ObjAF.DtResultados
GvLicencias.DataSource = ObjAF.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
Else
GvLicencias.DataSource = Nothing

View File

@@ -80,6 +80,10 @@