This commit is contained in:
rakcsle
2021-02-02 12:17:33 -07:00
53 changed files with 21977 additions and 1882 deletions

View File

@@ -96,10 +96,10 @@ public partial class AF_CatTiposServiciosActividades : ClsPaginas
}
else
{
if (ObjAF.UpdateActividades(DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text))
{
Alert("Se actualizó la Actividad del Tipo de Servicio correctamente");
}
//if (ObjAF.UpdateActividades(DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text,))
//{
// Alert("Se actualizó la Actividad del Tipo de Servicio correctamente");
//}
}
ObjAF.Dispose();
CargaDatos();

View File

@@ -47,21 +47,21 @@ Partial Class AF_ValesCombustible
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
If UsuarioActual.Empresa.GralSoloProyecto Then
'If UsuarioActual.Empresa.GralSoloProyecto Then
LtlSubProyecto.Text = "Proyecto"
DdlSubProyecto.Items.Clear()
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
DivProyecto.Visible = False
'DdlProyecto.Items(0).Text = ""
Else
DivProyecto.Visible = True
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
DdlProyecto.DataBind()
DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
' LtlSubProyecto.Text = "Proyecto"
' DdlSubProyecto.Items.Clear()
' DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
' DdlSubProyecto.DataBind()
' DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
' DivProyecto.Visible = False
' 'DdlProyecto.Items(0).Text = ""
'Else
DivProyecto.Visible = True
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
DdlProyecto.DataBind()
DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
'End If
DdlCombustible.DataSource = GlobalDTCombustibles(UsuarioActual.CveEmpresa)

View File

@@ -372,10 +372,20 @@
</td>
</tr>
</table>
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6">
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvGarantiasDetalle.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div style="overflow-y: auto; height: 400px; width:1200px;">
<asp:GridView ID="GvGarantiasDetalle" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<div style="overflow-y: auto; height: 400px; width: 1200px;" runat="server">
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
@@ -398,6 +408,7 @@
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
@@ -406,6 +417,9 @@
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnExportarExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>

View File

@@ -246,6 +246,13 @@ Partial Class Acumuladores_CatFoliosGarantia
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue)
End Sub
End Sub
Protected Sub BtnExportarExcel_Click(sender As Object, e As EventArgs)
GvGarantiasDetalle.ExportToExcelG(LblFolio.Text, "Ajustes de Garantía", UsuarioActual)
'GvGarantiasDetalle.ExportToExcelx(LblFolio.Text)
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
End Class

View File

