This commit is contained in:
2024-12-30 22:11:50 -07:00
11 changed files with 225 additions and 80 deletions

View File

@@ -3080,7 +3080,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Observaciones", Observaciones))
If UsuarioActual.CveEmpresa.Contiene(186, 189, 193) Then
If UsuarioActual.CveEmpresa.Contiene(186, 189, 193, 189) Then
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("NombreProveedor", If(CveCompra > 0, dr("RazonSocial").ToString, "")))
End If

View File

@@ -2300,28 +2300,38 @@ Partial Class Inventarios_EntregaAlmacen
StrXML.Append("</conceptos>")
Dim TieneErrorExistencia As Boolean = False
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
TieneErrorExistencia = True
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
Dim VerificaExistencia As Boolean = True
Dim SerieLoteCaducidad As String = ","
If Dr("Serie").ToString.Trim.Length > 0 AndAlso Dr("Serie").ToString.Trim <> "-1" Then
SerieLoteCaducidad = $" Serie: { Dr("Serie").ToString.Trim}"
End If
If Dr("Lote").ToString.Trim.Length > 0 AndAlso Dr("Lote").ToString.Trim <> "-1" Then
SerieLoteCaducidad = $"{SerieLoteCaducidad} Lote: {Dr("Lote").ToString.Trim}"
End If
If Dr("FechaCaducidad").ToString.Trim.Length > 0 AndAlso Dr("FechaCaducidad").ToString.Trim <> "-1" Then
SerieLoteCaducidad = $"{SerieLoteCaducidad} Caducidad: { Dr("FechaCaducidad").ToString.Trim.ToDate.ToString("dd/MM/yyyy")}"
End If
TextoError.AppendFormat("<b> - {0}</b> Existencia: {1:#,##0.##} {2}<br/>", Dr("CodigoPS"), Dr("Existencia"), If(SerieLoteCaducidad <> ",", SerieLoteCaducidad, ""))
Next
End If
Else
TieneErrorExistencia = True
'TEMPORAL - NO VERIFICAR EXISTENCIA CUANDO SON MUCHOS DATOS
If UsuarioActual.CveEmpresa = 140 AndAlso DtDatos.Rows.Count > 10 Then
VerificaExistencia = False
End If
If VerificaExistencia Then
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
TieneErrorExistencia = True
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
Dim SerieLoteCaducidad As String = ","
If Dr("Serie").ToString.Trim.Length > 0 AndAlso Dr("Serie").ToString.Trim <> "-1" Then
SerieLoteCaducidad = $" Serie: { Dr("Serie").ToString.Trim}"
End If
If Dr("Lote").ToString.Trim.Length > 0 AndAlso Dr("Lote").ToString.Trim <> "-1" Then
SerieLoteCaducidad = $"{SerieLoteCaducidad} Lote: {Dr("Lote").ToString.Trim}"
End If
If Dr("FechaCaducidad").ToString.Trim.Length > 0 AndAlso Dr("FechaCaducidad").ToString.Trim <> "-1" Then
SerieLoteCaducidad = $"{SerieLoteCaducidad} Caducidad: { Dr("FechaCaducidad").ToString.Trim.ToDate.ToString("dd/MM/yyyy")}"
End If
TextoError.AppendFormat("<b> - {0}</b> Existencia: {1:#,##0.##} {2}<br/>", Dr("CodigoPS"), Dr("Existencia"), If(SerieLoteCaducidad <> ",", SerieLoteCaducidad, ""))
Next
End If
Else
TieneErrorExistencia = True
End If
End If
If TieneErrorExistencia Then
ObjInventario.RollBack()
ObjInventario.Dispose()
@@ -3681,17 +3691,28 @@ Partial Class Inventarios_EntregaAlmacen
StrXML.Append("</conceptos>")
Dim TieneErrorExistencia As Boolean = False
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
TieneErrorExistencia = True
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
TextoError += $"<b> - {Dr("CodigoPS")}</b> Existencia: {Dr("Existencia").ToString().ToDecimal.ToString("#,##0.##")} <br/>"
Next
End If
Else
TieneErrorExistencia = True
Dim VerificaExistencia As Boolean = True
'TEMPORAL - NO VERIFICAR EXISTENCIA CUANDO SON MUCHOS DATOS
If UsuarioActual.CveEmpresa = 140 AndAlso DtDatos.Rows.Count > 10 Then
VerificaExistencia = False
End If
If VerificaExistencia Then
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
TieneErrorExistencia = True
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
TextoError += $"<b> - {Dr("CodigoPS")}</b> Existencia: {Dr("Existencia").ToString().ToDecimal.ToString("#,##0.##")} <br/>"
Next
End If
Else
TieneErrorExistencia = True
End If
End If
If TieneErrorExistencia Then
ObjInventario.RollBack()
ObjInventario.Dispose()

