merge --Ventas.aspx
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Choferes
|
||||
@@ -28,7 +36,8 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvChofer.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvChofer" runat="server" GridLines="None" data-sort="true"
|
||||
DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista,Identificacion,Domicilio,Telefono,Ciudad,RFC,Licencia,NumeroInterior,NumeroExterior,Colonia,Estado,NumRegidTribOperador,ResidenciaFiscalOperador,CP" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
|
||||
DataKeyNames="CveChofer,Chofer,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,CveTransportista,Identificacion,Domicilio,Telefono,Ciudad,RFC,Licencia,NumeroInterior,NumeroExterior,Colonia,Estado,NumRegidTribOperador,ResidenciaFiscalOperador,CP,CveEstado,CveMunicipio,CveLocalidad,CveColonia,ClaveSATColoniaCP"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Choferes">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Chofer" HeaderText="Chofer" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Transportista" HeaderText="Transportista" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -49,6 +58,13 @@
|
||||
</asp:GridView>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="A" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<div style="display:none">
|
||||
<asp:Button ID="BtnValidar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkValidar_Click" Text="validar" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<%--POPUP AGREGAR--%>
|
||||
@@ -78,16 +94,27 @@
|
||||
<asp:DropDownList ID="DdlTransportista" DataValueField="CveTransportista" DataTextField="Transportista" runat="server" CssClass="form-control select2me" AppendDataBoundItems="true" Width="200px"></asp:DropDownList>
|
||||
<label for="<%= DdlTransportista.ClientID.ToString()%>">Transportista:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtIdentificacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtIdentificacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Identificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtIdentificacion.ClientID.ToString()%>">Identificación:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTETelefono" runat="server" TargetControlID="TxtTelefono" FilterType="Custom, Numbers" />
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
|
||||
|
||||
<div class="row ">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtIdentificacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtIdentificacion.ClientID.ToString()%>">Identificación:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTETelefono" runat="server" TargetControlID="TxtTelefono" FilterType="Custom, Numbers" />
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -97,61 +124,106 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumInt" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNumInt.ClientID.ToString()%>">Numero Interior:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumExt" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNumExt.ClientID.ToString()%>">Numero Exterior:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtColonia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtColonia.ClientID.ToString()%>">Colonia:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCiudad" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtCiudad.ClientID.ToString()%>">Ciudad:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEstado" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtEstado.ClientID.ToString()%>">Estado:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="5" ClientIDMode="Static" onblur="ValidaCodigoPostal()" onkeypress="if(event.key === 'Enter'){return false;}"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCP" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCP" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código Postal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCP" FilterType="Custom" ValidChars="0123456789" />
|
||||
<label for="<%= TxtCP.ClientID.ToString()%>">Código Postal:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlEstado" CssClass="form-control select2me" DataValueField="CveEstado" DataTextField="NombreEstado" Width="100%" OnSelectedIndexChanged="DdlEstado_SelectedIndexChanged" AutoPostBack="true" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlEstado" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlEstado" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEstado.ClientID.ToString()%>">Estado:</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlMunicipio" CssClass="form-control select2me" DataValueField="CveMunicipio" DataTextField="Descripcion" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlMunicipio_SelectedIndexChanged" ></asp:DropDownList>
|
||||
<label for="<%= DdlMunicipio.ClientID.ToString()%>">Municipio:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlLocalidad" CssClass="form-control select2me" DataValueField="CveLocalidad" DataTextField="NombreLocalidad" Width="100%" ></asp:DropDownList>
|
||||
<label for="<%= DdlLocalidad.ClientID.ToString()%>">Localidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<ADS:Dropdownlost ID="DdlColonias" Width="100%" runat="server" data-metodo="getSATColomias" CssClass="form-control select2" DataTextField="ClaveSATColoniaCP" DataValueField="CveColonia" style="margin-top:7px!important" Onselectedindexchange="DdlColonias_selectedindexchange"></ADS:Dropdownlost>
|
||||
<label for="<%= DdlColonias.ClientID.ToString()%>">Colonia:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLicencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtLicencia.ClientID.ToString()%>">Licencia:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumRegidTribOperador" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNumRegidTribOperador.ClientID.ToString()%>">Numero RegidTribOperador:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtResidenciaFiscalOperador" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtResidenciaFiscalOperador.ClientID.ToString()%>">Residencia Fiscal Operador:</label>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumRegidTribOperador" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNumRegidTribOperador.ClientID.ToString()%>">Numero RegidTribOperador:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtResidenciaFiscalOperador" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtResidenciaFiscalOperador.ClientID.ToString()%>">Residencia Fiscal Operador:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="divEstatus" runat="server">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
@@ -159,6 +231,9 @@
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregarChofer" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i>Agregar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -169,5 +244,22 @@
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function ValidaCodigoPostal() {
|
||||
|
||||
$("#BtnValidar").click();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -3,17 +3,38 @@ Imports System.Data
|
||||
|
||||
Partial Class Acarreos_CatChoferes
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
CargaDdlTransportista()
|
||||
CargaDdlTransportista()
|
||||
DdlColonias.setEsWebService(True)
|
||||
Dim DT As DataTable = GlobalDTColonia(-1)
|
||||
CargaDdls()
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDdls()
|
||||
|
||||
|
||||
|
||||
DdlEstado.DataSource = GlobalDTEstado(-1).FiltraParametros("ClaveSATPais = 'MEX'")
|
||||
DdlEstado.DataBind()
|
||||
DdlEstado.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
|
||||
DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
@@ -38,32 +59,45 @@ Partial Class Acarreos_CatChoferes
|
||||
UpAddChofer.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click
|
||||
Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click
|
||||
|
||||
|
||||
Dim CveColonia As Integer = If(DdlColonias.txtValue.Value.ToEntero > 0, DdlColonias.txtValue.Value.ToEntero, -1)
|
||||
|
||||
If CveColonia <= 0 Then
|
||||
Alert("El campo colonia es necesario, por favor ingréselo.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If DdlTransportista.SelectedValue = "-1" Then
|
||||
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
|
||||
Dim ObjAcar As New ClsAcarreos
|
||||
Dim Estatus = 0
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Ciudad:=TxtCiudad.Text.Trim, Estado:=TxtEstado.Text.Trim(), CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim) Then
|
||||
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then
|
||||
CargaDatos()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Ciudad:=TxtCiudad.Text.Trim, Estado:=TxtEstado.Text.Trim(), CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim) Then
|
||||
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=TxtResidenciaFiscalOperador.Text.Trim, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=CveColonia) Then
|
||||
CargaDatos()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CveChofer")
|
||||
@@ -79,9 +113,9 @@ Partial Class Acarreos_CatChoferes
|
||||
TxtDomicilio.Text = GvRow.DataKey("Domicilio")
|
||||
TxtNumInt.Text = GvRow.DataKey("NumeroInterior")
|
||||
TxtNumExt.Text = GvRow.DataKey("NumeroExterior")
|
||||
TxtColonia.Text = GvRow.DataKey("Colonia")
|
||||
TxtCiudad.Text = GvRow.DataKey("Ciudad")
|
||||
TxtEstado.Text = GvRow.DataKey("Estado")
|
||||
'TxtColonia.Text = GvRow.DataKey("Colonia")
|
||||
'TxtCiudad.Text = GvRow.DataKey("Ciudad")
|
||||
'TxtEstado.Text = GvRow.DataKey("Estado")
|
||||
TxtCP.Text = GvRow.DataKey("CP")
|
||||
TxtLicencia.Text = GvRow.DataKey("Licencia")
|
||||
|
||||
@@ -92,8 +126,49 @@ Partial Class Acarreos_CatChoferes
|
||||
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||
|
||||
|
||||
DdlEstado.SelectedValueExist(GvRow.DataKey("CveEstado"))
|
||||
|
||||
|
||||
DdlMunicipio.Items.Clear()
|
||||
If DdlEstado.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim ClaveSATEstado As String = GlobalDTEstado("MEX").FiltroPrimeroValor("ClaveSATEstado", $" CveEstado = {DdlEstado.SelectedValue} ")
|
||||
DdlMunicipio.DataSource = GlobalDTMunicipio(ClaveSATEstado)
|
||||
DdlMunicipio.DataBind()
|
||||
|
||||
End If
|
||||
DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
DdlMunicipio.SelectedValueExist(GvRow.DataKey("CveMunicipio"))
|
||||
|
||||
|
||||
DdlLocalidad.Items.Clear()
|
||||
If DdlEstado.SelectedValue.ToEntero > 0 And DdlMunicipio.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
|
||||
DdlLocalidad.DataBind()
|
||||
|
||||
|
||||
End If
|
||||
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
DdlLocalidad.SelectedValueExist(GvRow.DataKey("CveLocalidad"))
|
||||
|
||||
If GvRow.DataKey("CveColonia").ToEntero > 0 Then
|
||||
|
||||
DdlColonias.txtText.Value = GvRow.DataKey("ClaveSATColoniaCP")
|
||||
DdlColonias.txtValue.Value = GvRow.DataKey("CveColonia")
|
||||
|
||||
Else
|
||||
DdlColonias.txtText.Value = "Selecione Una"
|
||||
DdlColonias.txtValue.Value = "-1"
|
||||
End If
|
||||
|
||||
|
||||
UpAddChofer.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Agregar()
|
||||
@@ -105,7 +180,7 @@ Partial Class Acarreos_CatChoferes
|
||||
TxtIdentificacion.Text = ""
|
||||
TxtDomicilio.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
TxtCiudad.Text = ""
|
||||
'TxtCiudad.Text = ""
|
||||
TxtLicencia.Text = ""
|
||||
|
||||
|
||||
@@ -113,14 +188,20 @@ Partial Class Acarreos_CatChoferes
|
||||
TxtRFC.Text = ""
|
||||
TxtNumInt.Text = ""
|
||||
TxtNumExt.Text = ""
|
||||
TxtEstado.Text = ""
|
||||
'TxtEstado.Text = ""
|
||||
TxtCP.Text = ""
|
||||
TxtColonia.Text = ""
|
||||
'TxtColonia.Text = ""
|
||||
|
||||
TxtNumRegidTribOperador.Text = ""
|
||||
TxtResidenciaFiscalOperador.Text = ""
|
||||
|
||||
|
||||
DdlColonias.txtText.Value = "Selecione Una"
|
||||
DdlColonias.txtValue.Value = "-1"
|
||||
|
||||
DdlEstado.SelectedValueExist(-1)
|
||||
DdlEstado_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
|
||||
ChkEstatus.Checked = True
|
||||
divEstatus.Visible = False
|
||||
UpAddChofer.Update()
|
||||
@@ -155,5 +236,81 @@ Partial Class Acarreos_CatChoferes
|
||||
|
||||
Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click
|
||||
Agregar()
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkValidar_Click(sender As Object, e As EventArgs)
|
||||
validaCodigoPostal()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DdlMunicipio.Items.Clear()
|
||||
|
||||
If DdlEstado.SelectedValue > 0 Then
|
||||
|
||||
Dim ClaveSATEstado As String = GlobalDTEstado("MEX").FiltroPrimeroValor("ClaveSATEstado", $" CveEstado = {DdlEstado.SelectedValue} ")
|
||||
DdlMunicipio.DataSource = GlobalDTMunicipio(ClaveSATEstado)
|
||||
DdlMunicipio.DataBind()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
DdlMunicipio.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
DdlMunicipio.SelectedValueExist(-1)
|
||||
|
||||
|
||||
DdlLocalidad.Items.Clear()
|
||||
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
|
||||
|
||||
|
||||
UpAddChofer.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DdlLocalidad.Items.Clear()
|
||||
|
||||
If DdlMunicipio.SelectedValue > 0 Then
|
||||
|
||||
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
|
||||
DdlLocalidad.DataBind()
|
||||
|
||||
End If
|
||||
|
||||
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
DdlLocalidad.SelectedValueExist(-1)
|
||||
|
||||
|
||||
UpAddChofer.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlColonias_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlColonias.txtValue.Value.ToEntero > 0 Then
|
||||
validaCodigoPostal()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub validaCodigoPostal()
|
||||
|
||||
Dim CPTxt As Integer = TxtCP.Text.ToEntero()
|
||||
|
||||
Dim CveColonia As Integer = DdlColonias.txtValue.Value.ToEntero
|
||||
|
||||
If CPTxt > 0 And CveColonia > 0 Then
|
||||
Dim CP As Integer = GlobalDTColonia(-1).FiltroPrimeroValor("CP", $"CveColonia = {CveColonia}")
|
||||
If CPTxt <> CP Then
|
||||
Alert("El codigo postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -111,7 +111,7 @@ Public Class ClsAcarreos
|
||||
#Region "Choferes"
|
||||
Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Telefono As String, Licencia As String, RFC As String, Domicilio As String,
|
||||
Optional NumeroExterior As String = "", Optional NumeroInterior As String = "", Optional Colonia As String = "", Optional Ciudad As String = "", Optional Estado As String = "", Optional CP As String = "",
|
||||
Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "") As Boolean
|
||||
Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "", Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Acar_ChoferesAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -131,7 +131,11 @@ Public Class ClsAcarreos
|
||||
.Add("@Estado", SqlDbType.VarChar).Value = Estado
|
||||
.Add("@CP", SqlDbType.VarChar).Value = CP
|
||||
.Add("@NumRegidTribOperador", SqlDbType.VarChar).Value = NumRegidTribOperador
|
||||
.Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador
|
||||
.Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador
|
||||
.Add("@CveEstado", SqlDbType.Int).Value = CveEstado
|
||||
.Add("@CveMunicipio", SqlDbType.Int).Value = CveMunicipio
|
||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||
.Add("@CveColonia", SqlDbType.Int).Value = CveColonia
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -145,7 +149,7 @@ Public Class ClsAcarreos
|
||||
|
||||
Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Telefono As String, Licencia As String, RFC As String, Domicilio As String,
|
||||
Optional NumeroExterior As String = "", Optional NumeroInterior As String = "", Optional Colonia As String = "", Optional Ciudad As String = "", Optional Estado As String = "", Optional CP As String = "",
|
||||
Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "") As Boolean
|
||||
Optional NumRegidTribOperador As String = "", Optional ResidenciaFiscalOperador As String = "", Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Acar_ChoferesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -167,7 +171,11 @@ Public Class ClsAcarreos
|
||||
.Add("@CP", SqlDbType.VarChar).Value = CP
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@NumRegidTribOperador", SqlDbType.VarChar).Value = NumRegidTribOperador
|
||||
.Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador
|
||||
.Add("@ResidenciaFiscalOperador", SqlDbType.VarChar).Value = ResidenciaFiscalOperador
|
||||
.Add("@CveEstado", SqlDbType.Int).Value = CveEstado
|
||||
.Add("@CveMunicipio", SqlDbType.Int).Value = CveMunicipio
|
||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||
.Add("@CveColonia", SqlDbType.Int).Value = CveColonia
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -258,7 +258,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
||||
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1) As Boolean
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -271,6 +271,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
.Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovto
|
||||
'.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
.Add("@ImporteMN", SqlDbType.Money).Value = ImporteMN
|
||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
|
||||
@@ -2820,6 +2820,23 @@ Public Class ClsGenerales
|
||||
OnError("Ocurrió un error al obtener los municipios del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetSATLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("Gral_SAT_LocalidadGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEstado", SqlDbType.VarChar).Value = CveEstado
|
||||
.Add("@CveMunicipio", SqlDbType.VarChar).Value = CveMunicipio
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las localidades del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetSATColonia(ClaveSATMunicipio As String) As Boolean
|
||||
|
||||
@@ -965,7 +965,7 @@ Public Class ClsInventarios
|
||||
CveVenta As Integer, CveSubProyecto As Integer, CveActivoFijo As Integer, Optional CveOS As Integer = -1, Optional CvePersonal As Integer = -1, Optional IDPoliza As Integer = -1, Optional CveUsuarioResponsable As Integer = -1,
|
||||
Optional CveConsignacion As Integer = -1, Optional Guia As String = "", Optional CveAlmacenDestino As Integer = -1, Optional Observaciones As String = "", Optional Recibio As String = "",
|
||||
Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional Placa As String = "",
|
||||
Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional CveCamion As Integer = -1, Optional Placa As String = "",
|
||||
Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "",
|
||||
Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1) As Integer
|
||||
|
||||
@@ -973,12 +973,16 @@ Public Class ClsInventarios
|
||||
|
||||
DataAdapter("PA_Inv_MovimientosAdd")
|
||||
|
||||
If FechaMovto.Hour = 0 AndAlso FechaMovto.Minute = 0 AndAlso FechaMovto.Second = 0 Then
|
||||
FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime
|
||||
End If
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
'.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
||||
.Add("@FechaMovto", SqlDbType.DateTime).Value = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime
|
||||
.Add("@FechaMovto", SqlDbType.DateTime).Value = FechaMovto
|
||||
.Add("@Folio", SqlDbType.Int).Value = tFolio
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
@@ -1010,6 +1014,7 @@ Public Class ClsInventarios
|
||||
.Add("@PedidoContrato", SqlDbType.VarChar).Value = PedidoContrato
|
||||
.Add("@GastoIndirecto", SqlDbType.Money).Value = GastoIndirecto
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
|
||||
.Add("@Placa", SqlDbType.VarChar).Value = Placa
|
||||
.Add("@FechaEntrega", SqlDbType.VarChar).Value = FechaEntrega
|
||||
.Add("@EspecifUnidad", SqlDbType.VarChar).Value = EspecifUnidad
|
||||
@@ -1640,7 +1645,8 @@ Public Class ClsInventarios
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer,
|
||||
FiltroFecha As Integer, CvesAlmacenes As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ProductosCaducidadGet")
|
||||
@@ -1652,7 +1658,11 @@ Public Class ClsInventarios
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@FiltroFecha", SqlDbType.SmallInt).Value = FiltroFecha
|
||||
.Add("@CvesAlmacenes", SqlDbType.VarChar).Value = CvesAlmacenes
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -988,6 +988,24 @@ Public Class ClsOC
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateOrdenCompraDetalleDivideCantidad(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Cantidad As Decimal, CveUsuarioModifico As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleDivideCantidadUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra
|
||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar la Orden de Compra Detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateOrdenCompraMoneda(CveOrdenCompra As Integer, CveEmpresa As Integer, CveMoneda As Integer, CveUsuarioModifico As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraMonedaUpdate")
|
||||
|
||||
@@ -425,6 +425,48 @@ Public Class ClsPaginas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property GlobalDTLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1) As DataTable
|
||||
Get
|
||||
|
||||
If Application("GlobalDTLocalidad") Is Nothing Then
|
||||
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados Else Application("GlobalDTLocalidad") = Nothing
|
||||
ObjGrales.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
Dim StrFiltro As String = ""
|
||||
|
||||
If CveEstado > 0 And CveMunicipio > 0 Then
|
||||
StrFiltro = $" CveEstado = '{CveEstado}' AND CveMunicipio = '{CveMunicipio}'"
|
||||
ElseIf CveEstado > 0 Then
|
||||
StrFiltro = $" CveEstado = '{CveEstado}'"
|
||||
ElseIf CveMunicipio > 0 Then
|
||||
StrFiltro = $" CveMunicipio = '{CveMunicipio}'"
|
||||
|
||||
Else
|
||||
StrFiltro = ""
|
||||
End If
|
||||
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTLocalidad"), DataTable), StrFiltro, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTLocalidad = Dv.ToTable
|
||||
|
||||
Dv.Dispose()
|
||||
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTLocalidad") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable
|
||||
Get
|
||||
If Application("GlobalDTColonia") Is Nothing Then
|
||||
@@ -3178,6 +3220,27 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTContaPlantillasPolizasDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
'Property GlobalDTContaPlantillasPolizasDetalle(CvePlantillaPoliza As Integer, CveEmpresa As Integer) As DataTable
|
||||
' Get
|
||||
' Dim AppNombre As String = String.Format("GlobalDTContaPlantillasPolizas-{0}", CveEmpresa)
|
||||
' 'sino existe, recarga los datos
|
||||
' If Application(AppNombre) Is Nothing Then
|
||||
' Using ObjContabilidad As New ClsContabilidad
|
||||
' If ObjContabilidad.GetConta_PlantillasPolizasDetalle(-1, CveEmpresa) Then Application(AppNombre) = ObjContabilidad.DtResultados Else Application(AppNombre) = Nothing
|
||||
' End Using
|
||||
' End If
|
||||
|
||||
' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CvePlantillaPoliza = {0}", CvePlantillaPoliza), "Orden", DataViewRowState.CurrentRows)
|
||||
' GlobalDTContaPlantillasPolizasDetalle = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
|
||||
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' Dim AppNombre As String = String.Format("GlobalDTContaPlantillasPolizas-{0}", CveEmpresa)
|
||||
' Application(AppNombre) = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ Public Class ClsSubProyectos
|
||||
Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean
|
||||
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_CentroCostoAdd")
|
||||
@@ -369,6 +369,7 @@ Public Class ClsSubProyectos
|
||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -391,7 +392,7 @@ Public Class ClsSubProyectos
|
||||
Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
|
||||
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
|
||||
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
|
||||
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "") As Boolean
|
||||
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_CentroCostoUpdate")
|
||||
@@ -429,6 +430,8 @@ Public Class ClsSubProyectos
|
||||
.Add("@HorarioInvierno", SqlDbType.Int).Value = HorarioInvierno
|
||||
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
|
||||
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
|
||||
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -305,7 +305,7 @@ Namespace Extensiones
|
||||
MsgInformacion = 2
|
||||
MsgConfirmacion = 3
|
||||
MsgAdvertencia = 4
|
||||
MsgVentasDosBotones = 9
|
||||
MsgDosBotones = 9
|
||||
|
||||
ToastInformacion = 5 'succes
|
||||
ToastInformacionB = 6 'info
|
||||
@@ -355,7 +355,7 @@ Namespace Extensiones
|
||||
onEscape = ""
|
||||
headerclas = " header-blue "
|
||||
|
||||
Case TipoMensaje.MsgVentasDosBotones
|
||||
Case TipoMensaje.MsgDosBotones
|
||||
Titulo = "<i class='fa fa-info-circle'></i> Información"
|
||||
b1title = TextoConfirmacion
|
||||
b1clas = "green"
|
||||
|
||||
@@ -113,6 +113,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Write(sendMail(context))
|
||||
Case "sendMailLPM"
|
||||
context.Response.Write(sendMailLPM(context))
|
||||
Case "getSATColomias"
|
||||
getSatColonias(context)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
@@ -1319,6 +1321,37 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "Get SAT Colonmias"
|
||||
Private Function getSATColonias(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
|
||||
|
||||
Dim dt As DataTable = DirectCast(context.Application("GlobalDTColonia"), DataTable)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
DtRetorno = dt.FiltraParametros($"ClaveSATColoniaCP like '%{Name}%'")
|
||||
End If
|
||||
|
||||
|
||||
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
||||
DtRetorno.Columns("CveColonia").ColumnName = "id"
|
||||
DtRetorno.Columns("ClaveSATColoniaCP").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||
DtRetorno.Dispose()
|
||||
context.Response.Write(retorno)
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Get Contratos"
|
||||
Private Function GetContratos(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
@@ -206,7 +206,7 @@ Partial Class Bancos_DepositosCaja
|
||||
CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||
|
||||
|
||||
If ChkIntermediario.Checked Then
|
||||
|
||||
@@ -4886,6 +4886,8 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
Private Sub CargaEventoBitacora()
|
||||
|
||||
If CveIE <= 0 Then Exit Sub
|
||||
|
||||
Dim ObjEventoBitacora As New ClsOIEventos()
|
||||
If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||
'GVEventoBitacora.DataSource = ObjEventoBitacora.DtResultados
|
||||
|
||||
@@ -912,7 +912,7 @@ Partial Class Bancos_PolizaCheque
|
||||
CveProveedor = gvr.DataKey("CveProveedor").ToEntero
|
||||
If HdnCveProveedor.Value.ToEntero > 0 Then CveProveedor = HdnCveProveedor.Value.ToEntero
|
||||
|
||||
If Importe > 0 Then
|
||||
If Importe <> 0 Then
|
||||
'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
' If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IDCuenta").ToEntero, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.FCTextBox("TxtConcepto").Text, 0, TxtFechaDocumento.Text.ToDate, "") Then
|
||||
' MsgError = "No se pudo insertar movimiento contable"
|
||||
|
||||
@@ -2924,14 +2924,18 @@ Partial Class Compras_eFacturas
|
||||
|
||||
For Each dRow2 As DataRow In DTDocumentosRelacionados.Rows
|
||||
|
||||
If dRow2("IdDocumento").ToString.ToUpper = drow("IdDocumento").ToString.ToUpper And drow("CveIE").ToString.ToEntero > 0 Then
|
||||
If dRow2("IdDocumento").ToString.ToUpper = drow("IdDocumento").ToString.ToUpper Then
|
||||
|
||||
dRow2("CveCompra") = drow("CveCompra").ToString.ToEntero
|
||||
dRow2("CveFactura") = drow("CveFactura").ToString.ToEntero
|
||||
dRow2("CveMetodoPago") = drow("CveMetodoPago").ToString.ToEntero
|
||||
dRow2("SerieFolioCompra") = drow("SerieFolioCompra").ToString
|
||||
Try
|
||||
dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString
|
||||
|
||||
If drow("CveIE").ToString.ToEntero > 0 Then
|
||||
dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
dRow2("CvePrePolizaDetalle") = 0
|
||||
End Try
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
|
||||
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConcepto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones"
|
||||
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConcepto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria"
|
||||
Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -392,6 +392,9 @@
|
||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
<div id="divCargoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtCargoME" CssClass="" runat="server" Style="text-align: right" Width="55px"></asp:TextBox>
|
||||
TC:<asp:TextBox ID="TxtTC" CssClass="" runat="server" Style="text-align: right" Width="45px"></asp:TextBox>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
@@ -399,6 +402,7 @@
|
||||
<HeaderTemplate>Abono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||
<div id="divAbonoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtAbonoME" CssClass="" runat="server" Style="text-align: right" Width="55px" ></asp:TextBox></div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -334,6 +334,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Double"))
|
||||
.Add("Modificado", Type.GetType("System.Boolean"))
|
||||
.Add("EsComplementaria", Type.GetType("System.Boolean"))
|
||||
|
||||
|
||||
End With
|
||||
@@ -735,9 +736,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
|
||||
|
||||
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
|
||||
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
|
||||
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
|
||||
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
|
||||
Dim Cuenta As String = ""
|
||||
Dim IdCuenta As Integer = 0
|
||||
Dim CodigoCuenta As String = ""
|
||||
@@ -778,7 +781,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CvePersonal") = drt("CvePersonal")
|
||||
dr("CveClasificacion") = -1
|
||||
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
||||
dr("CveCuenta") = drt("CveCuenta")
|
||||
dr("CveCuenta") = drt("CveCuenta")
|
||||
dr("EsComplementaria") = drt("EsComplementaria")
|
||||
'dr("FolioPoliza") = 0 'drt("FolioPoliza")
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
@@ -835,6 +839,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Enabled = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("EsComplementaria") = "True" Then
|
||||
If e.Row.DBCampo("TipoMovto") = "0" Then e.Row.FindControl("divCargoME").Visible = True
|
||||
If e.Row.DBCampo("TipoMovto") = "1" Then e.Row.FindControl("divAbonoME").Visible = True
|
||||
End If
|
||||
|
||||
|
||||
'Agregamos la opcion para vincular los movimientos bancarios
|
||||
If e.Row.DataKey("CveConcepto").ToEntero.Contiene(41) Then
|
||||
Dim ObjMovimientos As New ClsMovimientos
|
||||
@@ -923,6 +933,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
Dim Importe As Double = 0
|
||||
Dim ImporteME As Decimal = 0
|
||||
Dim TipoCambio As Decimal = 1
|
||||
Dim TipoMovto As Boolean = False
|
||||
Dim IdCtaContable As Integer = 0
|
||||
|
||||
@@ -946,17 +958,26 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
' FolioIE = ObjIE.Folio
|
||||
'End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
ImporteME = 0
|
||||
TipoCambio = 1
|
||||
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
|
||||
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
||||
TipoMovto = True
|
||||
Else
|
||||
TipoMovto = True
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
|
||||
TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
|
||||
End If
|
||||
Else
|
||||
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
|
||||
TipoMovto = False
|
||||
End If
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
|
||||
TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("CveConcepto").ToEntero <> 30 Then
|
||||
|
||||
If gvr.DataKey("CveConcepto").ToEntero = 41 Then
|
||||
@@ -982,7 +1003,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
|
||||
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
|
||||
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
|
||||
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
||||
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio,
|
||||
CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
|
||||
Else
|
||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||
@@ -1951,8 +1973,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim worksheet = workbook.Worksheets.Add(NombreHoja)
|
||||
|
||||
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero
|
||||
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
|
||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||
|
||||
|
||||
Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows
|
||||
Select New With
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<br />
|
||||
<asp:GridView runat="server" ID="GvGlobal" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||
DataKeyNames="CveEmpresa,CveCuenta,CveConceptoContable,CveCuentaAsignacion,CveConceptoNomina, CveProveedor,CveClasificacion,CveAlmacen, IdCuenta, PorcentajeIVA, CveBancoCuenta, CveCliente, CvePersonal" AutoGenerateColumns="False"
|
||||
Style=" width:100%" GridLines="None">
|
||||
Style=" width:100%" GridLines="None" Caption="Globales">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/>
|
||||
|
||||
@@ -236,6 +236,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlPersonal.ddl.DataSource = ""
|
||||
DdlPersonal.ddl.DataBind()
|
||||
DdlPersonal.setEsWebService(True)
|
||||
HdnCveCuentaAsignacion.Value = ""
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,16 @@
|
||||
<asp:ListItem Value="11" Text="ContaSIG - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
||||
<asp:ListItem Value="12" Text="Almacen" Enabled="True"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
|
||||
<div runat="server" id="divAlmacen">
|
||||
<div class="row">
|
||||
Fecha:<asp:TextBox ID="TxtFecha" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
Concepto:
|
||||
<asp:DropDownList ID="DdlConceptoAlmacen" runat="server">
|
||||
<asp:ListItem Selected="True" Value="1">Carga Inicial</asp:ListItem>
|
||||
<asp:ListItem Value="3">Salida Almacen</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ Partial Class General_SaldosIniciales
|
||||
Inherits ClsPaginas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1695,7 +1695,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim Cuenta As String = ""
|
||||
Dim Reporte As New StringBuilder
|
||||
Dim SubProTemp As DataTable = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("SI", 1, 0, 0, 1, Now.ToDate, "Saldos Iniciales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("SI", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Saldos Iniciales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
NombreCuenta = Row("NombreCuenta").ToString
|
||||
@@ -1774,37 +1774,46 @@ Partial Class General_SaldosIniciales
|
||||
Dim contadorMovimientos As Integer = 0
|
||||
Dim listadoMovimientos As String = ""
|
||||
Dim mensajeError As String = ""
|
||||
Dim Fecha As DateTime = (TxtFecha.Text).ToDate
|
||||
Try
|
||||
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("Almacen <> ''", DistinctColumns:={"Almacen"}).Rows
|
||||
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString
|
||||
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString.Trim
|
||||
'Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
Dim CveAlmacen As Integer = AlmacenRef.FiltroPrimeroValor("CveAlmacen", $"Almacen = '{almacenActual}'").ToEntero
|
||||
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, 1, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
||||
If CveAlmacen > 0 Then
|
||||
contadorMovimientos += 1
|
||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows
|
||||
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
If RowPS IsNot Nothing Then
|
||||
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero
|
||||
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero
|
||||
If CveUM > 0 Then
|
||||
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal
|
||||
Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal
|
||||
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, DdlConceptoAlmacen.SelectedValue.ToEntero, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||
listadoMovimientos += $"movimiento con folio <a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={movimientoCabecera}' target='_blank' style='color:blue'>{ObjMovimientos.Folio}</a><br/>"
|
||||
If movimientoCabecera > 0 Then
|
||||
|
||||
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then
|
||||
mensajeError = "No se logró generar el detalle del movimiento"
|
||||
|
||||
contadorMovimientos += 1
|
||||
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = '{almacenActual}'").Rows
|
||||
Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
If RowPS IsNot Nothing Then
|
||||
Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero
|
||||
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero
|
||||
If CveUM > 0 Then
|
||||
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString.ToDecimal
|
||||
Dim Valor As Decimal = nuevaEntrada("Valor").ToString.ToDecimal
|
||||
|
||||
If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, (Valor / Cantidad), -1, -1) Then
|
||||
mensajeError = "No se logró generar el detalle del movimiento"
|
||||
Throw New Exception()
|
||||
End If
|
||||
Else
|
||||
mensajeError = $"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}"
|
||||
Throw New Exception()
|
||||
End If
|
||||
Else
|
||||
mensajeError = $"La unidad de medida no se reconoce para el producto servicio:{nuevaEntrada("CodigoPS")}"
|
||||
mensajeError = $"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}"""
|
||||
Throw New Exception()
|
||||
End If
|
||||
Else
|
||||
mensajeError = $"No se encontró el producto o servicio con código ""{nuevaEntrada("CodigoPS")}"""
|
||||
Throw New Exception()
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Else
|
||||
mensajeError = $"No se registró el encabezado ""{almacenActual}"""
|
||||
Throw New Exception()
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
mensajeError = $"No se encontró el almacén con nombre ""{almacenActual}"""
|
||||
Throw New Exception()
|
||||
|
||||
@@ -200,7 +200,7 @@ Partial Class Inicio
|
||||
|
||||
Dim EsDEV = Not UsuarioActual.Empresa.FacturaProduccion
|
||||
If Not EsDEV Then
|
||||
If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100) Then MuestraInconsistencias() '100
|
||||
If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100, 1918) Then MuestraInconsistencias() '100
|
||||
End If
|
||||
|
||||
'MUESTRA CALENDARIO SOLO ROL ADMINISTRADOR-AD
|
||||
|
||||
@@ -86,7 +86,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
Dim Fecha As Date = DateTime.Now
|
||||
'AGREGAMOS LA ENTRADA
|
||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 44, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:="", Modulo:="ASA/G1")
|
||||
Folio = ObjInventario.Folio
|
||||
|
||||
@@ -161,7 +161,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ASA/G1")
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 43, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ASA/G1")
|
||||
Dim ind As Integer = 0
|
||||
|
||||
For Each Row As DataRow In resultado.Rows
|
||||
|
||||
@@ -207,7 +207,7 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
If CveProducto > 0 Then
|
||||
Dim DtTemp = CargarKardex(CveProducto)
|
||||
If DtTemp IsNot Nothing Then
|
||||
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||
Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean
|
||||
AplicaSerie = DtTemp.MAX("Serie") <> ""
|
||||
AplicaSeccion = DtTemp.MAX("SeccionAlmacen") <> ""
|
||||
@@ -223,7 +223,7 @@ Partial Class Inventarios_Kardex
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvM.Columns(11).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
|
||||
Dim Drp As datarow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
|
||||
Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
|
||||
Dim AuxAplicaSerie As Boolean
|
||||
Dim AuxAplicaCad As Boolean
|
||||
If Drp IsNot Nothing Then
|
||||
|
||||
@@ -4,6 +4,52 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.btnopaco {
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btnopaco:hover {
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
margin-top: 0px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.select2-selection {
|
||||
margin-top: 0px;
|
||||
height: 31px;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -19,6 +65,12 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Visible="true"><i class="fa fa-file-excel-o"></i><span style="padding: 10px">Excel</span></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirPDF"/>
|
||||
@@ -36,7 +88,7 @@
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<div class="row" >
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Proveedor:</label>
|
||||
</div>
|
||||
@@ -73,7 +125,15 @@
|
||||
<label>Sucursal:</label>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AutoPostBack="true" OnSelectedIndexChanged="DdlSucursal_SelectedIndexChanged" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1 truncate" >Almacén:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -92,14 +152,30 @@
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Producto:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:55%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Opcion:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList runat="server" ID="DdlOpcion" CssClass="select2me" Width="100%" CssStyle="width: 100%;">
|
||||
<asp:ListItem Value="1">Elaboración</asp:ListItem>
|
||||
<asp:ListItem Value="2" Selected="True">Caducidad</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" ToolTip="Reporte de productos caducidad " CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
@@ -109,10 +185,64 @@
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="150px" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString = "{0:dd/MM/yyyy}" ItemStyle-Width="100px" />
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" HeaderText="Tiempo de Caducidad" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTiempoCaducidad" runat="server" Text='<%# Eval("TiempoCaducidad","{0:n2}")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnPersonalizar" Style="display: none" ClientIDMode="Static" runat="server" Text="Personalizar" class="btn btn-success" OnClick="BtnPersonalizar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table style="width: 335px;" class="table table-striped table-advance table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTiempoCaducidad" runat="server" Text="Tiempo de Caducidad" Checked="false" /></td>
|
||||
<td style="text-align: left;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Text;
|
||||
|
||||
|
||||
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
{
|
||||
private DataTable DTDatos
|
||||
@@ -30,11 +31,16 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
{
|
||||
CargaFiltros();
|
||||
CargarDatos();
|
||||
CargaAlamacenes();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void CargarDatos()
|
||||
{
|
||||
|
||||
string Cves_Alamcenes = ddlAlmacen.GetSelectedValuesM();
|
||||
|
||||
DateTime FI = ModExtensiones.MinFecha;
|
||||
if (TxtFechaInicio.Text != "") FI = TxtFechaInicio.Text.ToDate();
|
||||
|
||||
@@ -44,7 +50,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
// aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad
|
||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
||||
DdlClasificacion.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa))
|
||||
DdlClasificacion.SelectedValue.ToEntero(), CvePS, 1, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion:DdlOpcion.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados;
|
||||
DTDatos = ObjInventarios.DtResultados;
|
||||
@@ -60,6 +66,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
CargarSucursales();
|
||||
CargarClasificaciones();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void CargarFechaText()
|
||||
@@ -89,6 +96,9 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
DdlSucursal.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
||||
DdlSucursal.DataBind();
|
||||
DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void CargarClasificaciones()
|
||||
@@ -104,6 +114,32 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void CargaAlamacenes(int CveSubProyectoFiltro = -1)
|
||||
{
|
||||
|
||||
ddlAlmacen.Items.Clear();
|
||||
|
||||
if (CveSubProyectoFiltro > 0)
|
||||
{
|
||||
ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveSubProyecto = {CveSubProyectoFiltro}");
|
||||
}
|
||||
else
|
||||
{
|
||||
ddlAlmacen.DataSource = get_GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1);
|
||||
}
|
||||
|
||||
ddlAlmacen.DataBind();
|
||||
ddlAlmacen.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
|
||||
UPFiltros.Update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargarDatos();
|
||||
@@ -134,6 +170,11 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
|
||||
@params.Add(new ReportParameter("OcultaCaducidad", ChkTiempoCaducidad.Checked ? "0": "1" ));
|
||||
|
||||
|
||||
|
||||
|
||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
if (Imagen.Exists)
|
||||
@@ -148,4 +189,35 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void DdlSucursal_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaAlamacenes(DdlSucursal.SelectedValue.ToEntero());
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void BtnPersonalizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Personaliza();
|
||||
}
|
||||
|
||||
private void Personaliza()
|
||||
{
|
||||
if (ChkTiempoCaducidad.Checked)
|
||||
{
|
||||
GvDatos.Columns[5].Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.Columns[5].Visible = false;
|
||||
}
|
||||
CargarDatos();//Si no se recarga no se muestran los valores dela la columna de tiempo caducindad laprimera vez que pasa de oculta a mostrarse
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,7 +43,10 @@ public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
||||
ObjInv.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.Cells[6].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-excel\"></i></a>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "XML",$"Tra-{e.Row.DBCampo("Folio")}","Tra")));
|
||||
|
||||
@@ -437,6 +437,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LnkProvisionNomina.Visible = CvePrePolizaProvision > 0;
|
||||
LnkProvisionNomina.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProvision}";
|
||||
LnkProvisionNominaAsimilados.Visible = CvePrePolizaProvisionAsimilados > 0;
|
||||
LnkProvisionNominaAsimilados.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProvisionAsimilados}";
|
||||
LnkProvisionProrrateo.NavigateUrl = $"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={CvePrePolizaProrrateo}";
|
||||
LnkProvisionProrrateo.Visible = CvePrePolizaProrrateo > 0;
|
||||
UpAccciones.Update();
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<div style="">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveSubProyecto,SubProyecto,IdSegNeg,Estatus,Serie,IVA,Calle,NoExt,NoInt,Colonia,Localidad,Municipio,Estado,Pais,CP,CveProyecto,TipoSucursal,EsSucursal,
|
||||
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal"
|
||||
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal,CveLocalidad"
|
||||
EmptyDataText="No se encontraron SubProyectos" ShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Centro de costo" />
|
||||
@@ -120,6 +120,11 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display:none">
|
||||
<asp:Button ID="BtnValidar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="BtnValidar_Click" Text="validar" />
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -180,7 +185,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkAplicaComercioExterior" AutoPostBack="true" OnCheckedChanged="ChkAplicaComercioExterior_CheckedChanged" runat="server" CssClass="form-control" Checked="false" />
|
||||
<asp:CheckBox ID="ChkAplicaComercioExterior" AutoPostBack="true" runat="server" CssClass="form-control" Checked="false" />
|
||||
<label for="<%= ChkAplicaComercioExterior.ClientID.ToString()%>">¿Aplica Comercio Exterior?</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,18 +278,83 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPais" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVPais" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtPais" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVPais" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtPais" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio" ></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPais.ClientID.ToString()%>">Pais:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" MaxLength="5"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCP" runat="server" CssClass="form-control" MaxLength="5" onblur="ValidaCodigoPostal()" onkeypress="if(event.key === 'Enter'){return false;}" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVCP" runat="server" Enabled="false" CssClass="help-block errorimput miclase" ControlToValidate="TxtCP" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CP''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCP" FilterType="Custom" ValidChars="0123456789"></ajax:FilteredTextBoxExtender>
|
||||
<label for="<%= TxtCP.ClientID.ToString()%>">CP:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPais" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlPais_SelectedIndexChanged" runat="server" DataTextField="ClaveSATPaisDescripcion" DataValueField="CvePais" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVDdlPais" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlPais" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlPais.ClientID.ToString()%>">Pais:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEstado" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlEstado_SelectedIndexChanged" runat="server" DataTextField="ClaveSATEstadoNombreEstado" DataValueField="CveEstado" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVDdlEstado" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlEstado" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEstado.ClientID.ToString()%>">Estado:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMunicipio" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlMunicipio_SelectedIndexChanged" runat="server" DataTextField="ClaveSATMunicipioDescripcion" DataValueField="CveMunicipio" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVDdlMunicipio" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlMunicipio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Municipio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlMunicipio.ClientID.ToString()%>">Municipio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlLocalidad" CssClass="form-control select2me" DataValueField="CveLocalidad" DataTextField="NombreLocalidad" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RFVDdlLocalidad" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlLocalidad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlLocalidad.ClientID.ToString()%>">Localidad:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlColonia" runat="server" AppendDataBoundItems="true" DataTextField="ClaveSATColoniaNombreAsentamiento" DataValueField="CveColonia" CssClass="form-control select2me" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlColonia_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator Visible="false" ID="RfvDdlColonia" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlColonia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlColonia.ClientID.ToString()%>">Colonia:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Telefono:</label>
|
||||
@@ -322,38 +392,19 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabComercioExterior" Visible="false" runat="server" HeaderText="Comercio Exterior">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- <ajax:TabPanel ID="TabComercioExterior" Visible="false" runat="server" HeaderText="Comercio Exterior">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPais" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlPais_SelectedIndexChanged" runat="server" DataTextField="ClaveSATPaisDescripcion" DataValueField="CvePais" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPais.ClientID.ToString()%>">Pais:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEstado" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlEstado_SelectedIndexChanged" runat="server" DataTextField="ClaveSATEstadoNombreEstado" DataValueField="CveEstado" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlEstado.ClientID.ToString()%>">Estado:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMunicipio" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlMunicipio_SelectedIndexChanged" runat="server" DataTextField="ClaveSATMunicipioDescripcion" DataValueField="CveMunicipio" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlMunicipio.ClientID.ToString()%>">Municipio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlColonia" runat="server" AppendDataBoundItems="true" DataTextField="ClaveSATColoniaNombreAsentamiento" DataValueField="CveColonia" CssClass="form-control select2me" Width="50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlColonia.ClientID.ToString()%>">Colonia:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabPanel>--%>
|
||||
</ajax:TabContainer>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -375,7 +426,7 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script >
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el SubProyecto?');
|
||||
}
|
||||
@@ -386,5 +437,13 @@
|
||||
document.getElementById("hiddenModalContent").style.display = "none";
|
||||
}
|
||||
|
||||
|
||||
function ValidaCodigoPostal() {
|
||||
|
||||
$("#BtnValidar").click();
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -74,6 +74,7 @@ Partial Class CatSubProyectos
|
||||
CargaEstado()
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
|
||||
CargaPrecioLista()
|
||||
|
||||
@@ -301,7 +302,9 @@ Partial Class CatSubProyectos
|
||||
DdlMunicipio.SelectedValueExist(GvRow.DataKey("CveMunicipio"))
|
||||
CargaColonia()
|
||||
DdlColonia.SelectedValueExist(GvRow.DataKey("CveColonia"))
|
||||
AplicaComercio()
|
||||
CargaLocalidad()
|
||||
DdlLocalidad.SelectedValueExist(GvRow.DataKey("CveLocalidad"))
|
||||
'AplicaComercio()
|
||||
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
|
||||
TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal"))
|
||||
|
||||
@@ -368,12 +371,52 @@ Partial Class CatSubProyectos
|
||||
Dim IdSeg As Integer
|
||||
If DdlSegmentoNegocio.Visible = True Then IdSeg = DdlSegmentoNegocio.SelectedValue.ToEntero Else IdSeg = 0
|
||||
|
||||
'CREA SUBPROYECTO
|
||||
|
||||
|
||||
Dim StrPais As String = ""
|
||||
Dim StrEstado As String = ""
|
||||
Dim StrMunicipio As String = ""
|
||||
Dim StrLocalidad As String = ""
|
||||
Dim StrColonia As String = ""
|
||||
|
||||
|
||||
|
||||
If DdlPais.SelectedValue.ToEntero > 0 Then
|
||||
StrPais = DdlPais.SelectedItem.Text
|
||||
Else
|
||||
StrPais = TxtPais.Text
|
||||
End If
|
||||
|
||||
If DdlEstado.SelectedValue.ToEntero > 0 Then
|
||||
StrEstado = DdlEstado.SelectedItem.Text
|
||||
Else
|
||||
StrEstado = TxtEstado.Text
|
||||
End If
|
||||
|
||||
If DdlMunicipio.SelectedValue.ToEntero > 0 Then
|
||||
StrMunicipio = DdlMunicipio.SelectedItem.Text
|
||||
Else
|
||||
StrMunicipio = TxtMunicipio.Text
|
||||
End If
|
||||
|
||||
If DdlLocalidad.SelectedValue.ToEntero > 0 Then
|
||||
StrLocalidad = DdlLocalidad.SelectedItem.Text
|
||||
Else
|
||||
StrLocalidad = TxtLocalidad.Text
|
||||
End If
|
||||
|
||||
If DdlColonia.SelectedValue.ToEntero > 0 Then
|
||||
StrColonia = DdlColonia.SelectedItem.Text
|
||||
Else
|
||||
StrColonia = TxtColonia.Text
|
||||
End If
|
||||
|
||||
'CREA SUBPROYECTO
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If Not ObjSubproyectos.AddCentroCosto(TxtCentroCosto.Text.Trim, IdSeg, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=StrLocalidad, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then
|
||||
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
|
||||
TieneError = True
|
||||
Else
|
||||
CveSubProyecto = ObjSubproyectos.CveSubProyecto
|
||||
@@ -381,9 +424,9 @@ Partial Class CatSubProyectos
|
||||
Else
|
||||
If (HorarioVerano > -13 And HorarioVerano < 13) And (HorarioInvierno > -13 And HorarioInvierno < 13) Then
|
||||
If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=TxtColonia.Text.Trim, Localidad:=TxtLocalidad.Text.Trim, Municipio:=TxtMunicipio.Text.Trim, Estado:=TxtEstado.Text.Trim, Pais:=TxtPais.Text.Trim, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=TxtLocalidad.Text.Trim, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
|
||||
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim) Then
|
||||
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
@@ -668,7 +711,7 @@ Partial Class CatSubProyectos
|
||||
ChkEsMatriz.Checked = False
|
||||
ChkEsSucursal.Checked = False
|
||||
ChkAplicaComercioExterior.Checked = False
|
||||
TabComercioExterior.Visible = False
|
||||
'TabComercioExterior.Visible = False
|
||||
|
||||
TxtSerie.Text = ""
|
||||
TxtIVA.Text = "0.16"
|
||||
@@ -689,6 +732,7 @@ Partial Class CatSubProyectos
|
||||
CargaEstado()
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaSegmentosNegocio()
|
||||
@@ -699,7 +743,8 @@ Partial Class CatSubProyectos
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarCentroCosto"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaRequired()
|
||||
Private Sub CargaRequired()
|
||||
|
||||
If ChkEsSucursal.Checked = True Then
|
||||
RFVSerie.Enabled = True
|
||||
RFVIVA.Enabled = True
|
||||
@@ -723,6 +768,14 @@ Partial Class CatSubProyectos
|
||||
RFVPais.Visible = True
|
||||
RFVCP.Visible = True
|
||||
|
||||
RFVCP.Visible = True
|
||||
RFVDdlPais.Visible = True
|
||||
RFVDdlEstado.Visible = True
|
||||
RFVMunicipio.Visible = True
|
||||
RFVLocalidad.Visible = True
|
||||
RFVColonia.Visible = True
|
||||
|
||||
|
||||
Else
|
||||
RFVSerie.Enabled = False
|
||||
RFVIVA.Enabled = False
|
||||
@@ -746,6 +799,14 @@ Partial Class CatSubProyectos
|
||||
RFVPais.Visible = False
|
||||
RFVCP.Visible = False
|
||||
|
||||
|
||||
RFVCP.Visible = False
|
||||
RFVDdlPais.Visible = False
|
||||
RFVDdlEstado.Visible = False
|
||||
RFVMunicipio.Visible = False
|
||||
RFVLocalidad.Visible = False
|
||||
RFVColonia.Visible = False
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -790,36 +851,82 @@ Partial Class CatSubProyectos
|
||||
End If
|
||||
DdlColonia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlColonia.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub CargaLocalidad()
|
||||
|
||||
DdlLocalidad.Items.Clear()
|
||||
|
||||
If DdlEstado.SelectedValue.ToEntero > 0 Then
|
||||
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
|
||||
DdlLocalidad.DataBind()
|
||||
End If
|
||||
|
||||
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaEstado()
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
End Sub
|
||||
Protected Sub DdlEstado_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaMunicipio()
|
||||
CargaColonia()
|
||||
End Sub
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaColonia()
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkAplicaComercioExterior_CheckedChanged(sender As Object, e As EventArgs)
|
||||
AplicaComercio()
|
||||
End Sub
|
||||
|
||||
Private Sub AplicaComercio()
|
||||
If ChkAplicaComercioExterior.Checked Then
|
||||
TabComercioExterior.Visible = True
|
||||
Else
|
||||
TabComercioExterior.Visible = False
|
||||
End If
|
||||
UpBodyCentroCosto.Update()
|
||||
End Sub
|
||||
|
||||
CargaLocalidad()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaColonia()
|
||||
CargaLocalidad()
|
||||
End Sub
|
||||
|
||||
'Protected Sub ChkAplicaComercioExterior_CheckedChanged(sender As Object, e As EventArgs)
|
||||
' AplicaComercio()
|
||||
'End Sub
|
||||
|
||||
'Private Sub AplicaComercio()
|
||||
' If ChkAplicaComercioExterior.Checked Then
|
||||
' TabComercioExterior.Visible = True
|
||||
' Else
|
||||
' TabComercioExterior.Visible = False
|
||||
' End If
|
||||
' UpBodyCentroCosto.Update()
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnValidar_Click(sender As Object, e As EventArgs)
|
||||
validaCodigoPostal()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
validaCodigoPostal()
|
||||
End Sub
|
||||
|
||||
Private Sub validaCodigoPostal()
|
||||
|
||||
Dim CPTxt As Integer = TxtCP.Text.ToEntero()
|
||||
|
||||
Dim CveColonia As Integer = DdlColonia.SelectedValue.ToEntero
|
||||
|
||||
If CPTxt > 0 And CveColonia > 0 Then
|
||||
Dim CP As Integer = GlobalDTColonia("-1").FiltroPrimeroValor("CP", $"CveColonia = {CveColonia}").ToEntero
|
||||
If CPTxt <> CP Then
|
||||
Alert("El codigo postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyectoAsignado" runat="server" CssClass="select2me" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" ValidationGroup="GrpGuardar" Width="100%">
|
||||
<asp:DropDownList ID="DdlSubProyectoAsignado" runat="server" CssClass="select2me" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" ValidationGroup="GrpGuardar" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -480,13 +480,13 @@
|
||||
<asp:Literal ID="LtlFechaIngreso" runat="server" Text='<%# Eval("FechaIngreso", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:label runat="server" ID="LtlSubProyectoConfigurado"> </asp:label>
|
||||
<asp:Label runat="server" ID="LtlSubProyectoConfigurado"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyectoConfigurado" runat="server" Text='<%# Eval("SubProyecto") %>' ></asp:Literal>
|
||||
<asp:Literal ID="LtlSubProyectoConfigurado" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -915,7 +915,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtCURP" runat="server" MaxLength="18"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtCURP" Text="CURP:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCURP" runat="server" ControlToValidate="TxtCURP" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CURP''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarAddS"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCURP" runat="server" ControlToValidate="TxtCURP" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CURP''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarAddS"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@@ -952,16 +952,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Hermosillo" ></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Taxi 1" ></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Taxi 2" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Taxi 1"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Taxi 2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5" style="display: none;">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -971,11 +971,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtFoto" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1060,7 +1055,7 @@
|
||||
|
||||
<asp:DropDownList ID="DDlTipoSalario" runat="server" CssClass="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardarAddS">
|
||||
<asp:ListItem Text="Salario fijo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Salario variable" Value="2" Selected="True" ></asp:ListItem>
|
||||
<asp:ListItem Text="Salario variable" Value="2" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Salario mixto" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DDlTipoSalario" Text="Tipo Salario:"></asp:Label>
|
||||
@@ -1105,7 +1100,7 @@
|
||||
|
||||
<asp:DropDownList ID="DDlSindicalizado" runat="server" CssClass="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardarAddS">
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1" Selected ="true"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1" Selected="true"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DDlSindicalizado" Text="Sindicalizado:"></asp:Label>
|
||||
</div>
|
||||
@@ -1119,6 +1114,11 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtFoto" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<asp:CheckBox ID="chkcontinuarAgregando" Checked="true" TextAlign="Left" Text="Continuar agregando:" runat="server" />
|
||||
</div>
|
||||
|
||||
@@ -1474,13 +1474,13 @@
|
||||
<i></i>
|
||||
</asp:Panel>
|
||||
|
||||
</asp:Panel>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtBono" runat="server" MaxLength="10" Text="0"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtBono" Text="Bono:"></asp:Label>
|
||||
<asp:CompareValidator ID="CVBono" runat="server" ControlToValidate="TxtBono" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Bono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtNumDiasAguinaldo" Text="15" runat="server" MaxLength="10"></asp:TextBox>
|
||||
|
||||
@@ -5465,6 +5465,8 @@ Partial Class RH_Personal
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.filename
|
||||
|
||||
Dim dir As String = String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta)
|
||||
System.IO.Directory.CreateDirectory(dir)
|
||||
Dim yaExistente As String = String.Format("{0}RH\Personal\{1}.jpg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||
Dim yaExistentePNG As String = String.Format("{0}RH\Personal\{1}.png", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||
Dim yaExistenteBMP As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||
|
||||
@@ -213,7 +213,7 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
End If
|
||||
Next
|
||||
|
||||
If NumModulos > 0 Then
|
||||
If NumModulos > 0 Or (UsuarioActual.CveEmpresa.Contiene(143, 1)) Then
|
||||
Valido = True
|
||||
Else
|
||||
Alert("Debe seleccionar al menos 1 modulo", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -2078,6 +2078,11 @@
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6569,6 +6574,11 @@
|
||||
$("#C_Tab_TabContratos_tab").click(function () { CargaContratos(); });
|
||||
}
|
||||
|
||||
var isAsyncPostback = Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();
|
||||
if (isAsyncPostback) {
|
||||
tb_init('a.thickbox');
|
||||
}
|
||||
|
||||
}
|
||||
$(document).on('mouseenter', ".truncate", function () {
|
||||
var $this = $(this);
|
||||
@@ -7293,6 +7303,13 @@
|
||||
$get("BtnCambiaPorcentaje").click();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"></script>
|
||||
|
||||
|
||||
@@ -7220,7 +7220,7 @@ Partial Class Ventas
|
||||
|
||||
If ValidaExistencia AndAlso DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
||||
'VALIDA EXISTENCIA
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 140, 153}) Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -8917,7 +8917,7 @@ Partial Class Ventas
|
||||
Liga2 = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
||||
End If
|
||||
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgVentasDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||
|
||||
MensajeAlert.Clear()
|
||||
|
||||
@@ -13602,7 +13602,7 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If CveConceptoAlmacen = 3 AndAlso UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") AndAlso Dr("EntregaDirecta").ToString().ToEntero() < 1 Then
|
||||
If CveConceptoAlmacen = 3 AndAlso UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 140, 141}) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") AndAlso Dr("EntregaDirecta").ToString().ToEntero() < 1 Then
|
||||
Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacen, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
||||
If Existencia < Cantidad Then
|
||||
OcurrioError = True
|
||||
@@ -16865,7 +16865,7 @@ Partial Class Ventas
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
'VALIDA EXISTENCIA
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153}) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 140, 153}) Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
|
||||
@@ -336,6 +336,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user