Carta Porte CatUnidades Esatatus

This commit is contained in:
rakcsle
2022-05-04 08:36:51 -07:00
parent 0ee812f008
commit 821dc0df6c
11 changed files with 49 additions and 34 deletions

View File

@@ -1980,6 +1980,7 @@ Public Class ClsCompras
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
@@ -2023,6 +2024,7 @@ Public Class ClsCompras
End With
Try
SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception

View File

@@ -996,14 +996,14 @@ Public Class ClsContabilidad
' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "")
'End If
OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", dr("ConceptoContable").ToString), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then
Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If '
Catch ex As Exception
If ex.Message.Contains("50015;") Then

View File

@@ -5567,7 +5567,7 @@ Public Class ClsInventarios
Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String,
Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "") As Boolean
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesAdd")
@@ -5593,6 +5593,7 @@ Public Class ClsInventarios
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
@@ -5620,7 +5621,7 @@ Public Class ClsInventarios
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String,
NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "") As Boolean
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -5646,6 +5647,7 @@ Public Class ClsInventarios
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -17538,8 +17538,8 @@ Partial Class Compras_Compras
'RETENCIONES
Dim Retenciones = 0D
Retenciones = TxtRetIVA.Text.ToDecimal
Retenciones += TxtRetISR.Text.ToDecimal
Retenciones = RetIVA.ToDecimal
Retenciones += RetISR.ToDecimal
SubTotal2 = SubTotal - Descuentos ' - Amortizacion '[IPP] COMENTADO CASO JAM 12653 CON NC 27122 | 23/MAYO/2018

View File

@@ -221,7 +221,7 @@
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1" style="text-align:left!important">
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" />
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" Visible="false" />
</div>
</div>
<div class="row rowpadding">
@@ -232,7 +232,7 @@
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1" style="text-align:left!important">
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" />
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" visible="false" />
</div>
</div>

View File

@@ -958,12 +958,12 @@ Partial Class Inventarios_CartaPorteManual
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus:=1) Then
DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados
End If
@@ -1508,7 +1508,7 @@ Partial Class Inventarios_CartaPorteManual
DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If
End Using

View File

@@ -31,7 +31,8 @@
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer"
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer,Estatus"
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
@@ -41,7 +42,7 @@
<asp:BoundField HeaderText="Permiso SCT" DataField="NumPermisoSCT" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Aseguradora" DataField="NombreAseguradora" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Estatus" DataField="EstatuStr" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
@@ -249,7 +250,8 @@
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" id="Div1">
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveProveedor" DataTextField="RazonSocial" Style="padding: 0px">
</asp:DropDownList>
@@ -258,6 +260,14 @@
<i></i>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server">
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
</div>
</div>
</div>
<%--<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />--%>

View File

@@ -37,10 +37,9 @@ Partial Class Inventarios_CatUnidades
Public Sub CargaDatos()
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) Then
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa, Estatus:=-1) Then
GvDatos.DataSource = ObjInventarios.DtResultados
Else
GvDatos.DataSource = Nothing
@@ -110,6 +109,7 @@ Partial Class Inventarios_CatUnidades
TxtNumeroTrailer.Text = ""
TxtSCAC.Text = ""
TxtCAAT.Text = ""
ChkEstatus.Checked = False
RdTipoUnidad.SelectedValue = "1"
LtlTituloModal.Text = "Agregar Unidad"
@@ -153,6 +153,7 @@ Partial Class Inventarios_CatUnidades
TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion")
TxtSCAC.Text = GvRow.DataKey("SCAC")
TxtCAAT.Text = GvRow.DataKey("CAAT")
ChkEstatus.Checked = If(Boolean.Parse(GvRow.DataKey("Estatus")), True, False)
'ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2")
@@ -206,14 +207,14 @@ Partial Class Inventarios_CatUnidades
If CveCamion <= 0 Then
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
Alert("Unidad agregada correctamente")
Else
ErrorPrceso = True
End If
Else
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text) Then
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked) Then
Alert("Unidad actualizada correctamente")
Using objbase = New ClsClaseBase()
objbase.runQuerystr(String.Format("UPDATE Inv_Camiones SET CveProveedor={1} WHERE CveCamion={0}", CveCamion, DdlProveedor.SelectedValue))

View File

@@ -279,7 +279,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{
ClsInventarios ObjInventarios = new ClsInventarios();
if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) && ObjInventarios.DtResultados.Rows.Count > 0)
if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa,Estatus:1) && ObjInventarios.DtResultados.Rows.Count > 0)
{
DdlModalCamion.DataSource = ObjInventarios.DtResultados;
}
@@ -829,7 +829,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
using (ClsInventarios ObjInv = new ClsInventarios())
{
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2,Estatus:1))
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
}
try
@@ -868,10 +868,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
using (ClsInventarios ObjInv = new ClsInventarios())
{
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1))
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:1))
DdlModalCamion.DataSource = ObjInv.DtResultados;
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2,Estatus:1))
DdlRemolque1.DataSource = ObjInv.DtResultados;
}

View File

@@ -3023,12 +3023,12 @@ Partial Class Inventarios_TraspasoAlmacen
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados
End If
@@ -3334,7 +3334,7 @@ Partial Class Inventarios_TraspasoAlmacen
DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If
End Using

View File

@@ -34126,12 +34126,12 @@ Partial Class Ventas
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados
End If
@@ -34265,7 +34265,7 @@ Partial Class Ventas
DvRemolque2.Visible = True
Using ObjInv As New ClsInventarios
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
End If
End Using