This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-12-14 06:39:42 -07:00
12 changed files with 216 additions and 50 deletions

View File

@@ -3770,7 +3770,7 @@ 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, Tipo As String, Orden As Integer, Estatus As Integer) As Integer
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, Orden As Integer, Estatus As Integer, Distancia As Integer) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Inv_EntregaAlmacenRutaAdd")
@@ -3783,9 +3783,11 @@ Public Class ClsGenerales
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
.Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
.Add("@Orden", SqlDbType.Int).Value = Orden
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
.Add("@Estatus", SqlDbType.VarChar).Value = Estatus
.Add("@Distancia", SqlDbType.Int).Value = Distancia
.Add("@CveEntregaAlmacen", SqlDbType.Int).Direction = ParameterDirection.Output
End With

View File

@@ -209,7 +209,7 @@ Public Class ClsNominas
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
OnError("Ocurrió un error al NominasSinTimbrar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -226,7 +226,7 @@ Public Class ClsNominas
SqlAdapter.Fill(DTSet)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
OnError("Ocurrió un error al Personal ISR Anual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function

View File

@@ -20,8 +20,7 @@ Public Class Timbres
Private Property CveMovimiento As Integer
Private Property UsuarioActual As Usuario
Private Property AplicaCP As Boolean
Private Property FechaSalidaLlegada As Date
Private Property FechaSalida As Date
Private Property Serie As String
Private Property Folio As Integer
Private Property CveTimbre As Integer
@@ -116,6 +115,9 @@ Public Class Timbres
Dim FI As Date = New Date(1900, 1, 1)
Dim FF As Date = New Date(9999, 1, 1)
Dim FechaLlegada As DateTime
Dim Distancia As Integer = 1
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetGralTimbre(CveTimbre, "-1", FI, FF, 0, UsuarioActual.CveEmpresa, -1) Then
@@ -125,7 +127,9 @@ Public Class Timbres
Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
FechaSalidaLlegada = drT("FechaEntrega").ToString.ToDate
FechaSalida = drT("FechaEntrega").ToString.ToDateTime
FechaLlegada = drT("FechaLlegada").ToString.ToDateTime
Distancia = drT("Distancia").ToString.ToEntero
ObjFactura.Folio = drT("Folio").ToString.ToEntero
ObjFactura.Serie = drT("Serie").ToString
@@ -188,17 +192,16 @@ Public Class Timbres
Dim Ubica As New CFDICartaPorteUbicacion
Ubica.TipoEstacion = ""
Ubica.DistanciaRecorrida = 1
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC,
.FechaHoraSalidaLlegada = Now.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
.FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
.Domicilio = DomOrigen}
CartaPorte.Ubicaciones.Add(Ubica)
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
.FechaHoraSalidaLlegada = FechaSalidaLlegada.ToString("yyyy-MM-ddT23:59:59"),
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
.Domicilio = DomDestino,
.DistanciaRecorrida = 1}
.DistanciaRecorrida = Distancia}
CartaPorte.Ubicaciones.Add(Ubica)
CartaPorte.FiguraTransporte.ClaveTransporte = "01"

View File

@@ -123,20 +123,48 @@
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
</div>
<asp:Label CssClass="col-md-1" Text="" ID="LbTipoMoneda" runat="server" />
<div class="col-md-2" id="DVPAgoEnPesos" runat="server" visible ="false">
<asp:CheckBox Text="Pagar con pesos" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarPesos" OnCheckedChanged="ChkPagarPesos_CheckedChanged" runat="server" ClientIDMode="Static" />
<%--<asp:CheckBox Text="Pagar con dolares" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarDolares" runat="server" OnCheckedChanged="ChkPagarDolares_CheckedChanged" ClientIDMode="Static" />--%>
</div>
</div>
<div class="row">
<label class="col-md-2 control-label">Cuenta:</label>
<div class="col-md-5">
<div class="col-md-4">
<asp:Label ID="LblCuenta" runat="server" Text=""></asp:Label>
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardar">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-2">
<div class="col-md-1">
<asp:Label ID="LblEstatusIE" runat="server" Text="Activo" Visible="false"></asp:Label>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlEstatusIE" DataValueField="CveEstatusIE" DataTextField="EstatusIE" AutoPostBack="false"></asp:DropDownList>
</div>
<div class="col-md-2" runat="server" id="DivTC" visible="false">
T.C.:
<asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaTCPagoOC();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
<asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:Label ID="LbImporteME" Text="" ClientIDMode="Static" runat="server" />
<div style="display:none">
<asp:Button ID="LnkActualizaTCOC" ClientIDMode="Static" runat="server" Text="Actaulziar" OnClick="LnkActualizaTCOC_Click" ></asp:Button>
</div>
</div>
<div class="col-md-2" runat="server" id="DivTC2" visible="false">
Dolares
<asp:TextBox ID="TxtImporteDolares" runat="server" Text="1" placeholder="Dolares" CssClass="form-control input-sm" MaxLength="12" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
<%--<asp:Label ID="Label1" Text="" ClientIDMode="Static" runat="server" />--%>
</div>
</div>
<div class="row" id="DivCheques" runat="server" visible="false">
<label class="col-md-2 control-label">Movimiento Relacionado:</label>
@@ -1781,5 +1809,10 @@
return false;
}
function CambiaTCPagoOC() {
$("#LnkActualizaTCOC").click();
}
</script>
</asp:Content>

