This commit is contained in:
2023-05-11 10:00:36 -07:00
21 changed files with 486 additions and 324 deletions

View File

@@ -4926,6 +4926,7 @@ Public Class ClsBancos
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_PagosNoBancarios") DataAdapter("PA_Banc_PagosNoBancarios")
SqlAdapter.SelectCommand.CommandTimeout = 0
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor

View File

@@ -3630,7 +3630,7 @@ Public Class ClsContabilidad
Public Function GetSituacionFinanciera(FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveSubProyecto As String, TipoMovtos As Integer, Optional SAT As Integer = 0) As Boolean Public Function GetSituacionFinanciera(FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveSubProyecto As String, TipoMovtos As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
Dim Retorno = False Dim Retorno = False
'SqlAdapter.SelectCommand.t 'SqlAdapter.SelectCommand.t
@@ -3644,6 +3644,7 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@SAT", SqlDbType.Int).Value = SAT .Add("@SAT", SqlDbType.Int).Value = SAT
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With End With
SqlAdapter.SelectCommand.CommandTimeout = 0 SqlAdapter.SelectCommand.CommandTimeout = 0
@@ -3854,7 +3855,7 @@ Public Class ClsContabilidad
End Function End Function
'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean 'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean
Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
Dim Retorno = False Dim Retorno = False
DataAdapter("PA_Conta_EstadoActividadesGet") DataAdapter("PA_Conta_EstadoActividadesGet")
@@ -3867,6 +3868,7 @@ Public Class ClsContabilidad
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@SAT", SqlDbType.Int).Value = SAT .Add("@SAT", SqlDbType.Int).Value = SAT
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With End With
SqlAdapter.SelectCommand.CommandTimeout = 0 SqlAdapter.SelectCommand.CommandTimeout = 0

View File

@@ -568,6 +568,7 @@ Public Class ClsEncuestas
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Fecha", SqlDbType.Date).Value = Now .Add("@Fecha", SqlDbType.Date).Value = Now
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEncuestaAplicada", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
Try Try

View File

@@ -6041,7 +6041,7 @@ Public Class ClsPaginas
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) Then If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) Then
Dim QRDescarga As String = "" Dim QRDescarga As String = ""
Dim cfdi As New RVCFDI33.GeneraCFDI() Dim cfdi As New RVCFDI33.GeneraCFDI()
Dim Parametros As String = Encripta($"CveVenta={Vta.CveVenta}&CveEmpresa={Vta.CveEmpresa}") Dim Parametros As String = Encripta($"SerieFolio={Vta.SerieFolio}&TipoDocto={Vta.TipoDocto}&CveEmpresa={Vta.CveEmpresa}")
Dim b As Byte() = cfdi.ConvertirQrCode($"http://econollantas.adssistemas.mx/Ashx/E141.ashx?PV={Parametros}") Dim b As Byte() = cfdi.ConvertirQrCode($"http://econollantas.adssistemas.mx/Ashx/E141.ashx?PV={Parametros}")
QRDescarga = Convert.ToBase64String(b) QRDescarga = Convert.ToBase64String(b)
params.Add(New ReportParameter("QRDescarga", QRDescarga)) params.Add(New ReportParameter("QRDescarga", QRDescarga))

View File

@@ -1325,7 +1325,7 @@ Public Class ClsVentas
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1, CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1, Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0, Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0,
Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "") As Boolean Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasDetalleAdd") DataAdapter("PA_VentasDetalleAdd")
@@ -1355,6 +1355,7 @@ Public Class ClsVentas
.Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle .Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle
.Add("@CveMovimientoDetallePedido", SqlDbType.Int).Value = CveMovimientoDetallePedido .Add("@CveMovimientoDetallePedido", SqlDbType.Int).Value = CveMovimientoDetallePedido
.Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial .Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
End With End With
Try Try

View File

@@ -97,7 +97,7 @@ Public Class Empresa
Public Property Soporte_PWD As String Public Property Soporte_PWD As String
Public Property Soporte_Tipo As String Public Property Soporte_Tipo As String
Public Property Timbres As Integer Public Property Timbres As Integer
Public Property RutaArchivos As String Private Property RutaArchivos As String
Public ReadOnly Property Ruta As String Public ReadOnly Property Ruta As String
Get Get
If Not String.IsNullOrEmpty(RutaArchivos) AndAlso ClsPaginas.EsProduccion Then If Not String.IsNullOrEmpty(RutaArchivos) AndAlso ClsPaginas.EsProduccion Then

View File

@@ -301,6 +301,11 @@ Namespace Modelos
#Region " OBJETOS Ventas" #Region " OBJETOS Ventas"
<Serializable>
Public Class MPrecioSugerido
Public Property CvePrecioLista As Integer
Public Property PrecioSugerido As Decimal
End Class
<Serializable> <Serializable>
Public Class VentaDescuentos Public Class VentaDescuentos
Public Consec As Integer Public Consec As Integer

View File

@@ -99,16 +99,36 @@ Public Class E141 : Implements IHttpHandler
Dim retorno As String = "" Dim retorno As String = ""
Try Try
Dim Params = If(context.Request("P") = Nothing, "", context.Request("P").ToString()) Dim Params = If(context.Request("P") = Nothing, "", context.Request("P").ToString())
Dim ParamsV = If(context.Request("PV") = Nothing, "", context.Request("PV").ToString())
Dim ParametrosNuevos As Boolean = False
If Not String.IsNullOrEmpty(ParamsV) Then
ParametrosNuevos = True
Params = ParamsV
End If
'DESCARGA DEL PDF 'DESCARGA DEL PDF
If Not String.IsNullOrEmpty(Params) Then If Not String.IsNullOrEmpty(Params) Then
Try Try
If ParametrosNuevos Then
Dim UrlParametros As Hashtable = Parametros(Decripta(Params))
Dim File As String = String.Format("{0}.pdf", UrlParametros("SERIEFOLIO").ToString())
Dim TipoDocto As String = UrlParametros("TIPODOCTO").ToString()
Dim CveEmpresaParam As Integer = UrlParametros("CVEEMPRESA").ToString().ToEntero()
If Not String.IsNullOrEmpty(File) AndAlso Not String.IsNullOrEmpty(TipoDocto) AndAlso CveEmpresaParam > 0 Then
ImprimirbytesPDF(context, DescargarFactura(File, CveEmpresaParam, TipoDocto), File)
End If
Else
Dim UrlParametros As Hashtable = Parametros(Decripta(Params)) Dim UrlParametros As Hashtable = Parametros(Decripta(Params))
Dim File As String = UrlParametros("FILE").ToString() Dim File As String = UrlParametros("FILE").ToString()
If Not String.IsNullOrEmpty(File) Then If Not String.IsNullOrEmpty(File) Then
ImprimirbytesPDF(context, DescargarFactura(File), File) ImprimirbytesPDF(context, DescargarFactura(File, Me.CveEmpresa), File)
End If End If
End If
Catch ex As Exception Catch ex As Exception
GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141") GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141")
End Try End Try
@@ -2202,8 +2222,8 @@ Public Class E141 : Implements IHttpHandler
#Region "D E S C A R G A - P D F" #Region "D E S C A R G A - P D F"
Private Function DescargarFactura(FilePDF As String) As Byte() Private Function DescargarFactura(FilePDF As String, CveEmpresa As Integer, Optional TipoDocto As String = "Ing") As Byte()
Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?TipoDocto=Ing&File={3}&TipoArchivo=PDF", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, FilePDF)) Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?TipoDocto={4}&File={3}&TipoArchivo=PDF", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, FilePDF, TipoDocto))
Dim File As Byte() = Nothing Dim File As Byte() = Nothing
Try Try
Using httpClient = New HttpClient() Using httpClient = New HttpClient()