View File

@@ -18,7 +18,7 @@
<%--FILTROS--%>
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
@@ -53,6 +53,10 @@
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1" style="max-width: 110px;">Centro de Costo</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="select2me Widthall"></asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -60,16 +64,15 @@
<div class="row">
<label class="col-md-1" style="max-width: 80px;">Proveedor: </label>
<div class="col-md-2">
<asp:DropDownList ID="DdlProveedor" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="select2me Widthall" ></asp:DropDownList>
<%--<asp:DropDownList ID="DdlProveedor" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="select2me" Width="100%" ></asp:DropDownList>--%>
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</div>
<div class="col-md-1" style="max-width: 60px;">Cliente:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="select2me Widthall"></asp:DropDownList>
</div>
<div class="col-md-1" style="max-width: 110px;">Centro de Costo</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="select2me Widthall"></asp:DropDownList>
<%--<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" CssClass="select2me" Width="100%" ></asp:DropDownList>--%>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
</div>
</div>

View File

@@ -15,20 +15,51 @@ Partial Class OC_RepOCxSurtir
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
TxtFechaF.Text = NowADS().ToShortDateString
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
'DdlProveedor.DataBind()
'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
'CargaProveedores
DdlSubProyecto.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
DdlCliente.DataBind()
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
If EsWS Then
DdlCliente.setEsWebService(True)
DdlCliente.SelectedText = "Todos"
DdlCliente.SelectedValue = "-1"
DdlProveedor.setEsWebService(True)
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
DdlProveedor.SelectedText = "Todos"
DdlProveedor.SelectedValue = "-1"
Else
DdlCliente.setEsWebService(False)
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlCliente.DataBind()
DdlCliente.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProveedor.setEsWebService(False)
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If
UPFiltros.Update()
End Sub

View File

@@ -168,7 +168,7 @@
</a>
</li>
<li id="tdVentas" runat="server" visible="false">
<a onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarFolio.aspx',890,577,'N');
<a onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarFolio.aspx',890,607,'N');
">
<i class="fa fa-money"></i>
Buscar Venta

View File

