Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1165,8 +1165,8 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCFechaInvFormat" runat="server" HighlightCssClass="vco" TargetControlID="CvFechaInv" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: center;">
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: center;">
|
||||
<asp:Button ID="BtnModalExcelAjuste" runat="server" Visible="false" CssClass="btn btn-primary" data-toggle="modal" data-target="#DivCargaAjuste" Text="Cargar Excel Ajuste" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -1866,12 +1866,16 @@
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-10" style="text-align: right">
|
||||
<asp:LinkButton ID="LnkDescargaFormato" runat="server" CssClass="btn btn-warning" OnClick="LnkDescargaFormato_Click" ><i class="fa fa-download" aria-hidden="true" ></i> Descargar Formato</asp:LinkButton>
|
||||
<asp:Button ID="BtnCargaExcelAjuste" runat="server" CssClass="btn btn-success" Text="Aceptar" OnClick="BtnCargaExcelAjuste_Click"></asp:Button>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaFormato" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -497,7 +497,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
|
||||
|
||||
TxtFecha.Enabled = False
|
||||
'ImgFecha.Visible = False
|
||||
@@ -1221,7 +1221,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
|
||||
|
||||
TxtFecha.Enabled = False
|
||||
'ImgFecha.Visible = False
|
||||
@@ -6071,6 +6071,27 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDescargaFormato_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoAjusteInventario.xlsx"
|
||||
|
||||
|
||||
Dim Archivo As New IO.FileInfo(Directorio)
|
||||
If Archivo.Exists Then
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.ClearContent()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name)
|
||||
Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
Response.ContentType = "text/plain"
|
||||
Response.Flush()
|
||||
Response.TransmitFile(Archivo.FullName)
|
||||
Response.End()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String)
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim Tipo As String = "EXCEL"
|
||||
@@ -6089,21 +6110,36 @@ Partial Class Inventarios_EntradasSalidas
|
||||
dt.TableName = "Datos"
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim TieneErrorCodigos As Boolean = False
|
||||
Try
|
||||
If DdlAlmacenInventarioFisico.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlPS.SelectedText = "" : Exit Sub
|
||||
|
||||
Dim sbNoencontrados As New StringBuilder
|
||||
|
||||
For Each row As DataRow In dt.Rows
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, Codigo:=row("Codigo").ToString(), Estatus:=-1).FiltroPrimero("")
|
||||
Dim CvePS As Integer = DrPS("CvePS").ToString().ToEntero()
|
||||
|
||||
If row("EntradaSalida").ToString() = "1" Then
|
||||
AddPSEntrada(CvePS, row("Diferencia").ToString().ToDecimal(), row("Costo").ToString().ToDecimal(), Sonido:=False, CargaGV:=False)
|
||||
If DrPS IsNot Nothing Then
|
||||
Dim CvePS As Integer = DrPS("CvePS").ToString().ToEntero()
|
||||
|
||||
If row("EntradaSalida").ToString() = "1" Then
|
||||
AddPSEntrada(CvePS, row("Diferencia").ToString().ToDecimal(), row("Costo").ToString().ToDecimal(), Sonido:=False, CargaGV:=False)
|
||||
Else
|
||||
AddPSSalida(CvePS, row("Diferencia").ToString().ToDecimal(), Sonido:=False, CargaGV:=False)
|
||||
End If
|
||||
Else
|
||||
AddPSSalida(CvePS, row("Diferencia").ToString().ToDecimal(), Sonido:=False, CargaGV:=False)
|
||||
TieneError = True
|
||||
TieneErrorCodigos = True
|
||||
sbNoencontrados.Append($"{row("Codigo").ToString}<br>")
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If sbNoencontrados.Length > 0 Then
|
||||
Alert($"No se encontraron los siguientes códigos. <br> {sbNoencontrados.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
CargaGvSalidas(DtMovimientosSalidaInvFisico)
|
||||
CargaGvEntradas(DtMovimientosEntradaInvFisico)
|
||||
Catch ex As Exception
|
||||
@@ -6122,7 +6158,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
CargaGvSalidas(DtMovimientosSalidaInvFisico)
|
||||
CargaGvEntradas(DtMovimientosEntradaInvFisico)
|
||||
|
||||
Alert("Ocurrió un error al cargar los datos", TipoMensaje.MsgError)
|
||||
If Not TieneErrorCodigos Then
|
||||
Alert("Ocurrió un error al cargar los datos", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Else
|
||||
If DtMovimientosEntradaInvFisico.Rows.Count <> dt.FiltraParametros("EntradaSalida = 1").Rows.Count Then
|
||||
Alert("No se cargaron todas las entradas.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -6144,4 +6183,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
UpModalAjuste.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -363,7 +363,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CargaParametrosAD()
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146, 119, 186) Then DdlAlmacen.AutoPostBack = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
End If
|
||||
|
||||
@@ -489,7 +489,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim PermisoEspecialCambioFecha As Boolean = False
|
||||
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 AndAlso Not PermisoEspecialCambioFecha Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 AndAlso Not PermisoEspecialCambioFecha Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
|
||||
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
|
||||
@@ -229,7 +229,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim PermisoEspecialCambioFecha As Boolean = False
|
||||
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 And Not PermisoEspecialCambioFecha Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 And Not PermisoEspecialCambioFecha Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
TxtFechaRecepcion.Enabled = False
|
||||
|
||||
Reference in New Issue
Block a user