--merge Ventas.aspx
This commit is contained in:
@@ -13,7 +13,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,2,12,14,16,19, 26)")
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,2,4,8,12,14,16,19, 26)")
|
||||
|
||||
DdlAlmacen.DataSource = DtAlmacenes
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HplImprimir" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplImprimirResumen" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Resumen</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplDescargaXml" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Descargar XML SAT</asp:HyperLink>
|
||||
</li>
|
||||
@@ -1428,7 +1431,7 @@
|
||||
<th style="width: 63px">Cant</th>
|
||||
<th style="width: 200px">Producto</th>
|
||||
<th style="width: 10%" runat="server" id="Th5" visible="false">Sección almacén</th>
|
||||
<th style="width: 10%" runat="server" id="Th6" visible="false">Serie</th>
|
||||
<th style="width: 100px" runat="server" id="Th6" visible="false">Serie</th>
|
||||
<th style="width: 10%" runat="server" id="Th7" visible="false">Lote</th>
|
||||
<th style="width: 10%" runat="server" id="Th8" visible="false">Caducidad</th>
|
||||
<th style="width: 73px;"></th>
|
||||
@@ -1440,7 +1443,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="psagregar">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPSCambioSalida" CssStyle="width:100%" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPSCambioSalida" CssStyle="width:100%" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSCambioSalida_selectedindexchange" />
|
||||
</div>
|
||||
</td>
|
||||
<td runat="server" id="Td5" visible="false">
|
||||
@@ -1449,7 +1452,7 @@
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td runat="server" id="Td6" visible="false">
|
||||
<asp:TextBox ID="TxtSerieCambio" runat="server" Width="50px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtSerieCambio" runat="server" Width="100px"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="Td7" visible="false">
|
||||
<asp:TextBox ID="TxtLoteCambio" runat="server" Width="50px"></asp:TextBox>
|
||||
@@ -1701,6 +1704,25 @@
|
||||
<label for="<%= TdTotal.ClientID.ToString()%>">Total</label>
|
||||
<asp:Literal ID="TdTotal" runat="server" Visible="false"></asp:Literal>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div runat="server" id="DVCultivosCuadro" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<asp:DropDownList ID="DdlModalCultivosCuadro" CssClass=" form-control input-sm select2me" runat="server" DataTextField="Cuadro" Style="width: 100%; max-width: 600px;"
|
||||
DataValueField="CveCultivoCuadroDetalle" ValidationGroup="GrpProduccion">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalCultivosCuadro" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlModalCultivosCuadro"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El Cuadro <b>''Cuadro''</b> es necesario, por favor ingréselo." ValidationGroup="GrpProduccion">
|
||||
</asp:RequiredFieldValidator>
|
||||
<label runat="server" for="<%= DdlModalCultivosCuadro.ClientID.ToString()%>">Cultivo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LkAgregarDetalle" runat="server" CssClass="btn btn-primary" Text="Agregar"></asp:LinkButton>
|
||||
|
||||
@@ -288,12 +288,25 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property AplicaVigenciaCambioVigencia() As Boolean
|
||||
Get
|
||||
If ViewState("CveAFEdit") Is Nothing Then
|
||||
ViewState("CveAFEdit") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("CveAFEdit").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("CveAFEdit") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 AndAlso IfNull(Request("Regenera"), "").ToString = "1" Then
|
||||
RegeneraRM(Request("CveMovimiento").ToString.ToEntero, 119)
|
||||
Exit Sub
|
||||
@@ -333,7 +346,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
divGuia.Visible = True
|
||||
End Select
|
||||
|
||||
|
||||
If Request("CveMovimiento") IsNot Nothing AndAlso Request("CveMovimiento").ToString.ToEntero > 0 Then
|
||||
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
LnkGenerarVirtual.Visible = True
|
||||
@@ -367,6 +379,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ActivaConsumoInterno()
|
||||
End If
|
||||
|
||||
If Request("CveEntregaAlmacen") IsNot Nothing AndAlso Request("CveEntregaAlmacen").ToString.ToEntero > 0 Then
|
||||
CargaDatosEntregaAlmacen(Request("CveEntregaAlmacen").ToString.ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
'BLOQUEA PERMISOS
|
||||
BtnGuardar.Enabled = PermiteGuardar()
|
||||
BtnEliminar.Enabled = PermiteEliminar()
|
||||
@@ -494,6 +511,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
dt.Columns.Add("Observaciones")
|
||||
dt.Columns.Add("CountMovimientoEntradaDetalle")
|
||||
dt.Columns.Add("TotalExtranjero", Type.GetType("System.Double"))
|
||||
dt.Columns.Add("CveCultivoCuadroDetalle", Type.GetType("System.Int32"))
|
||||
|
||||
CargaGVM(dt)
|
||||
|
||||
@@ -545,15 +563,16 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
|
||||
'Llenar el dropdownlist de almacén
|
||||
If Not IfNull(Request("CI"), -1).ToString.ToEntero > 0 Then
|
||||
If Not IfNull(Request("CI"), -1).ToString.ToEntero > 0 AndAlso Not IfNull(Request("CveEntregaAlmacen"), -1).ToString.ToEntero > 0 Then
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
'ElseIf UsuarioActual.CveUsuario.Contiene(1) Then
|
||||
' DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11) or CveAlmacen = 651e") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If IfNull(Request("CI"), -1).ToString.ToEntero > 0 And UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)")
|
||||
End If
|
||||
|
||||
DdlAlmacenInventarioFisico.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacenCambioVigencias.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)")
|
||||
@@ -570,7 +589,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlAlmacenInventarioFisico.DataBind()
|
||||
DdlAlmacenCambioVigencias.DataBind()
|
||||
|
||||
If IsNothing(Request("CveMovimiento")) Then
|
||||
If IsNothing(Request("CveMovimiento")) And IsNothing(Request("CveEntregaAlmacen")) Then
|
||||
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
DdlAlmacen_SelectedIndexChanged(DdlAlmacen, EventArgs.Empty)
|
||||
End If
|
||||
@@ -656,8 +675,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
GvM.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Mov.GetMovimientos(tCveMovimiento, pCveConcepto, pFolio, UsuarioActual.CveEmpresa) AndAlso Mov.DtResultados.Rows.Count = 1 Then
|
||||
|
||||
CveMovimiento = Mov.CveMovimiento
|
||||
@@ -668,7 +685,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Folio = Mov.Folio
|
||||
Dim drM As DataRow = DtMov.Rows(0)
|
||||
|
||||
|
||||
If DtMov.Rows(0)("CveConcepto").ToString.ToEntero = 2 Then
|
||||
HplTraspaso.Visible = True
|
||||
HplTraspaso.NavigateUrl = $"/Inventarios/TraspasoAlmacen.aspx?CveEntrada={DtMov.Rows(0)("CveMovimiento").ToString}"
|
||||
@@ -771,6 +787,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
HdnIdPoliza.Value = Mov.IDPoliza.ToString
|
||||
HplImprimir.Visible = True
|
||||
HplImprimir.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
HplImprimirResumen.Visible = True
|
||||
HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
|
||||
|
||||
CveCompra = Mov.CveCompra
|
||||
CveConcepto = Mov.CveConcepto
|
||||
|
||||
@@ -1044,6 +1066,32 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatosEntregaAlmacen(CveEntregaAlmacen As Integer)
|
||||
'RECARGA ALMACENES SOLO DE recepcion de usados
|
||||
DdlAlmacen.Items.Clear()
|
||||
DdlAlmacen.DataBind()
|
||||
Dim dttA As DataTable = Nothing
|
||||
dttA = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,22,27)")
|
||||
|
||||
DdlAlmacen.DataSource = dttA
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.SelectedIndex = 1 'toma el primer renglón
|
||||
|
||||
Dim ObjGenerales As New ClsGenerales()
|
||||
|
||||
If (ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen)) Then
|
||||
|
||||
For Each dr As DataRow In ObjGenerales.DtResultados.Rows
|
||||
AddNew(dr("CvePS").ToString.ToEntero, dr("CodigoPS").ToString, dr("CveUnidadMedida").ToString.ToEntero, dr("Abreviatura").ToString, dr("Cantidad").ToString.ToDecimal,
|
||||
0, "", "", "", "", "E", "", MinFecha, 0, "")
|
||||
Next
|
||||
End If
|
||||
ObjGenerales.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub BloqueaEdicionEncabezado()
|
||||
|
||||
|
||||
@@ -1291,7 +1339,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDecimal,
|
||||
txtPrecio.Text.ToDecimal, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text,
|
||||
TxtnLote.Text.Trim, TxtnFechaCaducidad.Text.ToDate, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text)
|
||||
TxtnLote.Text.Trim, TxtnFechaCaducidad.Text.ToDate, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.Toentero)
|
||||
LimpiarAgregar()
|
||||
|
||||
txtCantidad.Text = ""
|
||||
@@ -1302,6 +1350,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
DdlModalCultivosCuadro.SelectedValueExist(-1)
|
||||
|
||||
RegistraScript("CodigoAF = "";")
|
||||
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(105).ToString = "1" Then
|
||||
@@ -1315,7 +1365,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Decimal, PU As Decimal, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True)
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Decimal, PU As Decimal, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True, Optional CveCultivoCuadroDetalle As Integer = -1)
|
||||
|
||||
If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
|
||||
|
||||
Dim Valido As Boolean = True
|
||||
@@ -1408,6 +1459,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
registro.Item("FechaCaducidad") = FechaCaducidad
|
||||
registro.Item("Observaciones") = Observaciones
|
||||
registro.Item("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString
|
||||
registro.Item("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle
|
||||
|
||||
DtMovimientos.Rows.Add(registro)
|
||||
|
||||
If CargarGV Then
|
||||
@@ -1499,13 +1552,13 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If GlobalDTInvConceptos.FiltraParametros(String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue.ToEntero)).Rows.Count > 0 AndAlso GlobalDTInvConceptos.FiltraParametros(String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue.ToEntero)).Rows(0)("Origen").ToString.ToEntero < 0 Then
|
||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=If(Dr("Serie").ToString = "", "-1", Dr("Serie").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString)) >= Dr("Cantidad").ToString.ToDouble Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
|
||||
Mensaje = "Error al Agregar los nuevos movimientos"
|
||||
ErrorMovInv = True : Exit For
|
||||
End If
|
||||
Else
|
||||
If UsuarioActual.TienePermisoProceso(114) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
|
||||
Mensaje = "Error al Agregar los nuevos movimientos"
|
||||
ErrorMovInv = True : Exit For
|
||||
End If
|
||||
@@ -1515,7 +1568,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
|
||||
Mensaje = "Error al Agregar los nuevos movimientos"
|
||||
ErrorMovInv = True : Exit For
|
||||
End If
|
||||
@@ -1632,7 +1685,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim FechaCaducidadVal As Date = If(Dr("AplicaCaducidad").ToString = "True", Dr("FechaCaducidad").ToString.ToDate, MinFecha)
|
||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=If(Dr("Serie").ToString = "", "-1", Dr("Serie").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString), FechaCaducidad:=FechaCaducidadVal) >= Dr("Cantidad").ToString.ToDouble Then
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=FechaCaducidadVal, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=FechaCaducidadVal, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -1650,7 +1703,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Else
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(114) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -1684,7 +1737,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -1919,7 +1972,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If Not ErrorAC And Not ErrorMovInv Then
|
||||
Dim Msg As New StringBuilder
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then
|
||||
@@ -2163,6 +2216,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If DdlConcepto.Items.FindByValue("3") Is Nothing Then
|
||||
DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 2, 2, DdlConcepto.Items.Count), New ListItem("Salida Almacen ", "3"))
|
||||
End If
|
||||
If DdlConcepto.Items.FindByValue("45") Is Nothing Then
|
||||
DdlConcepto.Items.Insert(If(DdlConcepto.Items.Count >= 2, 2, DdlConcepto.Items.Count), New ListItem("Salida de Usado ", "45"))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -3289,6 +3345,24 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
TrSubProyectoActivoFijo.Visible = True
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, "Seleccione Uno")
|
||||
|
||||
DVCultivosCuadro.Visible = True
|
||||
CargaCultivos()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaCultivos()
|
||||
DdlModalCultivosCuadro.Items.Clear()
|
||||
DdlModalCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue}")
|
||||
DdlModalCultivosCuadro.DataBind()
|
||||
DdlModalCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -3752,6 +3826,35 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Protected Sub LnkCambioVigencia_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambiarVigencias"))
|
||||
|
||||
TxtCantCambio.Text = ""
|
||||
TxtSerieCambio.Text = ""
|
||||
TxtFechaCambio.Text = Now.ToString("dd/MM/yyyy")
|
||||
TxtObsCambioVigencia.Text = ""
|
||||
|
||||
Th5.Visible = False
|
||||
Th6.Visible = False
|
||||
Th7.Visible = False
|
||||
Th8.Visible = False
|
||||
|
||||
|
||||
Td5.Visible = False
|
||||
Td6.Visible = False
|
||||
Td7.Visible = False
|
||||
Td8.Visible = False
|
||||
|
||||
DdlPSCambioSalida.txtText.Value = ""
|
||||
DdlPSCambioSalida.txtValue.Value = ""
|
||||
|
||||
DdlSeccionCambio.SelectedValueExist(-1)
|
||||
DdlAlmacenCambioVigencias.SelectedValueExist(-1)
|
||||
|
||||
|
||||
AplicaVigenciaCambioVigencia = False
|
||||
|
||||
UpCambioSalida.Update()
|
||||
UpModalCambiarVigencias.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "ENTRADAS"
|
||||
@@ -3984,15 +4087,47 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
#Region "CAMBIO VIGENCIA"
|
||||
Private Sub LnkAddSalidaCambio_Click(sender As Object, e As EventArgs) Handles LnkAddSalidaCambio.Click
|
||||
|
||||
If Not DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If AplicaVigenciaCambioVigencia And TxtSerieCambio.Text.Trim.Length = 0 Then
|
||||
Alert("Es necesario especificar la serie del producto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
AddPSCambioSalida(DdlPSCambioSalida.SelectedValue.ToEntero, TxtCantCambio.Text.ToDouble)
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPSCambioSalida_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
Td6.Visible = False
|
||||
Th6.Visible = False
|
||||
|
||||
If DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Using ObjPS As New ClsProductosServicios()
|
||||
If ObjPS.GetPS(DdlPSCambioSalida.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
AplicaVigenciaCambioVigencia = If(ObjPS.DtResultados.Rows(0)("AplicaSerie").ToString = "", False, Boolean.Parse(ObjPS.DtResultados.Rows(0)("AplicaSerie").ToString))
|
||||
|
||||
Td6.Visible = AplicaVigenciaCambioVigencia
|
||||
Th6.Visible = AplicaVigenciaCambioVigencia
|
||||
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpCambioSalida.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub AddPSCambioSalida(CvePS As Integer, Cantidad As Double)
|
||||
If DdlAlmacenCambioVigencias.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlPSCambioSalida.SelectedText = "" : Exit Sub
|
||||
|
||||
@@ -4004,10 +4139,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim CodigoPS As String = ""
|
||||
Dim PS As String = ""
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacenSalida.SelectedValue.ToEntero
|
||||
Dim Serie As String = If(TxtSerieSalida.Text = "", "", TxtSerieSalida.Text)
|
||||
Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text)
|
||||
Dim Caducidad As String = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text)
|
||||
Dim CveSeccionAlmacen As Integer = DdlSeccionCambio.SelectedValue.ToEntero
|
||||
Dim Serie As String = If(TxtSerieCambio.Text = "", "", TxtSerieCambio.Text)
|
||||
Dim Lote As String = If(TxtLoteCambio.Text = "", "", TxtLoteCambio.Text)
|
||||
Dim Caducidad As String = If(TxtCaducidadCambio.Text = "", MinFecha.ToShortDateString, TxtCaducidadCambio.Text)
|
||||
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
|
||||
If dr IsNot Nothing Then
|
||||
@@ -4328,6 +4463,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
Private Sub BtnGuardarCambiosVigencia_Click(sender As Object, e As EventArgs) Handles BtnGuardarCambiosVigencia.Click
|
||||
|
||||
|
||||
|
||||
If GvSalidasCambioVigencia.Rows.Count = 0 Then
|
||||
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -4401,7 +4538,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ImporteConcepto += PUEntrada * Dr("Cantidad").ToString.ToDecimal()
|
||||
|
||||
'INSERTA EL MOVIMIENTO DE ENTRADA
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUMVigencia").ToString.ToEntero, Dr("CvePSVigencia").ToString.ToEntero, PUEntrada, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUMVigencia").ToString.ToEntero, Dr("CvePSVigencia").ToString.ToEntero, PUEntrada, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
|
||||
Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
|
||||
Mensaje = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
@@ -4929,6 +5067,18 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'#End Region
|
||||
|
||||
Protected Sub LkAgregar_Click() Handles LnkAgregarProducto.Click
|
||||
|
||||
If EsConsumoInterno And UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe seleccionar un Centro de Constos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
CargaCultivos()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
limpiarModalDetalle()
|
||||
UpAgregar.Update()
|
||||
RegistraScript("$('#ModalAgregar').modal()")
|
||||
@@ -4939,7 +5089,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDouble, DdlUnidad.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDouble, CveAFEdit,
|
||||
CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text,
|
||||
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=DdlModalCultivosCuadro.SelectedValue.ToEntero) Then
|
||||
Alert("Error al Actualizar los movimientos")
|
||||
Else
|
||||
Alert("Movimiento actualizado correctamente")
|
||||
@@ -4967,6 +5117,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
DdlSeccionAlmacen.ClearSelection()
|
||||
LkAgregarDetalle.Text = "Agregar"
|
||||
DdlModalCultivosCuadro.SelectedValueExist(-1)
|
||||
If DdlMonedaTC.SelectedValue.ToEntero = 2 Then
|
||||
VisualizaPUExtranjero(UsuarioActual.TienePermisoProceso(201))
|
||||
Else
|
||||
@@ -5256,7 +5407,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
@@ -5321,4 +5472,5 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Public Property FolioVirtual As String
|
||||
Public Property TieneError As Boolean
|
||||
End Class
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1810,6 +1810,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ObjConta.Dispose()
|
||||
ObjVentas.Dispose()
|
||||
ObjEventos.Dispose()
|
||||
'' identificar que productos no están completos.
|
||||
CargaVentaPorSurtir(CveVentaSurtir)
|
||||
CargaPendientes()
|
||||
Alert("Ha sido cambiada la informacion de existencias de la venta actual, se han recargado la información.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2329,13 +2330,33 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
|
||||
Dim Serie As String = RowGarantia("Comprobante").ToString
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie, CveVentaDetalle:=RowGarantia("CveVentaDetalle").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
End If
|
||||
TotalGarantia += (RowGarantia("Cantidad").ToString().ToDecimal() * PU)
|
||||
Next
|
||||
|
||||
''se registra
|
||||
'If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", -1, CveMovimientoGarantia, TotalGarantia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
|
||||
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Gar", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrada Garantía", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CvePrePolizaTraspaso > 0 Then
|
||||
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, TotalGarantia, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, TotalGarantia, TxtObservaciones.Text, 95, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' TERMINA: GARANTIAS
|
||||
|
||||
@@ -12,6 +12,19 @@
|
||||
.MultiLineTextBox {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.truncate {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 750px !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
@@ -326,13 +339,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" runat="server" id="Div4" >
|
||||
<asp:CheckBox ID="ChkEmitirPorteRec" runat="server" Text="Carta Porte" />
|
||||
<asp:CheckBox ID="ChkEmitirPorteRec" runat="server" Text="Carta Porte" Checked="true" />
|
||||
<label for="<%= ChkEmitirPorteRec.ClientID.ToString()%>"> Emitir:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="Div5">
|
||||
</div>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary" ID="LnkGeneraRecoleccion" OnClick="LnkGeneraRecoleccion_Click">Recoleccion</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary" ID="LnkGeneraRecoleccion" OnClick="LnkGeneraRecoleccion_Click">Recolección</asp:LinkButton>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -341,48 +354,71 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<asp:GridView ID="gvR" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveEntregaAlmacen,Orden,CveDireccionOrigen,CveSubProyecto"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de recolecciones"
|
||||
<asp:GridView ID="gvR" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvR_RowDataBound"
|
||||
DataKeyNames="CveEntregaAlmacen,Orden,CveDireccionOrigen,CveSubProyecto,Estatus,CveTimbre"
|
||||
EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="3%" HeaderStyle-Width="3%">
|
||||
<asp:TemplateField ItemStyle-Width="3%" HeaderStyle-Width="3%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" Checked="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="SerieFolio" DataField="Serie Folio" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="80px" HeaderStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFechaEntrega" runat="server" Text='<%# Eval("FechaEntrega", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LblFecha" runat="server" Text='<%# Eval("FechaEntrega", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<%--<asp:BoundField HeaderText="SerieFolio" DataField="Serie Folio" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField HeaderText="Fecha Límite" ItemStyle-Width="80px" HeaderStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFechaEntrega" runat="server" Text='<%# Eval("FechaLimite", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Centro" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblCC" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="5%" HeaderStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolio" runat="server" Text='<%# Eval("FolioReferencia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente" HeaderStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 150px;">
|
||||
<asp:Literal ID="LblNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Contacto" HeaderStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Sucursal" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblContacto" runat="server" Text='<%# Eval("Contacto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Dirección" DataField="Direccion" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:TemplateField HeaderText="Opciones">
|
||||
<asp:TemplateField HeaderText="Referencia" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEditar" runat="server" OnClick="LnkGvDatosRecoleccionEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CausesValidation="False" CssClass="btn btn-circle btn-xs blue" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEliminar" runat="server" CssClass="btn btn-circle btn-xs red" OnClick="LnkGvDatosRecoleccionEliminar_Click" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la recolección?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:Literal ID="LblRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dirección" >
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 150px;">
|
||||
<asp:Literal ID="LblDir" runat="server" Text='<%# Eval("Direccion") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEditar" runat="server" Visible="false" OnClick="LnkGvDatosRecoleccionEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CausesValidation="False" CssClass="btn btn-circle btn-xs blue" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEliminar" runat="server" Visible="false" CssClass="btn btn-circle btn-xs red" OnClick="LnkGvDatosRecoleccionEliminar_Click" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la recolección?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
@@ -397,8 +433,7 @@
|
||||
|
||||
<div class="row" runat="server" id="DivGvR2" visible="false">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GvR2" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveEntregaAlmacen,FechaIng,Nombre,NombreComercial,TipoDocto,Orden,CveDireccionOrigen,CveSubProyectoOrigen"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de recolecciones"
|
||||
@@ -489,45 +524,29 @@
|
||||
<asp:Label runat="server" ID="LblSubProyectoRecoleccion" AssociatedControlID="DdlSubProyectoRecoleccion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<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="TxtFechaLimite" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<div class="col-md-5">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaLimite" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaLimite" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaLimite" runat="server" TargetControlID="TxtFechaLimite" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaLimite" TargetControlID="TxtFechaLimite" PopupButtonID="ImgFechaLimite" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaLimite" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaLimite" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLimite" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaLimite" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaLimite" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLimite" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" ID="Label3" AssociatedControlID="TxtFechaLimite" Text="Fecha Límite"></asp:Label>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaLimite" runat="server" TargetControlID="TxtFechaLimite" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaLimite" TargetControlID="TxtFechaLimite" PopupButtonID="ImgFechaLimite" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaLimite" runat="server" ControlToValidate="TxtFechaLimite" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaLimite" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLimite" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaLimite" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaLimite" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLimite" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtFechaLimite.ClientID.ToString()%>"> F. Entrega:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:TextBox runat="server" ID="TxtFolioReferencia" CssClass="form-control" Width="100%" ></asp:TextBox>
|
||||
<asp:Label runat="server" ID="Label1" AssociatedControlID="TxtFolioReferencia" Text="Folio"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:TextBox runat="server" ID="TxtReferencia" CssClass="form-control" Width="100%" ></asp:TextBox>
|
||||
<asp:Label runat="server" ID="Label2" AssociatedControlID="TxtReferencia" Text="Referencia"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class=" col-md-6">
|
||||
@@ -554,6 +573,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:TextBox runat="server" ID="TxtFolioReferencia" CssClass="form-control" Width="100%" ></asp:TextBox>
|
||||
<asp:Label runat="server" ID="Label1" AssociatedControlID="TxtFolioReferencia" Text="Folio"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:TextBox runat="server" ID="TxtReferencia" CssClass="form-control" Width="100%" ></asp:TextBox>
|
||||
<asp:Label runat="server" ID="Label2" AssociatedControlID="TxtReferencia" Text="Referencia"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class=" col-md-2">
|
||||
|
||||
@@ -11,8 +11,7 @@ using System.Text;
|
||||
|
||||
public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
|
||||
|
||||
|
||||
DataTable DTGenerarDocumentos
|
||||
{
|
||||
get {
|
||||
@@ -379,11 +378,10 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
}
|
||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
CargaDatos();
|
||||
CargaDatosRecoleccion();
|
||||
DdlChofer.SelectedValueExist("-1");
|
||||
DdlUnidadCamion.SelectedValueExist("-1");
|
||||
ChkEmitirCartaPorte.Checked = false;
|
||||
|
||||
|
||||
SeleccionEntrega = false;
|
||||
SeleccionarGenerar(1);
|
||||
UpDatos.Update();
|
||||
@@ -437,6 +435,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
TabRecoleccion.Visible = UsuarioActual.Empresa.Funcionalidad(531)=="1";
|
||||
TxtFechaLimite.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
|
||||
CargarCentrosDeCosto(null, DdlSubProyectoRecoleccion, null, LblSubProyectoRecoleccion);
|
||||
@@ -704,7 +703,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
if (ObjClientes.DireccionEnvioGet(-1, DdlModalRecoleccionCliente.SelectedValue.ToEntero(), -1))
|
||||
{
|
||||
DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados;
|
||||
DdlmodalRecoleccionDireccion.DataSource = ObjClientes.DtResultados.FiltraParametros("CveSubProyecto = " + DdlSubProyectoRecoleccion.SelectedValue.ToEntero());
|
||||
}
|
||||
ObjClientes.Dispose();
|
||||
}
|
||||
@@ -816,7 +815,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
if( CveEntregaAlmacen == -1)
|
||||
{
|
||||
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",TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 1,0,1) ;
|
||||
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(DdlSubProyectoRecoleccion.SelectedValue.ToEntero(), DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1,-1, DdlChoferRec.SelectedValue.ToEntero(), DdlUnidadRec.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), fechallegada, "R",TxtFolioReferencia.Text, TxtReferencia.Text, TxtFechaLimite.Text.ToDate(), 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);
|
||||
@@ -837,15 +836,11 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
ProcesoOK = ObjGenerales.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen, DdlmodalRecoleccionDireccion.SelectedValue.ToEntero(), -1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ProcesoOK)
|
||||
{
|
||||
@@ -877,10 +872,8 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
ObjGenerales.Dispose();
|
||||
CargaDatosRecoleccion();
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
protected void LnkModalGvModalPSRecoleccionEliminar_Click(object sender, EventArgs e)
|
||||
@@ -889,8 +882,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer;
|
||||
|
||||
if (CveEntregaAlmacen > 0)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
int CveEntregaAlmacenDetalleEliminar = GvRow.DataKey("CveEntregaAlmacenDetalle").ToEntero();
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
@@ -907,8 +899,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
DTRecoleccion.Rows[DTIndex].Delete();
|
||||
DTRecoleccion.AcceptChanges();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
CargaDatosRecoleccionDetallePS();
|
||||
}
|
||||
|
||||
@@ -945,9 +936,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
LimpiarControlesPS();
|
||||
CargaDatosRecoleccionDetallePS();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private void LimpiarControlesPS()
|
||||
{
|
||||
TxtModalRecoleccionCantidad.Text = "";
|
||||
@@ -1026,5 +1015,26 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void gvR_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
LinkButton LnkEditar = e.Row.FCLinkButton("LnkGvDatosRecoleccionEditar");
|
||||
LinkButton LnkEliminar = e.Row.FCLinkButton("LnkGvDatosRecoleccionEliminar");
|
||||
|
||||
if (e.Row.DataKey("Estatus") == "0" || e.Row.DataKey("Estatus") == "")
|
||||
{
|
||||
LnkEditar.Visible = true;
|
||||
LnkEliminar.Visible = true;
|
||||
|
||||
}
|
||||
if (e.Row.DataKey("CveTimbre") != "")
|
||||
{
|
||||
e.Row.FCCheckBox("Chk").Visible = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1242,7 +1242,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
CveVenta = -1
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing Then
|
||||
|
||||
CargaDTDetalleRNC()
|
||||
@@ -1255,6 +1254,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
'Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia))
|
||||
CveVenta = Resp.CveVenta
|
||||
|
||||
If Resp.CveMovimientoUsado <= 0 Then
|
||||
Msg.Append("Error al guardar los movimientos de usados")
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dim Mensaje As String = ""
|
||||
@@ -1334,10 +1339,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC
|
||||
'If Not ErrorMovInv Then
|
||||
' ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True)
|
||||
'End If
|
||||
''GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC
|
||||
If Not ErrorMovInv Then
|
||||
ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -1433,12 +1438,12 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
Dim Concepto As String = ConceptoPoliza
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalida", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
Dim tCveConcepto As Integer = 278
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
@@ -2414,33 +2419,20 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||
Me.ObjRemisionNC.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||
Me.ObjRemisionNC.TipoDocto = "RNC"
|
||||
Me.ObjRemisionNC.RefDocto = ""
|
||||
Me.ObjRemisionNC.CveMesa = -1
|
||||
Dim Fecha As DateTime = TxtFecha.Text.ToDateTime()
|
||||
Me.ObjRemisionNC.Fecha = Fecha
|
||||
Me.ObjRemisionNC.CvePrePoliza = -1
|
||||
Me.ObjRemisionNC.FechaPago = Fecha
|
||||
Me.ObjRemisionNC.MotivoDescuento = ""
|
||||
Me.ObjRemisionNC.FechaEjecucion = Fecha
|
||||
Me.ObjRemisionNC.UsuarioCreo = UsuarioActual.Usuario
|
||||
Me.ObjRemisionNC.CveCondicionEntrega = -1
|
||||
Me.ObjRemisionNC.CondicionEntrega = ""
|
||||
Me.ObjRemisionNC.NumeroCuenta = ""
|
||||
Me.ObjRemisionNC.CondicionesPago = 0
|
||||
Me.ObjRemisionNC.FormaPago = 0
|
||||
Me.ObjRemisionNC.PedidoContrato = ""
|
||||
Me.ObjRemisionNC.NumeroContrato = ""
|
||||
Me.ObjRemisionNC.DescripcionContrato = ""
|
||||
Me.ObjRemisionNC.CveCorte = -1
|
||||
Me.ObjRemisionNC.TipoDocumento = "Remisión"
|
||||
'NUM 1- CARGO 2- BONIFICACION
|
||||
Me.ObjRemisionNC.Num1 = 1
|
||||
'NUM 0- USADO 1- AJUSTE/GARANTIA
|
||||
Me.ObjRemisionNC.Num2 = RblUsadosAjuste.SelectedValue.ToEntero()
|
||||
Me.ObjRemisionNC.Alfa1 = ""
|
||||
Me.ObjRemisionNC.Alfa2 = ""
|
||||
Me.ObjRemisionNC.Alfa3 = ""
|
||||
Me.ObjRemisionNC.CveContrato = -1
|
||||
|
||||
Me.ObjRemisionNC.ConvertirPesos = False
|
||||
Me.ObjRemisionNC.CveSubProyecto = CveSubProyecto
|
||||
Me.ObjRemisionNC.CveSubProyectoCobranza = CveSubProyecto
|
||||
@@ -2551,7 +2543,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Dim TotalCalculableImpuestos As Decimal = 0
|
||||
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||
@@ -2572,8 +2563,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Row("CvePS") = CvePS
|
||||
Row("Obs") = Obs
|
||||
|
||||
|
||||
|
||||
Dim DrPS As DataRow = Nothing
|
||||
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||
@@ -2583,7 +2572,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
DrPS("IEPSPorcentaje") = 0
|
||||
|
||||
'verifica si tiene ventaminima
|
||||
|
||||
@@ -69,6 +69,15 @@ Partial Class Inventarios_RepAlmacen
|
||||
End If
|
||||
objInv.Dispose()
|
||||
GVAlmacen.DataBind()
|
||||
CargaPermisos()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
|
||||
GVAlmacen.Columns(3).Visible = TienePermisoImportes
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
@@ -148,7 +148,8 @@
|
||||
<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>" />
|
||||
<asp:LinkButton ID="LnkCancelaTimbre" runat="server" OnClick="LnkCancelaTimbre_Click" AlternateText="Cancelar timbre" ToolTip="Cancelar timbre" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar cancelación?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="LnkCancelaTimbre" runat="server" OnClick="LnkCancelaTimbre_Click" AlternateText="Cancelar timbre" ToolTip="Cancelar timbre" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar cancelación?" data-btn-ok-label="si" />
|
||||
<asp:HyperLink ID="HplR" runat="server" visible="false" AlternateText="Registrar" ToolTip="Registrar entrada" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-location-arrow'></i>" />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
<ItemStyle HorizontalAlign="Left" Width="75px" />
|
||||
@@ -156,8 +157,8 @@
|
||||
|
||||
<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>" />
|
||||
<asp:LinkButton ID="LnkEditarDirOrigen" Visible="false" runat="server" OnClick="EditDireccionOrigen_Click" AlternateText="Editar" ToolTip="Actualizar 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="Actualizar dirección Destino" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-location-arrow'></i>" />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center" />
|
||||
<ItemStyle HorizontalAlign="Left" Width="50px" />
|
||||
|
||||
@@ -383,10 +383,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
if (GvRow.DataKey("CveCamionRemolque2").ToEntero() > 0)
|
||||
{
|
||||
DdlRemolque2.SelectedValueExist(GvRow.DataKey("CveCamionRemolque2"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
|
||||
|
||||
@@ -514,6 +511,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero();
|
||||
int CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero();
|
||||
int CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
string TimbreTipoDocto = GvRow.DataKey("TimbreTipoDocto").ToString();
|
||||
|
||||
|
||||
Timbrado ObjCancelacion = new Timbrado();
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
@@ -534,10 +533,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
//regenero el tmbre
|
||||
CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen : CveEntregaAlmacen, AplicaCP: true);
|
||||
|
||||
|
||||
|
||||
if (TimbreTipoDocto == "Tra")
|
||||
{
|
||||
CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true);
|
||||
}
|
||||
ProcesoOK = true;
|
||||
}
|
||||
}
|
||||
@@ -615,9 +614,7 @@ 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");
|
||||
@@ -629,18 +626,19 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
if (e.Row.DataKey("Estatus").ToEntero() == 0)
|
||||
{
|
||||
LnkEditar.Visible = true;
|
||||
LnkTimbrar.Visible = true;
|
||||
LnkTimbrar.Visible = UsuarioActual.TienePermisoProceso(338);
|
||||
|
||||
}
|
||||
|
||||
//if (e.Row.DataKey("TimbreTipoDocto") == "Man")
|
||||
//{
|
||||
// e.Row.FCLinkButton("LnkEditarDirOrigen").Visible = true;
|
||||
// e.Row.FCLinkButton("LnkEditarDirDestino").Visible = true;
|
||||
//}
|
||||
if (e.Row.DataKey("Tipo") == "R" && e.Row.DataKey("Estatus") == "1")
|
||||
{
|
||||
e.Row.FCHyperLink("HplR").Visible = true;
|
||||
e.Row.FCHyperLink("HplR").NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveEntregaAlmacen=" + e.Row.DBCampo("CveEntregaAlmacen");
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("Estatus").ToEntero() == 1)
|
||||
{
|
||||
LnkCancelaTimbre.Visible = true;
|
||||
LnkCancelaTimbre.Visible = UsuarioActual.TienePermisoProceso(338);
|
||||
|
||||
if (bool.Parse(e.Row.DataKey("AplicaCP")))
|
||||
{
|
||||
@@ -686,15 +684,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
default:
|
||||
e.Row.FCLabel("LtTipo").CssClass = "label label-sm label-warning";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargaPersonalChofer()
|
||||
{
|
||||
DdlModalChofer.Items.Clear();
|
||||
@@ -705,18 +698,10 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
DdlModalChofer.DataSource = ObjAcar.DtResultados;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ObjAcar.Dispose();
|
||||
|
||||
|
||||
DdlModalChofer.DataBind();
|
||||
|
||||
DdlModalChofer.Items.Insert(0, new ListItem("Seleccione Uno", "-1"));
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
@@ -743,7 +728,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
@@ -778,15 +762,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void DdlConfigAuto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ValidaConfiguracionVeiculo();
|
||||
}
|
||||
|
||||
|
||||
private void ValidaConfiguracionVeiculo()
|
||||
private void ValidaConfiguracionVeiculo()
|
||||
{
|
||||
DvRemolque1.Visible = false;
|
||||
DvRemolque2.Visible = false;
|
||||
@@ -802,7 +782,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
string Remolque = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" CveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue.ToEntero()}'");
|
||||
|
||||
|
||||
if (Remolque == "1")
|
||||
{
|
||||
RequiereRemolque = true;
|
||||
@@ -829,9 +808,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
MostrarRemolques = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (RequiereRemolque | MostrarRemolques)
|
||||
DvRemolque1.Visible = true;
|
||||
|
||||
@@ -840,7 +816,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
else
|
||||
DvConfiguracionVeiculo.Visible = true;
|
||||
|
||||
|
||||
UpModalEditarentrega.Update();
|
||||
}
|
||||
|
||||
@@ -857,13 +832,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
|
||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero()}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DdlRemolque2.DataBind();
|
||||
}
|
||||
catch { }
|
||||
|
||||
}
|
||||
else
|
||||
DvRemolque2.Visible = false;
|
||||
@@ -884,7 +857,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
if (RequiereRemolque & DdlRemolque1.SelectedValue.ToEntero() > 0)
|
||||
Respuesta = true;
|
||||
|
||||
|
||||
return Respuesta;
|
||||
}
|
||||
|
||||
@@ -899,7 +871,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1))
|
||||
DdlModalCamion.DataSource = ObjInv.DtResultados;
|
||||
|
||||
|
||||
if (ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2))
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados;
|
||||
}
|
||||
@@ -987,7 +958,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
CargaDirClienteColonia();
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
protected void DdlDirClienteEstado_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaDirClienteMunicipio();
|
||||
@@ -1001,13 +971,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
CargaDirClienteLocalidad();
|
||||
}
|
||||
|
||||
|
||||
protected void BtnDirClienteValidar_Click(object sender, EventArgs e)
|
||||
{
|
||||
DirClientevalidaCodigoPostal();
|
||||
}
|
||||
|
||||
|
||||
protected void DdlDirClienteColonia_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DirClientevalidaCodigoPostal();
|
||||
@@ -1110,10 +1078,8 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
|
||||
ModalActualizaDirecciones(CveTimbre);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void LnkAgregarDireccion_Click(object sender, EventArgs e)
|
||||
@@ -1126,8 +1092,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
CargaCombosDirecionesClientesSAT();
|
||||
TxtFechaLlegada.Text = "";
|
||||
|
||||
|
||||
|
||||
UpModalDVDireccionEnvio.Update();
|
||||
RegistraScript("$('#divAddDireccionEnvio').modal('show');");
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-right: 0px;">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="portlet xspadding light bordered infomov">
|
||||
<div class="col-md-6" runat="server" >
|
||||
<div class="portlet xspadding light bordered infomov" >
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
@@ -377,7 +377,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="portlet-body" >
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="max-width: 100px">Fecha</div>
|
||||
<div class="col-md-2">
|
||||
@@ -409,7 +409,7 @@
|
||||
<div class="row" style="margin-left: 0px; margin-right: 0px;">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="portlet smmallpadding light bordered infomov">
|
||||
<div class="portlet smmallpadding light bordered infomov" runat="server" id ="DVInformacionMoviminetoLiberacion" >
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
@@ -423,44 +423,43 @@
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
||||
<div class="rowpadding">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" id="LblTipo" runat="server" style="max-width: 155px">
|
||||
<label class="col-md-3 truncate" id="LblTipo" runat="server" style="max-width: 155px">
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-9">
|
||||
<asp:Label Text="" ID="LbTipoLiberacion" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">Almacén origen:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="col-md-3 truncate" style="max-width: 155px">Almacén origen:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:Label Text="" ID="LbAlmacenLiberacion" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">Almacén destino:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="col-md-3 truncate" style="max-width: 155px">Almacén destino:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlAlmacenDestinoLiberacion" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvAlmacenDestinoLiberacion" Display="None" ValidationGroup="GrpGuardarLiberacion" runat="server" ControlToValidate="DdlAlmacenDestinoLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Almacén destino''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAlmacenDestinoLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RfvAlmacenDestinoLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">Fecha:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="col-md-3 truncate" style="max-width: 155px">Fecha:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:Label Text="" ID="LbFechaLiberacion" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="max-width: 155px">
|
||||
<label class="col-md-3 truncate" style="max-width: 155px">
|
||||
Observaciones
|
||||
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtObservacionesLiberacion" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -476,6 +475,7 @@
|
||||
<asp:GridView ID="GvMLiberacion" OnRowCreated="GvMLiberacion_RowCreated" OnRowDataBound="GvMLiberacion_RowDataBound" runat="server" GridLines="none" CssClass="table table-striped table-hover Widthall" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CveUM,CvePS,Serie,Observaciones,PU,CveSeccionAlmacen,Lote,FechaCaducidad" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Figura" DataField="Figura" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<%-- <asp:BoundField HeaderText="Cant. Disponible" DataField="Cantidad" DataFormatString="{0:#,###,###.##}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:TemplateField HeaderText="Cant. Disponible" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
@@ -494,7 +494,7 @@
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" Width="80px" class="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -264,7 +264,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
''Almacen Destino
|
||||
Else
|
||||
'RESGUARDO
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) '.FiltraParametros("CveTipoAlmacen IN (1,2)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2)") ''almacen:material,herramientas,'.FiltraParametros("CveTipoAlmacen NOT IN (8)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'Almacen Destino
|
||||
@@ -281,13 +281,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
|
||||
''Almacen Destino
|
||||
DdlAlmacenDestinoLiberacion.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) '.FiltraParametros("CveTipoAlmacen IN (1,2)")
|
||||
DdlAlmacenDestinoLiberacion.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2)") ''almacen:material,herramientas,
|
||||
DdlAlmacenDestinoLiberacion.DataBind()
|
||||
DdlAlmacenDestinoLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
|
||||
CargaPS()
|
||||
End Sub
|
||||
Private Sub CargaPS()
|
||||
@@ -635,29 +632,66 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
#Region " CARGA RESGUARDOS PARA LIBERACION "
|
||||
|
||||
Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs)
|
||||
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
|
||||
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa <> 140 Then
|
||||
|
||||
|
||||
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
|
||||
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not DdlPersonalLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 1 Then
|
||||
Alert("Tiene que seleccionar un personal.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not DdlClienteLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 2 Then
|
||||
Alert("Tiene que seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
|
||||
GvMLiberacion.Columns(1).HeaderText = If(DdlTipo.SelectedValue.ToEntero = 1, "Personal", If(DdlTipo.SelectedValue.ToEntero = 2, "Cliente", "Proveedor"))
|
||||
|
||||
End If
|
||||
|
||||
If Not DdlPersonalLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 1 Then
|
||||
Alert("Tiene que seleccionar un personal.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not DdlClienteLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 2 Then
|
||||
Alert("Tiene que seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
If (DdlTipo.SelectedValue.ToEntero = 1 And DdlPersonalLiberacion.SelectedValue.ToEntero <= 0) Or (DdlTipo.SelectedValue.ToEntero = 2 And DdlClienteLiberacion.SelectedValue.ToEntero <= 0) Or (DdlTipo.SelectedValue.ToEntero = 3 And DdlProveedorLiberacion.SelectedValue.ToEntero <= 0) Then
|
||||
|
||||
DVInformacionMoviminetoLiberacion.Visible = False
|
||||
BtnGuardarLiberacion.Visible = False
|
||||
|
||||
GvMLiberacion.Columns(1).Visible = True
|
||||
Else
|
||||
DVInformacionMoviminetoLiberacion.Visible = True
|
||||
BtnGuardarLiberacion.Visible = True
|
||||
GvMLiberacion.Columns(1).Visible = False
|
||||
GvMLiberacion.Columns(1).HeaderText = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaResguardos()
|
||||
|
||||
|
||||
UpGridLiberacion.Update()
|
||||
UpGenerales.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaResguardos()
|
||||
Dim ObjInventario As New ClsInventarios()
|
||||
Dim Existencias As Double = 0
|
||||
|
||||
If ObjInventario.GetMovimientosDetallePorPersonal(DdlPersonalLiberacion.SelectedValue.ToEntero, DdlAlmacenLiberacion.SelectedValue.ToEntero, DdlClienteLiberacion.SelectedValue.ToEntero, DdlProveedorLiberacion.SelectedValue.ToEntero) Then
|
||||
If ObjInventario.GetMovimientosDetallePorPersonal(DdlPersonalLiberacion.SelectedValue.ToEntero, DdlAlmacenLiberacion.SelectedValue.ToEntero, DdlClienteLiberacion.SelectedValue.ToEntero, DdlProveedorLiberacion.SelectedValue.ToEntero, DdlTipo.SelectedValue.ToEntero) Then
|
||||
DtMovimientosLiberacion = ObjInventario.DtResultados
|
||||
|
||||
DtMovimientosLiberacion.Columns("No").AutoIncrement = True
|
||||
@@ -700,10 +734,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
Private Sub CargaGvMLiberacion()
|
||||
|
||||
GvMLiberacion.Columns(5).Visible = DtMovimientosLiberacion.MAX("Serie").ToString <> ""
|
||||
GvMLiberacion.Columns(6).Visible = DtMovimientosLiberacion.MAX("AplicaLote").ToString = "True"
|
||||
GvMLiberacion.Columns(7).Visible = DtMovimientosLiberacion.MAX("AplicaCaducidad").ToString = "True" ' .ToDate > MinFecha
|
||||
GvMLiberacion.Columns(8).Visible = DtMovimientosLiberacion.MAX("CveSeccionAlmacen").ToString.ToEntero > 0 Or DtMovimientosLiberacion.MAX("AplicaSeccion") = "True"
|
||||
GvMLiberacion.Columns(6).Visible = DtMovimientosLiberacion.MAX("Serie").ToString <> ""
|
||||
GvMLiberacion.Columns(7).Visible = DtMovimientosLiberacion.MAX("AplicaLote").ToString = "True"
|
||||
GvMLiberacion.Columns(8).Visible = DtMovimientosLiberacion.MAX("AplicaCaducidad").ToString = "True" ' .ToDate > MinFecha
|
||||
GvMLiberacion.Columns(9).Visible = DtMovimientosLiberacion.MAX("CveSeccionAlmacen").ToString.ToEntero > 0 Or DtMovimientosLiberacion.MAX("AplicaSeccion") = "True"
|
||||
|
||||
|
||||
GvMLiberacion.DataSource = DtMovimientosLiberacion
|
||||
@@ -876,7 +910,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSeccionAlmacen As Integer = 0
|
||||
Importe = ObjInventario.DtResultados.SUMD("Total").RoundAD
|
||||
Importe = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
|
||||
@@ -212,10 +212,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DivTransitorio2.Visible = True
|
||||
End If
|
||||
|
||||
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(141, 152, 158, 159, 160, 161, 162, 163) Then
|
||||
' ChkEmitirTimbrado.Visible = False
|
||||
' divEmitir.Visible = False
|
||||
'End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 2, 119, 140) Then
|
||||
|
||||
@@ -817,7 +817,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
#Region " GUARDAR "
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
If ChkEmitirCartaPorte.Checked Then
|
||||
If ChkTransitorio.Checked AndAlso ChkEmitirCartaPorte.Checked Then
|
||||
If DdlChofer.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe de seleccionar un chofer.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -3115,13 +3115,34 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim DrAlmO As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrAlmO("CveTipoAlmacen").ToString.ToEntero = 26 Then 'costeados
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (26) AND Estatus = 'Activo'")
|
||||
If ChkTransitorio.Checked Then
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (26) AND Estatus = 'Activo' ")
|
||||
Else
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (26) ")
|
||||
End If
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
ElseIf DrAlmO("CveTipoAlmacen").ToString.ToEntero = 22 Then 'Recepcion de Usados
|
||||
ElseIf DrAlmO("CveTipoAlmacen").ToString.Contiene("22") Then 'Recepcion de Usados
|
||||
|
||||
If ChkTransitorio.Checked Then
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ")
|
||||
Else
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22) ")
|
||||
End If
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
ElseIf DrAlmO("CveTipoAlmacen").ToString.Contiene("21") Then 'dev proveedor
|
||||
|
||||
If ChkTransitorio.Checked Then
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ")
|
||||
Else
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22) ")
|
||||
End If
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (21,22) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
@@ -3129,10 +3150,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Str As String
|
||||
If ChkTransitorio.Checked Then
|
||||
Str = "" ' String.Format(" AND CveSubProyecto <> {0} ", DrAlmO("CveSubProyecto")) 'RMF. pueden haber almacen que esten dentro de lamisma sucursal, pero que requeiren transitorio
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} AND Estatus = 'Activo' ", Str))
|
||||
Else
|
||||
Str = String.Format(" AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto"))
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} ", Str))
|
||||
End If
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) AND Estatus = 'Activo' {0} ", Str))
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
@@ -3246,11 +3269,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
|
||||
Protected Sub DdlConfigAuto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ValidaConfiguracionVeiculo()
|
||||
ValidaConfiguracionVehiculo()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaConfiguracionVeiculo()
|
||||
Private Sub ValidaConfiguracionVehiculo()
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user