Merge -- PV, PopUpVerFactura
This commit is contained in:
@@ -724,11 +724,11 @@ Public Class ClsCRM
|
||||
.Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
.Add("@CveAcercamiento", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
_CveAcercamiento = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString().ToEntero()
|
||||
_CveAcercamiento = SqlAdapter.SelectCommand.Parameters("@CveAcercamiento").Value.ToString().ToEntero()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el Acercamiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
@@ -1096,7 +1096,7 @@ Public Class ClsCRM
|
||||
#End Region
|
||||
|
||||
#Region "Asignar Vendedor a Prospectos"
|
||||
Public Function GetProspectosPorAsignarVendedor(CveEmpresa As Integer, Optional Empresa As String = "-1", Optional CveSubProyecto As Integer = -1, Optional CveGiro As Integer = -1) As Boolean
|
||||
Public Function GetProspectosPorAsignarVendedor(CveEmpresa As Integer, Optional Empresa As String = "-1", Optional CveSubProyecto As Integer = -1, Optional CveGiro As Integer = -1, Optional TipoAsignacion As Integer = 0) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_CRM_GetProspectosPorAsignarVendedor", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1104,6 +1104,7 @@ Public Class ClsCRM
|
||||
.Add("@Empresa", SqlDbType.NVarChar).Value = Empresa
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveGiro", SqlDbType.Int).Value = CveGiro
|
||||
.Add("@TipoAsignacion", SqlDbType.Int).Value = TipoAsignacion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -3426,6 +3426,19 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetCartaPorteTiposRemolques() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_CP_TiposRemolqueGet")
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los tipos de remolque de carta porte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -3835,7 +3848,8 @@ Public Class ClsGenerales
|
||||
End Function
|
||||
|
||||
Public Function AddInvEntregaAlmacenRuta(CveSubProyecto As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveMovimientoAlmacen As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, FechaLlegada As DateTime, Tipo As String,
|
||||
FolioReferencia As String, Referencia As String, FechaLimite As Date, Orden As Integer, Estatus As Integer, Distancia As Integer) As Integer
|
||||
FolioReferencia As String, Referencia As String, FechaLimite As Date, Orden As Integer, Estatus As Integer, Distancia As Integer, Optional ConfigCartaPorte As String = "-1",
|
||||
Optional CveCamionRemolque1 As Integer = -1, Optional CveCamionRemolque2 As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Inv_EntregaAlmacenRutaAdd")
|
||||
|
||||
@@ -3858,7 +3872,9 @@ Public Class ClsGenerales
|
||||
|
||||
.Add("@FechaLimite", SqlDbType.DateTime).Value = FechaLimite
|
||||
|
||||
|
||||
.Add("@CveCamionRemolque1", SqlDbType.Int).Value = CveCamionRemolque1
|
||||
.Add("@CveCamionRemolque2", SqlDbType.Int).Value = CveCamionRemolque2
|
||||
.Add("@ConfigCartaPorte", SqlDbType.VarChar).Value = ConfigCartaPorte
|
||||
|
||||
.Add("@CveEntregaAlmacen", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
@@ -3872,7 +3888,9 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, CveEmpresa As Integer) As Boolean
|
||||
Public Function UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, CveEmpresa As Integer,
|
||||
Optional FechaLlegada As DateTime = MinFecha, Optional CveCamionRemolque1 As Integer = -1, Optional CveCamionRemolque2 As Integer = -1, Optional Distancia As Integer = -1,
|
||||
Optional ConfigCartaPorte As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_EntregaAlmacenRutaUpdate")
|
||||
|
||||
@@ -3887,6 +3905,12 @@ Public Class ClsGenerales
|
||||
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
.Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
|
||||
.Add("@CveCamionRemolque1", SqlDbType.Int).Value = CveCamionRemolque1
|
||||
.Add("@CveCamionRemolque2", SqlDbType.Int).Value = CveCamionRemolque2
|
||||
.Add("@Distancia", SqlDbType.Int).Value = Distancia
|
||||
.Add("@ConfigCartaPorte", SqlDbType.VarChar).Value = ConfigCartaPorte
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3969,7 +3993,7 @@ Public Class ClsGenerales
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetInvEntregaAlmacenRutaRep(CveSubProyecto As Integer, CveEmpresa As Integer, Estatus As Integer, FechaInicio As Date, FechaFin As Date, CveChofer As Integer) As Boolean
|
||||
Public Function GetInvEntregaAlmacenRutaRep(CveSubProyecto As Integer, CveEmpresa As Integer, Estatus As Integer, FechaInicio As Date, FechaFin As Date, CveChofer As Integer, Optional CveTimbre As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -3983,6 +4007,7 @@ Public Class ClsGenerales
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveTimbre", SqlDbType.Int).Value = CveTimbre
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -5530,8 +5530,11 @@ Public Class ClsInventarios
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer, ConfigCartaPorte As String, 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) As Boolean
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5549,6 +5552,13 @@ Public Class ClsInventarios
|
||||
.Add("@NumPolizaSeguroMedioAmbiente", SqlDbType.VarChar).Value = NumPolizaSeguroMedioAmbiente
|
||||
.Add("@NombreAseguradoraCarga", SqlDbType.VarChar).Value = NombreAseguradoraCarga
|
||||
.Add("@NumPolizaSeguroCarga", SqlDbType.VarChar).Value = NumPolizaSeguroCarga
|
||||
.Add("@CveTipoCamion", SqlDbType.Int).Value = CveTipoCamion
|
||||
.Add("@CveTipoRemolque", SqlDbType.Int).Value = CveTipoRemolque
|
||||
.Add("@LongitudCaja", SqlDbType.VarChar).Value = LongitudCaja
|
||||
.Add("@LineaTransportacion", SqlDbType.VarChar).Value = LineaTransportacion
|
||||
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
|
||||
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
|
||||
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -5574,7 +5584,9 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String, ConfigCartaPorte As String, 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) As Boolean
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5593,6 +5605,13 @@ Public Class ClsInventarios
|
||||
.Add("@NumPolizaSeguroMedioAmbiente", SqlDbType.VarChar).Value = NumPolizaSeguroMedioAmbiente
|
||||
.Add("@NombreAseguradoraCarga", SqlDbType.VarChar).Value = NombreAseguradoraCarga
|
||||
.Add("@NumPolizaSeguroCarga", SqlDbType.VarChar).Value = NumPolizaSeguroCarga
|
||||
.Add("@CveTipoCamion", SqlDbType.Int).Value = CveTipoCamion
|
||||
.Add("@CveTipoRemolque", SqlDbType.Int).Value = CveTipoRemolque
|
||||
.Add("@LongitudCaja", SqlDbType.VarChar).Value = LongitudCaja
|
||||
.Add("@LineaTransportacion", SqlDbType.VarChar).Value = LineaTransportacion
|
||||
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
|
||||
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
|
||||
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -174,13 +174,38 @@ Public Class ClsNominas
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Function AutorizaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String) As Boolean
|
||||
Public Function ManifiestoForVtaGet(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String, CveEmbarqueManifiesto As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ManifiestoForVtaGet", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmbarqueManifiesto", SqlDbType.Int).Value = CveEmbarqueManifiesto
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(DTSet)
|
||||
If DTSet.Tables.Count > 0 Then
|
||||
Data = DTSet.Tables(0)
|
||||
End If
|
||||
retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al obtener datos manifiesto.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los datos manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function AutorizaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String, Optional Numpagos As Integer = 1) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_AutorizaCalculoAnual", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@PersonalXml", SqlDbType.Xml).Value = If(String.IsNullOrEmpty(PersonalXml), DBNull.Value, DirectCast(PersonalXml, Object))
|
||||
.Add("@Numpagos", SqlDbType.Int).Value = Numpagos
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1972,8 +1972,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Alert("El nuevo personal no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("Chk_RH_PersonalSalarioIMSS") Then
|
||||
Alert("El nuevo personal no se guardo debido a que se presento un problema al calcular el salario", TipoMensaje.MsgAdvertencia)
|
||||
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al guardar el nuevo personal.", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||
ElseIf Ex1.Message.Contains("dbo.Vw_Val_Nom_Curps") Then
|
||||
Alert(String.Format("El nuevo personal no se guardo, ya existe un personal con esta curp '{0}'", CURP), TipoMensaje.MsgAdvertencia)
|
||||
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al guardar el nuevo personal.", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar el nuevo personal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
@@ -185,6 +185,17 @@ Public Class Timbres
|
||||
End If
|
||||
|
||||
|
||||
If drT("ClaveTipoRemolque1").ToString <> "" Then
|
||||
Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")}
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1)
|
||||
End If
|
||||
|
||||
If drT("ClaveTipoRemolque2").ToString <> "" Then
|
||||
Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")}
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
|
||||
End If
|
||||
|
||||
|
||||
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
||||
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
|
||||
.Colonia = drT("DirOriClaveSATColonia").ToString,
|
||||
|
||||
@@ -389,6 +389,11 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
DdlEtapaProceso.SelectedValueExist(CveEtapaActual);
|
||||
DesactivaEdicion();
|
||||
|
||||
if (UsuarioActual.TienePermisoProceso(336)) //permiso para editar vendedor
|
||||
{
|
||||
DdlVendedor.Enabled = true;
|
||||
}
|
||||
|
||||
if (CveEtapaActual > 0)
|
||||
{
|
||||
//CARGAMOS BITACORA
|
||||
@@ -732,6 +737,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
Double Comision = TxtComision.Text.ToDouble();
|
||||
|
||||
int Prioridad = DdlPrioridad.SelectedValue.ToEntero();
|
||||
int CveRechazoMotivo = DdlRechazoMotivo.SelectedValue.ToEntero();
|
||||
|
||||
int CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
|
||||
@@ -750,14 +756,19 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
AcercaminetoModel.CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
AcercaminetoModel.CveEncuestaAplicadaProceso = CveEncuestaAplicadaProceso;
|
||||
AcercaminetoModel.FechaApertura = FechaApertura;
|
||||
AcercaminetoModel.FechaCierre = (DateTime)FechaCierre;
|
||||
AcercaminetoModel.FechaCierre = FechaCierre != null? (DateTime)FechaCierre : ModExtensiones.MinFecha;
|
||||
AcercaminetoModel.CvePS = DdlPS.SelectedValue.ToEntero();
|
||||
AcercaminetoModel.CveRechazoMotivo = CveRechazoMotivo;
|
||||
|
||||
if (cRMService.AcercamientoUpdate(AcercaminetoModel))
|
||||
{
|
||||
CveEtapaActual = CveEtapaProcesoActualActualizar;
|
||||
HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No se actualizó el acercamiento.", ModExtensiones.TipoMensaje.ToastError);
|
||||
}
|
||||
|
||||
|
||||
//CARGA BITACORA
|
||||
@@ -865,6 +876,11 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
this.RegistraScript("$('#ModalCierreMotivoRechazo').modal();");
|
||||
UpCierreMotivoRechazo.Update();
|
||||
}
|
||||
protected void EliminarFile(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void BtnRegistrarCierreCancelacion_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -36,6 +36,14 @@
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGiroClasificacion" Width="100%" runat="server" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 " style="width: 90px; margin-top: 5px;">Asignación a vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAsignacion" Width="100%" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Value="-1" Text="Todos" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="0" Text="Por asignar"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Asignados"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,12 +24,13 @@ public partial class CRM_AsignarVendedorEnProspectos : ClsPaginas
|
||||
{
|
||||
string Empresa = (TxtNombre.Text == "" ? "-1" : TxtNombre.Text);
|
||||
ClsCRM ObjCRM = new ClsCRM();
|
||||
if (ObjCRM.GetProspectosPorAsignarVendedor(UsuarioActual.CveEmpresa, Empresa, DdlSubProyecto.SelectedValue.ToEntero(),DdlGiroClasificacion.SelectedValue.ToEntero()))
|
||||
if (ObjCRM.GetProspectosPorAsignarVendedor(UsuarioActual.CveEmpresa, Empresa, DdlSubProyecto.SelectedValue.ToEntero(),DdlGiroClasificacion.SelectedValue.ToEntero(), DdlAsignacion.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvProspectos.DataSource = ObjCRM.DtResultados;
|
||||
}
|
||||
ObjCRM.Dispose();
|
||||
GvProspectos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
private void CargaFiltros()
|
||||
|
||||
@@ -1535,7 +1535,16 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
DdlVendedor.SelectedValueExist(CveVendedor);
|
||||
|
||||
if (CveVendedor > 0)
|
||||
{
|
||||
DdlVendedor.Enabled = false;
|
||||
DdlVendedorAsignado.Enabled = false;
|
||||
}
|
||||
|
||||
|
||||
if (UsuarioActual.TienePermisoProceso(336)) //permiso para editar vendedor
|
||||
{
|
||||
DdlVendedorAsignado.Enabled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3989,7 +3989,7 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
|
||||
|
||||
Dim TotalRealDevolucion As Decimal = 0
|
||||
|
||||
Dim EstatusCredito As Integer = 0
|
||||
Dim CveSubProyecto As Integer = 0
|
||||
@@ -4689,6 +4689,8 @@ Partial Class Compras_Compras
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
Devolucion = guardardevolucion(ObjInventario, ObjCompras.CveCompra, TxtSubTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate)
|
||||
|
||||
TotalRealDevolucion = Devolucion.Total
|
||||
|
||||
TieneError = Devolucion.TieneError
|
||||
End If
|
||||
Dim ErrorDetalles As Boolean = False
|
||||
@@ -6856,12 +6858,29 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||
|
||||
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
||||
|
||||
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
||||
|
||||
|
||||
Dim CveSubProyecto69 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
||||
Dim CveClasificacion69 As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||
|
||||
|
||||
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacion69}").ToString.ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=TotalRealDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -8500,8 +8519,8 @@ Partial Class Compras_Compras
|
||||
Catch ex As Exception
|
||||
ObjCompras.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
Alert("Ocurrió un error al registrar la compra y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError)
|
||||
GuardaLog($"Ocurrió un error al registrar la compra y cualquier detalle comuníquese a Soporte Técnico : {ex}")
|
||||
Alert("Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError)
|
||||
GuardaLog($"Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico : {ex}")
|
||||
ViewState("CveCompra") = -1
|
||||
End Try
|
||||
ObjAcar.Dispose()
|
||||
@@ -14262,6 +14281,11 @@ Partial Class Compras_Compras
|
||||
'*se envia true si hubo un error*'
|
||||
|
||||
Private Function guardardevolucion(ObjInventario As ClsInventarios, CveCompra As Integer, subtotal As Decimal, Fecha As Date) As MMensajeDevolucion
|
||||
|
||||
|
||||
Dim TotalSumaPU As Decimal = 0.0D
|
||||
|
||||
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim CveAlmacen As Integer = DdlAlmacenDevolucion.SelectedValue.ToEntero()
|
||||
Dim subtotaldevolucion As Double = 0
|
||||
@@ -14271,6 +14295,7 @@ Partial Class Compras_Compras
|
||||
Dim cantidad As Double = 0.0
|
||||
Dim TotalAlmacen As Decimal = 0
|
||||
|
||||
|
||||
For Each Dr As GridViewRow In GVDevolucion.Rows
|
||||
'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero
|
||||
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
@@ -14309,6 +14334,7 @@ Partial Class Compras_Compras
|
||||
PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDouble, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -14323,12 +14349,26 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
|
||||
For Each drow As DataRow In ObjInventario.DtResultados.Rows
|
||||
TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Return New MMensajeDevolucion() With
|
||||
{
|
||||
.CveMovimiento = CveMovimientoEntrada,
|
||||
.DebeRealizarDevolucion = realizadevolucion,
|
||||
.TieneError = ErrorMovInv
|
||||
.TieneError = ErrorMovInv,
|
||||
.Total = TotalSumaPU
|
||||
}
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub cargaddldevoluciones(CveProveedor As Integer, SubTotal As Double)
|
||||
@@ -21032,4 +21072,5 @@ Public Class MMensajeDevolucion
|
||||
Public Property CveMovimiento As Integer
|
||||
Public Property TieneError As Boolean
|
||||
Public Property DebeRealizarDevolucion As Boolean
|
||||
Public Property Total As Decimal
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
@@ -242,39 +242,129 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpPoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row" visible="false" runat="server" id="DivDatosPoliza">
|
||||
<label class="col-md-1">Tipo Póliza:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Fecha:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioPoliza" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
|
||||
|
||||
<div class="col-md-6" style="margin-top: 20px;">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-bookmark font-green"></i>
|
||||
<span class="caption-subject bold uppercase"></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtFolio" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoPoliza" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoPoliza.ClientID.ToString()%>">Tipo Póliza:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<%--<div class="form-group form-md-line-input input-iconright">--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<br />
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioPoliza" class="btn default" style="margin-top:15px!important"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendarioPoliza" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtFechaDocumento.ClientID.ToString()%>">Fecha:</label>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<%--</div>--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtConcepto.ClientID.ToString()%>">Concepto:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendarioPoliza" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Concepto:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
|
||||
<div class="col-md-6" style="margin-top: 20px;">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-bookmark font-green"></i>
|
||||
<span class="caption-subject bold uppercase"></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtEstatus" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtEstatus.ClientID.ToString()%>">Estatus: </label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtFechaelaboracion" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFechaelaboracion.ClientID.ToString()%>">Fecha Elaboracion: </label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtUsuarioElaboro" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtUsuarioElaboro.ClientID.ToString()%>">Usuario Elaboro: </label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" visible="false" runat="server" id="divContabilizada">
|
||||
<label class="col-md-1">Contabilizada:</label>
|
||||
<div class="col-md-2">
|
||||
@@ -285,6 +375,7 @@
|
||||
<asp:Label ID="LblFolio" Font-Bold="true" Font-Size="Large" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" visible="false" runat="server" id="DivTipoGasto">
|
||||
<label class="col-md-1">Tipo Gasto:</label>
|
||||
<div class="col-md-2">
|
||||
@@ -292,6 +383,9 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
|
||||
@@ -432,6 +432,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TipoPoliza = DdlTipoPoliza.SelectedItem.Text
|
||||
Folio = dr("FolioPoliza").ToString
|
||||
|
||||
TxtFolio.Text = dr("FolioPoliza").ToString
|
||||
TxtUsuarioElaboro.Text = dr("Usuario").ToString
|
||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
|
||||
|
||||
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
||||
'DivAgregarConceptos.Visible = True
|
||||
LnkAddConcepto.Visible = True
|
||||
@@ -2341,18 +2347,27 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
|
||||
Else
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
End If
|
||||
|
||||
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
Else
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Visible="false" />
|
||||
<asp:CheckBox ID="ChkAnticipos" runat="server" Text="Incluye Anticipos" TextAlign="Left" Checked="true" Visible="false" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -158,14 +158,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="CodigoMaterialPeligroso">
|
||||
<Textbox Name="CveMaterialPeligroso">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!CodigoMaterialPeligroso.Value</Value>
|
||||
<Value>=Fields!CveMaterialPeligroso.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -177,7 +177,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>CodigoMaterialPeligroso</rd:DefaultName>
|
||||
<rd:DefaultName>CveMaterialPeligroso</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#4f81bd</Color>
|
||||
@@ -687,9 +687,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>5.80407cm</Top>
|
||||
<Left>0.1841in</Left>
|
||||
<Height>0.5cm</Height>
|
||||
<Top>5.81465cm</Top>
|
||||
<Left>0.19973in</Left>
|
||||
<Height>0.50189cm</Height>
|
||||
<Width>7.52776in</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
@@ -1945,9 +1945,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.13111in</Top>
|
||||
<Top>1.09361in</Top>
|
||||
<Left>0.38395cm</Left>
|
||||
<Height>1.08451in</Height>
|
||||
<Height>0.95951in</Height>
|
||||
<Width>3.73231in</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
@@ -1955,9 +1955,6 @@
|
||||
<Color>#4f81bd</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -1985,7 +1982,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>2.33775cm</Top>
|
||||
<Top>2.27425cm</Top>
|
||||
<Left>0.15116in</Left>
|
||||
<Height>0.5cm</Height>
|
||||
<Width>7.5137in</Width>
|
||||
@@ -2159,9 +2156,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.13111in</Top>
|
||||
<Left>9.86403cm</Left>
|
||||
<Height>1.08451in</Height>
|
||||
<Top>1.09361in</Top>
|
||||
<Left>9.91989cm</Left>
|
||||
<Height>0.95951in</Height>
|
||||
<Width>3.78138in</Width>
|
||||
<ZIndex>11</ZIndex>
|
||||
<Style>
|
||||
@@ -2169,9 +2166,6 @@
|
||||
<Color>#4f81bd</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
@@ -3118,6 +3112,128 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox38">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Remolque 1</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> Placa: </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RemolquePlaca1.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> Tipo Rem: </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RemolqueSubtimo1.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox38</rd:DefaultName>
|
||||
<Top>5.28548cm</Top>
|
||||
<Left>0.42248cm</Left>
|
||||
<Height>0.45862cm</Height>
|
||||
<Width>9.43197cm</Width>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>= IIF( len(Parameters!RemolquePlaca1.Value) > 0,False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#4f81bd</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox44">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Remolque 2</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> Placa: </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RemolquePlaca2.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value> Tipo Rem: </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RemolqueSubtimo2.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox38</rd:DefaultName>
|
||||
<Top>5.28548cm</Top>
|
||||
<Left>9.94339cm</Left>
|
||||
<Height>0.45862cm</Height>
|
||||
<Width>9.5996cm</Width>
|
||||
<ZIndex>23</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>= IIF( len(Parameters!RemolquePlaca2.Value) > 0,False, True)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#4f81bd</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>7.34222in</Height>
|
||||
<Style />
|
||||
@@ -3701,8 +3817,8 @@
|
||||
<DataField>PesoEnKg</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CodigoMaterialPeligroso">
|
||||
<DataField>CodigoMaterialPeligroso</DataField>
|
||||
<Field Name="CveMaterialPeligroso">
|
||||
<DataField>CveMaterialPeligroso</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Embalaje">
|
||||
@@ -3974,6 +4090,30 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="RemolquePlaca1">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="RemolqueSubtimo1">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="RemolquePlaca2">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="RemolqueSubtimo2">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Language>es-MX</Language>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -2291,7 +2291,10 @@ Partial Class General_SaldosIniciales
|
||||
If CvePersonal > 0 Then
|
||||
Contador = Contador + 1
|
||||
Else
|
||||
If Not ObjRH.AddPersonal(Codigo, ApellidoPaterno, ApellidoMaterno, Nombre, CorreoElectronico, FechaIn, CveTipoPeriodo, NumeroSS, CBool(AltaIMSS), SalarioDiario.ToDouble, SalarioDiario.ToDouble, SDI.ToDouble, SalarioDiario.ToDouble,
|
||||
If SalarioDiario.ToDouble > SDI.ToDouble Then
|
||||
SDI = SalarioDiario
|
||||
End If
|
||||
If Not ObjRH.AddPersonal(Codigo, ApellidoPaterno, ApellidoMaterno, Nombre, CorreoElectronico, FechaIn, CveTipoPeriodo, NumeroSS, CBool(AltaIMSS), SalarioDiario.ToDouble, SalarioDiario.ToDouble, SDI.ToDouble, SDI.ToDouble,
|
||||
-1, -1, -1, CveMetodoPago, FechaIn, FechaFn.ToString, CveTipoContrato, Direccion, CveTurno, CvePuesto, CveDepartamento, -1, CveEscolaridad, CveEstadoCivil, CveGenero, -1, FechaBaja, CveEstatusPersonal, FechaNac,
|
||||
LugarNacimiento, Direccion, "", "", "", CodigoPostal, Ciudad, CveEstado, Telefono, Celular, RFC, CURP, NombrePadre, NombreMadre, -1, CveSATRiesgoPuesto, CveSATRegimenContratacion, -1, -1, "", -1,
|
||||
ClabeInterbancaria, "", CveJornada, CveJornada, "", -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveUsuarioNomina) Then
|
||||
|
||||
@@ -226,11 +226,41 @@
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">Unidad:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||
<label class="col-md-3">Configuración:</label>
|
||||
<div class="col-md-9">
|
||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row rowpadding">
|
||||
<%--<label class="col-md-3">F. Salida:</label>
|
||||
<div class="col-md-9" style="padding-top: 0px;">
|
||||
@@ -730,7 +760,7 @@
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlDirClienteLocalidad" CssClass="form-control select2me" DataValueField="CveLocalidad" DataTextField="NombreLocalidad" Width="100%" CausesValidation="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlDirClienteLocalidad" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteLocalidad" 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>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlDirClienteLocalidad" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteLocalidad" 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="<%= DdlDirClienteLocalidad.ClientID.ToString()%>">Localidad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
@@ -362,7 +362,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("") ' Estado = -1
|
||||
|
||||
If DrPS IsNot Nothing Then
|
||||
If DrPS IsNot Nothing AndAlso ValidaPSSAT(DrPS) Then
|
||||
|
||||
'codigo temporal
|
||||
Dim tLote As String
|
||||
@@ -561,7 +561,8 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
Dim FechallegadaMM As DateTime = (FechaLlegada.ToString("dd/MM/yyyy") & " 23:59:59").ToDateTime
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero, CveDireccionOrigen, CveDireccionDestino, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, FechaSalida, FechallegadaMM, "T", "-1", "-1", FechaLlegada, 1, 1, TxtDistancia.Text.ToEntero)
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero, CveDireccionOrigen, CveDireccionDestino, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, FechaSalida, FechallegadaMM, "T", "-1", "-1", FechaLlegada, 1, 1, TxtDistancia.Text.ToEntero,
|
||||
ConfigCartaPorte:=DdlConfigAuto.SelectedValue, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero)
|
||||
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
|
||||
@@ -946,15 +947,56 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
|
||||
Public Sub CargarCamiones()
|
||||
|
||||
DdlConfigAuto.Items.Clear()
|
||||
DdlUnidadCamion.Items.Clear()
|
||||
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataBind()
|
||||
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlUnidadCamion.DataBind()
|
||||
|
||||
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
DdlRemolque1.DataBind()
|
||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
'Using ObjGral As New ClsGenerales
|
||||
' If ObjGral.GetCartaPorteConfigAutoTransportes() Then
|
||||
' DdlConfigAuto.DataSource = ObjGral.DtResultados
|
||||
' End If
|
||||
'End Using
|
||||
|
||||
'DdlConfigAuto.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1334,6 +1376,223 @@ Partial Class Inventarios_CartaPorteManual
|
||||
UpModalDVDireccionEnvio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "remolques"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlUnidadCamionActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(DdlUnidadCamion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("ConfigCartaPorte"))
|
||||
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Property RequiereRemolque As Boolean
|
||||
Get
|
||||
If ViewState("RequiereRemolque") Is Nothing Then
|
||||
ViewState("RequiereRemolque") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("RequiereRemolque").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("RequiereRemolque") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property MostrarRemolques As Boolean
|
||||
Get
|
||||
If ViewState("MostrarRemolques") Is Nothing Then
|
||||
ViewState("MostrarRemolques") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("MostrarRemolques").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("MostrarRemolques") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlConfigAuto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ValidaConfiguracionVeiculo()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaConfiguracionVeiculo()
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlConfigAuto.SelectedIndex > 0 Then
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
Dim Remolque As String = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" ClaveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
||||
|
||||
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Else
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If RequiereRemolque Or MostrarRemolques Then
|
||||
DvRemolque1.Visible = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
DvConfiguracionVeiculo.Visible = False
|
||||
Else
|
||||
DvConfiguracionVeiculo.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlRemolque1_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DdlRemolque2.Items.Clear()
|
||||
|
||||
If DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlRemolque2.DataBind()
|
||||
|
||||
|
||||
Else
|
||||
DvRemolque2.Visible = False
|
||||
End If
|
||||
|
||||
DdlRemolque2.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function validarRemolques() As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("La configuración de la carta porte requiere que seleccione un remolque", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Function ValidaPSSAT(DrPS As DataRow) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim CveSATPS As Integer = DrPS("CveSATPS").ToString.ToEntero
|
||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||
|
||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Dim SBMensaje As New StringBuilder
|
||||
|
||||
SBMensaje.AppendLine("El producto seleccionado presenta la siguiente situación: <br>")
|
||||
|
||||
If CveSATPS <= 0 Then
|
||||
SBMensaje.AppendLine("-Producto SAT no asignado. <br>")
|
||||
End If
|
||||
|
||||
|
||||
If PesoKg = 0 Then
|
||||
SBMensaje.AppendLine("-Producto sin peso definido. <br>")
|
||||
End If
|
||||
|
||||
|
||||
If SATClaveUnidadMedida.Length = 0 Then
|
||||
SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ")
|
||||
End If
|
||||
|
||||
|
||||
SBMensaje.AppendLine($"<br><br> <strong><a class='texto' target='_blank' href='../Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Corregir Producto </a></strong>")
|
||||
|
||||
|
||||
Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -1,49 +1,46 @@
|
||||
<%@ Page Title="Catálogo de Unidades" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatUnidades.aspx.vb" Inherits="Inventarios_CatUnidades" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
|
||||
#DivAgregarUnidad > div.modal-dialog > div label input {
|
||||
padding:0px!important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Catálogo de Unidades
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Unidades
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarUnidad" OnClick="LnkAgregarUnidad_Click" data-toggle="tooltip" data-placement="left" title="Agregar Unidad" Text="<i class='fa fa-plus'></i>Agregar Unidad"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarUnidad" OnClick="LnkAgregarUnidad_Click" data-toggle="tooltip" data-placement="left" title="Agregar Unidad" Text="<i class='fa fa-plus'></i>Agregar Unidad"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<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,ConfigCartaPorte,Anio,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga"
|
||||
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:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,ConfigCartaPorte,Anio,CveTipoCamion,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer"
|
||||
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" />
|
||||
<asp:BoundField HeaderText="Placa" DataField="Placa" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Config Carta Porte" DataField="ConfigCartaPorte" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Placa" DataField="Placa" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Config Carta Porte" DataField="ConfigCartaPorte" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Tipo Permiso SCT" DataField="ClaveTipoPermisoSCT" ItemStyle-HorizontalAlign="Left" />
|
||||
<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="Póliza Seguro" DataField="NumPolizaSeguro" 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" />
|
||||
@@ -57,7 +54,7 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<div id="DivAgregarUnidad" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog ">
|
||||
@@ -71,25 +68,42 @@
|
||||
<asp:Literal runat="server" ID="LtlTituloModal" Text="Agregar Unidad"></asp:Literal></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-12">
|
||||
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
||||
<label for="<%= TxtEspecificacionNuevo.ClientID.ToString()%>">Unidad:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtEspecificacionNuevo" ControlToValidate="TxtEspecificacionNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-12">
|
||||
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
||||
<label for="<%= TxtEspecificacionNuevo.ClientID.ToString()%>">Unidad:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtEspecificacionNuevo" ControlToValidate="TxtEspecificacionNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVTiposRemolque" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlTiposRemolque" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoRemolqueCod" DataValueField="CveTipoRemolque" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlTiposRemolque" runat="server" ControlToValidate="DdlTiposRemolque" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Remolque''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTiposRemolque.ClientID.ToString()%>">Tipo Remolque:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-md-12">
|
||||
<asp:TextBox ID="TxtNumeroTrailer" CssClass="form-control" runat="server" MaxLength="100"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtNumeroTrailer" runat="server" Text="NÚMERO DE TRAILER"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6">
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtPlacaNuevo" CssClass="form-control" runat="server" MaxLength="7"></asp:TextBox>
|
||||
<label for="<%= TxtPlacaNuevo.ClientID.ToString()%>">Placa:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtPlacaNuevo" ControlToValidate="TxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator runat="server" ID="RevTxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> no contiene los caracteres suficientes." ControlToValidate="TxtPlacaNuevo" ValidationExpression="^.{6,8}$" ValidationGroup="GrpUnidad"></asp:RegularExpressionValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6" runat="server" id="DVAnio">
|
||||
<asp:TextBox ID="TxtAnio" CssClass="form-control" runat="server" MaxLength="4"></asp:TextBox>
|
||||
<label for="<%= TxtAnio.ClientID.ToString()%>">Año:</label>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtAnio" FilterType="Custom" ValidChars="1234567890" />
|
||||
@@ -101,8 +115,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVConfigAuto">
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlConfigAuto.ClientID.ToString()%>">Configuración Carta Porte:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" ControlToValidate="DdlConfigAuto" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
@@ -111,7 +125,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVTipoPermisoSCT">
|
||||
<asp:DropDownList ID="DdlTipoPermisoSCT" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="ClaveTipoPermisoDescripcion" DataValueField="CveTipoPermisoSCT" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoPermisoSCT.ClientID.ToString()%>">Tipo Permiso SCT:</label>
|
||||
@@ -119,10 +133,10 @@
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="DVNumermisoSCT">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumermisoSCT" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNumermisoSCT.ClientID.ToString()%>">Número Permiso SCT:</label>
|
||||
<%--<asp:RequiredFieldValidator runat="server" ID="RfvTxtNumermisoSCT" ControlToValidate="TxtNumermisoSCT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Permiso SCT''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>--%>
|
||||
@@ -131,7 +145,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="DVNombreAseguradora">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradora" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
@@ -150,45 +164,85 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="DVNombreAseguradoraMedioAmbiente">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtNombreAseguradoraMedioAmbiente" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraMedioAmbiente.ClientID.ToString()%>">Aseguradora Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="TxtNombreAseguradoraMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aseguradora Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradoraMedioAmbiente" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraMedioAmbiente.ClientID.ToString()%>">Aseguradora Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="TxtNombreAseguradoraMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aseguradora Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroMedioAmbiente" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroMedioAmbiente.ClientID.ToString()%>">Número Póliza Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="TxtNumPolizaSeguroMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Póliza Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroMedioAmbiente" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroMedioAmbiente.ClientID.ToString()%>">Número Póliza Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="TxtNumPolizaSeguroMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Póliza Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradoraCarga" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraCarga.ClientID.ToString()%>">Aseguradora Carga:</label>
|
||||
<i></i>
|
||||
<div class="row" runat="server" id="DVNumPolizaSeguroMedioAmbient">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradoraCarga" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraCarga.ClientID.ToString()%>">Aseguradora Carga:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroCarga" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroCarga.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroCarga" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroCarga.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6" runat="server" id="DVLongitudCaja" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLongitudCaja" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtLongitudCaja.ClientID.ToString()%>">Longitud de caja:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="DVLineaTransportacion" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLineaTransportacion" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtLineaTransportacion.ClientID.ToString()%>">Linea de transportacion:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DVSCACCAAT" visible="false">
|
||||
<div class="col-md-6" >
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtSCAC" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtSCAC.ClientID.ToString()%>">SCAC:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCAAT" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtCAAT.ClientID.ToString()%>">CAAT:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<asp:CheckBox ID="ChkesRemolque" Checked="true" TextAlign="Left" Text="¿Es remolque?:" runat="server" AutoPostBack="true" OnCheckedChanged="ChkesRemolque_CheckedChanged" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -204,13 +258,13 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -51,11 +51,22 @@ Partial Class Inventarios_CatUnidades
|
||||
If ObjGral.GetCartaPorteTipoPermisoSCT() Then
|
||||
DdlTipoPermisoSCT.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
|
||||
If ObjGral.GetCartaPorteTiposRemolques() Then
|
||||
DdlTiposRemolque.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
End Using
|
||||
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione Uno ", "-1"))
|
||||
|
||||
DdlTipoPermisoSCT.DataBind()
|
||||
DdlTipoPermisoSCT.Items.Insert(0, New ListItem("Seleccione Uno ", "-1"))
|
||||
|
||||
DdlTiposRemolque.DataBind()
|
||||
DdlTiposRemolque.Items.Insert(0, New ListItem("Seleccione Uno ", "-1"))
|
||||
|
||||
UpModalUnidades.Update()
|
||||
|
||||
@@ -82,8 +93,16 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtNumPolizaSeguroMedioAmbiente.Text = ""
|
||||
TxtNombreAseguradoraCarga.Text = ""
|
||||
TxtNumPolizaSeguroCarga.Text = ""
|
||||
|
||||
TxtLongitudCaja.Text = ""
|
||||
TxtLineaTransportacion.Text = ""
|
||||
TxtNumeroTrailer.Text = ""
|
||||
TxtSCAC.Text = ""
|
||||
TxtCAAT.Text = ""
|
||||
ChkesRemolque.Checked = False
|
||||
LtlTituloModal.Text = "Agregar Unidad"
|
||||
DdlTiposRemolque.SelectedValueExist(-1)
|
||||
|
||||
ChkesRemolque_CheckedChanged(Nothing, Nothing)
|
||||
|
||||
UpModalUnidades.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarUnidad"))
|
||||
@@ -95,7 +114,7 @@ Partial Class Inventarios_CatUnidades
|
||||
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
|
||||
CveCamion = GvRow.DataKey("CveCamion").ToEntero()
|
||||
|
||||
Dim CveTipoRemolque As Integer = GvRow.DataKey("CveTipoRemolque").ToEntero
|
||||
|
||||
TxtPlacaNuevo.Text = GvRow.DataKey("Placa")
|
||||
TxtEspecificacionNuevo.Text = GvRow.DataKey("Especificacion")
|
||||
@@ -113,8 +132,21 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtNombreAseguradoraCarga.Text = GvRow.DataKey("NombreAseguradoraCarga")
|
||||
TxtNumPolizaSeguroCarga.Text = GvRow.DataKey("NumPolizaSeguroCarga")
|
||||
|
||||
DdlTiposRemolque.SelectedValueExist(CveTipoRemolque)
|
||||
|
||||
TxtNumeroTrailer.Text = GvRow.DataKey("NumeroTrailer")
|
||||
TxtLongitudCaja.Text = GvRow.DataKey("LongitudCaja")
|
||||
TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion")
|
||||
TxtSCAC.Text = GvRow.DataKey("SCAC")
|
||||
TxtCAAT.Text = GvRow.DataKey("CAAT")
|
||||
|
||||
ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2")
|
||||
|
||||
LtlTituloModal.Text = "Actualizar Unidad"
|
||||
|
||||
ChkesRemolque_CheckedChanged(Nothing, Nothing)
|
||||
|
||||
|
||||
UpModalUnidades.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarUnidad"))
|
||||
@@ -128,18 +160,19 @@ Partial Class Inventarios_CatUnidades
|
||||
|
||||
Dim CveCamionEliminar = GvRow.DataKey("CveCamion").ToEntero()
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Using ObjInventarios As New ClsInventarios
|
||||
|
||||
If (ObjInventarios.RemoveCamiones(CveCamionEliminar, UsuarioActual.CveEmpresa)) Then
|
||||
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarUnidad"))
|
||||
Alert("Unidad Eliminada Correctamente")
|
||||
Else
|
||||
ErrorAlElimiar = True
|
||||
End If
|
||||
If (ObjInventarios.RemoveCamiones(CveCamionEliminar, UsuarioActual.CveEmpresa)) Then
|
||||
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarUnidad"))
|
||||
Alert("Unidad Eliminada Correctamente")
|
||||
Else
|
||||
ErrorAlElimiar = True
|
||||
End If
|
||||
End Using
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If Not ErrorAlElimiar Then
|
||||
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
|
||||
@@ -152,23 +185,25 @@ Partial Class Inventarios_CatUnidades
|
||||
|
||||
Dim ErrorPrceso As Boolean = False
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CveTipoCamion As Integer = If(ChkesRemolque.Checked, 2, 1)
|
||||
Using ObjInventarios As New ClsInventarios
|
||||
|
||||
If CveCamion <= 0 Then
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text) Then
|
||||
Alert("Unidad agregada correctamente")
|
||||
If CveCamion <= 0 Then
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue, 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
|
||||
Alert("Unidad agregada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue, 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
|
||||
Alert("Unidad actualizada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text) Then
|
||||
Alert("Unidad actualizada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
If Not ErrorPrceso Then
|
||||
@@ -183,4 +218,42 @@ Partial Class Inventarios_CatUnidades
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ChkesRemolque_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If Not ChkesRemolque.Checked Then
|
||||
|
||||
DVAnio.Visible = True
|
||||
DVConfigAuto.Visible = True
|
||||
DVTipoPermisoSCT.Visible = True
|
||||
DVNumermisoSCT.Visible = True
|
||||
DVNombreAseguradora.Visible = True
|
||||
DVNombreAseguradoraMedioAmbiente.Visible = True
|
||||
DVNumPolizaSeguroMedioAmbient.Visible = True
|
||||
|
||||
DVLineaTransportacion.Visible = True
|
||||
DVSCACCAAT.Visible = True
|
||||
|
||||
DVTiposRemolque.Visible = False
|
||||
DVLongitudCaja.Visible = False
|
||||
Else
|
||||
DVAnio.Visible = False
|
||||
DVConfigAuto.Visible = False
|
||||
DVTipoPermisoSCT.Visible = False
|
||||
DVNumermisoSCT.Visible = False
|
||||
DVNombreAseguradora.Visible = False
|
||||
DVNombreAseguradoraMedioAmbiente.Visible = False
|
||||
DVNumPolizaSeguroMedioAmbient.Visible = False
|
||||
|
||||
DVLineaTransportacion.Visible = False
|
||||
DVSCACCAAT.Visible = False
|
||||
|
||||
DVTiposRemolque.Visible = True
|
||||
DVLongitudCaja.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
DVTiposRemolque.Visible = ChkesRemolque.Checked
|
||||
UpModalUnidades.Update
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="DivPS" style="overflow-y: auto; width: 765px; height: 365px;" runat="server">
|
||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
|
||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad de Medida" />
|
||||
|
||||
@@ -150,7 +150,7 @@ Partial Class Inventarios_Default
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
If UsuarioActual.TienePermisoPagina(624) Then
|
||||
HlPendiente.Visible = True
|
||||
HlPendiente.NavigateUrl = String.Format("/Inventarios/RepVentasXSurtir.aspx?CvePS={0}", CvePS)
|
||||
End If
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server"
|
||||
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen,Tipo,AplicaCP,RFCReceptor,RFCEmisor,CveTimbre,CvePAC,FolioFiscal"
|
||||
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen,Tipo,AplicaCP,RFCReceptor,RFCEmisor,CveTimbre,CvePAC,FolioFiscal, TimbreTipoDocto,CveMovimiento,FechaLlegada,CveCamionRemolque1,CveCamionRemolque2,Distancia,ConfigCartaPorte,SerieFolio,DireccionOrigen,Direccion"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" GridLines="None"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
<asp:BoundField DataField="FechaEntrega" HeaderText="Fecha Entrega" ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" runat="server" OnClick="imgEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkTimbrar" runat="server" OnClick="LnkTimbrar_Click" AlternateText="Timbrar" ToolTip="Timbrar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-external-link'></i>" />
|
||||
@@ -128,15 +128,26 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderText="Direcciones" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarDirOrigen" Visible="false" runat="server" OnClick="EditDireccionOrigen_Click" AlternateText="Editar" ToolTip="Actualzar dirección Origen" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-location-arrow'></i>" />
|
||||
<asp:LinkButton ID="LnkEditarDirDestino" Visible="false" runat="server" OnClick="EditDireccionDestino_Click" AlternateText="Editar" ToolTip="Actualziar Dierccion Destino" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-location-arrow'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField DataField="Estatus" HeaderText="PDF" ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center" Visible="true" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="XML" ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center" Visible="true" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivEditarEntrega" class="modal ADS fade" role="dialog">
|
||||
<div id="DivEditarEntrega" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalEditarentrega" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -146,64 +157,119 @@
|
||||
</button>
|
||||
<h4 class="modal-title" id="H3" runat="server">Editar Entrega</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalDireccionOrigen" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalDireccionOrigen.ClientID.ToString()%>">Dirección Origen:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalDireccionOrigen" runat="server" ControlToValidate="DdlModalDireccionOrigen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dirección Origen''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalDireccionOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalDireccionOrigen" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
<label class="col-md-3">Chofer:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlModalChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalChofer" runat="server" Enabled="false" ControlToValidate="DdlModalChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlModalChofer" runat="server" HighlightCssClass="vco" TargetControlID="rfvDdlModalChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalDireccionDestino" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="DireccionEnvio" DataValueField="CveDireccionEnvio" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalDireccionDestino.ClientID.ToString()%>">Dirección Destino:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalDireccionDestino" runat="server" ControlToValidate="DdlModalDireccionDestino" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dirección Destino''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalDireccionDestino" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalDireccionDestino" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalChofer" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Chofer" DataValueField="CveChofer" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalChofer.ClientID.ToString()%>">Chofer:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalChofer" runat="server" ControlToValidate="DdlModalChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalChofer" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Unidad:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlModalCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlModalCamion_SelectedIndexChanged"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamionActivoFijo" runat="server" Enabled="false" ControlToValidate="DdlModalCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamionActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamionActivoFijo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalCamion" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Placa" DataValueField="CveCamion" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlModalCamion.ClientID.ToString()%>">Unidad:</label>
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalCamion" runat="server" ControlToValidate="DdlModalCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalCamion" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
<div class="row" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||
<label class="col-md-3">Configuración:</label>
|
||||
<div class="col-md-9">
|
||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" >
|
||||
|
||||
<div style="margin-left:16px!important">
|
||||
<label for="<%= TxtmodalFechaEntrega.ClientID.ToString()%>">Fecha Entrega:</label>
|
||||
<br />
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtmodalFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkModalTxtmodalFechaEntrega" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<div class="row" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtmodalFechaEntrega" runat="server" TargetControlID="TxtmodalFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeTxtmodalFechaEntrega" TargetControlID="TxtmodalFechaEntrega" PopupButtonID="LnkModalTxtmodalFechaEntrega" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtmodalFechaEntrega" runat="server" ControlToValidate="TxtmodalFechaEntrega" Display="None" ErrorMessage="El campo <b>''Fecha de Entrega''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpModalEditarentrega"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTxtmodalFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtmodalFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpModalDirecciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" runat="server" id="DVDireccionOrigen" visible="false">
|
||||
<label class="col-md-3">Dirección Origen:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:LinkButton runat="server" OnClick="EditDireccionOrigen_Click" ID="LnkDireccionOrigen" CssClass="Texto"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DVDireccionDestino" visible="false">
|
||||
<label class="col-md-3">Dirección Destino:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:LinkButton runat="server" OnClick="EditDireccionDestino_Click" ID="LnkDireccionDestino" CssClass="Texto"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-3">F. Salida:</label>
|
||||
<div class="col-md-9" style="padding-top: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaEntrega" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaEntrega" PopupButtonID="ImgFechaEntrega" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Entrega''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="divFechaLlegada">
|
||||
<label class="col-md-3">F. Llegada:</label>
|
||||
<div class="col-md-4" style="padding-top: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaLlegada" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaEnvio" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtFechaLlegada" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtFechaLlegada" PopupButtonID="ImgFechaEnvio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="TxtFechaLlegada" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Envío''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator2" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1">Dist:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtDistancia" runat="server" CssClass="form-control input-sm" Width="100%" Text="1"></asp:TextBox>
|
||||
<ajax:TextBoxWatermarkExtender ID="TBWEDistancia" runat="server" TargetControlID="TxtDistancia" WatermarkText="Distancia" WatermarkCssClass="watermarked" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
@@ -218,6 +284,144 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="divAddDireccionEnvio" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalDVDireccionEnvio" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel"> <asp:Label runat="server" ID="LblTitulodireccion"></asp:Label> </h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyDireccion" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEnvioDireccion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEnvioDireccion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEnvioDireccion.ClientID.ToString()%>">Calle:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtEnvioNoExt" runat="server" CssClass="form-control" MaxLength="15"></asp:TextBox>
|
||||
<label for="<%= TxtEnvioNoExt.ClientID.ToString()%>">No. Ext. </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtEnvioNoInt" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtEnvioNoInt.ClientID.ToString()%>">No. Int.</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEnvioCP" runat="server" Width="100%" CssClass="form-control" CausesValidation="true" TextMode="Number" onblur="DirclienteValidaCodigoPostal()" onkeypress="if(event.key === 'Enter'){return false;}"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEnvioCP" 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>
|
||||
<label for="<%= TxtEnvioCP.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 ID="DdlDirClientePais" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlDirClientePais_SelectedIndexChanged" runat="server" DataTextField="Descripcion" DataValueField="CvePais" CssClass="form-control select2me" Width="100%" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClientePais" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClientePais" 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="<%= DdlDirClientePais.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="DdlDirClienteEstado" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlDirClienteEstado_SelectedIndexChanged" runat="server" DataTextField="NombreEstado" DataValueField="CveEstado" CssClass="form-control select2me" Width="100%" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClienteEstado" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteEstado" 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="<%= DdlDirClienteEstado.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="DdlDirClienteMunicipio" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlDirClienteMunicipio_SelectedIndexChanged" runat="server" DataTextField="Descripcion" DataValueField="CveMunicipio" CssClass="form-control select2me" Width="100%" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClienteMunicipio" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteMunicipio" 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="<%= DdlDirClienteMunicipio.ClientID.ToString()%>">Municipio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlDirClienteLocalidad" CssClass="form-control select2me" DataValueField="CveLocalidad" DataTextField="NombreLocalidad" Width="100%" CausesValidation="true"></asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlDirClienteLocalidad" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteLocalidad" 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="<%= DdlDirClienteLocalidad.ClientID.ToString()%>">Localidad:</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="DdlDirClienteColonia" runat="server" AppendDataBoundItems="true" DataTextField="NombreAsentamiento" DataValueField="CveColonia" CssClass="form-control select2me" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlDirClienteColonia_SelectedIndexChanged" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlDirClienteColonia" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlDirClienteColonia" 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="<%= DdlDirClienteColonia.ClientID.ToString()%>">Colonia:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div style="display: none">
|
||||
<asp:Button ID="BtnDirClienteValidar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="BtnDirClienteValidar_Click" Text="validar" />
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregarDireccion" runat="server" CssClass="btn btn-success" Text="Actualizar" ValidationGroup="GrpObligatorio" OnClick="BtnAgregarDireccion_Click"></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -176,6 +176,81 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int CveDireccionEditar
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDireccionEditar"] == null)
|
||||
{
|
||||
ViewState["CveDireccionEditar"] = -1;
|
||||
}
|
||||
return ViewState["CveDireccionEditar"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveDireccionEditar"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private int CveDireccionOrigen
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDireccionOrigen"] == null)
|
||||
{
|
||||
ViewState["CveDireccionOrigen"] = -1;
|
||||
}
|
||||
return ViewState["CveDireccionOrigen"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveDireccionOrigen"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveDireccionDestino
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveDireccionDestino"] == null)
|
||||
{
|
||||
ViewState["CveDireccionDestino"] = -1;
|
||||
}
|
||||
return ViewState["CveDireccionDestino"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveDireccionDestino"] = value;
|
||||
}
|
||||
}
|
||||
private int CveTimbre
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveTimbre"] == null)
|
||||
{
|
||||
ViewState["CveTimbre"] = -1;
|
||||
}
|
||||
return ViewState["CveTimbre"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveTimbre"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -189,7 +264,13 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
CargaChoferes();
|
||||
UPFiltros.Update();
|
||||
CargarCentrosDeCosto(null, DdlSucursales, null, LblDdlSucursal);
|
||||
|
||||
CargaChoferes();
|
||||
CargarCamiones();
|
||||
|
||||
|
||||
CargaDatos();
|
||||
CargaCombosDirecionesClientesSAT();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,59 +355,124 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
protected void imgEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
CveTimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
||||
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero();
|
||||
|
||||
CargaModalCombosDirecciones(CveCliente, CveDireccionOrigen, CveAlmacen);
|
||||
|
||||
DdlModalDireccionOrigen.SelectedValueExist(GvRow.DataKey("CveDireccionOrigen"));
|
||||
DdlModalDireccionDestino.SelectedValueExist(GvRow.DataKey("CveDireccionDestino"));
|
||||
|
||||
DdlModalCamion.SelectedValueExist(GvRow.DataKey("CveCamion"));
|
||||
DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer"));
|
||||
DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer"));
|
||||
|
||||
TxtFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy");
|
||||
TxtFechaLlegada.Text = GvRow.DataKey("FechaLlegada").ToDate().ToString("dd/MM/yyyy");
|
||||
TxtDistancia.Text = GvRow.DataKey("Distancia");
|
||||
DdlConfigAuto.SelectedValueExist(GvRow.DataKey("ConfigCartaPorte"));
|
||||
DdlConfigAuto_SelectedIndexChanged(null, null);
|
||||
|
||||
if (GvRow.DataKey("CveCamionRemolque1").ToEntero() > 0)
|
||||
{
|
||||
DdlRemolque1.SelectedValueExist(GvRow.DataKey("CveCamionRemolque1"));
|
||||
DdlRemolque2.SelectedValueExist("-1");
|
||||
DdlRemolque1_SelectedIndexChanged(null, null);
|
||||
}
|
||||
|
||||
if (GvRow.DataKey("CveCamionRemolque2").ToEntero() > 0)
|
||||
{
|
||||
DdlRemolque2.SelectedValueExist(GvRow.DataKey("CveCamionRemolque2"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
||||
|
||||
ModalActualizaDirecciones( CveTimbre);
|
||||
|
||||
|
||||
//if( CveDireccionOrigen > 0)
|
||||
//{
|
||||
// DVDireccionOrigen.Visible = true;
|
||||
|
||||
// LnkDireccionOrigen.Text = GvRow.DataKey("DireccionOrigen") + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
//}
|
||||
//if (CveDireccionDestino > 0)
|
||||
//{
|
||||
// DVDireccionDestino.Visible = true;
|
||||
// LnkDireccionDestino.Text = GvRow.DataKey("Direccion") + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
//}
|
||||
|
||||
TxtmodalFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy");
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||
this.RegistraScript("$('#DivEditarEntrega').modal({ backdrop: 'static', keyboard: false });");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ModalActualizaDirecciones(int CveTimbre)
|
||||
{
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
|
||||
if (ObjGeneral.GetInvEntregaAlmacenRutaRep( -1, UsuarioActual.CveEmpresa, -1, new DateTime(1900,01,01), new DateTime(9000, 01, 01),-1, CveTimbre)) {
|
||||
|
||||
if (ObjGeneral.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
if (CveDireccionOrigen > 0)
|
||||
{
|
||||
DVDireccionOrigen.Visible = true;
|
||||
|
||||
LnkDireccionOrigen.Text = ObjGeneral.DtResultados.Rows[0]["DireccionOrigen"].ToString() + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
}
|
||||
if (CveDireccionDestino > 0)
|
||||
{
|
||||
DVDireccionDestino.Visible = true;
|
||||
LnkDireccionDestino.Text = ObjGeneral.DtResultados.Rows[0]["Direccion"].ToString() + " <i class='fa fa-search' aria-hidden='true'></i>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ObjGeneral.Dispose();
|
||||
UpModalDirecciones.Update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionOrigen, int CveAlmacen )
|
||||
{
|
||||
|
||||
DdlModalDireccionOrigen.Items.Clear();
|
||||
DdlModalDireccionDestino.Items.Clear();
|
||||
//DdlModalDireccionOrigen.Items.Clear();
|
||||
//DdlModalDireccionDestino.Items.Clear();
|
||||
|
||||
DataTable DTDireccionesCliente = new DataTable();
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
if (ObjClientes.DireccionEnvioGet(-1, CveCliente, -1))
|
||||
{
|
||||
DTDireccionesCliente = ObjClientes.DtResultados ;
|
||||
}
|
||||
ObjClientes.Dispose();
|
||||
//DataTable DTDireccionesCliente = new DataTable();
|
||||
//ClsClientes ObjClientes = new ClsClientes();
|
||||
//if (ObjClientes.DireccionEnvioGet(-1, CveCliente, -1))
|
||||
//{
|
||||
// DTDireccionesCliente = ObjClientes.DtResultados ;
|
||||
//}
|
||||
//ObjClientes.Dispose();
|
||||
|
||||
DdlModalDireccionDestino.DataSource = DTDireccionesCliente;
|
||||
DdlModalDireccionDestino.DataBind();
|
||||
DdlModalDireccionDestino.Items.Insert(0,new ListItem("Seleccione Una", "-1"));
|
||||
//DdlModalDireccionDestino.DataSource = DTDireccionesCliente;
|
||||
//DdlModalDireccionDestino.DataBind();
|
||||
//DdlModalDireccionDestino.Items.Insert(0,new ListItem("Seleccione Una", "-1"));
|
||||
|
||||
string Almacen = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen: CveAlmacen).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacen}");
|
||||
if (CveDireccionOrigen > 0)
|
||||
{
|
||||
DdlModalDireccionOrigen.DataSource = DTDireccionesCliente.FiltraParametros($"CveDireccionEnvio = {CveDireccionOrigen}");
|
||||
DdlModalDireccionOrigen.DataBind();
|
||||
DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
}else
|
||||
{
|
||||
DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
}
|
||||
DTDireccionesCliente.Dispose();
|
||||
//string Almacen = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen: CveAlmacen).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacen}");
|
||||
//if (CveDireccionOrigen > 0)
|
||||
//{
|
||||
// DdlModalDireccionOrigen.DataSource = DTDireccionesCliente.FiltraParametros($"CveDireccionEnvio = {CveDireccionOrigen}");
|
||||
// DdlModalDireccionOrigen.DataBind();
|
||||
// DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
//}else
|
||||
//{
|
||||
// DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//DTDireccionesCliente.Dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -335,14 +481,16 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
LinkButton LnkCancelarFolioFiscal = (LinkButton)sender;
|
||||
GridViewRow GvRow = (GridViewRow)LnkCancelarFolioFiscal.BindingContainer;
|
||||
int cvetimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
||||
string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto");
|
||||
|
||||
Timbres ObjTimbres = new Timbres("Tra", cvetimbre, UsuarioActual);
|
||||
Timbres ObjTimbres = new Timbres(TimbreTipoDocto, cvetimbre, UsuarioActual);
|
||||
StringBuilder MensajeAlert = new StringBuilder();
|
||||
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
||||
if (ObjTimbres.MsgError =="" && ObjTimbres.Timbrar())
|
||||
{
|
||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -429,7 +577,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
bool ProcesoOK = true ;
|
||||
|
||||
ClsGenerales ObjGral = new ClsGenerales();
|
||||
if(!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,DdlModalDireccionOrigen.SelectedValue.ToEntero(), DdlModalDireccionDestino.SelectedValue.ToEntero(), DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtmodalFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa))
|
||||
if(!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,-1,-1, DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa,
|
||||
TxtFechaLlegada.Text.ToDate(), CveCamionRemolque1: DdlRemolque1.SelectedValue.ToEntero(), CveCamionRemolque2: DdlRemolque2.SelectedValue.ToEntero(), Distancia: TxtDistancia.Text.ToEntero(),
|
||||
ConfigCartaPorte: DdlConfigAuto.SelectedValue))
|
||||
{
|
||||
ProcesoOK = false;
|
||||
}
|
||||
@@ -455,6 +605,9 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
e.Row.Cells[11].Text = "";
|
||||
|
||||
LinkButton LnkEditar = e.Row.FCLinkButton("LnkEditar");
|
||||
LinkButton LnkTimbrar = e.Row.FCLinkButton("LnkTimbrar");
|
||||
LinkButton LnkCancelaTimbre = e.Row.FCLinkButton("LnkCancelaTimbre");
|
||||
@@ -469,9 +622,35 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
LnkTimbrar.Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("TimbreTipoDocto") == "Man")
|
||||
{
|
||||
e.Row.FCLinkButton("LnkEditarDirOrigen").Visible = true;
|
||||
e.Row.FCLinkButton("LnkEditarDirDestino").Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("Estatus").ToEntero() == 1)
|
||||
{
|
||||
LnkCancelaTimbre.Visible = true;
|
||||
|
||||
if (bool.Parse(e.Row.DataKey("AplicaCP")))
|
||||
{
|
||||
e.Row.Cells[10].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) + "\" ><i class='fa fa-file-pdf-o'></i></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Cells[10].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) + "\" ><i class='fa fa-file-pdf-o'></i></a>";
|
||||
}
|
||||
|
||||
string ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, e.Row.DataKey("TimbreTipoDocto"), e.Row.DataKey("SerieFolio"));
|
||||
|
||||
if (File.Exists(ArchivoXML))
|
||||
{
|
||||
e.Row.Cells[11].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", -1, "XML", e.Row.DataKey("SerieFolio"), e.Row.DataKey("TimbreTipoDocto"))) + "\" ><i class='fa fa-file-code-o'></i></a>";
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
e.Row.Cells[10].Text = "";
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("Estatus").ToEntero() == 2)
|
||||
@@ -482,7 +661,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
switch (e.Row.DataKey("Tipo"))
|
||||
{
|
||||
case "E":
|
||||
case "E":
|
||||
e.Row.FCLabel("LtTipo").CssClass = "label label-sm label-success";
|
||||
break;
|
||||
case "T":
|
||||
@@ -495,8 +674,450 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargaPersonalChofer()
|
||||
{
|
||||
DdlModalChofer.Items.Clear();
|
||||
|
||||
ClsAcarreos ObjAcar = new ClsAcarreos();
|
||||
|
||||
if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1))
|
||||
{
|
||||
DdlModalChofer.DataSource = ObjAcar.DtResultados;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ObjAcar.Dispose();
|
||||
|
||||
|
||||
DdlModalChofer.DataBind();
|
||||
|
||||
DdlModalChofer.Items.Insert(0, new ListItem("Seleccione Uno", "-1"));
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
protected void RdTipo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaPersonalChofer();
|
||||
}
|
||||
protected void DdlModalCamion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DvRemolque1.Visible = false;
|
||||
DvRemolque2.Visible = false;
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1);
|
||||
DdlRemolque2.SelectedValueExist(-1);
|
||||
|
||||
if (DdlModalCamion.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||
{
|
||||
if (ObjInv.GetCamiones(DdlModalCamion.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("ConfigCartaPorte"));
|
||||
DdlConfigAuto_SelectedIndexChanged(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
public bool RequiereRemolque
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["RequiereRemolque"] == null)
|
||||
ViewState["RequiereRemolque"] = false;
|
||||
|
||||
return bool.Parse(ViewState["RequiereRemolque"].ToString());
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["RequiereRemolque"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool MostrarRemolques
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["MostrarRemolques"] == null)
|
||||
ViewState["MostrarRemolques"] = false;
|
||||
|
||||
return bool.Parse(ViewState["MostrarRemolques"].ToString());
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["MostrarRemolques"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void DdlConfigAuto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ValidaConfiguracionVeiculo();
|
||||
}
|
||||
|
||||
|
||||
private void ValidaConfiguracionVeiculo()
|
||||
{
|
||||
DvRemolque1.Visible = false;
|
||||
DvRemolque2.Visible = false;
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1);
|
||||
DdlRemolque2.SelectedValueExist(-1);
|
||||
|
||||
if (DdlConfigAuto.SelectedIndex > 0)
|
||||
{
|
||||
using (ClsGenerales ObjGrales = new ClsGenerales())
|
||||
{
|
||||
if (ObjGrales.GetCartaPorteConfigAutoTransportes())
|
||||
{
|
||||
string Remolque = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" ClaveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'");
|
||||
|
||||
|
||||
if (Remolque == "1")
|
||||
{
|
||||
RequiereRemolque = true;
|
||||
MostrarRemolques = true;
|
||||
}
|
||||
|
||||
if (Remolque == "0, 1")
|
||||
{
|
||||
RequiereRemolque = false;
|
||||
MostrarRemolques = true;
|
||||
}
|
||||
|
||||
if (Remolque == "0")
|
||||
{
|
||||
RequiereRemolque = false;
|
||||
MostrarRemolques = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RequiereRemolque = false;
|
||||
MostrarRemolques = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (RequiereRemolque | MostrarRemolques)
|
||||
DvRemolque1.Visible = true;
|
||||
|
||||
if (!RequiereRemolque)
|
||||
DvConfiguracionVeiculo.Visible = false;
|
||||
else
|
||||
DvConfiguracionVeiculo.Visible = true;
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
protected void DdlRemolque1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DdlRemolque2.Items.Clear();
|
||||
|
||||
if (DdlRemolque1.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DvRemolque2.Visible = true;
|
||||
|
||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||
{
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DdlRemolque2.DataBind();
|
||||
}
|
||||
catch { }
|
||||
|
||||
}
|
||||
else
|
||||
DvRemolque2.Visible = false;
|
||||
|
||||
DdlRemolque2.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
private bool validarRemolques()
|
||||
{
|
||||
bool Respuesta = false;
|
||||
|
||||
|
||||
if (RequiereRemolque & DdlRemolque1.SelectedValue.ToEntero() <= 0)
|
||||
Alert("La configuración de la carta porte requiere que seleccione un remolque", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
|
||||
if (RequiereRemolque & DdlRemolque1.SelectedValue.ToEntero() > 0)
|
||||
Respuesta = true;
|
||||
|
||||
|
||||
return Respuesta;
|
||||
}
|
||||
|
||||
|
||||
public void CargarCamiones()
|
||||
{
|
||||
DdlModalCamion.Items.Clear();
|
||||
DdlConfigAuto.Items.Clear();
|
||||
|
||||
using (ClsInventarios ObjInv = new ClsInventarios())
|
||||
{
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1))
|
||||
DdlModalCamion.DataSource = ObjInv.DtResultados;
|
||||
|
||||
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados;
|
||||
}
|
||||
|
||||
DdlModalCamion.DataBind();
|
||||
DdlModalCamion.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
|
||||
|
||||
DdlRemolque1.DataBind();
|
||||
DdlRemolque1.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
|
||||
|
||||
using (ClsGenerales ObjGrales = new ClsGenerales())
|
||||
{
|
||||
if (ObjGrales.GetCartaPorteConfigAutoTransportes())
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados;
|
||||
}
|
||||
|
||||
DdlConfigAuto.DataBind();
|
||||
DdlConfigAuto.Items.Insert(0, new ListItem("Seleccione una", "-1"));
|
||||
}
|
||||
|
||||
private void CargaCombosDirecionesClientesSAT()
|
||||
{
|
||||
CargaDirClientePais();
|
||||
CargaDirClienteEstado();
|
||||
CargaDirClienteMunicipio();
|
||||
CargaDirClienteLocalidad();
|
||||
CargaDirClienteColonia();
|
||||
}
|
||||
|
||||
|
||||
private void CargaDirClientePais()
|
||||
{
|
||||
DdlDirClientePais.DataSource = GlobalDTGralPaises;
|
||||
DdlDirClientePais.DataBind();
|
||||
DdlDirClientePais.SelectedValueExist("151");
|
||||
}
|
||||
|
||||
private void CargaDirClienteEstado()
|
||||
{
|
||||
DdlDirClienteEstado.Items.Clear();
|
||||
if (DdlDirClientePais.SelectedValue.ToEntero() > 0)
|
||||
DdlDirClienteEstado.DataSource = get_GlobalDTGralEstados("-1", DdlDirClientePais.SelectedValue.ToEntero());
|
||||
DdlDirClienteEstado.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlDirClienteEstado.DataBind();
|
||||
}
|
||||
|
||||
private void CargaDirClienteMunicipio()
|
||||
{
|
||||
DdlDirClienteMunicipio.Items.Clear();
|
||||
if (DdlDirClienteEstado.SelectedValue.ToEntero() > 0)
|
||||
DdlDirClienteMunicipio.DataSource = get_GlobalDTGralMunicipios("-1", DdlDirClienteEstado.SelectedValue.ToEntero());
|
||||
DdlDirClienteMunicipio.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlDirClienteMunicipio.DataBind();
|
||||
}
|
||||
|
||||
private void CargaDirClienteColonia()
|
||||
{
|
||||
DdlDirClienteColonia.Items.Clear();
|
||||
if (DdlDirClienteMunicipio.SelectedValue.ToEntero() > 0)
|
||||
DdlDirClienteColonia.DataSource = get_GlobalDTGralColonias("-1", "-1", "-1", DdlDirClienteMunicipio.SelectedValue.ToEntero(), CodigoPostal: TxtEnvioCP.Text.Trim().Length > 0 ? TxtEnvioCP.Text.ToEntero() : -1);
|
||||
DdlDirClienteColonia.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlDirClienteColonia.DataBind();
|
||||
}
|
||||
|
||||
|
||||
protected void CargaDirClienteLocalidad()
|
||||
{
|
||||
DdlDirClienteLocalidad.Items.Clear();
|
||||
if (DdlDirClienteEstado.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DdlDirClienteLocalidad.DataSource = get_GlobalDTLocalidad(DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero());
|
||||
DdlDirClienteLocalidad.DataBind();
|
||||
}
|
||||
|
||||
DdlDirClienteLocalidad.Items.Insert(0, new ListItem("Seleccione una", "-1"));
|
||||
}
|
||||
|
||||
|
||||
protected void DdlDirClientePais_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaDirClienteEstado();
|
||||
CargaDirClienteMunicipio();
|
||||
CargaDirClienteColonia();
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
protected void DdlDirClienteEstado_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaDirClienteMunicipio();
|
||||
CargaDirClienteColonia();
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
protected void DdlDirClienteMunicipio_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaDirClienteColonia();
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
|
||||
protected void BtnDirClienteValidar_Click(object sender, EventArgs e)
|
||||
{
|
||||
DirClientevalidaCodigoPostal();
|
||||
}
|
||||
|
||||
|
||||
protected void DdlDirClienteColonia_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DirClientevalidaCodigoPostal();
|
||||
}
|
||||
|
||||
private void DirClientevalidaCodigoPostal()
|
||||
{
|
||||
int CPTxt = TxtEnvioCP.Text.ToEntero();
|
||||
|
||||
int CveColonia = DdlDirClienteColonia.SelectedValue.ToEntero();
|
||||
|
||||
if (CPTxt > 0 & CveColonia > 0)
|
||||
{
|
||||
int CP = get_GlobalDTGralColonias("-1", "-1", "-1", CveColonia: CveColonia).FiltroPrimeroValor("CP", "").ToEntero();
|
||||
if (CPTxt != CP)
|
||||
Alert("El código postal selecionado es diferente del codigo postal de la Colonia.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void EditDireccionOrigen_Click(object sender, EventArgs e)
|
||||
{
|
||||
//GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
//int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
CveDireccionEditar = CveDireccionOrigen;
|
||||
LblTitulodireccion.Text = "Actualizar dirección origen";
|
||||
CargaDatosDireccion(CveDireccionOrigen);
|
||||
}
|
||||
|
||||
public void EditDireccionDestino_Click(object sender, EventArgs e)
|
||||
{
|
||||
//GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
//LblTitulodireccion.Text = "Actualizar dirección destino";
|
||||
//int CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
||||
CveDireccionEditar = CveDireccionDestino;
|
||||
LblTitulodireccion.Text = "Actualizar dirección Destino";
|
||||
CargaDatosDireccion(CveDireccionDestino);
|
||||
}
|
||||
|
||||
|
||||
private void CargaDatosDireccion(int CveDireccion)
|
||||
{
|
||||
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
|
||||
DataTable DT = new DataTable();
|
||||
|
||||
if (ObjClientes.DireccionEnvioGet(CveDireccion, -1,-1))
|
||||
{
|
||||
DT = ObjClientes.DtResultados;
|
||||
}
|
||||
|
||||
ObjClientes.Dispose();
|
||||
|
||||
if (DT.Rows.Count > 0)
|
||||
{
|
||||
TxtEnvioDireccion.Text = DT.Rows[0]["EnvioDireccion"].ToString();
|
||||
TxtEnvioNoExt.Text = DT.Rows[0]["EnvioNoExt"].ToString();
|
||||
TxtEnvioNoInt.Text = DT.Rows[0]["EnvioNoInt"].ToString();
|
||||
|
||||
TxtEnvioCP.Text = DT.Rows[0]["EnvioCP"].ToString();
|
||||
// TxtEnvioTel.Text = GvRow.DataKey("EnvioTel")
|
||||
|
||||
DdlDirClientePais.SelectedValueExist(DT.Rows[0]["CvePais"].ToString());
|
||||
CargaDirClienteEstado();
|
||||
DdlDirClienteEstado.SelectedValueExist(DT.Rows[0]["CveEstado"].ToString());
|
||||
CargaDirClienteMunicipio();
|
||||
DdlDirClienteMunicipio.SelectedValueExist(DT.Rows[0]["CveMunicipio"].ToString());
|
||||
CargaDirClienteColonia();
|
||||
DdlDirClienteLocalidad.SelectedValueExist(DT.Rows[0]["CveLocalidad"].ToString());
|
||||
CargaDirClienteLocalidad();
|
||||
|
||||
DdlDirClienteColonia.SelectedValueExist(DT.Rows[0]["CveColonia"].ToString());
|
||||
}
|
||||
|
||||
UpModalDVDireccionEnvio.Update();
|
||||
RegistraScript("$('#divAddDireccionEnvio').modal('show');");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void BtnAgregarDireccion_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ClsClientes ObjCli = new ClsClientes();
|
||||
bool ErrorProceso = false;
|
||||
|
||||
//CveDireccionEditar
|
||||
if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text.ToEntero(), "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1",
|
||||
DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero())){
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
ObjCli.Dispose();
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
Alert("Dirección actualizada correctamente.");
|
||||
RegistraScript("$('#divAddDireccionEnvio').modal('hide');");
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
|
||||
ModalActualizaDirecciones(CveTimbre);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void LnkAgregarDireccion_Click(object sender, EventArgs e)
|
||||
{
|
||||
TxtEnvioDireccion.Text = "";
|
||||
TxtEnvioNoExt.Text = "";
|
||||
TxtEnvioNoInt.Text = "";
|
||||
TxtEnvioCP.Text = "";
|
||||
|
||||
CargaCombosDirecionesClientesSAT();
|
||||
TxtFechaLlegada.Text = "";
|
||||
|
||||
|
||||
|
||||
UpModalDVDireccionEnvio.Update();
|
||||
RegistraScript("$('#divAddDireccionEnvio').modal('show');");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -509,4 +1130,3 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -224,11 +224,41 @@
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">Unidad:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||
<label class="col-md-3">Configuración:</label>
|
||||
<div class="col-md-9">
|
||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="ClaveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlConfigAuto" runat="server" Enabled="false" ControlToValidate="DdlConfigAuto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Configuración Carta Porte''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">F. Salida:</label>
|
||||
<div class="col-md-9" style="padding-top: 0px;">
|
||||
|
||||
@@ -673,6 +673,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CveClasificacion As Integer
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
|
||||
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
||||
If Not ValidaPSSAT(DrPS) Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If DrPS IsNot Nothing Then
|
||||
CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
|
||||
Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}")
|
||||
@@ -1190,7 +1199,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, Fechallegada, "T", "", "", MinFecha, 1, 1, 1)
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDate, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero,
|
||||
ConfigCartaPorte:=DdlConfigAuto.SelectedValue, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero)
|
||||
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
|
||||
@@ -2962,10 +2972,47 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End Sub
|
||||
|
||||
Public Sub CargarCamiones()
|
||||
|
||||
DdlConfigAuto.Items.Clear()
|
||||
DdlUnidadCamion.Items.Clear()
|
||||
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
'DdlUnidadCamion.DataBind()
|
||||
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlUnidadCamion.DataBind()
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
DdlRemolque1.DataBind()
|
||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
'Using ObjGral As New ClsGenerales
|
||||
' If ObjGral.GetCartaPorteConfigAutoTransportes() Then
|
||||
@@ -3092,6 +3139,207 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "remolques"
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlUnidadCamionActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(DdlUnidadCamion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("ConfigCartaPorte"))
|
||||
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Property RequiereRemolque As Boolean
|
||||
Get
|
||||
If ViewState("RequiereRemolque") Is Nothing Then
|
||||
ViewState("RequiereRemolque") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("RequiereRemolque").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("RequiereRemolque") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property MostrarRemolques As Boolean
|
||||
Get
|
||||
If ViewState("MostrarRemolques") Is Nothing Then
|
||||
ViewState("MostrarRemolques") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("MostrarRemolques").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("MostrarRemolques") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlConfigAuto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ValidaConfiguracionVeiculo()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaConfiguracionVeiculo()
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlConfigAuto.SelectedIndex > 0 Then
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
Dim Remolque As String = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" ClaveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
||||
|
||||
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
Else
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If RequiereRemolque Or MostrarRemolques Then
|
||||
DvRemolque1.Visible = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
DvConfiguracionVeiculo.Visible = False
|
||||
Else
|
||||
DvConfiguracionVeiculo.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlRemolque1_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DdlRemolque2.Items.Clear()
|
||||
|
||||
If DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
DvRemolque2.Visible = True
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlRemolque2.DataBind()
|
||||
|
||||
|
||||
Else
|
||||
DvRemolque2.Visible = False
|
||||
End If
|
||||
|
||||
DdlRemolque2.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function validarRemolques() As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("La configuración de la carta porte requiere que seleccione un remolque", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If RequiereRemolque And DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
If Not RequiereRemolque Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Function ValidaPSSAT(DrPS As DataRow) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim CveSATPS As Integer = DrPS("CveSATPS").ToString.ToEntero
|
||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||
|
||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Dim SBMensaje As New StringBuilder
|
||||
|
||||
SBMensaje.AppendLine("El producto seleccionado presenta la siguiente situación: <br>")
|
||||
|
||||
If CveSATPS <= 0 Then SBMensaje.AppendLine("-Producto SAT no asignado. <br>")
|
||||
|
||||
If PesoKg = 0 Then SBMensaje.AppendLine("-Producto sin peso definido. <br>")
|
||||
|
||||
If SATClaveUnidadMedida.Length = 0 Then SBMensaje.AppendLine("-Producto sin unidad de medida SAT asignada. ")
|
||||
|
||||
SBMensaje.AppendLine($"<br><br> <strong><a class='texto' target='_blank' href='../Ventas/ProductosServicios.aspx?CvePS={DrPS("CvePS").ToString}' > Corregir Producto </a></strong>")
|
||||
|
||||
Alert(SBMensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -251,6 +251,10 @@
|
||||
<asp:Label runat="server" Text="Concepto a cargo:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlConceptoCargo" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumerodePagos" Text="1" type="number" min="1" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Dividir en pagos:" AssociatedControlID="TxtNumerodePagos"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Concepto a compensar:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlConceptoCompensar" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
|
||||
@@ -231,6 +231,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
protected void LnkAutoriza_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool continuar = true;
|
||||
int numpagos = TxtNumerodePagos.Text.ToEntero();
|
||||
|
||||
|
||||
System.Xml.Linq.XDocument xmlarchivos = new System.Xml.Linq.XDocument();
|
||||
@@ -249,7 +250,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
||||
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
continuar = onom.AutorizaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xmlpeople);
|
||||
continuar = onom.AutorizaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xmlpeople, numpagos);
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
@@ -945,10 +945,9 @@
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng","{0:dd-MM-yyyy}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng","{0:dd-MM-yyyy}") %>'/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" DataFormatString="dd-MM-yyyy" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -3677,6 +3676,42 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
||||
<div id="ModalCancelarDocumento" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCancelarDocumento" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Cancelar Documento</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<br />
|
||||
<div class="row" id="DivMotivoCancelacion" runat="server">
|
||||
<div class="col-md-2">
|
||||
<label>Motivo:</label>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlMotivoCancelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="MotivoCancelacion" DataValueField="CveMotivoCancelacion">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMotivoCancelacion" runat="server" CssClass="help-block errorimput" Display="Dynamic" InitialValue="-1" ControlToValidate="DdlMotivoCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalCancelarDocumento"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooterCancelarRemision" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<button id="BCancelarDocumento" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:Button Text="Cancelar Documento" ID="BtnCancelarDocumento" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalCancelarDocumento" runat="server" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtCvePeriodo" CssClass="TxtCvePeriodo hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCvePersonal" CssClass="TxtCvePersonal hidden" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnGeneratepdf" CssClass="BtnGeneratepdf hidden" OnClick="BtnGeneratepdf_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
|
||||
@@ -193,7 +193,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
using (ClsNominas objnom =new ClsNominas())
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
objnom.GetNominasSinTimbrar(-1, UsuarioActual.CveEmpresa);
|
||||
GVNominaPendiente.DataSource = objnom.DTSetResultados.Tables[0];
|
||||
@@ -1210,13 +1210,37 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
protected int CveNominaCancelar
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveNominaCancelar"] == null) { return 0; }
|
||||
else { return ViewState["CveNominaCancelar"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CveNominaCancelar"] = value; }
|
||||
}
|
||||
protected void LnkCancelar_Click(object sender, EventArgs e)
|
||||
{
|
||||
int CveNomina = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||
CveNominaCancelar = CveNomina;
|
||||
DdlMotivoCancelacion.DataSource = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion IN (2,3)");
|
||||
DdlMotivoCancelacion.DataBind();
|
||||
UpCancelarDocumento.Update();
|
||||
RegistraScript("$('#ModalCancelarDocumento').modal()");
|
||||
}
|
||||
|
||||
protected void BtnCancelarDocumento_Click(object sender, EventArgs e)
|
||||
{
|
||||
int CveNomina = CveNominaCancelar;
|
||||
|
||||
|
||||
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
|
||||
|
||||
DdlMotivoCancelacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
using (ClsNominas Nom = new ClsNominas())
|
||||
{
|
||||
|
||||
@@ -1229,8 +1253,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string RFCReceptor = Nom.RFC;
|
||||
string RFCEmisor = UsuarioActual.Empresa.RFC;
|
||||
string SerieFolio = Nom.SerieFolio;
|
||||
DataRow rowc = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveMotivoCancelacion={0}", DdlMotivoCancelacion.SelectedValue));
|
||||
int CveMotivoCancelacion = -1;
|
||||
if(rowc != null)
|
||||
{
|
||||
CveMotivoCancelacion = rowc["CveSATMotivoCancelacion"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
if (ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor, 4))
|
||||
if (ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor, 4, CveSATMotivoCancelacion: CveMotivoCancelacion))//,CveSATMotivoCancelacion:=
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1266,9 +1296,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
cargaDatos();
|
||||
}
|
||||
RegistraScript("$('#ModalCancelarDocumento').modal('hide')");
|
||||
}
|
||||
|
||||
|
||||
protected void LnkModalPlantillaNomina_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript("$('#DModalNominas').modal();");
|
||||
@@ -1925,7 +1955,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
using (ClsNominas objRH = new ClsNominas())
|
||||
{
|
||||
|
||||
if (objRH.GETPersonalVacaciones(UsuarioActual.CveEmpresa ,SRCvePersonal))
|
||||
if (objRH.GETPersonalVacaciones(UsuarioActual.CveEmpresa, SRCvePersonal))
|
||||
{
|
||||
GvVacaciones.DataSource = objRH.DtResultados;
|
||||
|
||||
@@ -7710,4 +7740,5 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
UpModalProrrateo.Update();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5826,4 +5826,9 @@ Partial Class RH_Reclutamiento
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -2770,6 +2770,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPDatosUsado" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>Tipo Servicio:</label>
|
||||
@@ -2832,7 +2836,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ Partial Class PV
|
||||
Private Property FolioXML As String
|
||||
Private Property SubTotal As Decimal
|
||||
Private Property Total As Decimal = 0
|
||||
Private Property Descuentos As Decimal = 0
|
||||
'Private Property Descuentos As Decimal = 0
|
||||
Private Property EmisorRFC As String
|
||||
Private Property ReceptorRFC As String
|
||||
Private Property TrasladoIVA As Decimal = 0
|
||||
@@ -83,6 +83,15 @@ Partial Class PV
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtPorcentajeMarcas As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("DtPorcentajeMarcas")), Nothing, CType(ViewState("DtPorcentajeMarcas"), DataTable))
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPorcentajeMarcas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property RemisionesLista As List(Of Integer)
|
||||
Get
|
||||
Return If(IsNothing(ViewState("RemisionesLista")), Nothing, CType(ViewState("RemisionesLista"), List(Of Integer)))
|
||||
@@ -2576,6 +2585,12 @@ Partial Class PV
|
||||
If Not String.IsNullOrEmpty(ObjCliente.Vendedor) Then
|
||||
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
|
||||
End If
|
||||
|
||||
' si es empresa acumuladores
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
CargaPorcentajeMarcas()
|
||||
End If
|
||||
|
||||
Else
|
||||
TrEsDistribuidor.Visible = False
|
||||
End If
|
||||
@@ -2697,6 +2712,14 @@ Partial Class PV
|
||||
UPCondicionesPago.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPorcentajeMarcas()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPorcentajeMarcas(CveCliente) Then
|
||||
DtPorcentajeMarcas = ObjPS.DtResultados.Copy()
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CambiaSucursal()
|
||||
CargaFormatoSucursal()
|
||||
CargaFolios()
|
||||
@@ -3985,20 +4008,20 @@ Partial Class PV
|
||||
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
||||
Dim PrecioSugerido As Decimal = 0
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||
If UsuarioActual.CveEmpresa.Contiene(80, 119) Then
|
||||
Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
ObjInventarios.Dispose()
|
||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
@@ -4011,7 +4034,7 @@ Partial Class PV
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||
Dim PrecioAplicado As Decimal = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDecimal
|
||||
If PrecioAplicado > 0 Then
|
||||
PrecioSugerido = PrecioAplicado
|
||||
End If
|
||||
@@ -4023,7 +4046,7 @@ Partial Class PV
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
Dim PorcentajePrecio As Decimal = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
@@ -4040,15 +4063,15 @@ Partial Class PV
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
@@ -4101,9 +4124,13 @@ Partial Class PV
|
||||
|
||||
End If
|
||||
'Descuento por clasificación
|
||||
If drPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
TxtDescuento.Text = (PrecioSugerido * ClasificacionesDescuentos(drPS("CveClasificacion").ToString.ToEntero)).ToString("F2")
|
||||
Dim ObjDescuento As New Descuentos
|
||||
|
||||
ObjDescuento = CalcularDescuentos(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, PrecioSugerido)
|
||||
If ObjDescuento.EsPUModificado Then
|
||||
PrecioSugerido = ObjDescuento.PU
|
||||
End If
|
||||
TxtDescuento.Text = ObjDescuento.ImporteDescuento.ToString("N2")
|
||||
|
||||
HdnDescuentoOriginal.Value = TxtDescuento.Text.ToDecimal().ToString()
|
||||
LblDescuentoIncluido.Text = TxtDescuento.Text.ToDecimal().FormatoNumero(2)
|
||||
@@ -4138,6 +4165,180 @@ Partial Class PV
|
||||
UpAddVenta.Update()
|
||||
UPPDescuento.Update()
|
||||
End Sub
|
||||
|
||||
Partial Class Descuentos
|
||||
Public ImporteDescuento As Decimal = 0
|
||||
Public CvePromocionDetalle As Integer = -1
|
||||
Public PU As Decimal = 0
|
||||
Public EsPUModificado As Boolean = False
|
||||
Public ImporteProntoPago As Decimal = 0
|
||||
End Class
|
||||
|
||||
Private Function CalcularDescuentos(CvePS As Integer, Cantidad As Decimal, PU As Decimal) As Descuentos
|
||||
Dim Descuento As Decimal = HdnDescuento.Value.ToDecimal
|
||||
|
||||
If HdnTipoDescuento.Value = "0" Then
|
||||
Descuento = HdnDescuento.Value.ToDecimal * Cantidad
|
||||
End If
|
||||
|
||||
Dim ValidaCondicionesComerciales As Boolean = True
|
||||
|
||||
'AGREGA PROMOCION EN EL DESCUENTO
|
||||
Dim TipoPromo As Integer = 0
|
||||
Dim TotalPromocion As Decimal = 0
|
||||
Dim PromocionPorcentaje As Decimal = 0
|
||||
Dim PUModificado As Decimal = 0
|
||||
Dim SeAjustoPU As Boolean = False
|
||||
Dim PUPromocion As Decimal = 0
|
||||
Dim CantMinima As Integer = 0
|
||||
Dim CveMarcaPS As Integer = 0
|
||||
Dim CveClasifPS As Integer = 0
|
||||
Dim CveRinTamañoPS As Integer = 0
|
||||
Dim CvePromocionDetalle As Integer = 0
|
||||
Dim IncluyeImpuestos As Boolean = False
|
||||
Dim TipoAplicacion As Integer = 1 ' 1 - descuento, 2 en PU
|
||||
Dim ObjDescuento As New Descuentos
|
||||
|
||||
If DdlSubProyectoDatos.SelectedValue = "11842" Then '' E141, el subproyecto: Franquicia, no proceden las promociones
|
||||
Return ObjDescuento
|
||||
End If
|
||||
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing Then
|
||||
|
||||
CveMarcaPS = DrPS("CveMarca").ToString().ToEntero()
|
||||
CveClasifPS = DrPS("CveClasificacion").ToString().ToEntero()
|
||||
CveRinTamañoPS = DrPS("CveRinTamaño").ToString().ToEntero()
|
||||
|
||||
If CveClasifPS = 20636 Then
|
||||
ValidaCondicionesComerciales = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim dr As DataRow = Nothing
|
||||
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
|
||||
dr = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL) AND ((TipoPromocion <> 3 AND (CantidadMinima <= {3} OR CantidadMinima IS NULL)) OR (TipoPromocion = 3 AND CantidadMinima <= {3} ))", CvePS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, Cantidad), Orderby:="CantidadMinima desc ")
|
||||
If dr Is Nothing Then
|
||||
|
||||
'verifica marca, si tiene asignada la promocion
|
||||
dr = DtPromociones.FiltroPrimero(String.Format("CvePS IS NULL AND CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {3} OR CveRinTamaño IS NULL) AND ((TipoPromocion <> 3 AND (CantidadMinima <= {4} OR CantidadMinima IS NULL)) OR (TipoPromocion = 3 AND CantidadMinima <= {4} )) ", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, Cantidad), Orderby:="CantidadMinima desc")
|
||||
|
||||
End If
|
||||
End If
|
||||
Dim Cant As Integer = 1
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
TipoPromo = dr("TipoPromocion").ToString().ToEntero()
|
||||
CantMinima = dr("CantidadMinima").ToString().ToEntero()
|
||||
IncluyeImpuestos = dr("IncluyeImpuestos").ToString() = "True"
|
||||
PromocionPorcentaje = dr("Promocion").ToString().ToDecimal
|
||||
PUPromocion = dr("PUPromocion").ToString().ToDecimal
|
||||
CvePromocionDetalle = dr("CvePromocionDetalle").ToString().ToEntero()
|
||||
TipoAplicacion = dr("TipoAplicacion").ToString().ToEntero()
|
||||
|
||||
If CantMinima > 0 Then
|
||||
Cant = Math.Floor(Cantidad / CantMinima).ToEntero()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim PorcentajeIVA As Decimal = ViewState("SubProyectoPorcentajeIVA").ToString.ToDecimal ''Math.Round(ViewState("SubProyectoPorcentajeIVA").ToString.ToDecimal, 2).ToDecimal
|
||||
|
||||
TotalPromocion = Math.Round(PUPromocion * Cant / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
|
||||
|
||||
If TipoPromo = 1 Then 'Promocion por Importe $
|
||||
If TipoAplicacion = 2 Then
|
||||
Descuento = 0
|
||||
SeAjustoPU = True
|
||||
PUModificado = Math.Round(PUPromocion / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
|
||||
Else
|
||||
Descuento = Descuento + PU - TotalPromocion
|
||||
End If
|
||||
|
||||
ElseIf TipoPromo = 2 Then 'Promocion por %
|
||||
Descuento = Descuento + ((PU * PromocionPorcentaje / 100) * Cantidad)
|
||||
ElseIf TipoPromo = 3 Then 'Promocion por Cantidad
|
||||
If Cantidad >= CantMinima Then
|
||||
Descuento = Descuento + TotalPromocion
|
||||
Else
|
||||
CvePromocionDetalle = -1
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
|
||||
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
||||
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
|
||||
If Not String.IsNullOrEmpty(DrPS("CveMarca").ToString()) AndAlso DrPS("CveMarca").ToString().ToEntero() > 0 Then
|
||||
Dim RowPorcentaje = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
|
||||
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
|
||||
If RowPorcentaje IsNot Nothing Then
|
||||
'(AHORA LOS DESCUENTOS SON ACUMULABLES)
|
||||
'Descuento = 0
|
||||
Dim PorcentajeProducto = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto2 = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto3 = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
||||
|
||||
Dim TotalInicial As Decimal = (Cantidad * (PU)) '- Descuento
|
||||
Dim TotalFinal = TotalInicial
|
||||
'SI APLICA EL PRIMER DESCUENTO
|
||||
If PorcentajeProducto > 0 Then
|
||||
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
|
||||
Dim Total2 = (TotalInicial - Descuento1)
|
||||
|
||||
'SI APLICA EL SEGUNDO DESCUENTO
|
||||
If PorcentajeProducto2 > 0 Then
|
||||
Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2)
|
||||
Dim Total3 = (Total2 - Descuento2)
|
||||
|
||||
'SI APLICA EL TERCER DESCUENTO
|
||||
If PorcentajeProducto3 > 0 Then
|
||||
Dim Descuento3 As Decimal = (Total3 * PorcentajeProducto3).RoundSQL(2)
|
||||
TotalFinal = Total3 - Descuento3
|
||||
Else
|
||||
TotalFinal = Total3
|
||||
End If
|
||||
Else
|
||||
TotalFinal = Total2
|
||||
End If
|
||||
Else
|
||||
TotalFinal = TotalInicial
|
||||
End If
|
||||
|
||||
If PorcentajeProducto > 0 Then
|
||||
Descuento += ((Cantidad * PU) - TotalFinal)
|
||||
End If
|
||||
|
||||
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso RowPorcentaje("ProntoPago").ToString().ToDecimal() > 0 Then
|
||||
Dim TotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
|
||||
Dim PorcentajeProntoPago = RowPorcentaje("ProntoPago").ToString().ToDecimal() / 100D
|
||||
|
||||
ObjDescuento.ImporteProntoPago = (TotalProntoPago * PorcentajeProntoPago).RoundSQL(2)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
Descuento = PU * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjDescuento.ImporteDescuento = Descuento
|
||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||
If SeAjustoPU Then
|
||||
ObjDescuento.PU = PUModificado
|
||||
ObjDescuento.EsPUModificado = True
|
||||
End If
|
||||
|
||||
Return ObjDescuento
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange
|
||||
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero, DdlPS)
|
||||
End Sub
|
||||
@@ -5127,13 +5328,27 @@ Partial Class PV
|
||||
CvePSAmortizacion = DdlPS.SelectedValue.ToEntero.ToEntero
|
||||
End If
|
||||
|
||||
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal()
|
||||
Dim Descuento As Decimal = HdnDescuento.Value.ToDecimal
|
||||
If HdnTipoDescuento.Value = "0" Then
|
||||
Descuento = HdnDescuento.Value.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
End If
|
||||
|
||||
Dim ObjDescuento As New Descuentos
|
||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
ObjDescuento.ImporteDescuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero))
|
||||
End If
|
||||
|
||||
ObjDescuento = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||
If ObjDescuento.EsPUModificado Then
|
||||
PU = ObjDescuento.PU
|
||||
End If
|
||||
|
||||
|
||||
Dim CveProyecto As Integer = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveProyecto").ToString.ToEntero
|
||||
Dim Proyecto As String = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("Proyecto").ToString
|
||||
|
||||
Dim Consec = AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||
CvePS, "", TxtObsPS.Text.Trim, PU, Descuento,
|
||||
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
||||
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
||||
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
|
||||
|
||||
@@ -6784,12 +6999,12 @@ Partial Class PV
|
||||
DdlBCIAjuste.DataSource = DTBCIUsados.FiltraParametros($"CveTamaño={CveTamanio}")
|
||||
DdlBCIAjuste.DataBind()
|
||||
DdlBCIAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
CVAnio.Enabled = True
|
||||
If CveTamanio = 16 Then 'motobaterias
|
||||
DdlBCIAjuste.Items.Insert(0, New ListItem(" - ", "0"))
|
||||
|
||||
CVAnio.Enabled = False
|
||||
End If
|
||||
|
||||
'UPPDatosUsado.Update() ''refresca el RFV
|
||||
Else
|
||||
DdlBCIAjuste.Items.Insert(0, New ListItem(" - ", "0"))
|
||||
End If
|
||||
|
||||
@@ -105,18 +105,18 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Número de Parte / Código:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtCodigoBarras" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigoBarras.ClientID.ToString()%>">Código Barras:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divCodigo2" runat="server" visible ="false">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4" id="divCodigo2" runat="server" visible ="false">
|
||||
<asp:TextBox ID="TxtCodigo2" CssClass="form-control " runat="server" MaxLength="50" ></asp:TextBox>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo2.ClientID.ToString()%>">Código CPK:</label>
|
||||
<i></i>
|
||||
@@ -263,6 +263,12 @@
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtVentaMinima.ClientID.ToString()%>">Venta Mínima:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divLitraje" visible="false" runat="server">
|
||||
<asp:TextBox ID="TxtLitraje" CssClass="form-control " runat="server" ReadOnly="true"></asp:TextBox>
|
||||
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
|
||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtLitraje.ClientID.ToString()%>">Litraje:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@@ -245,6 +245,8 @@ Partial Class ProductosyServicios
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivPSAdicionalVigencia.Visible = True
|
||||
divCodigo2.Visible = True
|
||||
divLitraje.Visible = True
|
||||
|
||||
CargaPSAdicionalesVigencias()
|
||||
End If
|
||||
|
||||
@@ -846,6 +848,7 @@ Partial Class ProductosyServicios
|
||||
TxtCodigo2.Text = ObjProductosServicios.Codigo2
|
||||
TxtCodigoBarras.Text = ObjProductosServicios.CodigoBarras
|
||||
CodigoBarrasCargado = ObjProductosServicios.CodigoBarras
|
||||
TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString
|
||||
|
||||
TxtPS.Text = ObjProductosServicios.PS
|
||||
TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
|
||||
@@ -1238,8 +1241,9 @@ Partial Class ProductosyServicios
|
||||
|
||||
|
||||
If DdlSATPS.txtValue.Value.ToEntero > 0 Then
|
||||
ValidaMaterialPeligroso(DdlSATPS.txtValue.Value.ToEntero)
|
||||
If Not ValidaMaterialPeligrosoMensaje Then
|
||||
ValidaMaterialPeligroso(DdlSATPS.txtValue.Value.ToEntero)
|
||||
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -305,7 +305,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
|
||||
CveCliente = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToEntero() > 0, Request("CveCliente").ToEntero(), -1).ToString.ToEntero
|
||||
CveSubProyectoEjecucion = If(Request("CveSubProyectoEjecucion") IsNot Nothing AndAlso Request("CveSubProyectoEjecucion").ToEntero() > 0, Request("CveSubProyectoEjecucion").ToEntero(), -1).ToString
|
||||
CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor").ToEntero() > 0, Request("CveVendedor").ToEntero(), -1).ToString.ToEntero
|
||||
CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor").ToEntero() >= 0, Request("CveVendedor").ToEntero(), -1).ToString.ToEntero
|
||||
CveEstatus = If(Request("CveEstatus") IsNot Nothing AndAlso Request("CveEstatus").ToEntero() > 0, Request("CveEstatus").ToEntero(), -1).ToString
|
||||
CveUsuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
|
||||
TipoDocto = If(Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").ToString() <> "-1", Request("TipoDocto").ToString(), "-1").ToString
|
||||
@@ -421,6 +421,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
|
||||
'DdlClientes.SelectedValueExist(CveCliente)
|
||||
DdlSubProyectoEjecucion.SelectedValueExist(CveSubProyectoEjecucion)
|
||||
If CveVendedor = 0 Then DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||
DdlUsuario.SelectedValueExist(CveUsuario)
|
||||
DdlTipoComprobante.SelectedValuesIfExistM(TipoDocto)
|
||||
|
||||
@@ -637,7 +637,7 @@
|
||||
<td><b>Serie - Folio:</b></td>
|
||||
<td>
|
||||
<asp:Label ID="LblSerie" runat="server"></asp:Label>-
|
||||
<asp:TextBox ID="TxtFolio" runat="server" BorderStyle="None" Text="000" MaxLength="7" Width="60px" ValidationGroup="GrpEmitirImprimir" Style="text-align: left"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFolio" runat="server" BorderStyle="None" Text="000" MaxLength="7" Width="60px" ValidationGroup="GrpEmitirImprimir" Style="text-align: left" autopostback="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CompareValidator ID="CVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> no tiene el formato correcto, solo formato numérico." Operator="DataTypeCheck" Type="Integer" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
|
||||
@@ -30982,6 +30982,11 @@ Partial Class Ventas
|
||||
TxtFolio.Text = FolioFijo.ToString()
|
||||
End If
|
||||
|
||||
If EstablecioFolio AndAlso UsuarioActual.CveEmpresa = 140 Then ' CÓDIGO TEMPORAL 2022/01/17
|
||||
FolioFijo = TxtFolio.Text.ToEntero()
|
||||
ViewState("FolioActual") = FolioFijo
|
||||
End If
|
||||
|
||||
Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue
|
||||
DdlTipoComprobante.SelectedValue = TipoDoctoNuevo
|
||||
TxtFecha.Text = Now.ToString()
|
||||
|
||||
@@ -400,6 +400,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user