@@ -540,6 +540,33 @@ Public Class ClsNominas
Return Retorno
End Function
Public Function PA_Nom_NominasAutorizarUP(cvePersonal As Int32, cvePeriodo As Int32, salarioDiario As Decimal, sBC As Decimal, sDI As Decimal, horasDobles As Int16, horasTriples As Int16, total As Double, subTotal As Double, diasPagados As Double, diasFaltados As Int32, diasVacaciones As Int32, diasIncapacidad As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Nom_NominasAutorizarUP", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonal", SqlDbType.Int).Value = cvePersonal
.Add("@CvePeriodo", SqlDbType.Int).Value = cvePeriodo
.Add("@SalarioDiario", SqlDbType.SmallMoney).Value = salarioDiario
.Add("@SBC", SqlDbType.SmallMoney).Value = sBC
.Add("@SDI", SqlDbType.SmallMoney).Value = sDI
.Add("@HorasDobles", SqlDbType.SmallInt).Value = horasDobles
.Add("@HorasTriples", SqlDbType.SmallInt).Value = horasTriples
.Add("@Total", SqlDbType.Float).Value = total
.Add("@SubTotal", SqlDbType.Float).Value = subTotal
.Add("@DiasPagados", SqlDbType.Float).Value = diasPagados
.Add("@DiasFaltados", SqlDbType.Int).Value = diasFaltados
.Add("@DiasVacaciones", SqlDbType.Int).Value = diasVacaciones
.Add("@DiasIncapacidad", SqlDbType.Int).Value = diasIncapacidad
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al autorizar la nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function AddNom_Nominas(FolioNom As Integer, CveNominaTipo As Integer, CvePersonal As Integer, CvePeriodo As Integer, SubTotal As Double, Descuento As Double, RetISR As Double, Total As Double,
CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, Fecha As Date, MotivoDescuento As String, Observaciones As String,
Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double,

View File

@@ -5124,7 +5124,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
'PaginaDict.Add("/Compras/Efacturas.aspx".ToUpper(), 2007)
'PaginaDict.Add("/Compras/Compras.aspx".ToUpper(), 2008)
@@ -7468,11 +7468,11 @@ Public Class ClsPaginas
' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
'End If
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126, 158) Then
params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
End If
'DATOS PARA DESCUENTO
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126, 158) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString))
Else
@@ -7881,6 +7881,7 @@ Public Class ClsPaginas
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/Nomina/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjNomina.SerieFolio)
Dim cQr As Byte() = Nothing
Try
Dim CadenaOriginalCFD As String = "||1.0|" + FolioFiscal + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|" + SelloCFDi + "|" + NoSerieCertificado + "||"
@@ -7897,7 +7898,7 @@ Public Class ClsPaginas
RptParametro.Add(New ReportParameter("RFC", ObjPersonal.RFC))
RptParametro.Add(New ReportParameter("CURP", ObjPersonal.CURP))
RptParametro.Add(New ReportParameter("NombreCompleto", ObjPersonal.NombreCompleto))
RptParametro.Add(New ReportParameter("NombreCompleto", String.Format("{0} {1} {2}", ObjPersonal.Nombres, ObjPersonal.APaterno, ObjPersonal.AMaterno).Trim()))
RptParametro.Add(New ReportParameter("Regimen", ObjPersonal.RegimenContratacion))
RptParametro.Add(New ReportParameter("RiesgoPuesto", ObjPersonal.RiesgoPuesto))
@@ -7924,23 +7925,18 @@ Public Class ClsPaginas
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago))
RptParametro.Add(New ReportParameter("FormaPago", ObjNomina.FormaPago))
RptParametro.Add(New ReportParameter("MetodoPago", """PUE"" (Pago en una sola exhibición)"))
RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)"))
RptParametro.Add(New ReportParameter("Cantidad", "1"))
RptParametro.Add(New ReportParameter("Unidad", "SERVICIO"))
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
RptParametro.Add(New ReportParameter("PU", ObjNomina.SubTotal.ToString))
RptParametro.Add(New ReportParameter("Importe", ObjNomina.SubTotal.ToString))
RptParametro.Add(New ReportParameter("SubTotal", ObjNomina.SubTotal.ToString))
RptParametro.Add(New ReportParameter("Descuentos", ObjNomina.Descuento.ToString))
RptParametro.Add(New ReportParameter("ISR", ObjNomina.RetISR.ToString))
RptParametro.Add(New ReportParameter("Total", ObjNomina.Total.ToString))
RptParametro.Add(New ReportParameter("Total", ObjNomina.Total.ToString()))
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras))
RptParametro.Add(New ReportParameter("Clave", ""))
RptParametro.Add(New ReportParameter("Clave", "84111505"))
Else
TieneError = True
End If
@@ -7957,7 +7953,28 @@ Public Class ClsPaginas
End If
End If
'PERCECIONES - DEDUCCIONES
If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
DTPercepciones = ObjNomina.DtResultados.FiltraParametros("(Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND Importe <>0 AND EsPadre = 1 AND SoloVisible =0")
DTDeducciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'D' AND Importe >0 AND EsPadre = 1 AND SoloVisible =0")
For Each row As DataRow In DTPercepciones.Rows
If row("Tipo").ToString() = "D" Then
row("Codigo") = row("Codigo").ToString().Replace("D", "OP")
row("Importe") = row("Importe").ToString().ToDecimal() * -1
End If
Next
Else
DTPercepciones = Nothing
DTDeducciones = Nothing
End If
RptParametro.Add(New ReportParameter("PU", DTPercepciones.SUM("Importe").ToString()))
RptParametro.Add(New ReportParameter("Importe", DTPercepciones.SUM("Importe").ToString()))
RptParametro.Add(New ReportParameter("SubTotal", DTPercepciones.SUM("Importe").ToString()))
RptParametro.Add(New ReportParameter("Descuentos", DTDeducciones.SUM("Importe", "SATCveConcepto <> '002'").ToString()))
RptParametro.Add(New ReportParameter("ISR", DTDeducciones.SUM("Importe", "SATCveConcepto = '002'").ToString()))
'Timbrado
RptParametro.Add(New ReportParameter("FolioFiscal", FolioFiscal))
RptParametro.Add(New ReportParameter("CertificadoSAT", NoSerieCertificado))
@@ -7967,16 +7984,18 @@ Public Class ClsPaginas
RptParametro.Add(New ReportParameter("CadenaOriginal", CadenaOriginalCFD))
RptParametro.Add(New ReportParameter("QR", ImgCBB.ToString))
'PERCECIONES - DEDUCCIONES
If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
DTPercepciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'P' AND EsPadre = 1")
DTDeducciones = ObjNomina.DtResultados.FiltraParametros("Tipo = 'D' AND EsPadre = 1")
Else
DTPercepciones = Nothing
DTDeducciones = Nothing
End If
Dim LSRds As New List(Of ReportDataSource)
Dim rds2 = New ReportDataSource()
Dim limagenes = New List(Of utilImage)()
limagenes.Add(New utilImage(cQr))
rds2.Name = "dsImagenes"
rds2.Value = limagenes
LSRds.Add(rds2)
Dim RptDS As New ReportDataSource
RptDS.Name = "DsOC"
RptDS.Value = DTPercepciones
@@ -8002,7 +8021,7 @@ Public Class ClsPaginas
End Try
End If
Else
ImprimirPDF(String.Format("{0}\Formatos\Nomina.rdlc", RutaEmpresa), LSRds, RptParametro, ObjNomina.SerieFolio)
'ImprimirPDF(String.Format("{0}\Formatos\Nomina.rdlc", RutaEmpresa), LSRds, RptParametro, ObjNomina.SerieFolio)
End If
Else
Alert("Ocurrio un error al obtener los datos de la Nomina")
@@ -8018,6 +8037,13 @@ Public Class ClsPaginas
Return Retorno
End Function
Public Class utilImage
Public Sub New(imagenByte As Byte())
Me.ImagenByte = imagenByte
End Sub
Public Property ImagenByte As Byte()
End Class
#End Region
#Region "PDF PAGOS"

View File

@@ -1,3 +0,0 @@
Log tareas:
Llamada de consulta: 11 minutos
Temperatura comienzo: 7 pm

View File

@@ -249,13 +249,16 @@ Public Class LogicNominas
If DtDeducciones IsNot Nothing AndAlso DtDeducciones.Rows.Count > 0 Then
For Each Row As DataRow In DtDeducciones.Rows
If Row("Importe").ToString().ToDecimal > 0 Then
If Row("Importe").ToString().ToDecimal <> 0 Then
If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For
If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 Then
ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
.ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()})
ElseIf Row("Importe").ToString().ToDecimal() < 0 AndAlso Row("Concepto").ToString() = "Ajuste al neto" Then
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "999", .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
.Importe = Row("Importe").ToString().ToDecimal() * -1})
Else
ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = Row("SATCveConcepto").ToString(),
.Clave = Row("Codigo").ToString(),

View File

@@ -1775,7 +1775,7 @@ Namespace Modelos
AlmacenEntrada = CveAlmacenDestino
CveMovimientoEntrada2 = ObjInventario.AddMovimiento(AlmacenEntrada, 9, 1, Me.Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=-1,
CveMovimientoRelacionado:=CveMovimientoSalida2, CveOS:=CveOS, Modulo:="Mod/OS")
CveMovimientoRelacionado:=CveMovimientoSalida2, CveOS:=CveOS, Modulo:="Mod/OS1")
FolioEntrada = ObjInventario.Folio
If CveMovimientoEntrada2 <= 0 Then
@@ -1803,7 +1803,7 @@ Namespace Modelos
AlmacenEntrada = CveAlmacenDestino
CveMovimientoEntrada3 = ObjInventario.AddMovimiento(AlmacenEntrada, 3, 1, Me.Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=-1,
CveMovimientoRelacionado:=CveMovimientoSalida3, CveOS:=CveOS, Modulo:="Mod/OS")
CveMovimientoRelacionado:=CveMovimientoSalida3, CveOS:=CveOS, Modulo:="Mod/OS2")
FolioEntrada = ObjInventario.Folio
If CveMovimientoEntrada3 <= 0 Then
@@ -1842,7 +1842,7 @@ Namespace Modelos
'MOVIMIENTO DE SALIDA POR TRASPASO DEL ALMACEN DE CONSIGNACION
CveMovimientoSalidaConsignacion = ObjInventario.AddMovimiento(CveAlmacenExistenciasContrato, 8, 1, Me.Fecha, -1, Me.CveUsuario, Me.CveEmpresa, -1, Me.CveVenta, -1, -1, Modulo:="Mod/E")
CveMovimientoSalidaConsignacion = ObjInventario.AddMovimiento(CveAlmacenExistenciasContrato, 8, 1, Me.Fecha, -1, Me.CveUsuario, Me.CveEmpresa, -1, Me.CveVenta, -1, -1, Modulo:="Mod/CV")
If CveMovimientoSalidaConsignacion > 0 Then
Dim CveProducto As Integer
Dim CveUnidad As Integer
@@ -1885,7 +1885,7 @@ Namespace Modelos
'ENTRADA POR TRASPASO A GENERAL
CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(Me.CveAlmacenOrigenContrato, 9, 1, Me.Fecha, -1, Me.CveUsuario, Me.CveEmpresa, -1, Me.CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalidaConsignacion, Modulo:="Mod/E")
CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(Me.CveAlmacenOrigenContrato, 9, 1, Me.Fecha, -1, Me.CveUsuario, Me.CveEmpresa, -1, Me.CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalidaConsignacion, Modulo:="Mod/E2")
If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
@@ -1899,7 +1899,7 @@ Namespace Modelos
End If
'SALIDA GENERAL
CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(Me.CveAlmacenOrigenContrato, 3, 1, Me.Fecha, -1, Me.CveUsuario, Me.CveEmpresa, -1, Me.CveVenta, -1, -1, Modulo:="Mod/E")
CveMovimientoEntradaGeneral = ObjInventario.AddMovimiento(Me.CveAlmacenOrigenContrato, 3, 1, Me.Fecha, -1, Me.CveUsuario, Me.CveEmpresa, -1, Me.CveVenta, -1, -1, Modulo:="Mod/E3")
If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
@@ -3610,7 +3610,7 @@ Namespace Modelos
Dim OcurrioError As Boolean = False
If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") AndAlso (DtRecepcionUsados IsNot Nothing Or DtAjustes IsNot Nothing) Then
If factura.CveAlmacenRecepcionUsados > 0 Then
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(factura.CveAlmacenRecepcionUsados, 2, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Mod/E")
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(factura.CveAlmacenRecepcionUsados, 2, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Mod/E4")
Dim DtTemporal As DataTable = Nothing
Dim DtTemporalMovimientosDetalle As DataTable = Nothing
@@ -3667,7 +3667,7 @@ Namespace Modelos
If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
If factura.CveAlmacen > 0 AndAlso DtInventario.Rows.Count > 0 Then
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(factura.CveAlmacen, 3, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Mod/E")
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(factura.CveAlmacen, 3, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Mod/E5")
If CveMovimientoInventario <= 0 Then
OcurrioError = True
@@ -3952,7 +3952,7 @@ Namespace Modelos
Dim ContadorMovtosDetalles = 0
'Creamos el movimiento
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado)
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado,, Modulo:="Mod/M2")
If CveMovimientoInventario > 0 Then
@@ -4800,7 +4800,7 @@ Namespace Modelos
'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION
If ObjFactura.SaldoAlmacen <> 0 Then
'SALIDA DE ALMACEN - SALIDA POR TRASPASO CUANDO ES REMISION - DEVOLUCION (SI ES TRASPASO Y TIENE CONTRATO NO HACE DEVOLUCIóN)
CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenDevolucion, CveConceptoDevolucion, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1)
CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenDevolucion, CveConceptoDevolucion, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, Modulo:="Mod/CV1")
Folio = ObjInventario.Folio
If CveMovimientoDevolucion > 0 Then
@@ -5314,11 +5314,11 @@ Namespace Modelos
End If
'SALIDA GENERAL
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem)
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem, Modulo:="Mod/ExAR1")
FolioMovimientoSalidaDevRem = ObjInventario.Folio
'ENTRADA ADELANTADO
CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion)
CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion, Modulo:="Mod/ExAR2")
FolioMovimientoEntradaDevRem = ObjInventario.Folio
If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then
@@ -5397,11 +5397,11 @@ Namespace Modelos
Dim FolioMovimientoEntradaDevRem As Integer = 0
'SALIDA DE (ENTREGA POR ADELANTADO)
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveRemision, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenDestino)
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveRemision, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Mod/CancExAR1")
FolioMovimientoSalidaDevRem = ObjInventario.Folio
'ENTRADA A (ALMACEN GENERAL)
CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveRemision, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDestino)
CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveRemision, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Mod/CancExAR2")
FolioMovimientoEntradaDevRem = ObjInventario.Folio
If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then
@@ -5484,7 +5484,7 @@ Namespace Modelos
For Each Dr As DataRow In DtTempApartados.Rows
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero)
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="Mod/Apar1")
FolioSalida = ObjInventario.Folio
CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero
@@ -5511,7 +5511,7 @@ Namespace Modelos
For Each Dr1 As DataRow In DtTraspasos.Rows
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString.ToEntero
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente)
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente, Modulo:="Mod/Apar2")
FolioEntrada = ObjInventario.Folio
If Not CveMovimientoEntradaApartado > 0 Then

View File

@@ -0,0 +1,9 @@
Imports Microsoft.VisualBasic
Namespace Models.Request
Public Class RequestLogin
Public Property UserName As String
Public Property Password As String
End Class
End Namespace

View File

@@ -0,0 +1,10 @@
Imports Microsoft.VisualBasic
Namespace Models.Response
Public Class ResponseGenericModel(Of T)
Public Property IsSuccess As Boolean
Public Property Msg As String
Public Property Result As T
End Class
End Namespace

View File

@@ -0,0 +1,93 @@
Imports Microsoft.VisualBasic
Imports Newtonsoft.Json
Namespace Models.Response
Public Class ResponseLogin
Public Property CveUsuario As Long
Public Property Usuario As String
Public Property Nombre As String
Public Property Correo As String
Public Property CveEmpresa As Long
Public Property Empresa As String
Public Property CvePlataforma As Long
Public Property Estatus As Boolean
Public Property CveRol As Integer
Public Property Rol As String
Public Property CveToken As Long
Public Property AccessToken As String
Public Property RefreshToken As String
Public Property UsuarioModulos As List(Of UsuarioModulo)
Public Property UsuarioEmpresas As List(Of UsuarioEmpresa)
Public Property EmpresaFuncionalidades As List(Of EmpresaFuncionalidad)
End Class
Public Class UsuarioModulo
Public Property CveModulo As Long
Public Property Modulo As String
Public Property CveUsuario As Long
Public Property Agrupacion As String
Public Property Descripcion As String
Public Property Liga As String
Public Property CveModuloAcceso As Long
Public Property CveProcesoAcceso As Long
Public Property Permitir As Long
Public Property Estilo As String
Public Property Padre As String
Public Property CvePadre As Long
Public Property Usuario As String
Public Property CveRol As Long
Public Property Rol As String
Public Property CvePlataforma As Long
Public Property Parametros As String
End Class
Public Class UsuarioEmpresa
Public Property Tipo_CentroCosto As Long
Public Property CveEmpresa As Long
Public Property Empresa As String
Public Property CveUsuario As Long
Public Property Usuario As String
Public Property Contraseña As String
Public Property CveCliente As Long
Public Property Cliente As String
Public Property CveProveedor As Long
Public Property Proveedor As String
Public Property FechaUltimoAcceso As DateTime
Public Property Nombre As String
Public Property CveRol As Long
Public Property Rol As String
Public Property Telefono As String
Public Property Correo As String
Public Property Estatus As Boolean
Public Property FechaIng As DateTime
Public Property EsSupervisorRH As Boolean
Public Property CveSupervisa As Long
Public Property CveAutoriza As Long
Public Property CvePersonal As Long
Public Property CveVendedor As Long
Public Property CvePlataforma As Long
Public Property ComprasProgramadas As Long
Public Property ProveedoresResponsables As Long
Public Property CveSubProyecto As Long
Public Property CveUsuarioIng As Long
Public Property CveEncuestaCRM As Long
<JsonIgnore>
Public Property EmpresaFuncionalidades As List(Of EmpresaFuncionalidad)
Public Function Funcionalidad(ByVal CveFuncionalidad As Long) As String
Return If(EmpresaFuncionalidades IsNot Nothing AndAlso EmpresaFuncionalidades.FirstOrDefault(Function(x) x.CveFuncionalidad = CveFuncionalidad) IsNot Nothing, EmpresaFuncionalidades.FirstOrDefault(Function(x) x.CveFuncionalidad = CveFuncionalidad).Valor, "")
End Function
End Class
Public Class EmpresaFuncionalidad
Public Property CveEmpresa As Long
Public Property CveFuncionalidad As Long
Public Property Valor As String
Public Property Descripción As String
Public Property Funcionalidad As String
End Class
End Namespace

36
App_Code/TimbradoB.vb Normal file
View File

@@ -0,0 +1,36 @@
Imports Microsoft.VisualBasic
Public Class TimbradoB
'Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
' Dim Retorno As Boolean = False
' Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
' If CvePACEspecial <> -1 Then tCvePAC = CvePACEspecial
' Dim objs As ADSTimbrado.TimbradoEmpresa
' Dim result = ADSTimbrado.Timbrado.TimbrarFactura(Ventas, objs, ADSTimbrado.PacTimbrado.PADEv)
' Retorno = result.isOK
' If result.isOK Then
' Else
' End If
' Return Retorno
'End Function
End Class
'Public Class TimbradoEmpresa
' Inherits ADSTimbradoLibrary.TimbradoEmpresa
' Public Overrides Function UpdateEstatusFactura(FolioFiscal As String, ObjCFDITimbre As ADSTimbradoLibrary.CFDITimbre, facturaCFDI As ADSTimbradoLibrary.Factura, CvePAC As Integer) As String
' Throw New NotImplementedException()
' End Function
' Public Overrides Function Timbre() As String
' Throw New NotImplementedException()
' End Function
'End Class

View File

@@ -13,11 +13,14 @@
<li>
<asp:HyperLink ID="LnkAgregar" NavigateUrl="/CRM/EmpresaCRM.aspx" runat="server" Target="_blank"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar</span></asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkCargaProspectos" runat="server" OnClick="LnkCargaProspectos_Click"><i class="fa fa-plus"></i><span style="padding-left:5px;">Cargar Prospectos</span></asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
@@ -47,9 +50,9 @@
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-right: 10px; margin-top: 18px;margin-bottom: 5px;" align="right">
<div class="row" style="margin-right: 10px; margin-top: 18px; margin-bottom: 5px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -59,7 +62,7 @@
<Columns>
<asp:TemplateField HeaderText="Empresa" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink ID="HplEmpresa" Target="_blank" runat="server" Text='<%# Eval("Empresa")%>' data-toggle="tooltip" title="Ir a Detalle"> </asp:HyperLink>
<asp:HyperLink ID="HplEmpresa" Target="_blank" runat="server" Text='<%# Eval("Empresa")%>' data-toggle="tooltip" title="Ir a Detalle"> </asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RFC" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
@@ -72,21 +75,21 @@
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Medio de Captacion" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<asp:TemplateField HeaderText="Medio de Captacion" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Contactos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField>
<asp:TemplateField HeaderText="Contactos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblNoContactos" runat="server" Text='<%# Eval("NoContactos")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Acercamientos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
</asp:TemplateField>
<asp:TemplateField HeaderText="Acercamientos" ItemStyle-Width="5%" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblNoAcercamientos" runat="server" Text='<%# Eval("NoAcercamientos")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:g}" />
<asp:TemplateField HeaderText="Usuario que Ingresó" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
@@ -95,14 +98,49 @@
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="10%" HeaderText="Comandos">
<ItemTemplate>
<asp:HyperLink ID="HplEditar" Target="_blank" runat="server" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="Sí" />
<asp:HyperLink ID="HplEditar" Target="_blank" runat="server" data-toggle="tooltip" CssClass="btn btn-circle btn-sm green" title="Editar" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
<asp:LinkButton ID="LnkEliminar" runat="server" CommandName="Delete" AlternateText="Eliminar" data-toggle="confirmation" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-popout="true" data-original-title="¿Eliminar la Empresa tambien eliminara los Contacto de esta, seguro que desea continuar?" data-btn-ok-label="Sí" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivCargasMasivas" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpCargasMasivas" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Cargar Prospectos</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2" style="margin-left: 30px;text-align: left">
<asp:Button ID="BtnDescargar" runat="server" OnClick="BtnDescargar_Click" CssClass="btn btn-warning" Text="Descargar Formato" />
</div>
</div>
<br />
<div class="row">
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 50px;">
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAgregarProspectos" OnClick="BtnAgregarProspectos_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnDescargar"/>
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,11 +1,12 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using GemBox.Spreadsheet;
using Extensiones;
public partial class CRM_CatEmpresasCRM : ClsPaginas
@@ -124,4 +125,172 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas
CargaMediosCaptacion();
UPFiltros.Update();
}
protected void LnkCargaProspectos_Click(object sender, EventArgs e)
{
RegistraScript(String.Format("$('#{0}').modal();", "DivCargasMasivas"));
}
protected void BtnDescargar_Click(object sender, EventArgs e)
{
string Directorio = ModExtensiones.DirectorioBaseEmpresas + "Empresas\\Grales\\Formatos\\FormatoDeProspectos.xlsx";
FileInfo Archivo = new FileInfo(Directorio);
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name);
Response.AddHeader("Content-Length", Archivo.Length.ToString());
Response.ContentType = "text/plain";
Response.Flush();
Response.TransmitFile(Archivo.FullName);
Response.End();
}
protected void BtnAgregarProspectos_Click(object sender, EventArgs e)
{
if( TxtExcel.getfiles().Archivos.Count > 0 )
{
Archivo file = TxtExcel.getfiles().Archivos[0];
string Directorio = Server.MapPath("~") + file.patch;
DataTable dt = ReadExcelFile(Directorio + file.filename, true);
DataRowCollection Rows = dt.Rows;
ClsCRM ObjCRM = new ClsCRM();
ObjCRM.IniciaTransacSQL();
bool TieneError = false;
foreach (DataRow row in Rows)
{
string Proceso = row["Proceso"].ToString();
string NombreEmpresa = row["Nombre de la empresa"].ToString();
string RFC = row["RFC"].ToString();
string Mail = row["Mail"].ToString();
string MedioCaptacion = row["Medio de Captación"].ToString();
string Agente = row["Agente"].ToString();
string Sucursal = row["Sucursal"].ToString();
string Giro = row["Giro"].ToString();
string ContactoPrincipal = row["Contacto Principal"].ToString();
string TelOficina = row["Teléfono de Oficina"].ToString();
string Celular = row["Celular"].ToString();
string Correo = row["Correo"].ToString();
int CveMedioCaptacion = -1;
if (ObjCRM.GetMedioCaptacion(UsuarioActual.CveEmpresa))
{
DataRow MediosCaptacion = ObjCRM.DtResultados.FiltroPrimero(String.Format("MedioCaptacion = '{0}'",MedioCaptacion));
if(MediosCaptacion != null)
{
CveMedioCaptacion = MediosCaptacion["CveMedioCaptacion"].ToString().ToEntero();
}else
{
Alert(String.Format("El medio de captación '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
}
int CveVendedor = -1;
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("Vendedor = '{0}'",Agente));
if (Vendedor != null)
{
CveVendedor = Vendedor["CveVendedor"].ToString().ToEntero();
}else
{
Alert(String.Format("El vendedor '{0}' no fue encontrado", MedioCaptacion), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
int CveSubProyecto = -1;
DataRow SubProyecto = get_GlobalDTSubProyectos(-1,CveEmpresa:UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("SubProyecto = '{0}'",Sucursal));
if(SubProyecto != null)
{
CveSubProyecto = SubProyecto["CveSubProyecto"].ToString().ToEntero();
}else
{
Alert(String.Format("El SubProyecto '{0}'", Sucursal), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
int CveGiro = -1;
DataRow GiroDt = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("ClienteClasificacion = '{0}'", Giro));
if (GiroDt != null)
{
CveGiro = GiroDt["CveClienteClasificacion"].ToString().ToEntero();
}
else
{
Alert(String.Format("El Giro de Empresa '{0}'", Giro), ModExtensiones.TipoMensaje.MsgAdvertencia);
TieneError = true;
break;
}
TieneError = (!(ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, -1, CveVendedor, CveSubProyecto, Mail, CveGiro) > 0));
}
if (TieneError)
{
ObjCRM.RollBack();
}else
{
ObjCRM.Commit();
Alert("Prospectos agregados correctamente");
TxtExcel.Text = "";
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivCargasMasivas"));
}
ObjCRM.Dispose();
}
}
private DataTable ReadExcelFile(string flatFilePath, bool firstRowHasHeaders)
{
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet());
ExcelFile excelFile = ExcelFile.Load(flatFilePath);
int unnamed = 0;
int cols;
string[] columns;
int curRow = 0;
int curCol = 0;
DataTable dataTable = new DataTable();
ExcelWorksheet worksheet = excelFile.Worksheets[0];
for (cols = 0; cols <= worksheet.Rows[0].AllocatedCells.Count - 1; cols++)
{
if (firstRowHasHeaders)
{
if (worksheet.Rows[0].Cells[cols].Value != null)
dataTable.Columns.Add(worksheet.Rows[0].Cells[cols].Value.ToString().Trim());
else
dataTable.Columns.Add("Unnamed Column " + (System.Threading.Interlocked.Increment(ref unnamed)));
curRow = 1;
}
else
dataTable.Columns.Add("Column " + (cols + 1));
}
while (curRow < worksheet.Rows.Count)
{
columns = new string[cols - 1 + 1];
for (curCol = 0; curCol <= cols - 1; curCol++)
{
if (worksheet.Rows[curRow].Cells[curCol].Value == null)
columns[curCol] = "";
else
columns[curCol] = worksheet.Rows[curRow].Cells[curCol].Value.ToString();
}
dataTable.Rows.Add(columns);
curRow += 1;
}
return dataTable;
}
}

View File

@@ -252,6 +252,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
VerificaPermisos();
CargaClasificaciones();
DdlPS.setEsWebService(true);
DdlPS.SelectedText = "Seleccione";
DdlPS.SelectedValue = "-1";
}
}
@@ -1516,6 +1518,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
if ((UsuarioActual.CveVendedor != CveVendedor))
{
BtnGuardarEmpresa.Visible = false;
BtnEliminarEmpresa.Visible = false;
BtnAgregarContacto.Visible = false;
//LnkAgregarAcercamiento.Visible = false;
DivAccionesBitacora.Visible = false;

View File

@@ -12585,6 +12585,9 @@ Partial Class Compras_Compras
TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDouble + tPU
TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDouble + ImporteAjuste
TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDouble() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDouble()).RoundAD(2)
'Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos)
'Row("IEPSPSPorcentaje") = PorcentajeIEPS
TmpDT.AcceptChanges()
End If

View File

@@ -1153,29 +1153,7 @@ Partial Class PopUpVerFactura
End If
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso (Vta.DtDocumentosRelacionados Is Nothing OrElse Vta.DtDocumentosRelacionados.Rows.Count = 0) Then
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
Vta.DtNCVinculadas = ObjVentas.DtResultados
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados '.FiltraParametros("FolioFiscal IS NOT NULL")
If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
If Vta.TipoDocto.Contiene("Ing") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "01"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
End If
If Vta.TipoDocto.Contiene("Egs") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "01"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
End If
If Vta.TipoDocto.Contiene("Dev") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
End If
End If
End If
End If
End If
'If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
@@ -1218,6 +1196,29 @@ Partial Class PopUpVerFactura
End If
End If
End If
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso (Vta.DtDocumentosRelacionados Is Nothing OrElse Vta.DtDocumentosRelacionados.Rows.Count = 0) Then
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
Vta.DtNCVinculadas = ObjVentas.DtResultados
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados '.FiltraParametros("FolioFiscal IS NOT NULL")
If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
If Vta.TipoDocto.Contiene("Ing") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "01"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
End If
If Vta.TipoDocto.Contiene("Egs") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "01"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
End If
If Vta.TipoDocto.Contiene("Dev") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
End If
End If
End If
End If
'End If

View File

@@ -250,7 +250,7 @@
<asp:TemplateField HeaderText="Agregar">
<ItemTemplate>
<%--<asp:Image ID="ImgAgregar" runat="server" Style="cursor: pointer;" Visible='<%# Eval("CveProveedor").ToString <> "" %>' ToolTip="Agregar Factura" ImageUrl="/Imagenes/Nota.gif" Height="18px" />--%>
<asp:HyperLink ID="HplAgregar" runat="server" CssClass="btn btn-circle btn-sm green" Visible='<%# Eval("CveProveedor").ToString <> "" %>' data-toggle="tooltip" title="Agregar Factura" Target="_blank"><i class="fa fa-plus"></i></asp:HyperLink>
<asp:HyperLink ID="HplAgregar" runat="server" CssClass="btn btn-circle btn-sm green" Visible='<%# Eval("CveProveedor").ToString <> "" %>' data-toggle="tooltip" title="Agregar Factura" rel="opener" Target="_blank"><i class="fa fa-plus"></i></asp:HyperLink>
<asp:LinkButton ID="LnkAgregarPago" runat="server" OnClick="LnkAgregarPago_Click" CssClass="btn btn-sm blue" Visible="false" data-toggle="tooltip" title="Vincular Pago"><i class="fa fa-check"></i></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -4,20 +4,6 @@
<ReportItems>
<Rectangle Name="Rectangle1">
<ReportItems>
<Image Name="Image1">
<Source>Embedded</Source>
<Value>Logo</Value>
<Sizing>FitProportional</Sizing>
<Top>0.41929cm</Top>
<Left>1.2827cm</Left>
<Height>3.23567cm</Height>
<Width>4.49779cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@@ -41,7 +27,6 @@
<Left>0.381cm</Left>
<Height>0.6cm</Height>
<Width>1.74625cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -60,7 +45,7 @@
<Left>4.21416cm</Left>
<Height>2.78048cm</Height>
<Width>2.21979cm</Width>
<ZIndex>2</ZIndex>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -91,7 +76,7 @@
<Left>0.28575cm</Left>
<Height>0.6cm</Height>
<Width>3.2225cm</Width>
<ZIndex>3</ZIndex>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -107,7 +92,7 @@
<Left>0.28575cm</Left>
<Height>0cm</Height>
<Width>3.2225cm</Width>
<ZIndex>4</ZIndex>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -140,7 +125,7 @@
<Left>0.28575cm</Left>
<Height>0.6cm</Height>
<Width>3.09903cm</Width>
<ZIndex>5</ZIndex>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -156,7 +141,7 @@
<Left>0.28575cm</Left>
<Height>0cm</Height>
<Width>3.10079cm</Width>
<ZIndex>6</ZIndex>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -189,7 +174,7 @@
<Left>4.11891cm</Left>
<Height>0.6cm</Height>
<Width>1.90229cm</Width>
<ZIndex>7</ZIndex>
<ZIndex>6</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -205,7 +190,7 @@
<Left>3.61103cm</Left>
<Height>0cm</Height>
<Width>2.82292cm</Width>
<ZIndex>8</ZIndex>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -236,7 +221,7 @@
<Left>0.0635cm</Left>
<Height>0.6cm</Height>
<Width>6.67724cm</Width>
<ZIndex>9</ZIndex>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -270,7 +255,7 @@
<Left>6.97976cm</Left>
<Height>0.41303cm</Height>
<Width>1.04599cm</Width>
<ZIndex>10</ZIndex>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -303,7 +288,7 @@
<Left>6.97976cm</Left>
<Height>0.41628cm</Height>
<Width>1.08479cm</Width>
<ZIndex>11</ZIndex>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -336,7 +321,7 @@
<Left>6.97976cm</Left>
<Height>0.43596cm</Height>
<Width>3.37312cm</Width>
<ZIndex>12</ZIndex>
<ZIndex>11</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -369,7 +354,7 @@
<Left>6.97976cm</Left>
<Height>0.39892cm</Height>
<Width>1.55985cm</Width>
<ZIndex>13</ZIndex>
<ZIndex>12</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -402,7 +387,7 @@
<Left>6.97976cm</Left>
<Height>0.3901cm</Height>
<Width>2.36625cm</Width>
<ZIndex>14</ZIndex>
<ZIndex>13</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -435,7 +420,7 @@
<Left>6.97976cm</Left>
<Height>0.40421cm</Height>
<Width>1.58424cm</Width>
<ZIndex>15</ZIndex>
<ZIndex>14</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -468,7 +453,7 @@
<Left>6.95537cm</Left>
<Height>0.43118cm</Height>
<Width>3.37312cm</Width>
<ZIndex>16</ZIndex>
<ZIndex>15</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -501,7 +486,7 @@
<Left>6.95537cm</Left>
<Height>0.37069cm</Height>
<Width>1.07037cm</Width>
<ZIndex>17</ZIndex>
<ZIndex>16</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -534,7 +519,7 @@
<Left>6.97976cm</Left>
<Height>0.4601cm</Height>
<Width>2.10312cm</Width>
<ZIndex>18</ZIndex>
<ZIndex>17</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -567,7 +552,7 @@
<Left>6.97976cm</Left>
<Height>0.42008cm</Height>
<Width>1.04599cm</Width>
<ZIndex>19</ZIndex>
<ZIndex>18</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -600,7 +585,7 @@
<Left>6.95537cm</Left>
<Height>0.44125cm</Height>
<Width>1.96378cm</Width>
<ZIndex>20</ZIndex>
<ZIndex>19</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -616,7 +601,7 @@
<Left>8.06455cm</Left>
<Height>0cm</Height>
<Width>5.59245cm</Width>
<ZIndex>21</ZIndex>
<ZIndex>20</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -629,7 +614,7 @@
<Left>7.87726cm</Left>
<Height>0cm</Height>
<Width>5.77973cm</Width>
<ZIndex>22</ZIndex>
<ZIndex>21</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -642,7 +627,7 @@
<Left>10.22883cm</Left>
<Height>0cm</Height>
<Width>3.42816cm</Width>
<ZIndex>23</ZIndex>
<ZIndex>22</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -655,7 +640,7 @@
<Left>8.46349cm</Left>
<Height>0cm</Height>
<Width>5.16176cm</Width>
<ZIndex>24</ZIndex>
<ZIndex>23</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -668,7 +653,7 @@
<Left>9.28251cm</Left>
<Height>0cm</Height>
<Width>4.37449cm</Width>
<ZIndex>25</ZIndex>
<ZIndex>24</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -681,7 +666,7 @@
<Left>8.36824cm</Left>
<Height>0cm</Height>
<Width>5.28876cm</Width>
<ZIndex>26</ZIndex>
<ZIndex>25</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -694,7 +679,7 @@
<Left>10.10183cm</Left>
<Height>0cm</Height>
<Width>3.55516cm</Width>
<ZIndex>27</ZIndex>
<ZIndex>26</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -707,7 +692,7 @@
<Left>7.65501cm</Left>
<Height>0cm</Height>
<Width>6.00198cm</Width>
<ZIndex>28</ZIndex>
<ZIndex>27</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -720,7 +705,7 @@
<Left>9.01601cm</Left>
<Height>0cm</Height>
<Width>4.64099cm</Width>
<ZIndex>29</ZIndex>
<ZIndex>28</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -733,7 +718,7 @@
<Left>7.82113cm</Left>
<Height>0cm</Height>
<Width>5.83587cm</Width>
<ZIndex>30</ZIndex>
<ZIndex>29</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -746,7 +731,7 @@
<Left>8.79713cm</Left>
<Height>0cm</Height>
<Width>4.85987cm</Width>
<ZIndex>31</ZIndex>
<ZIndex>30</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -788,7 +773,7 @@
<Left>6.95537cm</Left>
<Height>1.79104cm</Height>
<Width>6.70163cm</Width>
<ZIndex>32</ZIndex>
<ZIndex>31</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -837,7 +822,7 @@
<Left>6.97976cm</Left>
<Height>0.89104cm</Height>
<Width>6.67724cm</Width>
<ZIndex>33</ZIndex>
<ZIndex>32</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -870,7 +855,7 @@
<Left>8.04338cm</Left>
<Height>0.34247cm</Height>
<Width>5.61362cm</Width>
<ZIndex>34</ZIndex>
<ZIndex>33</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -902,7 +887,7 @@
<Left>8.06455cm</Left>
<Height>0.33894cm</Height>
<Width>5.59245cm</Width>
<ZIndex>35</ZIndex>
<ZIndex>34</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -934,7 +919,7 @@
<Left>10.38816cm</Left>
<Height>0.34776cm</Height>
<Width>3.26884cm</Width>
<ZIndex>36</ZIndex>
<ZIndex>35</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -966,7 +951,7 @@
<Left>8.63838cm</Left>
<Height>0.2384cm</Height>
<Width>5.01862cm</Width>
<ZIndex>37</ZIndex>
<ZIndex>36</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -998,7 +983,7 @@
<Left>9.34601cm</Left>
<Height>0.30719cm</Height>
<Width>4.31099cm</Width>
<ZIndex>38</ZIndex>
<ZIndex>37</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1030,7 +1015,7 @@
<Left>8.46874cm</Left>
<Height>0.27544cm</Height>
<Width>5.16176cm</Width>
<ZIndex>39</ZIndex>
<ZIndex>38</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1062,7 +1047,7 @@
<Left>10.39905cm</Left>
<Height>0.32535cm</Height>
<Width>3.25795cm</Width>
<ZIndex>40</ZIndex>
<ZIndex>39</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1094,7 +1079,7 @@
<Left>8.06455cm</Left>
<Height>0.32131cm</Height>
<Width>5.59245cm</Width>
<ZIndex>41</ZIndex>
<ZIndex>40</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1126,7 +1111,7 @@
<Left>9.15344cm</Left>
<Height>0.30543cm</Height>
<Width>4.50356cm</Width>
<ZIndex>42</ZIndex>
<ZIndex>41</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1166,7 +1151,7 @@
<Left>0.381cm</Left>
<Height>1.4631cm</Height>
<Width>6.05295cm</Width>
<ZIndex>43</ZIndex>
<ZIndex>42</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1200,7 +1185,7 @@
<Left>3.61103cm</Left>
<Height>0.41382cm</Height>
<Width>2.82292cm</Width>
<ZIndex>44</ZIndex>
<ZIndex>43</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1232,7 +1217,7 @@
<Left>8.0963cm</Left>
<Height>0.38481cm</Height>
<Width>5.5607cm</Width>
<ZIndex>45</ZIndex>
<ZIndex>44</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1264,7 +1249,7 @@
<Left>9.01439cm</Left>
<Height>0.33189cm</Height>
<Width>4.6426cm</Width>
<ZIndex>46</ZIndex>
<ZIndex>45</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1280,7 +1265,7 @@
<Left>2.02882cm</Left>
<Height>0cm</Height>
<Width>4.40513cm</Width>
<ZIndex>47</ZIndex>
<ZIndex>46</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -1293,7 +1278,7 @@
<Left>0.43512cm</Left>
<Height>0cm</Height>
<Width>5.99883cm</Width>
<ZIndex>48</ZIndex>
<ZIndex>47</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>
@@ -1306,7 +1291,7 @@
<Left>0.43512cm</Left>
<Height>0cm</Height>
<Width>5.99883cm</Width>
<ZIndex>49</ZIndex>
<ZIndex>48</ZIndex>
<Style>
<Border>
<Color>#073a79</Color>

View File

@@ -88,7 +88,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!Orden.Value = "", "#67809F", "No color")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -124,7 +124,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!Orden.Value = "", "#67809F", "No color")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -251,7 +251,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!Orden.Value = "", "#67809F", "No color")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -690,6 +690,10 @@
<DataField>Orden</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TipoFila">
<DataField>TipoFila</DataField>
<rd:TypeName>System.Integer</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>

View File

@@ -342,7 +342,8 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -377,7 +378,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -412,7 +413,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -447,7 +448,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -482,7 +483,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -517,7 +518,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -552,7 +553,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -587,7 +588,7 @@
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=IIF(Fields!GPO.Value = "Total Pesos" OR Fields!GPO.Value = "Total Dólares","#67809F","Transparent")</BackgroundColor>
<BackgroundColor>=Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -1078,6 +1079,10 @@
<DataField>Orden</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TipoFila">
<DataField>TipoFila</DataField>
<rd:TypeName>System.Integer</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>

View File

@@ -2896,7 +2896,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>$</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value &gt;0,"$",Nothing)</Value>
<Style />
</TextRun>
</TextRuns>
@@ -2927,7 +2927,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteP.Value</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value &gt;0,Fields!ImporteP.Value,nothing)</Value>
<Style>
<Format>#,0.00;(#,0.00)</Format>
</Style>
@@ -3025,7 +3025,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>$</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value &gt;0,"$"," ")</Value>
<Style />
</TextRun>
</TextRuns>
@@ -3056,7 +3056,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteD.Value</Value>
<Value>=IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value &gt;0,Fields!ImporteD.Value,nothing)</Value>
<Style>
<Format>#,0.00;(#,0.00)</Format>
</Style>
@@ -4194,7 +4194,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value> Percepciones y deducciones que en el aparecen a la fecha COMPUPROVEEDORES SA DE CV no me adeuda</Value>
<Value> Percepciones y deducciones que en el aparecen a la fecha [@Empresa] no me adeuda</Value>
<Style />
</TextRun>
</TextRuns>
@@ -5130,6 +5130,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Empresa">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubProyecto">
<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>

View File

@@ -2695,12 +2695,16 @@ Partial Class Inventarios_EntregaAlmacen
If TipoMovimiento = 1 Then
CveConceptoMovimientoVirtual = 37
ElseIf TipoMovimiento = 2 Then
ValidaVirtual = True
CveConceptoMovimientoVirtual = 36
End If
'SI NO TIENE ALMACEN VIRTUAL ASIGNADO NO GENERA EL MOVIMIENTO VIRTUAL
If CveAlmacenVirtual <= 0 Then
ValidaVirtual = False
End If
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G6")

File diff suppressed because it is too large Load Diff

View File

@@ -403,6 +403,15 @@ Partial Class Inventarios_RecepcionAlmacen
End Set
End Property
'Private Property DtDocumentos As DataTable
' Get
' Return CType(ViewState("DtDocumentos"), DataTable)
' End Get
' Set(value As DataTable)
' ViewState("DtDocumentos") = value
' End Set
'End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -1010,6 +1019,10 @@ Partial Class Inventarios_RecepcionAlmacen
DivTraspasoDevolucion.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
DivDocumentos.Visible = True
End If
DtDatosDetalle = Nothing
CreaDtDetalle()
DtDatosLoteDetalle = Nothing
@@ -1127,6 +1140,8 @@ Partial Class Inventarios_RecepcionAlmacen
ObjInventario.Dispose()
CargaGVInv()
UpDocumentos.Update()
End Sub
Private Sub CargaImportacionSurtir(pCveImportacion As Integer)
@@ -2180,6 +2195,14 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
If Filesgral Is Nothing OrElse Filesgral.Count = 0 Then
Alert("Es necesario agregar un documento.", TipoMensaje.MsgAdvertencia)
Return False
End If
End If
Return True
End Function
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
@@ -2758,41 +2781,45 @@ Partial Class Inventarios_RecepcionAlmacen
tCveAlmacen = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen").ToEntero()
End If
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then
DtPSVirtual = ObjInventario.DtResultados
End If
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
Dim CveTipoAlmacenFiltro As Integer = If(CveTipoCompra = 9, 25, 24)
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
FolioVirtual = ObjInventario.Folio
For Each RowUsado As DataRow In DtPSVirtual.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
Next
If SumarImporteUsados Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
End If
'VERIFICA SI TIENE ALMACEN VIRTUAL
If CveAlmacenVirtual > 0 Then
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then
DtPSVirtual = ObjInventario.DtResultados
End If
Else
ErrorMovInv = True
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
Dim CveTipoAlmacenFiltro As Integer = If(CveTipoCompra = 9, 25, 24)
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
FolioVirtual = ObjInventario.Folio
For Each RowUsado As DataRow In DtPSVirtual.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
Next
If SumarImporteUsados Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
End If
End If
Else
ErrorMovInv = True
End If
End If
End If
'DEVENGAR AC
@@ -3452,6 +3479,15 @@ Partial Class Inventarios_RecepcionAlmacen
ErrorMovInv = True
End If
End If
'DOCUMENTOS RELACIONADOS AL MOVIMIENTO
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
If Not ErrorMovInv AndAlso Not GuardaDocumentoBitacora(ObjBitacora, CveMovimiento) Then
ErrorMovInv = True
Alert("Ocurrió un error al guardar los datos adjuntos de la bitácora", TipoMensaje.MsgError)
End If
End If
Catch ex As Exception
OnError("Ocurrió un error al guardar RA.", ex)
ErrorMovInv = True
@@ -3865,6 +3901,18 @@ Partial Class Inventarios_RecepcionAlmacen
HLFolio.NavigateUrl = "#"
LbProveedor.Text = ""
LbDescripcionCompra.Text = ""
DivDocumentos.Visible = False
'If DtDocumentos IsNot Nothing Then
' DtDocumentos.Clear()
' TxtDocumento.Text = ""
' 'GvDocumentos.DataSource = DtDocumentos
' 'GvDocumentos.DataBind()
'End If
UpDocumentos.Update()
UpDatosCompra.Update()
CargaPendientes()
@@ -4521,6 +4569,131 @@ Partial Class Inventarios_RecepcionAlmacen
#End Region
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
' Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
' If Filesgral Is Nothing OrElse Filesgral.Count = 0 Then
' Alert("No se agregó ningun archivo", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' If DtDocumentos Is Nothing Then
' DtDocumentos = New DataTable()
' Dim column As DataColumn = New DataColumn("No")
' column.DataType = Type.GetType("System.Int32")
' With column
' .AutoIncrement = True
' .AutoIncrementSeed = 1
' .AutoIncrementStep = 1
' End With
' DtDocumentos.Columns.Add(column)
' DtDocumentos.Columns.Add("DocumentoOrignal", GetType(String))
' DtDocumentos.Columns.Add("Documento", GetType(String))
' DtDocumentos.Columns.Add("FileExtension", GetType(String))
' End If
' Dim row As DataRow = DtDocumentos.NewRow()
' Dim archivo = Filesgral.FirstOrDefault()
' row("DocumentoOrignal") = archivo.filenameO
' row("Documento") = archivo.filename
' row("FileExtension") = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, archivo.filename))
' DtDocumentos.Rows.Add(row)
' 'GvDocumentos.DataSource = DtDocumentos
' 'GvDocumentos.DataBind()
' UpDocumentos.Update()
' RegistraScript("$('#ModalBitacoraDoc').modal('hide');")
'End Sub
'Protected Sub LnkEliminarDoc_Click(sender As Object, e As EventArgs)
' Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton)
' If DtDocumentos.Rows.Count > 0 And lnkRemove.CommandArgument.ToString.Length > 0 Then
' Dim i As Integer
' i = lnkRemove.CommandArgument.ToString.ToEntero
' Dim Drs As DataRow() = DtDocumentos.Select(String.Format("No = {0}", i))
' If Drs.Count > 0 Then
' Drs(0).Delete()
' End If
' DtDocumentos.AcceptChanges()
' End If
' 'GvDocumentos.EditIndex = -1
' 'GvDocumentos.DataSource = DtDocumentos
' 'GvDocumentos.DataBind()
'End Sub
Private Function GuardaDocumentoBitacora(ObjEventoBitacora As ClsOIEventos, CveMovimiento As Integer) As Boolean
Dim Retorno = True
Dim Archivo As System.IO.FileInfo = Nothing
Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
Dim archivoOriginal = Filesgral.FirstOrDefault()
Dim Bitacora As String = ""
If Not String.IsNullOrEmpty(TxtObservaciones.Text) Then
Bitacora = TxtObservaciones.Text
Else
Bitacora = "Documento Relacionado"
End If
If ObjEventoBitacora.AddEventoBitacora(Bitacora, String.Format(".{0}", archivoOriginal.Extencion), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMovimientoAlmacen:=CveMovimiento) Then
Try
If archivoOriginal.filename <> "" Then
Archivo = New System.IO.FileInfo(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, archivoOriginal.filename))
If Archivo.Exists() Then
File.Move(Archivo.ToString, String.Format("{0}OI\OI{1}{2}", UsuarioActual.Empresa.Ruta, ObjEventoBitacora.CveEvento.ToString, Archivo.Extension))
Else
Retorno = False
End If
End If
Catch ex As Exception
Retorno = False
End Try
Else
Retorno = False
End If
Return Retorno
End Function
'Private Function GuardaDocumentoBitacora(ObjEventoBitacora As ClsOIEventos, CveMovimiento As Integer) As Boolean
' Dim Retorno = True
' Dim Archivo As System.IO.FileInfo = Nothing
' For Each Dr As DataRow In DtDocumentos.Rows
' If ObjEventoBitacora.AddEventoBitacora("Documento Relacionado", Dr("FileExtension").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMovimientoAlmacen:=CveMovimiento) Then
' Try
' If Dr("Documento").ToString <> "" Then
' Archivo = New System.IO.FileInfo(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, Dr("Documento").ToString))
' If Archivo.Exists() Then
' File.Move(Archivo.ToString, String.Format("{0}OI\OI{1}{2}", UsuarioActual.Empresa.Ruta, ObjEventoBitacora.CveEvento.ToString, Archivo.Extension))
' Else
' Retorno = False
' End If
' End If
' Catch ex As Exception
' Retorno = False
' Exit For
' End Try
' Else
' Retorno = False
' Exit For
' End If
' Next
' Return Retorno
'End Function
End Class
Public Class MMovimientoAlmacen

View File

@@ -72,7 +72,7 @@ Partial Class Inventarios_RepAlmacenCompras
'Llena Almacen
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
#End Region

View File

@@ -867,7 +867,7 @@ Partial Class Inventarios_TraspasoAlmacen
'VIRTUAL SALIDA
If RealizarMovimientoVirtual Then
If RealizarMovimientoVirtual AndAlso CveAlmacenVirtualSalida > 0 Then
'If TipoAlmacenOrigen = 27 Then
' CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 25).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyectoOrigen}").ToEntero()
@@ -1702,6 +1702,7 @@ Partial Class Inventarios_TraspasoAlmacen
' CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
'End If
'VERIFICA SI TIENE ALMACEN VIRTUAL ASIGNADA
If CveAlmacenVirtual > 0 Then
Dim dtvirtual As DataTable = Nothing
@@ -1729,9 +1730,9 @@ Partial Class Inventarios_TraspasoAlmacen
TextoError = "No se pudo registrar el movimiento virtual"
ErrorMovInv = True
End If
Else
TextoError = "La Sucursal no tiene creado un almacen virtual"
ErrorMovInv = True
'Else
' TextoError = "La Sucursal no tiene creado un almacen virtual"
' ErrorMovInv = True
End If
End If
@@ -1964,9 +1965,9 @@ Partial Class Inventarios_TraspasoAlmacen
TextoError = "No se pudo registrar el movimiento virtual"
ErrorMovInv = True
End If
Else
TextoError = "La Sucursal no tiene creado un almacen virtual"
ErrorMovInv = True
'Else
' TextoError = "La Sucursal no tiene creado un almacen virtual"
' ErrorMovInv = True
End If
End If

View File

@@ -204,8 +204,13 @@ Partial Class LogIn
ADSSessionConfig.sessionUser = Usuario
ADSSessionConfig.sessionDpage = False
ObjUsuario.Dispose()
If Usuario IsNot Nothing Then
Dim isgps = Request.Url.Host.ToUpper().Contains("SIGNALSGPS".ToUpper())
If Usuario IsNot Nothing AndAlso (
Usuario.CveRol = 1 OrElse (
(isgps AndAlso (Usuario.CvePlataforma = 3 OrElse Usuario.CveRol = 1200)) OrElse
((Not isgps) AndAlso (Usuario.CvePlataforma <> 3 AndAlso Usuario.CveRol <> 1200))
)
) Then
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
CreaObjetoEmpresa(Usuario)
@@ -265,7 +270,6 @@ Partial Class LogIn
End If
End If
End Sub
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
Dim ObjEmpresa As New ClsSisEmpresas()

View File

@@ -262,6 +262,7 @@ partial class Nomina_Finiquito : ClsPaginas
ChkesLiquidacion.Checked = esLiquidacion;
}
}
Timbrado tr;
if (DdlMotivoBaja.SelectedValue.ToEntero() > 0)
LblMotivoBaja.Text = DdlMotivoBaja.SelectedItem.Text;
else

View File

@@ -274,6 +274,15 @@
<asp:ListItem Text="Todos" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 " style="line-height: 1;">Agrupador:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlAgrupadorB" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Sin Agrupación" Value="-1" Selected ="True"></asp:ListItem>
<asp:ListItem Text="Centro de costos" Value="1"></asp:ListItem>
<asp:ListItem Text="Departamento" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -307,7 +316,7 @@
</div>
</div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Codigo,Turno,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Codigo,Turno,Departamento,SubProyecto,NomAutorizado" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" Style="text-align: center;" GridLines="None" data-cols="2" data-rows="2" data-heighterror="360">
<Columns>
@@ -323,7 +332,7 @@
<ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
</ItemTemplate>
<ItemStyle Width="350px" HorizontalAlign="Left" />
<ItemStyle Width="300px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +1,23 @@
<%@ Page Title="Nómina - Pre Nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PreNomina.aspx.vb" Inherits="Nomina_PreNomina" %>
<%@ Page Title="Nómina - Pre nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PreNomina.aspx.vb" Inherits="Nomina_PreNomina" %>
<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="HB" runat="Server">
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<%-- <asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>--%>
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
<asp:LinkButton ID="ImgExcel" Target="_blank" runat="server"> <i class="fa fa-ad-excel"></i> Imprimir</asp:LinkButton>
</li>
<li>
<asp:HyperLink ID="HLImgImprimir" Target="_blank" runat="server" NavigateUrl="#"> <i class="fa fa-ad-pdf"></i> Imprimir</asp:HyperLink>
<%--<a id="HLImgImprimir" runat="server" href="#" class="Texto">
<img alt="Imprimir" src="/Imagenes/btnImprimir.gif"/>
</a>--%>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Pre Nómina
Pre nómina
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
@@ -57,10 +47,10 @@
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
<asp:Button ID="BtnGuardarBono" runat="server" Text="Guardar Bonos" class="btn btn-primary" />
<asp:Button ID="BtnImpresion" runat="server" Text="Cerrar Nómina" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
</div>
<div class="portlet-body" style="display: none;">
@@ -79,7 +69,12 @@
</div>
</div>
<table id="TblHeader" runat="server" class="table table-striped table-advance table-hover" width="1385px">
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="TblHeader" runat="server" class="table table-striped table-advance table-hover Widthall TblHeader" >
<thead>
<tr class="Titulos">
<th rowspan="2" width="250px">Nombre</th>
@@ -99,7 +94,6 @@
<th id="TDBono" runat="server" rowspan="2" style="width: 60px;">Bono</th>
<th id="TDPagoAdicional" runat="server" rowspan="2" style="width: 60px;">Pago Adi</th>
<th id="TDDescuento" runat="server" rowspan="2" style="width: 60px;">Desc Adi</th>--%>
<th rowspan="2">&nbsp;</th>
</tr>
<tr class="Titulos">
<th width="35px">Tipo</th>
@@ -133,12 +127,8 @@
</tr>
</thead>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Pre Nómina" Width="1385px" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePersonal" EmptyDataText="No se encontraron Ventas con los filtros especificados" data-tableheader=".TblHeader"
ToolTip="Pre Nómina" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style=" text-align: center;" GridLines="None" data-scrollwidthrow=".scrollwidthrow">
<Columns>
<asp:TemplateField>
<ItemTemplate>
@@ -345,37 +335,37 @@
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:CheckBox ID="ChkAplica" runat="server" Visible="false" Checked='<%# Eval("AplicaBono") %>' />
</ItemTemplate>
<ItemStyle Width="70px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtBono" runat="server" Visible="false" Text='<%# Eval("Importe", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtPagoAdicional" Visible="false" runat="server" Text='<%# Eval("PagoAdicional", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtDescuentoAdicional" Visible="false" runat="server" Text='<%# Eval("DescuentoAdicional", "{0:N0}") %>' Width="44px"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
</asp:TemplateField>
<%--<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlHorasTriples" runat="server" Text='<%# Eval("HorasTriples") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="65px" />
</asp:TemplateField>--%>
<asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
&nbsp;
</ItemTemplate>

View File

@@ -205,11 +205,12 @@ Partial Class Nomina_PreNomina
If e.Row.DBCampo("Asistencias").ToDouble = 0 Then e.Row.FCLiteral("LtlAsistencias").Text = ""
If e.Row.DBCampo("Faltas").ToDouble = 0 Then e.Row.FCLiteral("LtlFaltas").Text = ""
If e.Row.DBCampo("HorasDobles").ToDouble = 0 Then e.Row.FCLiteral("LtlHorasExtras").Text = ""
e.Row.CssClass = "scrollwidthrow"
End If
End If
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("PreNomina", TblHeader)
End Sub

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@
<a href="javascript:;" class="collapse"></a>
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
</div>
<div class="titlefiltros caption ">
<div class="titlefiltros ">
<ul class="list-inline">
<li>Cliente:
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />

View File

@@ -32,7 +32,11 @@
<asp:LinkButton ID="ImgImprimir" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>--%>
<li>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Expediente de personal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LbGafete" runat="server" CssClass="" Text="Gafete" />
</li>
<asp:UpdatePanel ID="UpBuzon" runat="server">
@@ -3221,8 +3225,6 @@
<td style="width: 40px;"></td>
<td style="width: 500px; text-align: right!important"></td>
<td style="width: 500px; text-align: right!important">
<asp:LinkButton ID="LbGafete" runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-download' title='Descargar Contrato'></i>" />
</td>
<td style="width: 50px!important"></td>
</tr>
@@ -3295,9 +3297,6 @@
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LbGafete" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -943,17 +943,26 @@ Partial Class RH_Personal
DdlClienteAsistenciaC.Attributes.Add("onclick", "CargaClientes();")
DdlClienteAsistenciaA.Attributes.Add("onclick", "CargaClientes();")
CargaClientes()
Dim fechainicioasistencia As String
Dim fechaFinasistencia As String
If Now.Day >= 15 Then
fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now)
fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now)
Else
Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddDays(-1)
fechainicioasistencia = String.Format("{0:16/MM/yyyy}", dateendasis)
fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis)
End If
If Request("FechaI") IsNot Nothing AndAlso IsDate(Request("FechaI")) Then
txtFechaI.Text = Request("FechaI")
Else
txtFechaI.Text = Now.ToShortDateString
txtFechaI.Text = fechainicioasistencia
End If
If Request("FechaF") IsNot Nothing AndAlso IsDate(Request("FechaF")) Then
txtFechaF.Text = Request("FechaF")
Else
txtFechaF.Text = Now.ToShortDateString
txtFechaF.Text = fechaFinasistencia
End If
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
@@ -3177,13 +3186,14 @@ Partial Class RH_Personal
#End Region
#Region "I M P R I M I R N O M I N A"
#Region "I M P R I M I R N O M I N A"
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
Dim LB = CType(sender, LinkButton)
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "Recibo")
Dim LB = CType(sender, LinkButton)
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
End Sub
#End Region
@@ -3437,7 +3447,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("LogoUri", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, "ReportePersonal", "PDF")
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
End If
End If
ObjPersonal.Dispose()

View File

@@ -823,6 +823,7 @@ ADSScroll = function (tablescroll) {
tablefooter.attr('id', 'ADSF-' + tablescroll.attr('id'));
let trWwidth = $('<tr class="trnopadding ADtr SearchADHeader"></tr>');
let idTheader = tablescroll.data('tableheader');
let scrollwidthrow = tablescroll.data('scrollwidthrow') ? tablescroll.data('scrollwidthrow') : "";
let rowVisibles = isNaN(Number(tablescroll.data('rows'))) ? 1 : Number(tablescroll.data('rows'));
let rowFooter = isNaN(Number(tablescroll.data('footer'))) ? 0 : Number(tablescroll.data('footer'));
let heightBody = isNaN(Number(tablescroll.data('height'))) ? 200 : Number(tablescroll.data('height'));
@@ -861,12 +862,21 @@ ADSScroll = function (tablescroll) {
}
}
let firsttr = null;
tablescroll.find('> tbody > tr,> thead > tr,> tr').each(function () {
tablescroll.find('> tbody > tr' + scrollwidthrow + ',> thead > tr' + scrollwidthrow + ',> tr' + scrollwidthrow +'').each(function () {
var retorno = false;
firsttr = $(this);
if (firsttr.find(' > td[colspan], > th[colspan]').length) { retorno = true; }
return retorno;
});
if (firsttr == null) {
tablescroll.find('> tbody > tr,> thead > tr,> tr').each(function () {
var retorno = false;
firsttr = $(this);
if (firsttr.find(' > td[colspan], > th[colspan]').length) { retorno = true; }
return retorno;
});
}
tablescroll.before(divcontainer);
divcontainer.append(divheader);
divcontainer.append(divbody);

View File

@@ -100,6 +100,7 @@
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
<asp:ListItem Text="Forma de Pago" Value="15"></asp:ListItem>
<asp:ListItem Text="Vendedor/Cliente" Value="16"></asp:ListItem>
</asp:DropDownList>
</div>
</div>

View File

@@ -48,7 +48,7 @@ Partial Class Ventas_RepRecuperacion
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
CargaDatos()
'CargaDatos()
End If
End Sub
@@ -75,6 +75,8 @@ Partial Class Ventas_RepRecuperacion
'Carga Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
@@ -177,7 +179,20 @@ Partial Class Ventas_RepRecuperacion
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"))
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
If DdlGrupo.SelectedValue.ToEntero = 16 Then
If e.Row.DBCampo("GPO").Contains("Total") Then
e.Row.CssClass = "Totales"
Else
If e.Row.DBCampo("CveCliente") = "" Then
e.Row.CssClass = "SubTotales"
End If
End If
End If
End If
End Sub

View File

@@ -16,10 +16,10 @@
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
<asp:LinkButton ID="ImgExcel" OnClick="ImgExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
<li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>

View File

@@ -112,7 +112,8 @@ Partial Class Ventas_RepRecuperacionDetalle
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
DdlVendedor.Attributes.Add("disabled", "disabled")
DdlVendedor.Enabled = False
End If
End If
DdlVendedor.Items.Insert(0, New ListItem("Sin Vendedor", "-2"))
'Carga Usuarios
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)

View File

@@ -274,7 +274,8 @@ Partial Class RepVentaDetalle
DdlGrupo.Items.Insert(10, New ListItem("Año Ejec.", "11"))
DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12"))
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
DdlGrupo.DataBind()
End Sub

View File

@@ -252,6 +252,7 @@ Partial Class Ventas_RepVentas
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
'CargaUsuarios
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)

View File

@@ -99,7 +99,7 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
<%--<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />--%>
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>

View File

@@ -5,8 +5,8 @@ Imports System.Data
Imports System.Drawing
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
'Imports CrystalDecisions.CrystalReports.Engine
'Imports CrystalDecisions.Shared
Partial Class Ventas_RepVentasUtilidad
Inherits ClsPaginas

View File

@@ -1255,6 +1255,15 @@ Partial Class Ventas
ViewState("PermiteCredito") = value
End Set
End Property
Private Property CreditoDisponible As Double
Get
Return If(IsNothing(ViewState("CreditoDisponible")), 0, ViewState("CreditoDisponible")).ToString().ToDecimal
End Get
Set(value As Double)
ViewState("CreditoDisponible") = value
End Set
End Property
Private Property DtAnticipoAmortizacion As DataTable
Get
Return CType(ViewState("DtAnticipoAmortizacion"), DataTable)
@@ -18435,7 +18444,7 @@ Partial Class Ventas
'SI LA REMISION SE SURTIO CON USADOS UTILIZAR ESTE MOVIMIENTO
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 24 AND CveConcepto = 2) AND CveVenta > 0")
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) AND CveVenta > 0")
If RowMovimiento IsNot Nothing Then
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
@@ -18450,7 +18459,7 @@ Partial Class Ventas
'SI NO SE SURTIO LA REMSION CON USADOS, UTILIZAR EL MOVIMIENTO DE SALIDA DEL INGRESO
If CveMovimientoReferencia <= 0 Then
If ObjInventario.GetInv_Mov(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto = 3) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0")
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0")
If RowMovimiento IsNot Nothing Then
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
@@ -18466,121 +18475,8 @@ Partial Class Ventas
End If
End If
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
DtPSVirtual = ObjInventario.DtResultados.Copy()
Else
OcurrioError = True
End If
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia)
If CveMovimientoVirtual > 0 Then
For Each RowUsado As DataRow In DtPSVirtual.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
OcurrioError = True
Exit For
End If
Next
Else
OcurrioError = True
End If
'Agregamos las PrePolizas
If Not OcurrioError Then
If CveMovimientoVirtual > 0 Then
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim DtCostos = ObjInventario.DtResultados.Copy
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim ValorInventario As Decimal
Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
TotalCostoAcumulado += ValorInventario
'cuando es el último movimiento y hay diferencias en los importes
If Cont = DtCostosDistinct.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
End If
Try
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
Exit For
End If
'End If
Catch ex As Exception
OcurrioError = True
Alert("Error inesperado (15148). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End Try
Cont += 1
Next
If Not OcurrioError Then
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero()
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
End If
End If
Else
OcurrioError = True
End If
End If
End If
End If
Catch ex As Exception
OnError("Ocurrió un error al generar el almacen virtual.", ex)
OcurrioError = True
End Try
Return Not OcurrioError
End Function
Private Function GenerarMovimientoAlmacenVirtualConsignacion(CveVenta As Integer, CveAlmacenContrato As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
Dim OcurrioError As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
Try
Dim CveMovimientoVirtual As Integer = -1
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenContrato).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
Dim CveConceptoMovimientoVirtual As Integer = 37
Dim DtPSVirtual As DataTable = Nothing
Dim DtTamanios As DataTable = Nothing
Dim CveMovimientoReferencia As Integer = -1
Dim CveSubProyecto As Integer = -1
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 17 AND CveConcepto = 8)) AND CveVenta > 0")
If RowMovimiento IsNot Nothing Then
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
Else
OcurrioError = True
End If
Else
OcurrioError = True
End If
'SI TIENE ALMACEN VIRTUAL ASIGNADO GENERA EL MOVIMIENTO VIRTUAL
If CveAlmacenVirtual > 0 Then
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
DtPSVirtual = ObjInventario.DtResultados.Copy()
@@ -18660,6 +18556,125 @@ Partial Class Ventas
End If
End If
End If
Catch ex As Exception
OnError("Ocurrió un error al generar el almacen virtual.", ex)
OcurrioError = True
End Try
Return Not OcurrioError
End Function
Private Function GenerarMovimientoAlmacenVirtualConsignacion(CveVenta As Integer, CveAlmacenContrato As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
Dim OcurrioError As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
Try
Dim CveMovimientoVirtual As Integer = -1
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenContrato).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
Dim CveConceptoMovimientoVirtual As Integer = 37
Dim DtPSVirtual As DataTable = Nothing
Dim DtTamanios As DataTable = Nothing
Dim CveMovimientoReferencia As Integer = -1
Dim CveSubProyecto As Integer = -1
'SI TIENE UN ALMACEN VIRTUAL GENERA EL MOVIMIENTO
If CveAlmacenVirtual > 0 Then
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 17 AND CveConcepto = 8)) AND CveVenta > 0")
If RowMovimiento IsNot Nothing Then
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
Else
OcurrioError = True
End If
Else
OcurrioError = True
End If
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
DtPSVirtual = ObjInventario.DtResultados.Copy()
Else
OcurrioError = True
End If
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia)
If CveMovimientoVirtual > 0 Then
For Each RowUsado As DataRow In DtPSVirtual.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
OcurrioError = True
Exit For
End If
Next
Else
OcurrioError = True
End If
'Agregamos las PrePolizas
If Not OcurrioError Then
If CveMovimientoVirtual > 0 Then
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim DtCostos = ObjInventario.DtResultados.Copy
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim ValorInventario As Decimal
Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
TotalCostoAcumulado += ValorInventario
'cuando es el último movimiento y hay diferencias en los importes
If Cont = DtCostosDistinct.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
End If
Try
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
Exit For
End If
'End If
Catch ex As Exception
OcurrioError = True
Alert("Error inesperado (15148). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End Try
Cont += 1
Next
If Not OcurrioError Then
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero()
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True
End If
End If
Else
OcurrioError = True
End If
End If
End If
End If
End If
Catch ex As Exception
OnError("Ocurrió un error al generar el almacen virtual.", ex)
@@ -22823,29 +22838,32 @@ Partial Class Ventas
Dim dtvirtual As DataTable = Nothing
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenOrigenContrato).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
Dim CveMovimientoVirtualSalida As Integer
'SI TIENE UN ALMACEN VIRTUAL ASIGNADO GENERA EL MOVIMIENTO VIRTUAL
If CveAlmacenVirtual > 0 Then
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaGeneral, UsuarioActual.CveEmpresa) Then
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaGeneral, UsuarioActual.CveEmpresa) Then
dtvirtual = ObjInventario.DtResultados
dtvirtual = ObjInventario.DtResultados
If dtvirtual.Rows.Count > 0 Then
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral)
'FolioVirtualSalida = ObjInventario.Folio
If dtvirtual.Rows.Count > 0 Then
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral)
'FolioVirtualSalida = ObjInventario.Folio
For Each RowVirtual As DataRow In dtvirtual.Rows
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
For Each RowVirtual As DataRow In dtvirtual.Rows
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Return False
End If
Next
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Return False
End If
Next
End If
Else
Return False
End If
Else
Return False
End If
End If
Else
Return False
@@ -28223,6 +28241,7 @@ Partial Class Ventas
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
For Each DrowPartidas As DataRow In TmpDTCalculo
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString().ToEntero()
@@ -28283,6 +28302,10 @@ Partial Class Ventas
End If
Next
If DTPSTemp IsNot Nothing AndAlso DTPSTemp.Rows.Count > 0 Then
DTPSTemp = DTPSTemp.Select().OrderBy(Function(row) row("PU")).CopyToDataTable()
End If
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
Modalidad = "A"
If drowPsTamaños("PU").ToString().ToDecimal > 0 Then

25
testApi.aspx Normal file
View File

@@ -0,0 +1,25 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="testApi.aspx.vb" Inherits="testApi" %>
<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">
Prueba api de Login
</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">
<div class="row">
<label class="col-md-12">
<asp:Label runat="server" ID="LblMsg" Font-Bold="true"></asp:Label>
</label>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

51
testApi.aspx.vb Normal file
View File

@@ -0,0 +1,51 @@
Option Strict On
Option Explicit On
Imports System.Data
Imports System.IO
Imports System.Net
Imports Extensiones
Imports Models.Request
Imports Models.Response
Imports Newtonsoft.Json
Partial Class testApi
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim responseGenericModel = New ResponseGenericModel(Of ResponseLogin)()
Dim origResponse As HttpWebResponse
Dim origRequest As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://sig.adssistemas.mx:90/api/usuario/Login"), HttpWebRequest)
'origRequest.Headers.Add("Authorization", "Barer c3NhX2RzdDpBc3AzY3RfMTIzNA==") Esto se usara cuando se tenga que mandar el token (todos excepto el login)
origRequest.AllowAutoRedirect = False
origRequest.Method = "POST"
origRequest.ContentType = "application/json"
origRequest.Accept = "application/json"
origRequest.Expect = "application/json"
Try
Dim requestLogin = New RequestLogin() With {
.UserName = "RPimienta",
.Password = "capillafc"
}
Dim requestJson = JsonConvert.SerializeObject(requestLogin)
origRequest.GetRequestStream.Write(System.Text.Encoding.UTF8.GetBytes(requestJson), 0, System.Text.Encoding.UTF8.GetBytes(requestJson).Count)
origResponse = DirectCast(origRequest.GetResponse(), HttpWebResponse)
Dim Stream As Stream = origResponse.GetResponseStream()
Dim sr As New StreamReader(Stream, Encoding.GetEncoding("utf-8"))
Dim str As String = sr.ReadToEnd()
responseGenericModel = JsonConvert.DeserializeObject(Of ResponseGenericModel(Of ResponseLogin))(str)
If responseGenericModel.IsSuccess Then
LblMsg.Text = $"Bienvenido {responseGenericModel.Result.Nombre}"
End If
Catch ex As WebException
Alert(ex.Response.ToString())
End Try
End If
End Sub
End Class

View File

@@ -148,6 +148,20 @@