View File

@@ -297,6 +297,17 @@ Partial Class Bancos_IE
End Set
End Property
Private Property CveMonedaOriginal As Integer
Get
Return ViewState("CveMonedaOriginal").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveMonedaOriginal") = value
End Set
End Property
Private Property CveOCSolicitudAnticipo As Integer
Get
@@ -504,6 +515,22 @@ Partial Class Bancos_IE
End Set
End Property
Private Property ImporteOriginalDolaras As Decimal
Get
If ViewState("ImporteOriginalDolaras") Is Nothing Then
Return 0
Else
Return ViewState("ImporteOriginalDolaras").ToString().ToDecimal()
End If
End Get
Set(value As Decimal)
ViewState("ImporteOriginalDolaras") = value
End Set
End Property
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
Property CveComplementoPagoCancelar As Integer
@@ -2471,6 +2498,9 @@ Partial Class Bancos_IE
If CveOCSolicitudAnticipo > 0 Then
Dim ObjOC As New ClsOC
If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal
@@ -2479,10 +2509,18 @@ Partial Class Bancos_IE
End If
ObjOC.Dispose()
If TxtImporte.Text.ToDecimal > SaldoOCAnticipo Then
Dim ImporteComparacion As Decimal = TxtImporte.Text.ToDecimal
'
If ChkPagarPesos.Checked Then
ImporteComparacion = ImporteOriginalDolaras
End If
If ImporteComparacion > SaldoOCAnticipo Then
EsValido = False
Alert($"El importe del movimiento es mayor al saldo de la orden de compra importe movmiento {TxtImporte.Text.FormatoNumero } saldo orden de compra: {SaldoOCAnticipo.ToString.FormatoNumero}", TipoMensaje.MsgAdvertencia)
End If
End If
Return EsValido
@@ -5557,11 +5595,23 @@ Partial Class Bancos_IE
Else
TxtImporte.Text = DrOC("ImporteAnticipo").ToString.FormatoNumero
TxtImporteLetra.Text = DrOC("ImporteAnticipo").ToString.ToDouble.Texto2Letras(DrOC("CveMoneda").ToString.ToEntero)
ImporteOriginalDolaras = DrOC("ImporteAnticipo").ToString.ToDecimal
End If
DdlMoneda.SelectedValue = DrOC("CveMoneda").ToString
CveMoneda = DrOC("CveMoneda").ToString.ToEntero
CargaCuenta(DrOC("CveMoneda").ToString.ToEntero)
CveMonedaOriginal = DrOC("CveMoneda").ToString.ToEntero
If CveMonedaOriginal > 1 Then
MostrarPagoEnPesos(True)
End If
UpCuentaDeposito.Update()
If DrOC("CveProveedor").ToString.ToEntero > 0 Then
HdnCveProveedor.Value = DrOC("CveProveedor").ToString
@@ -5644,6 +5694,69 @@ Partial Class Bancos_IE
End If
End Sub
Private Sub MostrarPagoEnPesos(Mostrar As Boolean)
LbTipoMoneda.Visible = Mostrar
LbTipoMoneda.Text = If(Mostrar, "Pago en doalres", "")
DVPAgoEnPesos.Visible = Mostrar
ChkPagarPesos.Visible = Mostrar
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
End Sub
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarPesos.Checked Then
DivTC.Visible = True
DivTC2.Visible = True
' DivDolaresDolares.Visible = False
'CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
CargaCuenta(1)
'TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
'TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
TxtImporteDolares.Text = TxtImporte.Text
'TxtImporteDolares.Text = TxtImporte.Text
'TxtImporte.Text = (TxtImporte.Text.ToDecimal * (TxtTC.Text.ToDecimal)).ToString("###,###,###.00")
CveMoneda = 1
Else
DivTC.Visible = False
DivTC2.Visible = False
CveMoneda = CveMonedaOriginal
'DivDolaresDolares.Visible = True
'CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
CargaCuenta(CveMonedaOriginal)
'TxtFechaDocumento.Attributes.Remove("onchange")
TxtImporte.Text = ImporteOriginalDolaras.ToString("###,###,###.00")
End If
CambiaTCPagoOC()
UpDatos.Update()
' RegistraScript("CambiaPesosDolares();")
End Sub
Public Sub CambiaTCPagoOC()
If ChkPagarPesos.Checked Then
TxtImporte.Text = (TxtImporteDolares.Text.ToDecimal * (TxtTC.Text.ToDecimal)).ToString("###,###,###.00")
Else
TxtImporte.Text = TxtImporteDolares.Text
End If
UpDatos.Update()
End Sub
Protected Sub LnkActualizaTCOC_Click(sender As Object, e As EventArgs)
CambiaTCPagoOC()
End Sub
Private Function GuardaSolicitudAnticipoOC(ByRef ObjOC As ClsOC) As String
Dim ObjOI As New ClsOIEventos
Dim CveEvento As Integer = 0
@@ -6724,4 +6837,5 @@ Partial Class Bancos_IE
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub
End Class