View File

@@ -30,13 +30,14 @@
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <div class="row">
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label> <label class="col-md-1 truncate" >Ejercicio:</label>
<div class="col-md-2" style="width: 125px;"> <div class="col-md-1" >
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px"> <asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 truncate" style="width: 90px;">Periodo:</label>
<div class="col-md-2" style="width: 130px;"> <label class="col-md-1 truncate" >Periodo:</label>
<div class="col-md-1" style="width: 130px;">
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me"> <asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem> <asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem> <asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
@@ -53,25 +54,38 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label> <asp:Label ID="LblProyecto" CssClass="col-md-1" runat="server">Proyecto:</asp:Label>
<div class="col-md-2" id="DivProyecto" runat="server"> <div class="col-md-1" id="DivProyecto" runat="server">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%"> <asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label> <asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
<div class="col-md-2"> <div class="col-md-1">
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True"> <asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<li runat="server" id="liTipoReporte" visible="false">Tipo: <label class="col-md-1" >Consolidado: </label>
<div class="col-md-1">
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
<asp:ListItem Value ="2">Consolidado</asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1" runat="server" id="DivTipo1" visible="false" >Tipo: </label>
<div class="col-md-1" runat="server" id="DivTipo2" visible="false" >
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px"> <asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px">
<asp:ListItem Text="Contable" Value="1"></asp:ListItem> <asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem> <asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem> <asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</li> </div>
</ul>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -86,7 +86,8 @@ Partial Class AC_RepEstadoActividades
ReporteComplementario = False ReporteComplementario = False
Else Else
ReporteComplementario = False ReporteComplementario = False
liTipoReporte.Visible = False DivTipo1.Visible = False
DivTipo2.Visible = False
LtTitulo.Text = "Estado de Resultados" LtTitulo.Text = "Estado de Resultados"
End If End If
@@ -136,7 +137,7 @@ Partial Class AC_RepEstadoActividades
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa) Then If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
Else Else
DtDatos = Nothing DtDatos = Nothing
@@ -331,6 +332,10 @@ Partial Class AC_RepEstadoActividades
params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text)) params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text))
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato) ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
' UsuarioActual.Empresa.GrupoEmpresa
End Sub End Sub
End Class End Class

View File

@@ -63,6 +63,15 @@
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1" >Consolidado: </label>
<div class="col-md-1">
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
<asp:ListItem Value ="2">Consolidado</asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -195,7 +195,7 @@ Partial Class AC2_SituacionFinanciera
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte) Then If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados DtDatos = ObjConta.DtResultados
CargaGrids() CargaGrids()

View File

@@ -9453,7 +9453,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
DdlCuenta.Items.Clear(); DdlCuenta.Items.Clear();
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 "); DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
DTCuentas.CaseSensitive = false; DTCuentas.CaseSensitive = false;
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE')"); DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE','BBVA Bancomer','BBVA')");
DdlCuenta.DataBind(); DdlCuenta.DataBind();
DdlCuenta.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlCuenta.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlCuenta.SelectedValueExist("-1"); DdlCuenta.SelectedValueExist("-1");

View File

@@ -27,7 +27,7 @@
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle" style="min-height: 55px;">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%> <a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
@@ -36,60 +36,57 @@
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <div class="row">
<div class="col-md-1" style="text-align: right"> <div class="col-md-2">
Cliente: Cliente:
</div> <div>
<div class="col-md-1">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
</div> </div>
<div class="col-md-1" id="DivProyectosAsignado1" runat="server">
<asp:Label runat="server" ID="LblProyectoAsignado" AssociatedControlID="DdlProyecto">Proyecto: </asp:Label>
</div> </div>
<div class="col-md-1" id="DivProyectosAsignado2" runat="server">
<div class="col-md-2" id="DivProyectosAsignado1" runat="server">
<asp:Label runat="server" ID="LblProyectoAsignado" AssociatedControlID="DdlProyecto">Proyecto: </asp:Label>
<div id="DivProyectosAsignado2" runat="server">
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block;" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block;" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1" style="text-align: right">
<asp:Label runat="server" ID="LblSubProyectoAsignado" AssociatedControlID="DdlSubProyecto">SubProyecto: </asp:Label>
</div> </div>
<div class="col-md-1"> <div class="col-md-2">
<asp:Label runat="server" ID="LblSubProyectoAsignado" AssociatedControlID="DdlSubProyecto">SubProyecto: </asp:Label>
<div>
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" Style="display: inline-block" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1" style="text-align: right">
<asp:Label runat="server" AssociatedControlID="DdlTurno">Turno: </asp:Label>
</div> </div>
<div class="col-md-1"> <div class="col-md-2">
<asp:Label runat="server" AssociatedControlID="DdlTurno">Turno: </asp:Label>
<div>
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" <asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno"
Class="form-control input-sm select2me" ValidationGroup="GrpGuardar"> Class="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1" style="text-align: right">
<asp:Label AssociatedControlID="DdlSupervisorOrganigrama" runat="server" Text="Supervisor:" Style="display: inline-block;"></asp:Label>
</div> </div>
<div class="col-md-1">
<div class="col-md-2">
<asp:Label AssociatedControlID="DdlSupervisorOrganigrama" runat="server" Text="Supervisor:" Style="display: inline-block;"></asp:Label>
<div>
<asp:DropDownList ID="DdlSupervisorOrganigrama" runat="server" Style="display: inline-block;" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlSupervisorOrganigrama" runat="server" Style="display: inline-block;" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem> <asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem> <asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1" style="text-align: right">
<asp:Label runat="server" AssociatedControlID="TxtFechaAsistencia">F. Asistencia: </asp:Label>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
<asp:Label runat="server" AssociatedControlID="TxtFechaAsistencia">F. Asistencia: </asp:Label>
<div >
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaAsistencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox Width="80px" ID="txtFechaAsistencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
@@ -105,6 +102,7 @@
</div> </div>
</div> </div>
</div>

