Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3,6 +3,16 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
|
||||
#C_DdlColonias > span > span.selection > span{
|
||||
width:267px!important
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Choferes
|
||||
@@ -28,7 +38,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 +60,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 +96,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,45 +126,70 @@
|
||||
</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="col-md-4">
|
||||
|
||||
<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>
|
||||
<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-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 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-4">
|
||||
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
<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 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>
|
||||
<label for="<%= TxtCP.ClientID.ToString()%>">Código Postal:</label>
|
||||
</div>
|
||||
</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="267px" 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>
|
||||
@@ -159,6 +213,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 +226,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,44 @@ 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)
|
||||
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 +112,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 +125,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 +179,7 @@ Partial Class Acarreos_CatChoferes
|
||||
TxtIdentificacion.Text = ""
|
||||
TxtDomicilio.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
TxtCiudad.Text = ""
|
||||
'TxtCiudad.Text = ""
|
||||
TxtLicencia.Text = ""
|
||||
|
||||
|
||||
@@ -113,14 +187,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 +235,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) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ProductosCaducidadGet")
|
||||
@@ -1652,6 +1658,9 @@ 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
|
||||
End With
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = ""
|
||||
|
||||
@@ -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"
|
||||
|
||||
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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -44,7 +44,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,"1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados;
|
||||
DTDatos = ObjInventarios.DtResultados;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user