@@ -102,7 +102,8 @@ Partial Class Ventas_PVCobranza
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not Page.IsPostBack Then
Dim Arr As New ArrayList
'Arr.Add("autorizada")
'If EnviarNotificacionWhatsApp("526621430964", "solicitud_autorizacion_anticipo_respuesta", Arr) Then
@@ -389,7 +390,24 @@ Partial Class Ventas_PVCobranza
Else
e.Row.FCLinkButton("BtnPagar").CssClass = "btn btn-xs btn-danger"
' e.Row.FCLinkButton("BtnPagar").Enabled = False
e.Row.FCLinkButton("BtnPagar").OnClientClick = "alert('La solicitud de crédito no ha sido autorizada');return false;"
'e.Row.FCLinkButton("BtnPagar").OnClientClick = "alert('La solicitud de crédito no ha sido autorizada');return false;"
'e.Row.FCLinkButton("BtnPagar").OnClientClick = "bootbox.dialog({message: 'La solicitud de crédito no ha sido autorizada ', className: ' header-yellow ', onEscape: function() { },title: '<i class='fa fa-warning'></i> Advertencia',buttons: { success: { label: '', className: ' hide',callback: function() { } }, danger: { label: '', className: ' hide',callback: function() { } },main: { label: 'Aceptar', className: ' yellow', callback: function() { } } } });return false;"
'e.Row.FCLinkButton("BtnPagar") =
e.Row.FCLinkButton("BtnPagar").Enabled = False
e.Row.FCLinkButton("BtnPagar").OnClientClick =
"bootbox.dialog({" &
"message: 'La solicitud de crédito no ha sido autorizada ', " &
"className: 'header-yellow', " &
"onEscape: function() {}, " &
"title: '<i class=""fa fa-warning""></i> Advertencia', " &
"buttons: { " &
"success: { label: '', className: 'hide', callback: function() {} }, " &
"danger: { label: '', className: 'hide', callback: function() {} }, " &
"main: { label: 'Aceptar', className: 'yellow', callback: function() {} } " &
"} " &
"});" &
"return false;"
End If
End If

View File

@@ -175,7 +175,7 @@ Partial Class PopUpBuscarFolio
Liga = String.Format("<a class='Texto' href='javascript:IrPV(""{0}"");'>", e.Row.DBCampo("CveVenta"))
End If
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div class='truncate' style='width:22px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div style='width:22px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:95px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio"))
e.Row.FCLiteral("LtlFecha").Text = String.Format("<div class='truncate' style='width:64px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString)
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))

View File

@@ -142,6 +142,9 @@
<asp:ListItem Value ="1">Descuento</asp:ListItem>
<asp:ListItem Value ="2">PU</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoAplicacion" runat="server" ControlToValidate="DdlTipoAplicacion" Display="None" InitialValue="-1"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Aplicacion''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERfvDdlTipoAplicacion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoAplicacion" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-2 truncate">Marca:</label>
@@ -193,7 +196,7 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LbAgregarModal" OnClick="LbAgregarModal_Click" runat="server" data-toggle="tooltip" title="Agregar Producto/Servicio" AlternateText="Agregar Producto/Servicio" CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i>" />
<asp:LinkButton ID="LbAgregarModal" OnClick="LbAgregarModal_Click" runat="server" data-toggle="tooltip" title="Agregar Producto/Servicio" AlternateText="Agregar Producto/Servicio" CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar Producto" />
</div>
</div>
</div>

View File

@@ -243,7 +243,7 @@ Partial Class Ventas_Promociones
'CLASIFICACIONES
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacion.DataBind()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If EmpresaGrupoDiaz Then
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
Else
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -536,11 +536,16 @@ Partial Class Ventas_Promociones
End If
' validación de %minimo considerado 02580104V
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If EmpresaGrupoDiaz Then
Dim tuc As Decimal = LblUltimoCosto.Text.ToDecimal
Dim tpu As Decimal = TxtPromocionConcepto.Text.ToDecimal
If tuc <= 0 OrElse (tpu - tuc) / tuc < UsuarioActual.Empresa.Funcionalidad(129).ToDecimal / 100 Then
Alert("El producto está debajo de la utilidad permitida, la promoción requerirá autorización.", TipoMensaje.MsgAdvertencia.ToastAdventencia)
If PermisoAutorizPromocionPorcentaje Then
Alert("El producto está debajo de la utilidad permitida.", TipoMensaje.MsgAdvertencia.ToastAdventencia)
Else
Alert("El producto está debajo de la utilidad permitida, la promoción requerirá autorización.", TipoMensaje.MsgAdvertencia.ToastAdventencia)
End If
End If
End If
@@ -714,7 +719,7 @@ Partial Class Ventas_Promociones
Next
End If
If BloqueadoPromocionPorcentaje AndAlso Bloquear Then
If (Not PermisoAutorizPromocionPorcentaje) AndAlso BloqueadoPromocionPorcentaje AndAlso Bloquear Then
ChkEstatus.Checked = False
ChkEstatus.Enabled = False
End If