View File

@@ -167,7 +167,11 @@ Partial Class RH_Asistencias
lrds.Add(rds) lrds.Add(rds)
'"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
Dim rutardlc = "GPS/Asistencia.rdlc" 'Dim rutardlc = "GPS/Asistencia.rdlc"
Dim rutardlc As String = UsuarioActual.Empresa.Ruta & "Formatos/Asistencia.rdlc"
If Not System.IO.File.Exists(rutardlc) Then
rutardlc = "Empresas/Grales/Formatos/Asistencia.rdlc"
End If
ImprimirPDF(rutardlc, lrds, params, "Lista de asistencia") ImprimirPDF(rutardlc, lrds, params, "Lista de asistencia")
End Sub End Sub

View File

@@ -698,7 +698,7 @@ public partial class RH_CalculoSBC : ClsPaginas
} }
string rutarchivos = string.Format("{0}modificacionsalarios\\", UsuarioActual.Empresa.RutaArchivos); string rutarchivos = string.Format("{0}modificacionsalarios\\", UsuarioActual.Empresa.Ruta);
if (!System.IO.Directory.Exists(rutarchivos)) if (!System.IO.Directory.Exists(rutarchivos))
{ {
System.IO.Directory.CreateDirectory(rutarchivos); System.IO.Directory.CreateDirectory(rutarchivos);
@@ -900,7 +900,7 @@ public partial class RH_CalculoSBC : ClsPaginas
protected void Lnkmostrararchivos_Click(object sender, EventArgs e) protected void Lnkmostrararchivos_Click(object sender, EventArgs e)
{ {
string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.RutaArchivos); string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.Ruta);
List<archivosD> lisaarchivos = new List<archivosD>(); List<archivosD> lisaarchivos = new List<archivosD>();
foreach (var urfile in System.IO.Directory.GetFiles(rutarchivos, "*")) foreach (var urfile in System.IO.Directory.GetFiles(rutarchivos, "*"))
{ {

View File

@@ -570,7 +570,7 @@
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright" style="display: none;"> <div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvRuta" >
<asp:DropDownList Width="100%" ID="DdlRuta" runat="server" AppendDataBoundItems="True" DataTextField="Ruta" DataValueField="CveRuta" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar"> <asp:DropDownList Width="100%" ID="DdlRuta" runat="server" AppendDataBoundItems="True" DataTextField="Ruta" DataValueField="CveRuta" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin asignar Ruta" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Sin asignar Ruta" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>

View File

@@ -1009,6 +1009,11 @@ Partial Class RH_Personal
DVNetoPeriodo.Visible = True DVNetoPeriodo.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(712) = "1" Then
DvRuta.Visible = True
End If
End If End If
AgregarEventosAsincronosGvVacaciones() AgregarEventosAsincronosGvVacaciones()
End Sub End Sub
@@ -7674,6 +7679,9 @@ Partial Class RH_Personal
Dim CorreoUsuario As String = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo") Dim CorreoUsuario As String = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo")
Dim CCP As String = If(CorreoUsuario.Trim.Length > 0, CorreoUsuario, "") Dim CCP As String = If(CorreoUsuario.Trim.Length > 0, CorreoUsuario, "")
'Para Pruebas
'CorreoNominista = "oscar.irigoyen@adssistemas.mx"
If CorreoNominista = "" Then If CorreoNominista = "" Then
Alert("No se envio el correo de notificación a nominas, el nominista no tiene correo electronico", TipoMensaje.MsgAdvertencia) Alert("No se envio el correo de notificación a nominas, el nominista no tiene correo electronico", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
@@ -7737,9 +7745,12 @@ Partial Class RH_Personal
Cuerpo.AppendLine("<table border='0'>") Cuerpo.AppendLine("<table border='0'>")
Cuerpo.AppendLine($"<tr><td style='text-align: center; font-weight:bold; font-size:medium;' colspan='2'>Datos del Candidato</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: center; font-weight:bold; font-size:medium;' colspan='2'>Datos del Candidato</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Puesto:</td><td style=' text-align: left; font-weight:bold;'>{IIf(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Puesto:</td><td style=' text-align: left; font-weight:bold;'>{IIf(DdlPuesto.SelectedIndex > 0, DdlPuesto.SelectedItem.Text, "") }</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Ruta/Servicio:</td><td style=' text-align: left; font-weight:bold;'>{ DdlRuta.SelectedItem.Text }</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Fecha de { TimpoMovimiento }:</td><td style=' text-align: left; font-weight:bold;'>{TxtFechaEstatus.Text}</td></tr>") If DvRuta.Visible Then
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Ruta/Servicio:</td><td style=' text-align: left; font-weight:bold;'>{ DdlRuta.SelectedItem.Text }</td></tr>")
End If
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Fecha de { TimpoMovimiento }:</td><td style=' text-align: left; font-weight:bold;'>{ If(eTipoMovimientoRH = TipoMovimientoRH.Alta, Now.ToString("dd/MM/yyyy"), TxtFechaEstatus.Text) }</td></tr>")
If eTipoMovimientoRH = TipoMovimientoRH.Baja Then If eTipoMovimientoRH = TipoMovimientoRH.Baja Then
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Motivo de Baja:</td><td style=' text-align: left; font-weight:bold;'>{ DdlMotivoBaja.SelectedItem.Text }</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Motivo de Baja:</td><td style=' text-align: left; font-weight:bold;'>{ DdlMotivoBaja.SelectedItem.Text }</td></tr>")
@@ -7760,12 +7771,36 @@ Partial Class RH_Personal
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Nombre de la Madre:</td><td style=' text-align: left; font-weight:bold;'>{ Madre }</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Nombre de la Madre:</td><td style=' text-align: left; font-weight:bold;'>{ Madre }</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Dirección:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCalle.Text } No Ext.{ TxtNumExt.Text} No int.{TxtNumInt.Text}</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Dirección:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCalle.Text } No Ext.{ TxtNumExt.Text} No int.{TxtNumInt.Text}</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Escolaridad:</td><td style=' text-align: left; font-weight:bold;'>{ IIf(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Escolaridad:</td><td style=' text-align: left; font-weight:bold;'>{ IIf(DdlEscolaridad.SelectedIndex > 0, DdlEscolaridad.SelectedItem.Text, "") }</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Telefono:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCelular.Text},{TxtCelularPersonal.Text}</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Telefono:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCelular.Text}, {TxtCelularPersonal.Text}, {TxtTelefono.Text}</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Tel en Caso de Emergencia:</td><td style=' text-align: left; font-weight:bold;'>{ TxtTelefonoEmergencia.Text }</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Tel en Caso de Emergencia:</td><td style=' text-align: left; font-weight:bold;'>{ TxtTelefonoEmergencia.Text }</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Correo:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCorreo.Text }</td></tr>") Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Correo:</td><td style=' text-align: left; font-weight:bold;'>{ TxtCorreo.Text }</td></tr>")
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Supervisor:</td><td style=' text-align: left; font-weight:bold;'>{ DdlSupervisorOrganigrama.SelectedItem.Text }</td></tr>")
Dim SBDatosBancarios As New StringBuilder
For Each GvRow As GridViewRow In GvBancosCuentas.Rows
SBDatosBancarios.Append($"Banco: {GvRow.FCLabel("LtNombreBanco").Text}, ")
SBDatosBancarios.Append(If(GvRow.FCLabel("LtNumeroCuenta").Text.Trim.Length > 0, $"Cuenta: {GvRow.FCLabel("LtNumeroCuenta").Text}, ", ""))
SBDatosBancarios.Append(If(GvRow.FCLabel("LtCLABE").Text.Trim.Length > 0, $"CLABE: {GvRow.FCLabel("LtCLABE").Text}, ", ""))
SBDatosBancarios.Append(If(GvRow.FCLabel("LtMoneda").Text.Trim.Length > 0, $"Moneda: {GvRow.FCLabel("LtMoneda").Text}, ", ""))
SBDatosBancarios.Append(If(GvRow.FCLabel("LlbEstatusTexto").Text.Trim.Length > 0, $"Estatus: {GvRow.FCLabel("LlbEstatusTexto").Text} ", ""))
SBDatosBancarios.AppendLine($"<br>")
Next
If SBDatosBancarios.ToString.Trim.Length > 0 Then
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Datos Bancarios:</td><td style=' text-align: left; font-weight:bold;'>{ SBDatosBancarios.ToString }</td></tr>")
End If
Cuerpo.AppendLine("</table>") Cuerpo.AppendLine("</table>")
correo.SendMail(EmpresaNotificaciones, CorreoNominista, $"Notificacion por { TimpoMovimiento }de Nomina: " & NombreCompleto, Cuerpo.ToString, CCP:=CCP) correo.SendMail(EmpresaNotificaciones, CorreoNominista, $"Notificacion por { TimpoMovimiento } de Nomina: " & NombreCompleto, Cuerpo.ToString, CCP:=CCP)
End Sub End Sub