View File

@@ -846,15 +846,17 @@ Partial Class PopUpVerFactura
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
'If Imagen.Exists Then
' params.Add(New ReportParameter("LogoPath", logouri))
'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
If Imagen.Exists Then
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
params.Add(New ReportParameter("LogoPath", LogoRuta))
'Else
' params.Add(New ReportParameter("LogoPath", ""))
'End If
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
@@ -1174,15 +1176,25 @@ Partial Class PopUpVerFactura
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ClienteRFC, Total, FolioFiscal, RutaCBB)
End If
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, SerieFolio)
ImagenCBB = New System.IO.FileInfo(RutaCBB)
If ImagenCBB.Exists Then
ImgCBB = String.Format("file://{0}", ImagenCBB.FullName)
Else
ImgCBB = ""
End If
End If
If DtConceptos.Rows.Count > 0 Then
Dim params As New List(Of ReportParameter)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
params.Add(New ReportParameter("LogoPath", LogoRuta))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
@@ -1295,7 +1307,7 @@ Partial Class PopUpVerFactura
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, Parametros("EXT").ToString, Parametros("TIPODOCTO").ToString, Parametros("FOLIO").ToString, Exten)
Dim Archivo As New System.IO.FileInfo(Path)
Dim cvetimbre As Integer = Parametros("CVETIMBRE").ToString.ToEntero
Dim cvetimbre As Integer = IfNull(Parametros("CVETIMBRE"), "0").ToString.ToEntero
If Archivo.Exists Then
DescargarArchivoPDFTraslado(Archivo, Path)

View File

@@ -238,16 +238,12 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0"));
DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1"));
DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2"));
}
}
protected void InicializaFechas()
{
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy");
TxtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy");
}
#endregion
@@ -265,8 +261,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
ObjGeneral.Dispose();
GVDatos.DataBind();
UPDatos.Update();
}
}
#endregion
@@ -311,13 +306,13 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
DataTable DTDireccionesCliente = new DataTable();
ClsClientes ObjClientes = new ClsClientes();
if (ObjClientes.DireccionEnvioGet(-1, -1, -1))
if (ObjClientes.DireccionEnvioGet(-1, CveCliente, -1))
{
DTDireccionesCliente = ObjClientes.DtResultados ;
}
ObjClientes.Dispose();
DdlModalDireccionDestino.DataSource = DTDireccionesCliente.FiltraParametros($"CveCliente = {CveCliente}");
DdlModalDireccionDestino.DataSource = DTDireccionesCliente
DdlModalDireccionDestino.DataBind();
DdlModalDireccionDestino.Items.Insert(0,new ListItem("Seleccione Una", "-1"));
@@ -331,7 +326,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{
DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2"));
}
DTDireccionesCliente.Dispose();
}

