-- merge SIGWEB
This commit is contained in:
@@ -744,9 +744,33 @@ Partial Class Inventarios_Consignaciones
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If DdlConcepto.SelectedValue = "11" Then
|
||||
|
||||
|
||||
|
||||
Dim ImportePrePoliza As Decimal = DtMovimientos.SUMD("Total")
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
||||
|
||||
Dim Concepto As String = "Consig"
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Entrada/Consignacion", 53, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrePoliza, "Entrada por Consignacion", 68, "Entrada por Consignacion", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImportePrePoliza, "Entrada por Consignacion", 337, "Entrada por Consignacion", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -879,9 +903,48 @@ Partial Class Inventarios_Consignaciones
|
||||
TextoError = "Ocurrió un Error al guardar los movimientos"
|
||||
Exit For
|
||||
Else
|
||||
MovimientosRealizados += 1
|
||||
|
||||
|
||||
Dim ImportePrePoliza As Decimal = Gvr.DataKey("PU").ToString.ToDecimal * Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDecimal
|
||||
|
||||
Dim MovAlmacen As Boolean = True
|
||||
|
||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & ConceptoDevolucion).ToEntero
|
||||
|
||||
If OrigenMov = 1 Then
|
||||
MovAlmacen = True
|
||||
Else
|
||||
MovAlmacen = False
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
||||
|
||||
Dim Concepto As String = "Consig"
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Consig", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, "Consig", 68, "Consig", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, "Consig", 337, "Consig", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
MovimientosRealizados += 1
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@ Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
|
||||
'Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
|
||||
Partial Class Inventarios_EntradasSalidas
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -345,9 +343,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
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
|
||||
End If
|
||||
|
||||
CargaDatos(Request("CveMovimiento").ToString.ToEntero)
|
||||
'CargaGvPaqueteria()
|
||||
@@ -708,6 +703,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.CveEmpresa = 140 AndAlso Mov.CveMovimientoVirtual <= 0 Then
|
||||
LnkGenerarVirtual.Visible = True
|
||||
End If
|
||||
|
||||
'DATOS DE CONSIGNACION
|
||||
If DtMov.Rows(0)("SerieFolio").ToString.Length > 0 Then
|
||||
RowConsignacion.Visible = True
|
||||
@@ -1830,9 +1829,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
||||
'Dim IdCuentaGasto As Integer = 0
|
||||
For Each Dr As DataRow In Dt.Rows
|
||||
Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion").ToString}").SUM("Total").ToDecimal.RoundSQL()
|
||||
Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").ToDecimal.RoundSQL()
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, Total, TxtObservaciones.Text.Trim, CveConceptoContable, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=Total, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, Total, Total, CveConceptoContable, TxtFolio.Text, TxtObservaciones.Text.Trim, IdCtaContableOtro, CveMovimientoAlmacen:=CveMovimiento, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Next
|
||||
@@ -3774,56 +3773,63 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
|
||||
If ObjInventario.Modulo.Contiene("M/CU") Then
|
||||
Contabilizable = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 278, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompra, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 289, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo.Contiene("Consig") Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 95, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
If ObjInventario.Modulo.Contiene("Consig") Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 95, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -4548,11 +4554,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
'MOVIMIENTOS
|
||||
If DtMovimientosCambioVigencias.Rows.Count > 0 Then
|
||||
FolioSalida = ObjInventario.GetFolioSiguiente(8, UsuarioActual.CveEmpresa)
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Fecha, FolioSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, Modulo:="ES/CV1")
|
||||
FolioSalida = ObjInventario.GetFolioSiguiente(47, UsuarioActual.CveEmpresa)
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 47, 1, Fecha, FolioSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, Modulo:="ES/CV1")
|
||||
|
||||
FolioEntrada = ObjInventario.GetFolioSiguiente(9, UsuarioActual.CveEmpresa)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 9, 1, Fecha, FolioEntrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ES/CV2")
|
||||
FolioEntrada = ObjInventario.GetFolioSiguiente(48, UsuarioActual.CveEmpresa)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 48, 1, Fecha, FolioEntrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ES/CV2")
|
||||
End If
|
||||
|
||||
|
||||
@@ -5298,7 +5304,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 36, 37), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV")
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 36, 37), 1, TxtFecha.text.todate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV")
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
|
||||
@@ -2992,7 +2992,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
|
||||
|
||||
If ObjVentas.GetVenta(CveVentaSurtir, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVentaSurtir, UsuarioActual.CveEmpresa, False) Then
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate ' If(TipoMovimiento <> 1, TxtFecha.Text.ToDate, ObjVentas.DtResultados(0)("Fecha").ToString().ToDate)
|
||||
Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||
Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString()
|
||||
|
||||
@@ -8,9 +8,24 @@
|
||||
Costo Indirecto
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCerrarFlete" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Cerrar Costo Indirecto" OnClick="LnkCerrarFlete_Click"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Cerrar Costo Indirecto?" data-btn-ok-label="si" Visible="false" />
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -94,6 +94,11 @@ Partial Class Compras_Fletes
|
||||
'HLOCFolio.NavigateUrl = If(HdnCveOC.Value.ToEntero > 0, $"/OC/OC.aspx?OC={HdnCveOC.Value}", $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}")
|
||||
'LbOCImporte.Text = $"{ObjInv.DtResultados.Rows(0)("TotalDocumento").ToString.FormatoNumero} {ObjInv.DtResultados.Rows(0)("Moneda").ToString}"
|
||||
|
||||
If ObjInv.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
|
||||
LnkCerrarFlete.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If ObjInv.GetFleteDetalle(CveFlete) Then
|
||||
DtCompras = ObjInv.DtResultados
|
||||
Else
|
||||
@@ -104,6 +109,9 @@ Partial Class Compras_Fletes
|
||||
GvComprasVinculadas.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("No se encontró el flete", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -434,4 +442,17 @@ Partial Class Compras_Fletes
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkCerrarFlete_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.UpdateFleteCierre(CveFlete, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
Alert("Costo Indirecto cerrado correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Fletes.aspx?CveFlete={CveFlete}"" ")
|
||||
End If
|
||||
|
||||
ObjInv.Dispose()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -587,25 +587,45 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
End If
|
||||
|
||||
'Dim Concepto As String = ConceptoPoliza
|
||||
'Dim CvePrePoliza = ObjConta.AddPrePolizas("RA-01", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim ImportePrePoliza As Decimal = 0D
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
|
||||
End If
|
||||
|
||||
|
||||
Dim MovAlmacen As Boolean = True
|
||||
|
||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 19).ToEntero
|
||||
|
||||
If OrigenMov = 1 Then
|
||||
MovAlmacen = True
|
||||
Else
|
||||
MovAlmacen = False
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
||||
|
||||
Dim Concepto As String = "ARMPAQ2"
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("ARMPAQ1/ARMPAQ2", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
|
||||
' Retorno = False
|
||||
'End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, "ARMPAQ2", 68, "ARMPAQ2", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=True) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorInventario, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
|
||||
' Retorno = False
|
||||
'End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, "ARMPAQ1", 68, "ARMPAQ1", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImportePrePoliza, Contabilizable:=True) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
' If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
' GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
' Retorno = False
|
||||
' End If
|
||||
'End If
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 2 'DESARMADO
|
||||
|
||||
@@ -688,6 +708,49 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ImportePrePoliza As Decimal = 0D
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
|
||||
End If
|
||||
|
||||
|
||||
Dim MovAlmacen As Boolean = True
|
||||
|
||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 4).ToEntero
|
||||
|
||||
If OrigenMov = 1 Then
|
||||
MovAlmacen = True
|
||||
Else
|
||||
MovAlmacen = False
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
||||
|
||||
Dim Concepto As String = "ARMPAQ2"
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("ARMPAQ1/ARMPAQ2", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, "ARMPAQ4", 68, "ARMPAQ4", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=True) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, "ARMPAQ3", 68, "ARMPAQ3", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImportePrePoliza, Contabilizable:=True) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
@@ -285,8 +285,8 @@
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GVPendientes" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" DataKeyNames="CveCompra" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="200" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="RazonSocial" ItemStyle-Width="45%" />
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="RazonSocial" />
|
||||
<asp:TemplateField HeaderText="Serie-Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblSerieFolio" runat="server" Text='<%# Eval("SerieFolio")%>' />
|
||||
@@ -297,7 +297,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton Text="Surtir" ID="BtnSurtir" CommandArgument="-1" OnClick="BtnSurtir_Click" CssClass="btn btn-primary input-sm" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="20%" />
|
||||
<ItemStyle HorizontalAlign="Center" Width="100px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -809,7 +809,7 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Ingresar producto con Serie/Lote y Fecha de Vencimiento"></asp:Label>
|
||||
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Ingresar producto con Serie"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -824,12 +824,7 @@
|
||||
<td >
|
||||
<asp:Label Text="" ID="LbCantidad" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr />
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80px">Serie:</td>
|
||||
<td>
|
||||
@@ -839,20 +834,19 @@
|
||||
|
||||
<asp:CustomValidator id="ReVTxtSerie" runat="server" ControlToValidate="TxtSerie" Display="None" ClientValidationFunction="TamanioSerie"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> debe tener un minimo de 6 caracteres." ValidationGroup="GrpAgregaSerie" />
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="ReVTxtSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="ReVTxtSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
<td><asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BtnAgregarPS" OnClick="BtnAgregarPS_Click" ValidationGroup="GrpAgregaSerie" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<asp:GridView ID="GvSerie" runat="server" EmptyDataText="Aun no hay registros." DataKeyNames="Serie" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="250" data-freezerows="1" GridLines="None">
|
||||
<asp:GridView ID="GvSerie" runat="server" EmptyDataText="Aun no hay registros." DataKeyNames="Serie" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover table-advance mysmallbtn Widthall ScrollAD " data-height="250" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Serie-Folio" DataField="Serie" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="40%" />
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20%"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -434,6 +434,42 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CveImportacionSeleccionada As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveImportacionSeleccionada") Is Nothing Then
|
||||
ViewState("CveImportacionSeleccionada") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("CveImportacionSeleccionada").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveImportacionSeleccionada") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CveFleteSeleccionado As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveFleteSeleccionado") Is Nothing Then
|
||||
ViewState("CveFleteSeleccionado") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("CveFleteSeleccionado").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveFleteSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -561,7 +597,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Recargaporalmacenes()
|
||||
RecargaporAlmacenes()
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaporAlmacenes()
|
||||
@@ -858,7 +894,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCLinkButton("BtnSurtir").CommandArgument = e.Row.DBCampo("CveCompra")
|
||||
|
||||
If e.Row.DBCampo("TipoDocto").ToString.Contiene({"Fac"}) And e.Row.DBCampo("EstatusAlmacen").ToString.ToEntero = 0 Then
|
||||
If e.Row.DBCampo("TipoDocto").ToString.Contiene({"Fac"}) And e.Row.DBCampo("EstatusAlmacen").ToString = "0" Then
|
||||
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary input-sm"
|
||||
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left'></i> Recibir"
|
||||
Else
|
||||
@@ -867,9 +903,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
Dim Css = "Texto"
|
||||
Dim Liga = $"/Compras/Compras.aspx?&CveCompra={e.Row.DataKey("CveCompra")}"
|
||||
e.Row.FCLabel("LblSerieFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblSerieFolio").Text + "</a>"
|
||||
e.Row.FCLabel("LblSerieFolio").Text = String.Format("<a class='Texto' href='/Compras/Compras.aspx?CveCompra={0}'>{1} </a>", e.Row.DataKey("CveCompra"), e.Row.FCLabel("LblSerieFolio").Text)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -921,6 +955,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
UpDatosCompra.Update()
|
||||
|
||||
|
||||
CveImportacionSeleccionada = -1
|
||||
CveFleteSeleccionado = -1
|
||||
|
||||
If TxtOC.Text <> "" Then
|
||||
LtDocumento.Text = "ORDEN DE COMPRA"
|
||||
CargaOC()
|
||||
@@ -1242,6 +1279,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CreaDtLoteDetalle()
|
||||
CreaDTInv(ObjInventario.DtResultados)
|
||||
BtnGuardar.Visible = True
|
||||
|
||||
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
CveImportacionSeleccionada = DdlFolioImportacion.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If DtInv Is Nothing OrElse DtInv.Rows.Count = 0 Then
|
||||
@@ -1298,6 +1340,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CreaDtLoteDetalle()
|
||||
CreaDTInv(ObjInventario.DtResultados)
|
||||
BtnGuardar.Visible = True
|
||||
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
CveFleteSeleccionado = DdlFletes.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If DtInv Is Nothing OrElse DtInv.Rows.Count = 0 Then
|
||||
@@ -1712,13 +1758,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
|
||||
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
||||
|
||||
|
||||
GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvSerie.DataBind()
|
||||
|
||||
'VALIDA QUE SIGA AGREGANDO
|
||||
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
|
||||
BtnAgregarPS.Enabled = False
|
||||
BtnAgregarPS.Enabled = True
|
||||
If CerrarCompletado Then
|
||||
RegistraScript("$('#DivSerie').modal('hide');")
|
||||
End If
|
||||
@@ -1761,9 +1806,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs)
|
||||
AgregaSerie(TxtSerie.Text.Replace(" ", String.Empty), 1)
|
||||
End Sub
|
||||
Private Sub AgregaSerie(Serie As String, Tipo As Integer)
|
||||
'SerieLote = SerieLote.Trim.Replace(" ", " ")
|
||||
|
||||
Private Sub AgregaSerie(Serie As String, Tipo As Integer, Optional AlertaSonido As Boolean = True, Optional CargaMasivaSeries As Boolean = False)
|
||||
If Serie.Trim = "" Then
|
||||
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -1774,10 +1817,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'VALIDACION DE SERIES DUPLICADAS
|
||||
Dim MensajeAlert As New StringBuilder
|
||||
Dim DtDuplicado As New DataTable
|
||||
Dim DtSeriesNuevas As New DataTable
|
||||
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
|
||||
|
||||
'If CvePSS > 0 And CvePSSerie = 0 Then CvePSSerie = CvePSS
|
||||
|
||||
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimero("", "PS")
|
||||
@@ -1786,12 +1825,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DtDuplicado = DtDatosDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Serie = '{Serie}'")
|
||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado ya se encuentra ingresado.")
|
||||
Continue For
|
||||
End If
|
||||
|
||||
DtDuplicado = DtSeriesNuevas.FiltraParametros($"Serie = '{Serie}'")
|
||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado se encuentra duplicado.")
|
||||
TxtSerie.Text = ""
|
||||
TxtSerie.Focus()
|
||||
Continue For
|
||||
End If
|
||||
|
||||
@@ -1800,27 +1835,21 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
MensajeAlert.Append($"<br/> El numero de Serie <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.")
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim Row = DtSeriesNuevas.NewRow
|
||||
Row("Serie") = Serie
|
||||
DtSeriesNuevas.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
If MensajeAlert.ToString <> "" Then
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.MsgAdvertencia)
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.ToastError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim MensajeSinExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Index = 0
|
||||
|
||||
For Each Serie In SeriesArreglo
|
||||
If Serie <> "" Then
|
||||
|
||||
|
||||
|
||||
Dim Row = DtDatosDetalle.NewRow
|
||||
|
||||
Index = Index + 1
|
||||
@@ -1849,11 +1878,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
'Dim AplicaCaducidad = False
|
||||
'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
|
||||
'End If
|
||||
|
||||
Row("ConsecId") = CveConsecSerie
|
||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||
Row("CvePS") = CvePSSerie
|
||||
@@ -1872,15 +1896,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
TxtSerie.Text = ""
|
||||
End If
|
||||
|
||||
CargaSerie(Tipo, True)
|
||||
If Not CargaMasivaSeries Then CargaSerie(Tipo, True)
|
||||
|
||||
If MensajeAlert.ToString <> "" Then
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
If AlertaSonido Then RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Else
|
||||
If MensajeSinExistencias.ToString <> "" Then
|
||||
Alert($"Las siguientes Series no cuentan con la existencia suficiente por lo cual se omitieron. <br?><br/> {MensajeSinExistencias.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
RegistraScript("playsonidito('beep-07.wav')", "SoniditoSerie")
|
||||
If AlertaSonido Then RegistraScript("playsonidito('beep-07.wav')", "SoniditoSerie")
|
||||
|
||||
End If
|
||||
|
||||
@@ -3753,6 +3777,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ErrorMovInv = True
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
'FINAL
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
@@ -4099,6 +4125,22 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv AndAlso CveImportacionSeleccionada > 0 Then
|
||||
|
||||
If Not ObjInventario.UpdateImportacionCierre(CveImportacionSeleccionada, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv AndAlso CveFleteSeleccionado > 0 Then
|
||||
If Not ObjInventario.UpdateFleteCierre(CveFleteSeleccionado, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'FINAL
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
@@ -4954,12 +4996,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then
|
||||
NoPSConSerie = NoPSConSerie + 1
|
||||
LbCantidad.Text = DtInv.FiltroPrimeroValor("Cantidad", "CvePS=" & CvePSSerie)
|
||||
End If
|
||||
|
||||
|
||||
If Valido Then
|
||||
CveConsecSerie = RowPS("Consec").ToString.ToEntero
|
||||
AgregaSerie(RowExcel("Serie").ToString, 1)
|
||||
AgregaSerie(RowExcel("Serie").ToString, 1, False)
|
||||
|
||||
'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
|
||||
RowsCargados = RowsCargados + 1
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
<%@ Page Title="Reg RSCO" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegRSCO.aspx.vb" Inherits="Inventarios_RegRSCO" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
#DivAgregarUnidad > div.modal-dialog > div label input {
|
||||
padding: 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reg RSCO
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarRSCO" OnClick="LnkAgregarRSCO_Click" data-toggle="tooltip" data-placement="left" title="Agregar RSCO" Text="<i class='fa fa-plus'></i>Agregar RSCO"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
|
||||
DataKeyNames="CveCompuestoVigencia,CveCompuesto,CveProveedor,RegistroRSCO,FechaVigencia,VigenciaIndeterminada,CveUsuario, NombreComercial"
|
||||
EmptyDataText="No se Encontraron Registros" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Compuesto" DataField="Compuesto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Registro RSCO" DataField="RegistroRSCO" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Fecha. Vigencia" ItemStyle-HorizontalAlign="Center" DataField="FechaVigencia" ItemStyle-Width="5%" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Fecha Indeterminada" DataField="VigenciaIndeterminadaStr" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
|
||||
<asp:BoundField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Eitar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Eliminar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Eliminar" data-btn-ok-label="Si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="DivAgregarRSCO" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog ">
|
||||
|
||||
<asp:UpdatePanel runat="server" class="modal-content rowpadding" tabindex="-1" ID="UpModalRSCO" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal runat="server" ID="LtlTituloModal" Text="Agregar Unidad"></asp:Literal></h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" runat="server" id="DVTiposRemolque" >
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssClass="form-control" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
<label for="<%= DdlProveedores.ClientID.ToString()%>" style="margin-top:-6px" >Proveedor:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" runat="server">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCompuesto" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveCompuesto" DataTextField="Compuesto" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlCompuesto.ClientID.ToString()%>">Compuesto:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvDdlCompuesto" ControlToValidate="DdlCompuesto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compuesto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRSCO"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRegistroRSCO" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtRegistroRSCO.ClientID.ToString()%>">Registro RSCO:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtRegistroRSCO" ControlToValidate="TxtRegistroRSCO" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Registro RSCO''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRSCO"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 160px!important" runat="server" id="DvFechaVijencia">
|
||||
|
||||
<asp:TextBox ID="TxtFechaVigencia" CssClass="form-control" MaxLength="50" runat="server" Width="130px"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: -5px;">
|
||||
<asp:LinkButton ID="LnkTxtFechaVigencia" class="btn default" Style="margin-top: 15px; margin-left: 6px" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaVigencia" TargetControlID="TxtFechaVigencia" PopupButtonID="LnkTxtFechaVigencia" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None"
|
||||
ErrorMessage="El campo <b>''Fecha de Cierre''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."
|
||||
Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRSCO"></asp:CompareValidator>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Cierre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRSCO"></asp:RequiredFieldValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaVigencia" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaVigencia" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaVigencia" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaVigencia" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<label for="<%= TxtFechaVigencia.ClientID.ToString() %>">Fecha de Vigencia:</label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server">
|
||||
<asp:CheckBox ID="ChkFechaIndeterminada" runat="server" CssClass="form-control" OnCheckedChanged="ChkFechaIndeterminada_CheckedChanged" AutoPostBack="true" />
|
||||
<label for="<%= ChkFechaIndeterminada.ClientID.ToString()%>">Fecha Indeterminada:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DivModalContinuarAgregando">
|
||||
|
||||
<div class="col-md-12" style="text-align:right!important">
|
||||
<asp:CheckBox ID="ChkModalContinuarAgregando" runat="server" Text="Continuar Agregando" TextAlign="Left" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:Button ID="BtnAgregarRSCO" Text="Agregar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" OnClick="BtnAgregarRSCO_Click" ValidationGroup="GrpRSCO" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
Imports Extensiones
|
||||
Partial Class Inventarios_RegRSCO
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveCompuestoVigencia As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveCompuestoVigencia") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveCompuestoVigencia").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
ViewState("CveCompuestoVigencia") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub Inventarios_RegRSCO_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjInventarios.GetCompuestosVigencia(-1, -1, MinFecha, MaxFecha, 1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Seleccione Uno"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
|
||||
If ObjPS.GetCompuestosActivos(UsuarioActual.CveEmpresa) Then
|
||||
DdlCompuesto.DataSource = ObjPS.DtResultados
|
||||
Else
|
||||
DdlCompuesto.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
DdlCompuesto.DataBind()
|
||||
DdlCompuesto.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
|
||||
|
||||
UpModalRSCO.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarModalDivAgregarRSCO()
|
||||
CveCompuestoVigencia = -1
|
||||
|
||||
BtnAgregarRSCO.Text = "Agregar"
|
||||
|
||||
DdlProveedores.txtValue.Value = "-1"
|
||||
DdlProveedores.txtText.Value = ""
|
||||
|
||||
DdlCompuesto.SelectedValueExist(-1)
|
||||
|
||||
TxtFechaVigencia.Text = ""
|
||||
TxtRegistroRSCO.Text = ""
|
||||
ChkFechaIndeterminada.Checked = False
|
||||
|
||||
LtlTituloModal.Text = "Agregar RSCO"
|
||||
|
||||
DivModalContinuarAgregando.Visible = True
|
||||
ChkModalContinuarAgregando.Checked = True
|
||||
|
||||
UpModalRSCO.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregarRSCO_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LimpiarModalDivAgregarRSCO()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarRSCO"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
BtnAgregarRSCO.Text = "Actualizar"
|
||||
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
|
||||
CveCompuestoVigencia = GvRow.DataKey("CveCompuestoVigencia").ToEntero()
|
||||
|
||||
|
||||
|
||||
DdlProveedores.txtValue.Value = GvRow.DataKey("CveProveedor")
|
||||
DdlProveedores.txtText.Value = GvRow.DataKey("NombreComercial")
|
||||
|
||||
|
||||
DdlCompuesto.SelectedValueExist(GvRow.DataKey("CveCompuesto"))
|
||||
TxtFechaVigencia.Text = GvRow.DataKey("FechaVigencia").ToDate.ToString("dd/MM/yyyy")
|
||||
TxtRegistroRSCO.Text = GvRow.DataKey("RegistroRSCO")
|
||||
ChkFechaIndeterminada.Checked = Boolean.Parse(GvRow.DataKey("VigenciaIndeterminada"))
|
||||
|
||||
LtlTituloModal.Text = "Actualizar RSCO"
|
||||
|
||||
DivModalContinuarAgregando.Visible = False
|
||||
ChkModalContinuarAgregando.Checked = False
|
||||
|
||||
|
||||
If ChkFechaIndeterminada.Checked Then
|
||||
DvFechaVijencia.Visible = False
|
||||
TxtFechaVigencia.Text = "01/01/1900"
|
||||
Else
|
||||
DvFechaVijencia.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
UpModalRSCO.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarRSCO"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ErrorAlElimiar As Boolean = False
|
||||
|
||||
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
|
||||
Dim CveCompuestoVigenciaEliminar = GvRow.DataKey("CveCompuestoVigencia").ToEntero()
|
||||
|
||||
Using ObjInventarios As New ClsInventarios
|
||||
|
||||
If (ObjInventarios.RemoveCompuestosVigencia(CveCompuestoVigenciaEliminar, UsuarioActual.CveEmpresa)) Then
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarRSCO"))
|
||||
Alert("RSCO Eliminado Correctamente.")
|
||||
Else
|
||||
ErrorAlElimiar = True
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
If Not ErrorAlElimiar Then
|
||||
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarRSCO_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ErrorPrceso As Boolean = False
|
||||
|
||||
|
||||
If DdlProveedores.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe de seleccionar un proveedor.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Using ObjInventarios As New ClsInventarios
|
||||
|
||||
If CveCompuestoVigencia <= 0 Then
|
||||
If ObjInventarios.AddCompuestosVigencia(DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, TxtRegistroRSCO.Text, TxtFechaVigencia.Text.ToDate, ChkFechaIndeterminada.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("RSCO agregado correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.UpdateCompuestosVigencia(CveCompuestoVigencia, DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, TxtRegistroRSCO.Text, TxtFechaVigencia.Text.ToDate, ChkFechaIndeterminada.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("RSCO actualizado correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
If Not ErrorPrceso Then
|
||||
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
|
||||
If Not ChkModalContinuarAgregando.Checked Then
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarRSCO"))
|
||||
Else
|
||||
LimpiarModalDivAgregarRSCO()
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub ChkFechaIndeterminada_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If ChkFechaIndeterminada.Checked Then
|
||||
DvFechaVijencia.Visible = False
|
||||
TxtFechaVigencia.Text = "01/01/1900"
|
||||
Else
|
||||
DvFechaVijencia.Visible = True
|
||||
TxtFechaVigencia.Text = ""
|
||||
End If
|
||||
|
||||
UpModalRSCO.Update()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -40,6 +40,7 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
@@ -91,9 +92,31 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="portlet-body" style="display: block">
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="max-width: 70px">Esatus:</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" Width="100%" CssClass="select2me">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="0" Selected="True">Activo</asp:ListItem>
|
||||
<asp:ListItem Value="1">Cerrado</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
@@ -49,7 +49,7 @@ Partial Class Compras_RepFletes
|
||||
Dim ObjInv As New ClsInventarios
|
||||
If TxtFolio.Text <> "" Then TxtFechaI.Text = MinFecha.ToShortDateString : TxtFechaF.Text = MaxFecha.ToShortDateString
|
||||
If ObjInv.GetFletesRep(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedores.SelectedValue.ToString.ToEntero, -1, -1,
|
||||
TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero()) Then
|
||||
TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero(), CveEstatus:=DdlEstatus.SelectedValue.ToEntero()) Then
|
||||
DtFletes = ObjInv.DtResultados
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<ajax:CalendarExtender ID="CalFechaIEjec" runat="server" TargetControlID="TxtFechaInicio" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-md-1" style="text-align:right">
|
||||
<label>. Fin:</label>
|
||||
<label>F. Fin:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;display:flex">
|
||||
@@ -139,10 +139,10 @@
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Sucursal:</label>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div class="col-sm-2">
|
||||
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AutoPostBack="true" OnSelectedIndexChanged="DdlSucursal_SelectedIndexChanged" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" >Almacén:</label>
|
||||
<label class="col-md-1 truncate" style="text-align:right">Almacén:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
|
||||
@@ -152,13 +152,21 @@
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" CssStyle="width: 100%;"/>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Producto:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1 truncate" style="text-align:right" >Compuesto:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
|
||||
<asp:DropDownList runat="server" ID="DdlCompuesto" CssClass="select2me" DataTextField="Compuesto" DataValueField="CveCompuesto" Width="100%" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="text-align:right">Producto:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -29,10 +29,13 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
CargaFiltros();
|
||||
CargarDatos();
|
||||
CargaAlamacenes();
|
||||
CargaCompuestos();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargarDatos()
|
||||
{
|
||||
|
||||
@@ -47,8 +50,9 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
// aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad
|
||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
||||
DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero()))
|
||||
{
|
||||
DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero(),
|
||||
CveCompuesto: DdlCompuesto.SelectedValue.ToEntero() ))
|
||||
{
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados;
|
||||
DTDatos = ObjInventarios.DtResultados;
|
||||
if (DdlOpcion.SelectedValue == "1")
|
||||
@@ -75,6 +79,16 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void CargaCompuestos()
|
||||
{
|
||||
ClsProductosServicios ObjPS = new ClsProductosServicios();
|
||||
ObjPS.GetCompuestosActivos(UsuarioActual.CveEmpresa);
|
||||
DdlCompuesto.DataSource = ObjPS.DtResultados;
|
||||
ObjPS.Dispose();
|
||||
DdlCompuesto.DataBind();
|
||||
DdlCompuesto.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
private void CargarFechaText()
|
||||
{
|
||||
DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
|
||||
|
||||
@@ -115,26 +115,20 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
|
||||
DataKeyNames="CveCompuestoVigencia,CveCompuesto,CveProveedor,RegistroRSCO,FechaVigencia,VigenciaIndeterminada,CveUsuario"
|
||||
DataKeyNames="CvePS,CveCompuesto,CveProveedorCompra,RegistroRSCO,FechaVigenciaRSCOStr,VigenciaIndeterminadaRSCO,CveUsuario"
|
||||
EmptyDataText="No se Encontraron Registros" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Compuesto" DataField="Compuesto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Registro RSCO" DataField="RegistroRSCO" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Fecha. Vigencia" ItemStyle-HorizontalAlign="Center" DataField="FechaVigencia" ItemStyle-Width="5%" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Fecha Indeterminada" DataField="VigenciaIndeterminadaStr" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:BoundField HeaderText="Fecha. Vigencia" ItemStyle-HorizontalAlign="Center" DataField="FechaVigenciaRSCOStr" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
|
||||
<asp:BoundField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" DataField="Fecha" ItemStyle-Width="5%" DataFormatString="{0:d}" />
|
||||
|
||||
<%-- <asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Eitar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Eliminar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Eliminar" data-btn-ok-label="Si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
Reference in New Issue
Block a user