View File

@@ -11,7 +11,9 @@
} }
body { body {
/*
font-size: 15px; font-size: 15px;
*/
} }
#C_GvDocumentos4 > tbody > tr:nth-child(2) > td:nth-child(2) { #C_GvDocumentos4 > tbody > tr:nth-child(2) > td:nth-child(2) {
@@ -905,17 +907,23 @@
<span class="caption-subject bold uppercase">Familiares</span> <span class="caption-subject bold uppercase">Familiares</span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<input type="text" id="TxtBusquedaFam" class="form-control input-sm"
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>"
style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>"
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
</div> </div>
<div class="tools"> <div class="tools">
</div> </div>
</div> </div>
<div class="portlet-body form"> <div class="portlet-body form">
<div class="row col-md-12" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important">
<input type="text" id="TxtBusquedaFam" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFam','{0}')", GvFamiliares4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UPTabFamiliares4" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPTabFamiliares4" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvFamiliares4" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFamiliar,Parentesco,Nombre,Domicilio,Edad,Ocupacion,CveParentesco,Telefono,Observaciones" <asp:GridView ID="GvFamiliares4" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFamiliar,Parentesco,Nombre,Domicilio,Edad,Ocupacion,CveParentesco,Telefono,Observaciones"
@@ -995,6 +1003,13 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<input type="text" id="TxtBusquedaEsc" class="form-control input-sm"
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>"
style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>"
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
</div> </div>
<div class="tools"> <div class="tools">
@@ -1002,10 +1017,7 @@
</div> </div>
<div class="portlet-body form"> <div class="portlet-body form">
<div class="row col-md-12" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important">
<input type="text" id="TxtBusquedaEsc" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaEsc','{0}')", GvFamiliares4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UPTabEscolaridad4" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPTabEscolaridad4" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -1075,16 +1087,19 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<input type="text" id="TxtBusquedaLab" class="form-control input-sm"
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaLap','{0}')", GvReferenciasLaborales4.ClientID) %>"
style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaLab','{0}')", GvReferenciasLaborales4.ClientID) %>"
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
</div> </div>
<div class="tools"> <div class="tools">
</div> </div>
</div> </div>
<div class="portlet-body form"> <div class="portlet-body form">
<div class="row col-md-12" style="text-align: right!important; margin-bottom: 2px!important; margin-top: 2px!important">
<input type="text" id="TxtBusquedaLab" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaLap','{0}')", GvReferenciasLaborales4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaLab','{0}')", GvReferenciasLaborales4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UPTabReferenciasLaborales4" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPTabReferenciasLaborales4" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -1156,6 +1171,12 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<input type="text" id="TxtBusquedaPer" class="form-control input-sm"
onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>"
style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>"
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>
</div> </div>
<div class="tools"> <div class="tools">
@@ -1163,10 +1184,7 @@
</div> </div>
<div class="portlet-body form"> <div class="portlet-body form">
<div class="row col-md-12" style="text-align: right!important; margin-top: 2px!important; margin-bottom: 2px!important">
<input type="text" id="TxtBusquedaPer" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaPer','{0}')", GvReferenciasPersonales4.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UPTabReferenciasPersonales4" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPTabReferenciasPersonales4" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvReferenciasPersonales4" runat="server" AutoGenerateColumns="False" <asp:GridView ID="GvReferenciasPersonales4" runat="server" AutoGenerateColumns="False"
@@ -3676,4 +3694,3 @@
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -1066,12 +1066,21 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</th> </th>
<th> <th>
<asp:TextBox ID="TxtPrecio" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GprAgregaPS" Width="76px" Height="24px" CssClass="form-control input-sm "></asp:TextBox> <div class="row" id="DivPrecioLista" runat="server" visible="false">
<div class="col-md-12">
<asp:DropDownList ID="DdlPrecioLista" runat="server" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista" OnSelectedIndexChanged="DdlPrecioLista_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:TextBox ID="TxtPrecio" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GprAgregaPS" Width="100%" Height="24px" CssClass="form-control input-sm "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator ID="CVPrecio" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator> <asp:CustomValidator ID="CVPrecio" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecio" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</th> </th>
<th id="thEncDesc2" runat="server" visible="true"></th> <th id="thEncDesc2" runat="server" visible="true"></th>
<th id="thPredial2" runat="server" visible="false"> <th id="thPredial2" runat="server" visible="false">
@@ -1207,7 +1216,16 @@
<%--9--%> <%--9--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right"> <asp:TemplateField ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<div class="row">
<div class="col-md-12">
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU", "{0:N2}") %>'></asp:Literal> <asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU", "{0:N2}") %>'></asp:Literal>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:Literal ID="LtlPrecioLista" runat="server" Visible="false" Text='<%# Eval("PrecioLista") %>'></asp:Literal>
</div>
</div>
</ItemTemplate> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal> <asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal>