View File

@@ -22,7 +22,7 @@
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Entrega Almacen Ruta
Ruta de Entrega/Recolección
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">

View File

@@ -154,7 +154,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
TieneError = true;
break;
}
int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), "E",Orden,0);
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), CveDireccionOrigen, CveDireccionDestino, row.DataKey("CveMovimiento").ToEntero(), DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "E",Orden,0,1);
CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero();
if (CveEntregaAlmacen > 0)
@@ -416,7 +417,9 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
DdlChofer.DataBind();
DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1"));
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
TabRecoleccion.Visible = UsuarioActual.Empresa.Funcionalidad(531)=="1";
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
CargarCentrosDeCosto(null, DdlSubProyectoRecoleccion, null, LblSubProyectoRecoleccion);
@@ -795,7 +798,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
if( CveEntregaAlmacen == -1)
{
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), "R", 1,0);
DateTime fechallegada = (TxtFechaEntrega.Text + " 23:59").ToDate();
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada , "R", 1,0,1);
if (CveEntregaAlmacen > 0)
{
//CveTimbrenuevo = ObjGenerales.AddGralTimbre("Rec", "-1", -1, "-1", TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, -1);

View File

@@ -206,7 +206,7 @@
<asp:DropDownList ID="DdlAlmacenTransitorio" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
</div>
</div>
<div class="row" class="rowpadding">
<div class="row rowpadding" id="divEmitir" runat="server">
<label class="col-md-3">Emitir:</label>
<div class="col-md-9">
<table>
@@ -217,7 +217,7 @@
</table>
</div>
</div>
<div class="row" class="rowpadding">
<div class="row rowpadding">
<label class="col-md-3">Chofer:</label>
<div class="col-md-9">
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
@@ -248,18 +248,17 @@
</div>
</div>
</div>
<div class="row rowpadding">
<div class="row rowpadding" runat="server" id="divFechaEnvio" visible="false">
<label class="col-md-3">F. Llegada:</label>
<div class="col-md-9" style="padding-top: 0px;" runat="server" id="divFechaEnvio" visible="false">
<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="TxtFechaEnvio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
<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="TxtFechaEnvio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaEnvio" PopupButtonID="ImgFechaEnvio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="TxtFechaEnvio" 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:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtFechaLlegada" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" 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>

View File

@@ -206,6 +206,7 @@ Partial Class Inventarios_TraspasoAlmacen
If UsuarioActual.CveEmpresa.Contiene(141, 152, 158, 159, 160, 161, 162, 163) Then
ChkEmitirTimbrado.Visible = False
divEmitir.Visible = False
End If
If UsuarioActual.CveEmpresa.Contiene(1, 119, 140, 2) Then
@@ -419,7 +420,7 @@ Partial Class Inventarios_TraspasoAlmacen
DdlChofer.Items.Insert(0, New ListItem("Seleccione", "-1"))
TxtFechaEntrega.Text = Now.ToShortDateString
TxtFechaEnvio.Text = Now.ToShortDateString
TxtFechaLlegada.Text = Now.ToShortDateString
'Llena Responsables Transitorio
'DdlResponsable.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
@@ -1168,7 +1169,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, "T", 1, 1)
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDatetime, "T", 1, 1, 1)
If CveEntregaAlmacen > 0 Then
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)

View File

@@ -38,7 +38,10 @@ Partial Class OI_Normatividad
If ObjOIEventos.AddEventoNormatividad("PADRE", "PADRE DE TODOS", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "".ToEntero) Then
If ObjOIEventos.GetEventoNormatividad(UsuarioActual.CveEmpresa) Then
IDSelected = ObjOIEventos.DtResultados(0)("CveEvento").ToString.ToEntero
IDSelected = 0
If ObjOIEventos.DtResultados.Rows.Count > 0 Then
IDSelected = ObjOIEventos.DtResultados(0)("CveEvento").ToString.ToEntero
End If
ObjOIEventos.AddEventoNormatividad("Título 1", "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IDSelected)
End If