View File

@@ -8233,7 +8233,7 @@
<div class="row">
<asp:Panel ID="PnlValidaNombre" runat="server" DefaultButton="BtnValidaPorNombre">
<div class="form-group form-md-line-input input-iconright col-xs-9">
<asp:TextBox ID="TxtRFCNombre" Style="text-transform: uppercase;" placeholder="Ingrese el RFC/Nombre para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
<asp:TextBox ID="TxtRFCNombre" Style="text-transform: uppercase;" placeholder="Ingrese el RFC/Nombre para su validación" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtRFCNombre.ClientID.ToString()%>">RFC / Nombre:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3" style="display:flex;">
@@ -8383,10 +8383,9 @@
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="100%">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVFormaCliente" runat="server" ControlToValidate="DdlFormaCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlFormaCliente.ClientID.ToString()%>">Forma Pago: </label>
<i></i>
</div>

View File

@@ -11,7 +11,6 @@ Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
Imports ADSNetLibrary.SIGAPI.Services.CRM
Imports ADSTimbrado
Imports Extensiones
Imports Microsoft.Ajax.Utilities
Imports Microsoft.Reporting.WebForms
Imports Modelos
Imports Newtonsoft.Json.Linq
@@ -25084,7 +25083,7 @@ Partial Class Ventas
DivNombreCliente.Visible = False
DivTipoPersona.Visible = False
DivDireccionCliente.Visible = False
DVRegimenSociedad.Visible = False
DivNumeroCPCliente.Visible = False
'DivColoniaTelefonoCliente.Visible = False
DivCiudadLocalidadCliente.Visible = False
@@ -25098,6 +25097,20 @@ Partial Class Ventas
CargaEstados()
TxtNombreCliente.Text = ""
TxtRFCCliente.Text = ""
TxtRegimenSociedad.Text = ""
DdlEstadoSAT.SelectedValueExist("-1")
TxtCiudadCliente.Text = ""
TxtLocalidadCliente.Text = ""
TxtColoniaCliente.Text = ""
TxtCPCliente.Text = ""
TxtDireccionCliente.Text = ""
TxtNumExtCliente.Text = ""
TxtNumIntCliente.Text = ""
TxtCorreoCliente.Text = ""
TxtTelefonoCliente.Text = ""
If UsuarioActual.CveEmpresa = 189 Then
TxtRFCNombre.Text = ""
@@ -25150,7 +25163,16 @@ Partial Class Ventas
DivValidaRFC.Visible = True
DivValidaPorNombre.Visible = False
DivBusquedaCliente.Visible = False
TxtRFCCliente.Text = TxtRFCNombre.Text
'VERIFICAR SI EL TEXTO DE ENTRADA ES UN NOMBRE O UN RFC
If TxtRFCNombre.Text.Length > 13 Then
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
ElseIf EsRFC(TxtRFCNombre.Text.Trim()) Then
TxtRFCCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
Else
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
End If
BtnValidarRFC_Click(Nothing, EventArgs.Empty)
End If
End If
@@ -25183,7 +25205,8 @@ Partial Class Ventas
RdTipoPersona.SelectedValue = "0"
DdlMetodoCliente.SelectedValueExist(1)
DdlMetodoCliente.SelectedValueExist("1")
DdlMetodoCliente_SelectedIndexChanged(Nothing, EventArgs.Empty)
'DdlFormaCliente.SelectedValueExist(1)
@@ -25233,7 +25256,7 @@ Partial Class Ventas
End If
If UsuarioActual.CveEmpresa = 189 Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
divGiro.Visible = True
Dim DrSP As DataRow = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, DdlSubProyectoDatos.SelectedValue.ToEntero()).FiltroPrimero("")
@@ -25250,6 +25273,32 @@ Partial Class Ventas
End If
DdlMetodoCliente.SelectedValueExist(1)
DdlMetodoCliente_SelectedIndexChanged(Nothing, EventArgs.Empty)
'PERSONA MORAL
If TxtRFCCliente.Text.Trim().Length = 12 Then
RdTipoPersona.SelectedValue = "1"
RdTipoPersona_SelectedIndexChanged(Nothing, EventArgs.Empty)
DdlRegimenFiscalCliente.SelectedValueExist("1")
DdlRegimenFiscalCliente_SelectedIndexChanged(Nothing, EventArgs.Empty)
'PERSONA FISICA
Else
RdTipoPersona.SelectedValue = "0"
RdTipoPersona_SelectedIndexChanged(Nothing, EventArgs.Empty)
If TxtRFCCliente.Text.Trim() = "XAXX010101000" Then
DdlRegimenFiscalCliente.SelectedValueExist("11")
Else
DdlRegimenFiscalCliente.SelectedValueExist("9")
End If
DdlRegimenFiscalCliente_SelectedIndexChanged(Nothing, EventArgs.Empty)
End If
DdlUsoCFDICliente.SelectedValueExist("3")
End If
End Sub
@@ -26064,16 +26113,16 @@ Partial Class Ventas
Dim RestringirAlmacenes As Integer = -1
Dim BuscarEnTabla As Boolean = True
Dim ObjInventarios As New ClsInventarios()
If ObjInventarios.GetExistenciasProducto(GvRow.DataKey("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=-1,
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then
GvVerExistencias.DataSource = ObjInventarios.DtResultados.Copy()
End If
ObjInventarios.Dispose()
Dim BuscarEnTabla As Boolean = True
Dim ObjInventarios As New ClsInventarios()
If ObjInventarios.GetExistenciasProducto(GvRow.DataKey("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=-1,
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then
GvVerExistencias.DataSource = ObjInventarios.DtResultados.Copy()
End If
ObjInventarios.Dispose()
GvVerExistencias.DataBind()
UpVerExistencias.Update()
@@ -38738,7 +38787,7 @@ Partial Class Ventas
End Sub
Private Sub DdlMetodoCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlMetodoCliente.SelectedIndexChanged
DdlFormaCliente.Items.Clear()
If DdlMetodoCliente.SelectedValue = "3" Then
DdlFormaCliente.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20")
Else
@@ -38746,6 +38795,10 @@ Partial Class Ventas
End If
DdlFormaCliente.DataBind()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
DdlFormaCliente.SelectedValueExist("1")
End If
End Sub
Private Sub AsignaMedicoProcedimientoFacturaRemisionesModal()
@@ -39863,18 +39916,18 @@ Partial Class Ventas
End Function
Protected Sub GvVerExistencias_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveAlmacen") = "" Then
e.Row.CssClass = "Totales"
If e.Row.DBCampo("CveAlmacen") = "" Then
e.Row.CssClass = "Totales"
End If
End If
End Sub
Private Sub CargaGiro()
Dim Dt As DataTable = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
DdlGiro.DataSource = Dt
DdlGiro.DataBind()
DdlGiro.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpAgregarCliente.Update()
Private Sub CargaGiro()
Dim Dt As DataTable = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
DdlGiro.DataSource = Dt
DdlGiro.DataBind()
DdlGiro.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpAgregarCliente.Update()
End Sub
@@ -40058,9 +40111,21 @@ Partial Class Ventas
DivValidaRFC.Visible = True
DivValidaPorNombre.Visible = False
DivBusquedaCliente.Visible = False
TxtRFCCliente.Text = TxtRFCNombre.Text
'VERIFICAR SI EL TEXTO DE ENTRADA ES UN NOMBRE O UN RFC
If TxtRFCNombre.Text.Length > 13 Then
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
ElseIf EsRFC(TxtRFCNombre.Text.Trim()) Then
TxtRFCCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
Else
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
End If
BtnValidarRFC_Click(Nothing, EventArgs.Empty)
End Sub
Private Function EsRFC(texto As String) As Boolean
Return Regex.IsMatch(texto, "^[a-zñA-ZÑ.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$")
End Function
End Class