Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1871,6 +1871,32 @@ Public Class ClsOS
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function AddOrdenesServicioMateriales(CveOS As Integer, CvePS As Integer, Cantidad As Decimal, Serie As String, Lote As String, FechaCaducidad As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServicioMaterialesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el material.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public Function GetCveCliente(CveVenta As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' DataAdapter("PA_OS_ClienteGet")
|
||||
|
||||
@@ -8,6 +8,8 @@ Imports Telerik.Web.UI
|
||||
Imports System.Data.SqlClient
|
||||
Imports Stimulsoft.Report.StiOptions.Export
|
||||
Imports Modelos
|
||||
Imports System.Runtime.InteropServices.ComTypes
|
||||
Imports APP_Code_CSharp
|
||||
|
||||
Partial Class OS_OrdenesServicios
|
||||
Inherits ClsPaginas
|
||||
@@ -670,7 +672,7 @@ Partial Class OS_OrdenesServicios
|
||||
' End If
|
||||
'End If
|
||||
|
||||
ElseIf TipoEstatus = 4 Then
|
||||
ElseIf TipoEstatus = 4 AndAlso Not UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
'DisableAll()
|
||||
If SeFacturara = "True" Then
|
||||
HplFacturar.Visible = True
|
||||
@@ -2955,6 +2957,20 @@ Partial Class OS_OrdenesServicios
|
||||
LnkModalMaterialUtilizado.Visible = True
|
||||
DTSolicitudDev = New DataTable
|
||||
Dim Opcion As Integer = If(DdlTipoVenta.SelectedValue.Contiene("2", "3"), 2, 1)
|
||||
|
||||
|
||||
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
||||
Case 2, 3
|
||||
Opcion = 2
|
||||
Exit Select
|
||||
Case 5
|
||||
Opcion = 3
|
||||
Exit Select
|
||||
Case Else
|
||||
Opcion = 1
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
Dim ObjOS As New ClsOS
|
||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, Opcion, UsuarioActual.CveEmpresa) Then
|
||||
DTSolicitudDev = ObjOS.DtResultados
|
||||
@@ -2996,18 +3012,74 @@ Partial Class OS_OrdenesServicios
|
||||
Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero
|
||||
Dim CveAlmacenDestino As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {CveSubProyectoPedido}").ToEntero
|
||||
|
||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||
Dim TotalSeleccionado As Decimal = 0
|
||||
|
||||
For Each GVRow As GridViewRow In GvMU.Rows
|
||||
TotalSeleccionado = TotalSeleccionado + GVRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
Next
|
||||
|
||||
If TotalSeleccionado = 0 Then
|
||||
Alert("No se selecciono ningun material", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not CveAlmacenDestino > 0 Then
|
||||
Alert("No se encontró almacen de entrega por adelantado", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim ProcesoOK As Boolean = True
|
||||
Dim ObjV As New ClsVentas
|
||||
Dim ClsOS As New ClsOS(ObjV.IniciaTransacSQL())
|
||||
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
|
||||
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
|
||||
|
||||
Dim GenrarRemisionMovimientos As Boolean = False
|
||||
|
||||
|
||||
|
||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||
|
||||
For Each GVRow As GridViewRow In GvMU.Rows
|
||||
Dim CantidadRegistro As Decimal = GVRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
Dim CvePS As Integer = GVRow.DataKey("CvePS").ToEntero
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
|
||||
Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie"))
|
||||
Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote"))
|
||||
Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate)
|
||||
|
||||
If Not ObjOS.AddOrdenesServicioMateriales(CveOS, CvePS, CantidadRegistro, Serie, Lote, FechaCaducidad, UsuarioActual.CveUsuario) Then
|
||||
Alert("Ocurrió un error al guardar el material.", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero
|
||||
|
||||
If CveOSEstatusFinalizada > 0 Then
|
||||
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOS) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudo obtener el estado para finalizar la orden de servicio.")
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Else
|
||||
If ProcesoOK Then
|
||||
Dim AplicaDevolucion As Boolean = False
|
||||
For Each GvRow As GridViewRow In GvMU.Rows
|
||||
@@ -3127,7 +3199,7 @@ Partial Class OS_OrdenesServicios
|
||||
End If
|
||||
End If
|
||||
If ProcesoOK Then
|
||||
If Not ClsOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
@@ -3151,21 +3223,30 @@ Partial Class OS_OrdenesServicios
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
ObjV.Commit()
|
||||
|
||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||
Dim Liga As String = $" document.location.href=""/OS/OrdenesServicios.aspx?CveOS={CveOS}""; "
|
||||
Alert("El material utilizado se guardó correctamente", TipoMensaje.MsgInformacion, Liga)
|
||||
Else
|
||||
If GenrarRemisionMovimientos = False Then
|
||||
Alert("El material sera recibido en almacén.")
|
||||
Else
|
||||
Alert("El material utilizado se guardó correctamente")
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DivModalMaterialUtilizado').modal('hide');")
|
||||
Else
|
||||
ObjV.RollBack()
|
||||
Alert("El material utilizado no se guardó correctamente", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Se presento un error al guardar el material", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjV.Dispose()
|
||||
|
||||
@@ -5732,7 +5732,7 @@
|
||||
<div>
|
||||
<div style="width: 200px; display: inline-block;">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtFechamodIMSS" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechamodIMSSSalario" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtFechamodIMSSSalario">Fecha:</asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MEETxtFechamodIMSSS" runat="server" TargetControlID="TxtFechamodIMSSSalario" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEETxtFechamodIMSSS" TargetControlID="TxtFechamodIMSSSalario" PopupButtonID="LnkFechaModImssSalario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
@@ -5751,19 +5751,20 @@
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtMImssSalarioDiarioImSS" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtMImssSalarioDiarioImSS" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtMImssSalarioDiarioImSS">Salario diario(IMSS):</asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtMImssSDI" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtMImssSDI">Salario Diario Integrado(SDI):</asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkModificarSalarioIMSSGuardar" OnClick="LnkModificarSalarioIMSSGuardar_Click" ValidationGroup="GrpGuardarModSalarioIMSS" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -1142,11 +1142,11 @@ Partial Class RH_Personal
|
||||
tdCliente2.Visible = True
|
||||
GVAsistencia.Columns(1).Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(372) Then
|
||||
TxtSalarioDiarioImSS.Enabled = True
|
||||
TxtSalarioDiarioIntegrado.Enabled = True
|
||||
End If
|
||||
'no sedeben habilitar ya que solo son informativos
|
||||
'If UsuarioActual.TienePermisoProceso(372) Then
|
||||
' TxtSalarioDiarioImSS.Enabled = True
|
||||
' TxtSalarioDiarioIntegrado.Enabled = True
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Sub SetPermisos()
|
||||
@@ -6961,7 +6961,7 @@ Partial Class RH_Personal
|
||||
Dim DiasVacaciones As Decimal = TxtFIDiasVacaciones.Text.ToDecimal()
|
||||
Dim diasaguinaldo As Decimal = TxtFIAguinaldo.Text.ToDecimal()
|
||||
Dim FI As Decimal = (365D + diasaguinaldo + (DiasVacaciones * (primav / 100D))) / 365D
|
||||
Dim SDI As Decimal = (SD * FI)
|
||||
Dim SDI As Decimal = Math.Round((SD * FI), 2)
|
||||
TxtFactordeIntegracion.Text = FI.ToString()
|
||||
TxtFISalarioDiarioIntegrado.Text = String.Format("{0:###0.########}", SDI)
|
||||
UpFactordeintegracion.Update()
|
||||
@@ -7044,15 +7044,18 @@ Partial Class RH_Personal
|
||||
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
ObjPersonal.IniciaTransacSQL()
|
||||
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodIMSS.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtSalarioDiario.Text.ToDecimal(), TxtSDI.Text.ToDecimal(), TxtMImssSalarioDiarioImSS.Text.ToDecimal(),
|
||||
TxtSalarioDiario.Text.ToDecimal()) Then
|
||||
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodIMSSSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtSalarioDiario.Text.ToDecimal(), TxtMImssSDI.Text.ToDecimal(), TxtMImssSalarioDiarioImSS.Text.ToDecimal(), -1) Then
|
||||
|
||||
|
||||
ObjPersonal.Commit()
|
||||
|
||||
RegistraScript("$('#DmodamodificarsalarioIMSS').modal('hide')")
|
||||
TxtSalarioCotizado.Text = TxtMImssSalarioDiarioImSS.Text
|
||||
|
||||
TxtSDI.Text = TxtMImssSDI.Text
|
||||
Dim sdi As Decimal = TxtSDI.Text.ToDecimal()
|
||||
Dim sbc As Decimal = TxtMImssSalarioDiarioImSS.Text.ToDecimal()
|
||||
salarioVariable = If(sbc > sdi, sbc - sdi, 0)
|
||||
UpModSalario.Update()
|
||||
UpDatos.Update()
|
||||
Alert("Se ha actualizado el salario", TipoMensaje.ToastInformacion)
|
||||
@@ -7063,8 +7066,9 @@ Partial Class RH_Personal
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkModsalarioIMSS_Click(sender As Object, e As EventArgs)
|
||||
|
||||
TxtFechamodIMSSSalario.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
TxtMImssSalarioDiarioImSS.Text = TxtSalarioCotizado.Text
|
||||
TxtMImssSDI.Text = TxtSDI.Text
|
||||
RegistraScript("$('#DmodamodificarsalarioIMSS').modal()")
|
||||
UpModSalarioIMSS.Update()
|
||||
End Sub
|
||||
|
||||
@@ -236,7 +236,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
LnkAccionesModalSeleccionLayout.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 1, 15) Then
|
||||
DVImporteDeduccionesPago.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user