View File

@@ -2734,6 +2734,9 @@ Partial Class Ventas
TmpDT.Columns.Add("TieneProntoPago", GetType(String)) TmpDT.Columns.Add("TieneProntoPago", GetType(String))
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal)) TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
TmpDT.Columns.Add("CveMarca", GetType(Integer)) TmpDT.Columns.Add("CveMarca", GetType(Integer))
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
TmpDT.Columns.Add("PrecioLista", GetType(String))
GvPS.DataSource = ObjVentas.DtResultados GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind() GvPS.DataBind()
@@ -2758,6 +2761,9 @@ Partial Class Ventas
TmpDT.Columns.Add("TieneProntoPago", GetType(String)) TmpDT.Columns.Add("TieneProntoPago", GetType(String))
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal)) TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
TmpDT.Columns.Add("CveMarca", GetType(Integer)) TmpDT.Columns.Add("CveMarca", GetType(Integer))
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
TmpDT.Columns.Add("PrecioLista", GetType(String))
GvPS.DataSource = ObjVentas.DtResultados GvPS.DataSource = ObjVentas.DtResultados
GvPS.DataBind() GvPS.DataBind()
@@ -3125,6 +3131,11 @@ Partial Class Ventas
If Not ExFolioFactura Then SetPermisos() If Not ExFolioFactura Then SetPermisos()
If CveVenta < 1 Then CargaFolios() If CveVenta < 1 Then CargaFolios()
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
CargaListasPrecios()
End If
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE 'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
'If UsuarioActual.CveVendedor > 0 Then 'If UsuarioActual.CveVendedor > 0 Then
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString()) ' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
@@ -3475,6 +3486,21 @@ Partial Class Ventas
End If End If
End Sub End Sub
Private Sub CargaListasPrecios()
DivPrecioLista.Visible = True
Using ObjVta As New ClsVentas
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
End If
End Using
DdlPrecioLista.DataBind()
DdlPrecioLista.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpPS.Update()
End Sub
Private Sub BloqueaClasificaciones() Private Sub BloqueaClasificaciones()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
DdlClasificacion.Enabled = False DdlClasificacion.Enabled = False
@@ -6076,12 +6102,6 @@ Partial Class Ventas
End Sub End Sub
Private Sub CargaFormaPago(CveMetodoPago As Integer) Private Sub CargaFormaPago(CveMetodoPago As Integer)
'EN LA VERSION 4.0 NO PERMITE DESBLOEQUEAR RELACION METODO Y FOMA DE PAGO
'If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
' 'permiso para desbloquear la relación entre Método de pago y forma de pago
' If UsuarioActual.TienePermisoProceso(282) Then CveMetodoPago = -1
'End If
Dim dtt As DataTable = Nothing Dim dtt As DataTable = Nothing
If CveMetodoPago > 0 Then If CveMetodoPago > 0 Then
dtt = GlobalDTVtaFormaPago.FiltraParametros(If(CveMetodoPago = 1, " CveFormaPago <> 20 ", "CveFormaPago = 20")) dtt = GlobalDTVtaFormaPago.FiltraParametros(If(CveMetodoPago = 1, " CveFormaPago <> 20 ", "CveFormaPago = 20"))
@@ -6117,22 +6137,13 @@ Partial Class Ventas
'End If 'End If
End Sub End Sub
Private Sub CargaUsoCFDI() Private Sub CargaUsoCFDI()
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
RegimenFiscalCliente = "-1"
End If
DdlUsoCFDI.Items.Clear() DdlUsoCFDI.Items.Clear()
DdlSucursalUsoCFDI.Items.Clear() DdlSucursalUsoCFDI.Items.Clear()
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim EsPersonaMoral As Boolean = (TipoPersona = True) Dim EsPersonaMoral As Boolean = (TipoPersona = True)
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente) DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente) DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
Else
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
End If
DdlUsoCFDI.DataBind() DdlUsoCFDI.DataBind()
DdlSucursalUsoCFDI.DataBind() DdlSucursalUsoCFDI.DataBind()
@@ -6463,12 +6474,10 @@ Partial Class Ventas
ViewState("CliPais") = ObjCliente.Pais ViewState("CliPais") = ObjCliente.Pais
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString() RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString()
RegimenSociedad = ObjCliente.DtResultados(0)("RegimenSociedad").ToString() RegimenSociedad = ObjCliente.DtResultados(0)("RegimenSociedad").ToString()
TipoPersona = CBool(ObjCliente.DtResultados(0)("TipoPersona")) TipoPersona = CBool(ObjCliente.DtResultados(0)("TipoPersona"))
CargaUsoCFDI() CargaUsoCFDI()
End If
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago 'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
If Not ClienteDesglosaIEPS Then If Not ClienteDesglosaIEPS Then
@@ -6527,7 +6536,7 @@ Partial Class Ventas
End If End If
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI) DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales. 'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23") DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False DdlUsoCFDI.Enabled = False
@@ -7061,7 +7070,7 @@ Partial Class Ventas
Dim ValorAutorizacion As String = UsuarioActual.Empresa.Funcionalidad(595) Dim ValorAutorizacion As String = UsuarioActual.Empresa.Funcionalidad(595)
'OBLIGAR PAGO DE CONTADO SI EL CLIENTE NO PERMITE CREDITO 'OBLIGAR PAGO DE CONTADO SI EL CLIENTE NO PERMITE CREDITO
If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then If Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then
RBLPago.SelectedValue = "2" RBLPago.SelectedValue = "2"
RBLPago.Items(0).Enabled = False RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing) RBLPago_SelectedIndexChanged(Nothing, Nothing)
@@ -7459,9 +7468,9 @@ Partial Class Ventas
LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString() LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString()
'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString() 'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString()
LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString() LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString()
If Not UsuarioActual.Empresa.Funcionalidad(350) = "1" Then 'If Not UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
LblCP.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString() ' LblCP.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString()
End If 'End If
ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString() ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString()
ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString() ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString()
ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString() ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString()
@@ -7518,7 +7527,7 @@ Partial Class Ventas
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString()) DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString())
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString()) DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString())
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales. 'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23") DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False DdlUsoCFDI.Enabled = False
@@ -7560,7 +7569,7 @@ Partial Class Ventas
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33) DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI) DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales. 'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23") DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False DdlUsoCFDI.Enabled = False
@@ -8038,6 +8047,10 @@ Partial Class Ventas
End If End If
If UsuarioActual.Empresa.Funcionalidad(360) = "1" AndAlso e.Row.DBCampo("CvePrecioLista").ToEntero() > 0 Then
e.Row.FCLiteral("LtlPrecioLista").Visible = True
End If
'CANTIDAD FACTURADA 'CANTIDAD FACTURADA
Select Case e.Row.DBCampo("TipoDocto") Select Case e.Row.DBCampo("TipoDocto")
Case "Cot" Case "Cot"
@@ -8748,7 +8761,7 @@ Partial Class Ventas
DtOCTmpDT = TmpDT.Copy DtOCTmpDT = TmpDT.Copy
TmpDTError = TmpDT.Copy TmpDTError = TmpDT.Copy
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Egs", "Dev") Then If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Egs", "Dev") Then
If RegimenFiscalCliente.Contiene("-1", "") Then If RegimenFiscalCliente.Contiene("-1", "") Then
Alert("El cliente no tiene asignado un régimen fiscal.", TipoMensaje.MsgAdvertencia) Alert("El cliente no tiene asignado un régimen fiscal.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
@@ -8759,6 +8772,7 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
End If End If
If ChkEmitirComercioExterior.Checked AndAlso DdlMoneda.SelectedValue.ToEntero() <> 2 Then If ChkEmitirComercioExterior.Checked AndAlso DdlMoneda.SelectedValue.ToEntero() <> 2 Then
Alert("La moneda de la factura debe ser dolares cuando aplica comercio exterior.", TipoMensaje.MsgAdvertencia) Alert("La moneda de la factura debe ser dolares cuando aplica comercio exterior.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
@@ -8769,7 +8783,7 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs", "Dev") Then If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs", "Dev") Then
If LblRFC.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso RegimenFiscalCliente <> "616" Then If LblRFC.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso RegimenFiscalCliente <> "616" Then
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
@@ -9396,37 +9410,37 @@ Partial Class Ventas
End If End If
'Verifica versión 3.3.() 'Verifica versión 3.3.()
If (Not UsuarioActual.Empresa.Funcionalidad(350) = "1") AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then 'If (Not UsuarioActual.Empresa.Funcionalidad(350) = "1") AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
Dim dttsat As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '' OR ISNULL(SATClaveUM,'') = '' ") ' Dim dttsat As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '' OR ISNULL(SATClaveUM,'') = '' ")
If dttsat IsNot Nothing AndAlso dttsat.Rows.Count > 0 Then ' If dttsat IsNot Nothing AndAlso dttsat.Rows.Count > 0 Then
Dim str As New StringBuilder ' Dim str As New StringBuilder
str.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>") ' str.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
For Each drt As DataRow In dttsat.Rows ' For Each drt As DataRow In dttsat.Rows
str.AppendFormat("{0} <br/>", drt("CodigoPS")) ' str.AppendFormat("{0} <br/>", drt("CodigoPS"))
Next ' Next
Alert(str.ToString(), TipoMensaje.MsgAdvertencia) ' Alert(str.ToString(), TipoMensaje.MsgAdvertencia)
dttsat.Dispose() ' dttsat.Dispose()
str.Clear() ' str.Clear()
Exit Sub ' Exit Sub
End If ' End If
dttsat.Dispose() ' dttsat.Dispose()
If UsuarioActual.CveEmpresa = 72 Then ' If UsuarioActual.CveEmpresa = 72 Then
Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ") ' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ")
If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then ' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
Dim StrNoEncontrados As New StringBuilder ' Dim StrNoEncontrados As New StringBuilder
StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>") ' StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>")
For Each drt As DataRow In DtNoEncontrados.Rows ' For Each drt As DataRow In DtNoEncontrados.Rows
StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS")) ' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
Next ' Next
Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia) ' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
DtNoEncontrados.Dispose() ' DtNoEncontrados.Dispose()
StrNoEncontrados.Clear() ' StrNoEncontrados.Clear()
Exit Sub ' Exit Sub
End If ' End If
DtNoEncontrados.Dispose() ' DtNoEncontrados.Dispose()
End If ' End If
End If 'End If
'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT 'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT
If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then
@@ -10068,7 +10082,7 @@ Partial Class Ventas
Try Try
If AutoConta Then If AutoConta Then
If idCuentaContabilizacion > 0 Then If idCuentaContabilizacion > 0 Or UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit() If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
Else Else
@@ -10643,9 +10657,6 @@ Partial Class Ventas
ObjFacturaDevolucion.Fecha = Now ObjFacturaDevolucion.Fecha = Now
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaDevolucion.Version = "4.0" ObjFacturaDevolucion.Version = "4.0"
If ObjFacturaDevolucion.Cliente Is Nothing Then If ObjFacturaDevolucion.Cliente Is Nothing Then
@@ -10654,12 +10665,6 @@ Partial Class Ventas
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.CveMetodoPago33 = 1 ObjFacturaDevolucion.CveMetodoPago33 = 1
ObjFacturaDevolucion.MetodoPago33 = "Pago en una sola exhibición" ObjFacturaDevolucion.MetodoPago33 = "Pago en una sola exhibición"
@@ -10942,8 +10947,6 @@ Partial Class Ventas
End If End If
ObjFacturaBonificacion.Fecha = Now ObjFacturaBonificacion.Fecha = Now
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaBonificacion.Version = "4.0" ObjFacturaBonificacion.Version = "4.0"
If ObjFacturaBonificacion.Cliente Is Nothing Then If ObjFacturaBonificacion.Cliente Is Nothing Then
@@ -10952,9 +10955,6 @@ Partial Class Ventas
ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaBonificacion.Version = "3.3"
End If
ObjFacturaBonificacion.CveMetodoPago33 = 1 ObjFacturaBonificacion.CveMetodoPago33 = 1
ObjFacturaBonificacion.MetodoPago33 = "Pago en una sola exhibición" ObjFacturaBonificacion.MetodoPago33 = "Pago en una sola exhibición"
@@ -11368,7 +11368,6 @@ Partial Class Ventas
ObjFactura = New Modelos.Factura ObjFactura = New Modelos.Factura
End If End If
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFactura.Version = "4.0" ObjFactura.Version = "4.0"
If ObjFactura.Cliente Is Nothing Then If ObjFactura.Cliente Is Nothing Then
ObjFactura.Cliente = New Modelos.ClienteModel ObjFactura.Cliente = New Modelos.ClienteModel
@@ -11376,9 +11375,6 @@ Partial Class Ventas
ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFactura.Version = "3.3"
End If
ObjFactura.CveUsuario = UsuarioActual.CveUsuario ObjFactura.CveUsuario = UsuarioActual.CveUsuario
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
@@ -12154,7 +12150,6 @@ Partial Class Ventas
ObjFacturaDevolucion.SerieFolioPadre = HdnFolioFiscalNC.Value.ToString() ObjFacturaDevolucion.SerieFolioPadre = HdnFolioFiscalNC.Value.ToString()
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaDevolucion.Version = "4.0" ObjFacturaDevolucion.Version = "4.0"
If ObjFacturaDevolucion.Cliente Is Nothing Then If ObjFacturaDevolucion.Cliente Is Nothing Then
@@ -12163,9 +12158,6 @@ Partial Class Ventas
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero() ObjFacturaDevolucion.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero()
ObjFacturaDevolucion.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "") ObjFacturaDevolucion.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
@@ -12412,7 +12404,7 @@ Partial Class Ventas
Dim Timbre As New CFDITimbre Dim Timbre As New CFDITimbre
Timbre.Comprobante.Version = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3") Timbre.Comprobante.Version = "4.0"
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString() Timbre.Comprobante.Folio = Obj.Folio.ToString()
@@ -12441,11 +12433,7 @@ Partial Class Ventas
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else Else
Timbre.Receptor.RFC = Obj.Cliente.RFC Timbre.Receptor.RFC = Obj.Cliente.RFC
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Timbre.Receptor.Nombre = Obj.Cliente.Nombre Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Else
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
End If
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If End If
@@ -13346,11 +13334,9 @@ Partial Class Ventas
For Each Row As DataRow In TmpDTDetalle.Rows For Each Row As DataRow In TmpDTDetalle.Rows
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDouble, Row("CveUM").ToString().ToEntero(), If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDouble, Row("CveUM").ToString().ToEntero(),
Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6), Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(),
TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble,
IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero()) Then
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble,
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString()) Then
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Exit For Exit For
Else Else
@@ -17615,7 +17601,13 @@ Partial Class Ventas
Dim PrecioSugerido As Decimal = 0 Dim PrecioSugerido As Decimal = 0
Dim tPrecioSugerido As Decimal = 0 Dim tPrecioSugerido As Decimal = 0
tPrecioSugerido = drPS("Precio").ToString().ToDecimal tPrecioSugerido = drPS("Precio").ToString().ToDecimal
PrecioSugerido = CalculaPrecioSugerido(CvePSParametro, drPS("CveClasificacion").ToString().ToEntero()) Dim ObjPrecioSugerido = CalculaPrecioSugerido(CvePSParametro, drPS("CveClasificacion").ToString().ToEntero())
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
End If
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
@@ -17655,7 +17647,9 @@ Partial Class Ventas
End Sub End Sub
Private Function CalculaPrecioSugerido(CvePSParametro As Integer, CveClasificacion As Integer) As Decimal Private Function CalculaPrecioSugerido(CvePSParametro As Integer, CveClasificacion As Integer, Optional CvePrecioListaSugerido As Integer = -1) As Modelos.MPrecioSugerido
Dim Retorno As New Modelos.MPrecioSugerido
Dim PrecioSugerido As Decimal = 0 Dim PrecioSugerido As Decimal = 0
If UsuarioActual.CveEmpresa.Contiene(1) Then If UsuarioActual.CveEmpresa.Contiene(1) Then
@@ -17698,6 +17692,10 @@ Partial Class Ventas
End If End If
If DivPrecioLista.Visible AndAlso CvePrecioListaSugerido > 0 Then
CvePrecioListaPS = CvePrecioListaSugerido
End If
If CvePrecioListaPS > 0 Then If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
@@ -17717,7 +17715,8 @@ Partial Class Ventas
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
End If End If
End If End If
CvePrecioLista = CvePrecioListaPS Me.CvePrecioLista = CvePrecioListaPS
Retorno.CvePrecioLista = CvePrecioListaPS
End If End If
@@ -17729,7 +17728,10 @@ Partial Class Ventas
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1) PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If End If
End If End If
Return PrecioSugerido
Retorno.PrecioSugerido = PrecioSugerido
Return Retorno
End Function End Function
Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS) DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS)
@@ -18816,11 +18818,29 @@ Partial Class Ventas
PU = ObjDescuento.PU PU = ObjDescuento.PU
End If End If
Dim CvePrecioListaPS As Integer = -1
Dim PrecioListaPS As String = ""
'VALIDA LA ASIGNACION DE LISTA DE PRECIOS
If DivPrecioLista.Visible Then
If DdlPrecioLista.SelectedValue.ToEntero() > 0 AndAlso DdlPrecioLista.SelectedValue.ToEntero() = Me.CvePrecioLista Then
CvePrecioListaPS = Me.CvePrecioLista
PrecioListaPS = DdlPrecioLista.SelectedItem.Text
Else
Alert("La lista de precios del producto no coincide con la seleccionada", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Else
If Me.CvePrecioLista > 0 Then
CvePrecioListaPS = Me.CvePrecioLista
End If
End If
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text, AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento, CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento,
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle, Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento) ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS)
CalculaUsados() CalculaUsados()
@@ -19011,7 +19031,7 @@ Partial Class Ventas
Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "", Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False, Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing) As Boolean Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Try Try
@@ -19267,6 +19287,9 @@ Partial Class Ventas
End If End If
Row("CvePrecioLista") = CvePrecioLista
Row("PrecioLista") = PrecioLista
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
@@ -19501,6 +19524,9 @@ Partial Class Ventas
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String)) TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
TmpDT.Columns.Add("CveMarca", GetType(Integer)) TmpDT.Columns.Add("CveMarca", GetType(Integer))
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
TmpDT.Columns.Add("PrecioLista", GetType(String))
TmpDT.Columns("EsOutSourcing").DefaultValue = False TmpDT.Columns("EsOutSourcing").DefaultValue = False
TmpDT.Columns("EsCargo").DefaultValue = False TmpDT.Columns("EsCargo").DefaultValue = False
@@ -22227,7 +22253,7 @@ Partial Class Ventas
Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6), Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6),
Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(), Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(),
CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString()}").ToEntero(), -1), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString()}").ToEntero(), -1),
ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString()) Then ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero()) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
Else Else
@@ -23410,7 +23436,7 @@ Partial Class Ventas
RFVCiudadC.Visible = False RFVCiudadC.Visible = False
RFVLocalidadC.Visible = False RFVLocalidadC.Visible = False
RFVSATPais.Visible = False RFVSATPais.Visible = False
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1" divRegimenCliente.Visible = True
RdTipoPersona.SelectedValue = "0" RdTipoPersona.SelectedValue = "0"
@@ -23440,7 +23466,7 @@ Partial Class Ventas
DivCorreoCuentaCliente.Visible = True DivCorreoCuentaCliente.Visible = True
DivBotonesAgregarCliente.Visible = True DivBotonesAgregarCliente.Visible = True
DivFormaCliente.Visible = True DivFormaCliente.Visible = True
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1" divRegimenCliente.Visible = True
End If End If
End If End If
ObjCliente.Dispose() ObjCliente.Dispose()
@@ -23473,17 +23499,13 @@ Partial Class Ventas
Else Else
Dim RegimenFiscalCliente As String = "-1" Dim RegimenFiscalCliente As String = "-1"
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}") RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}")
End If End If
DdlUsoCFDICliente.Items.Clear() DdlUsoCFDICliente.Items.Clear()
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1") Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente) DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
Else
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
End If
DdlUsoCFDICliente.DataBind() DdlUsoCFDICliente.DataBind()
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -23505,7 +23527,6 @@ Partial Class Ventas
Dim CveRegimenFiscal As Integer = -1 Dim CveRegimenFiscal As Integer = -1
Dim CveUsoCFDI As Integer = 3 Dim CveUsoCFDI As Integer = 3
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero() CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero() CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
@@ -23543,8 +23564,6 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
End If
If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0) Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0)
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
@@ -25604,7 +25623,8 @@ Partial Class Ventas
If CvePS > 0 Then If CvePS > 0 Then
If PrecioUnitario <= 0 Then If PrecioUnitario <= 0 Then
PrecioUnitario = CalculaPrecioSugerido(CvePS, CveClasificacion) Dim ObjPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
PrecioUnitario = ObjPrecioSugerido.PrecioSugerido
End If End If
AgregarProductoServicio(Cantidad, CveUM, UM, -1, "", AgregarProductoServicio(Cantidad, CveUM, UM, -1, "",
@@ -32988,6 +33008,10 @@ Partial Class Ventas
'REMOVER EVENTO PARA RECARGAR ALMACEN 'REMOVER EVENTO PARA RECARGAR ALMACEN
'spanAlmacen.Attributes.Remove("onclick") 'spanAlmacen.Attributes.Remove("onclick")
If UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
CargaListasPrecios()
End If
HdnCargarInventario.Value = "False" HdnCargarInventario.Value = "False"
UpParametros.Update() UpParametros.Update()
@@ -34870,7 +34894,6 @@ Partial Class Ventas
ObjFacturaProntoPago.Fecha = Now ObjFacturaProntoPago.Fecha = Now
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaProntoPago.Version = "4.0" ObjFacturaProntoPago.Version = "4.0"
If ObjFacturaProntoPago.Cliente Is Nothing Then If ObjFacturaProntoPago.Cliente Is Nothing Then
@@ -34879,9 +34902,6 @@ Partial Class Ventas
ObjFacturaProntoPago.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal ObjFacturaProntoPago.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaProntoPago.Cliente.RegimenFiscal = ClienteRegimenFiscal ObjFacturaProntoPago.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaProntoPago.Version = "3.3"
End If
ObjFacturaProntoPago.CveMetodoPago33 = 1 ObjFacturaProntoPago.CveMetodoPago33 = 1
ObjFacturaProntoPago.MetodoPago33 = "Pago en una sola exhibición" ObjFacturaProntoPago.MetodoPago33 = "Pago en una sola exhibición"
@@ -35286,7 +35306,8 @@ Partial Class Ventas
TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean)) TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CveMarca", GetType(Integer)) TmpDT.Columns.Add("CveMarca", GetType(Integer))
TmpDT.Columns.Add("CvePrecioLista", GetType(Integer))
TmpDT.Columns.Add("PrecioLista", GetType(String))
Return TmpDT Return TmpDT
End Function End Function
Private Function InicializaDTVentasNCProntoPago() As DataTable Private Function InicializaDTVentasNCProntoPago() As DataTable
@@ -35585,8 +35606,6 @@ Partial Class Ventas
DVRegimenSociedad.Visible = False DVRegimenSociedad.Visible = False
DivRazonSocial2.Attributes.Add("class", "col-md-12") DivRazonSocial2.Attributes.Add("class", "col-md-12")
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
DivRazonSocial2.Attributes.Add("class", "col-md-8") DivRazonSocial2.Attributes.Add("class", "col-md-8")
DVRegimenSociedad.Visible = True DVRegimenSociedad.Visible = True
@@ -35617,8 +35636,6 @@ Partial Class Ventas
DdlUsoCFDICliente.Items.Clear() DdlUsoCFDICliente.Items.Clear()
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
UpAgregarCliente.Update() UpAgregarCliente.Update()
End Sub End Sub
@@ -36398,7 +36415,7 @@ Partial Class Ventas
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
End If End If
End If End If
CvePrecioLista = CvePrecioListaPS Me.CvePrecioLista = CvePrecioListaPS
End If End If
@@ -36740,5 +36757,20 @@ Partial Class Ventas
End If End If
End Sub End Sub
Protected Sub DdlPrecioLista_SelectedIndexChanged(sender As Object, e As EventArgs)
If DivPrecioLista.Visible AndAlso DdlPrecioLista.SelectedValue.ToEntero() > 0 Then
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero()).FiltroPrimero("")
Dim ObjPrecioSugerido = CalculaPrecioSugerido(drPS("CvePS").ToString().ToEntero(), drPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=DdlPrecioLista.SelectedValue.ToEntero())
If ObjPrecioSugerido.PrecioSugerido > 0 Then
TxtPrecio.Text = ObjPrecioSugerido.PrecioSugerido.ToString("#,###.####")
Else
Alert("No se encontro un precio para este producto en la lista de precios seleccionada")
End If
End If
End Sub
End Class End Class