Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2519,7 +2519,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (dconr != null)
|
||||
{
|
||||
CveConcepto = dconr["CveConcepto"].ToString();
|
||||
dtxz.Columns[i].ColumnName = CveConcepto;
|
||||
if (dtxz.Columns.Contains(CveConcepto))
|
||||
{
|
||||
stringError = string.Format("Ocurrio un Error al procesar el excel código duplicado '{0}'({1}).", conceptocodigo, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
dtxz.Columns[i].ColumnName = CveConcepto;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Enabled="false" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -106,9 +105,9 @@
|
||||
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Numero" ItemStyle-HorizontalAlign="Left" >
|
||||
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("CvePersonal") %>'> </asp:Label>
|
||||
<asp:Label ID="LtlNumero" runat="server" CssClass="truncate" Width="50" Text='<%# Eval("Codigo") %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Personal" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
@@ -327,7 +327,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Resultados.Columns.Add("CvePersonal")
|
||||
Resultados.Columns.Add("NombreCompleto")
|
||||
'Resultados.Columns.Add("Codigo")
|
||||
Resultados.Columns.Add("Codigo")
|
||||
Resultados.Columns.Add("CveSubProyecto")
|
||||
Resultados.Columns.Add("SalarioDiario")
|
||||
Resultados.Columns.Add("CveAsistenciasInasistencias")
|
||||
@@ -349,7 +349,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Resultados.Columns.Add("TipoCorto")
|
||||
Resultados.Columns.Add("Sancion")
|
||||
|
||||
If DdlTurno.SelectedValue.ToEntero > 0 And DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim FiltroSubProyecto As String = ""
|
||||
Dim filtroturno = If(DdlTurno.SelectedValue = "-1", "", $"AND CveTurno = { DdlTurno.SelectedValue}")
|
||||
@@ -422,6 +422,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
Dim CveTurno As Integer = dRow("CveTurno").ToString.ToEntero
|
||||
Dim DiaDescanso As Integer = GlobalDTTurno(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DiaDescanso", $" CveTurno = {CveTurno} ").ToEntero - 1 'El -1 es por que en .net el domingo empieza 0 y en la sql en 1
|
||||
Dim Codigo As String = dRow("Codigo").ToString
|
||||
|
||||
If registrosPersonal.Rows.Count > 0 Then
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString() & "")
|
||||
Retardos = 0
|
||||
@@ -431,7 +435,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||
@@ -458,7 +462,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
Dim Asistencia As Boolean = True
|
||||
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal, DiaDescanso)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||
|
||||
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString())
|
||||
@@ -615,7 +619,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
@@ -651,7 +655,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
End If
|
||||
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal, DiaDescanso)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||
|
||||
If Not DiaLaboral Then
|
||||
@@ -705,6 +709,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
|
||||
Dim Codigo As String = dRow("Codigo").ToString
|
||||
If registrosPersonal.Rows.Count > 0 Then
|
||||
|
||||
For x As Integer = 1 To (DiasPeriodo)
|
||||
@@ -712,7 +718,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
@@ -765,7 +771,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
'ReRow("Codigo") = dRow("Codigo").ToString()
|
||||
ReRow("Codigo") = Codigo
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
ReRow("PorcentajePago") = "0"
|
||||
ReRow("Asistio") = "False"
|
||||
@@ -802,8 +808,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DtResultados = Resultados
|
||||
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
@@ -836,6 +842,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
|
||||
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
|
||||
@@ -845,7 +852,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
|
||||
For x As Integer = 3 To dt.Columns.Count
|
||||
For x As Integer = 3 To dt.Columns.Count-1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
@@ -866,9 +873,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
ColumN = 2
|
||||
ColumN = 3
|
||||
|
||||
Dim ResumenDia As New DataTable
|
||||
Dim DTTempAsistencias As New DataTable
|
||||
@@ -970,170 +977,219 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
Private Sub ReprocesarTabla()
|
||||
Dim dt As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
Dim DTAsistenciasInasistencias As New DataTable
|
||||
|
||||
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
Dim dt As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
Dim DTAsistenciasInasistencias As New DataTable
|
||||
|
||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
dt.Columns.Add("Fecha4")
|
||||
dt.Columns.Add("Fecha5")
|
||||
dt.Columns.Add("Fecha6")
|
||||
dt.Columns.Add("Fecha7")
|
||||
dt.Columns.Add("Fecha8")
|
||||
dt.Columns.Add("Fecha9")
|
||||
dt.Columns.Add("Fecha10")
|
||||
dt.Columns.Add("Fecha11")
|
||||
dt.Columns.Add("Fecha12")
|
||||
dt.Columns.Add("Fecha13")
|
||||
dt.Columns.Add("Fecha14")
|
||||
dt.Columns.Add("Fecha15")
|
||||
dt.Columns.Add("Fecha16")
|
||||
dt.Columns.Add("Fecha17")
|
||||
dt.Columns.Add("Fecha18")
|
||||
dt.Columns.Add("Fecha19")
|
||||
dt.Columns.Add("Fecha20")
|
||||
dt.Columns.Add("Fecha21")
|
||||
dt.Columns.Add("Fecha22")
|
||||
dt.Columns.Add("Fecha23")
|
||||
dt.Columns.Add("Fecha24")
|
||||
dt.Columns.Add("Fecha25")
|
||||
dt.Columns.Add("Fecha26")
|
||||
dt.Columns.Add("Fecha27")
|
||||
dt.Columns.Add("Fecha28")
|
||||
dt.Columns.Add("Fecha29")
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
Dim objRH As New ClsRH
|
||||
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
Dim DTVFechas As New DataView(DtResultados)
|
||||
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}"))
|
||||
|
||||
For x As Integer = 3 To ColumN - 1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
dt.Columns.Add("CvePersonal")
|
||||
dt.Columns.Add("NombreCompleto")
|
||||
'dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Fecha1")
|
||||
dt.Columns.Add("Fecha2")
|
||||
dt.Columns.Add("Fecha3")
|
||||
dt.Columns.Add("Fecha4")
|
||||
dt.Columns.Add("Fecha5")
|
||||
dt.Columns.Add("Fecha6")
|
||||
dt.Columns.Add("Fecha7")
|
||||
dt.Columns.Add("Fecha8")
|
||||
dt.Columns.Add("Fecha9")
|
||||
dt.Columns.Add("Fecha10")
|
||||
dt.Columns.Add("Fecha11")
|
||||
dt.Columns.Add("Fecha12")
|
||||
dt.Columns.Add("Fecha13")
|
||||
dt.Columns.Add("Fecha14")
|
||||
dt.Columns.Add("Fecha15")
|
||||
dt.Columns.Add("Fecha16")
|
||||
dt.Columns.Add("Fecha17")
|
||||
dt.Columns.Add("Fecha18")
|
||||
dt.Columns.Add("Fecha19")
|
||||
dt.Columns.Add("Fecha20")
|
||||
dt.Columns.Add("Fecha21")
|
||||
dt.Columns.Add("Fecha22")
|
||||
dt.Columns.Add("Fecha23")
|
||||
dt.Columns.Add("Fecha24")
|
||||
dt.Columns.Add("Fecha25")
|
||||
dt.Columns.Add("Fecha26")
|
||||
dt.Columns.Add("Fecha27")
|
||||
dt.Columns.Add("Fecha28")
|
||||
dt.Columns.Add("Fecha29")
|
||||
dt.Columns.Add("Fecha30")
|
||||
dt.Columns.Add("Fecha31")
|
||||
|
||||
ColumN = 3
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||
GVRegDatos.Columns(ColumN).Visible = True
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
Dim DTFechas As DataTable
|
||||
Dim DTUPersonal As DataTable
|
||||
Dim DTVFechas As New DataView(DtResultados)
|
||||
DTFechas = DTVFechas.ToTable(True, "Fecha")
|
||||
DTUPersonal = DTVFechas.ToTable(True, {"CvePersonal", "NombreCompleto"})
|
||||
|
||||
For Each pRow As DataRow In DtPersonal.Rows
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
For x As Integer = 3 To ColumN - 1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
|
||||
ColumN = 2
|
||||
ColumN = 3
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||
GVRegDatos.Columns(ColumN).Visible = True
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
|
||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
For Each pRow As DataRow In DtPersonal.Rows
|
||||
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
Dim RRow As DataRow = dt.NewRow
|
||||
RRow("CvePersonal") = pRow("CvePersonal")
|
||||
RRow("NombreCompleto") = pRow("NombreCompleto")
|
||||
'RRow("Codigo") = pRow("Codigo")
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
ColumN = 2
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
If TipoCorto <> "" Then
|
||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
|
||||
If TipoCorto = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
|
||||
If TipoCorto = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
If TipoCorto <> "" Then
|
||||
|
||||
If TipoCorto = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
End If
|
||||
|
||||
If TipoCorto = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
If TipoCorto = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
Else
|
||||
|
||||
If TipoCorto = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
If TipoCorto = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
End If
|
||||
|
||||
If TipoCorto = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
Else
|
||||
|
||||
RRow(ColumN) = "-"
|
||||
RRow(ColumN) = "-"
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND" & "|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
|
||||
End If
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||
RRow(ColumN) = "C" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1141,62 +1197,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
|
||||
End If
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||
RRow(ColumN) = "C" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
ColumN = ColumN + 1
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
dt.Rows.Add(RRow)
|
||||
Next
|
||||
dt.Rows.Add(RRow)
|
||||
Next
|
||||
Dim stopp As Integer = 0
|
||||
DtDatosTabla = dt
|
||||
Dim stopp As Integer = 0
|
||||
DtDatosTabla = dt
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function HorarioDiario(Fecha As Date, DTHorarioPersonal As DataTable) As DataTable
|
||||
Private Function HorarioDiario(Fecha As Date, DTHorarioPersonal As DataTable, DiaDescanso As Integer) As DataTable
|
||||
Dim respuesta As New DataTable
|
||||
respuesta.Columns.Add("TRABAJO", System.Type.GetType("System.Boolean"))
|
||||
|
||||
@@ -1212,9 +1227,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
|
||||
DiaDescanso = If(DiaDescanso > -1, DiaDescanso, 0)
|
||||
|
||||
Select Case diaSemana
|
||||
Case 0
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Domingo").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntradaComida").ToString()))
|
||||
@@ -1222,42 +1240,48 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Exit Select
|
||||
Case 1
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Lunes").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("LunesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 2
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Martes").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MartesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 3
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Miercoles").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MiercolesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 4
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Jueves").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("JuevesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 5
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Viernes").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("ViernesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 6
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), $"{(DiaDescanso <> diaSemana).ToString}", drp("Sabado").ToString()))
|
||||
'Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntradaComida").ToString()))
|
||||
|
||||
@@ -91,7 +91,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
LblModalidad.Visible = True
|
||||
DivModalidad.Visible = True
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(189, 190, 192) Then
|
||||
LblModalidad.Visible = True
|
||||
DivModalidad.Visible = True
|
||||
End If
|
||||
|
||||
@@ -30,11 +30,16 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CvePrecioLista, PrecioLista, Estatus,Predeterminada" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="PrecioLista" ItemStyle-Width="50%" HeaderText="Precio de lista" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Predeterminada" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Predeterminada" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPred" runat="server" Text='<%#If(Eval("Predeterminada").ToString = "True", "Si", "") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCred" runat="server" Text='<%#If(Eval("Credito").ToString = "True", "Si", "") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="20%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="center" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server">
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID ="LnkGenerarEtiqueta"/>
|
||||
</Triggers>
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkUnificar" runat="server" data-toggle="tooltip" data-placement="left" title="Unificar Productos" Text="<i class='material-icons'>loop</i> Unificar Producto" Visible="false"></asp:LinkButton>
|
||||
@@ -74,6 +77,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LBBitacoraEcommerce" OnClick="LBBitacoraEcommerce_Click" Visible="false" runat="server"><i class="fa fa-stack-overflow"></i> Bitacora Ecommerce</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGenerarEtiqueta" runat="server" data-toggle="tooltip" data-placement="left" title="Generar Etiqueta" Visible="false" OnClick="LnkGenerarEtiqueta_Click" Text="<i class='fa fa-qrcode'></i> Imprimir Etiqueta"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -5,6 +5,7 @@ Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports ZXing
|
||||
|
||||
Partial Class ProductosyServicios
|
||||
@@ -1083,6 +1084,10 @@ Partial Class ProductosyServicios
|
||||
LnkUnificar.Visible = True
|
||||
ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
LnkGenerarEtiqueta.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then
|
||||
|
||||
TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString
|
||||
@@ -3542,12 +3547,12 @@ Partial Class ProductosyServicios
|
||||
|
||||
'If DdlMaterialPeligroso.SelectedValue.ToEntero > 0 And DdlEmbalaje.SelectedValue.ToEntero > 0 And DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero > 0 And CamposStringCCP.Length > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios(transaccionSQL)
|
||||
If Not ObjPS.AddUpdateProductosServiciosComplementos(CvePS, TxtPesoKg.Text.ToDecimal, DdlMaterialPeligroso.SelectedValue.ToEntero, DdlEmbalaje.SelectedValue.ToEntero, TxtDimensiones.Text, DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero,
|
||||
TxtNombreIngredienteActivo.Text.Trim, TxtNomQuimico.Text.Trim, TxtDenominacionGenerica.Text.Trim, TxtDenominacionDistintiva.Text.Trim, TxtFabricante.Text.Trim, DdlClaveFormaFarmaceutica.SelectedValue.ToEntero, DdlCondicionesEspTransporte.SelectedValue.ToEntero,
|
||||
TxtRegistroSanitarioAutorizacion.Text.Trim, TxtPermisoImportacion.Text.Trim, TxtFolioImportacionVUCEM.Text.Trim, TxtNumCAS.Text.Trim, TxtRazonSocialEmpImportacion.Text, TxtNumRegistroPlagCOFEPRIS.Text.Trim, TxtDatosFabricante.Text.Trim,
|
||||
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text, DdlTipoMateria.SelectedValue.ToEntero) Then
|
||||
Respuesta = False
|
||||
End If
|
||||
If Not ObjPS.AddUpdateProductosServiciosComplementos(CvePS, TxtPesoKg.Text.ToDecimal, DdlMaterialPeligroso.SelectedValue.ToEntero, DdlEmbalaje.SelectedValue.ToEntero, TxtDimensiones.Text, DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero,
|
||||
TxtNombreIngredienteActivo.Text.Trim, TxtNomQuimico.Text.Trim, TxtDenominacionGenerica.Text.Trim, TxtDenominacionDistintiva.Text.Trim, TxtFabricante.Text.Trim, DdlClaveFormaFarmaceutica.SelectedValue.ToEntero, DdlCondicionesEspTransporte.SelectedValue.ToEntero,
|
||||
TxtRegistroSanitarioAutorizacion.Text.Trim, TxtPermisoImportacion.Text.Trim, TxtFolioImportacionVUCEM.Text.Trim, TxtNumCAS.Text.Trim, TxtRazonSocialEmpImportacion.Text, TxtNumRegistroPlagCOFEPRIS.Text.Trim, TxtDatosFabricante.Text.Trim,
|
||||
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text, DdlTipoMateria.SelectedValue.ToEntero) Then
|
||||
Respuesta = False
|
||||
End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
@@ -3566,4 +3571,25 @@ Partial Class ProductosyServicios
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkGenerarEtiqueta_Click(sender As Object, e As EventArgs)
|
||||
Dim CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
|
||||
Dim DtPrecios As DataTable = Nothing
|
||||
|
||||
Dim ObjVentas As New ClsProductosServicios
|
||||
If ObjVentas.GetPSPrecios(CvePrecioListaPredeterminada, Me.CvePS.ToString()) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
DtPrecios = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtPrecios IsNot Nothing Then
|
||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||
End If
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -3436,7 +3436,7 @@ Partial Class Ventas
|
||||
HlAgregarExcel.Visible = True
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(109) <> "1" Then
|
||||
' IPP 15 Julio 2017 - ERA FALSE
|
||||
ImgAntiPend.Visible = False
|
||||
UpPS.Update()
|
||||
@@ -3584,7 +3584,7 @@ Partial Class Ventas
|
||||
DivBloqueoAcceso.Visible = False
|
||||
End If
|
||||
Else
|
||||
DivBloqueoacceso.Visible = False
|
||||
DivBloqueoAcceso.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -3656,7 +3656,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
Usuario.Empresa = ObjEmpresa.Empresa
|
||||
ADSSession.ADSSessionConfig.sessionUser.CveEmpresa = ObjEmpresa.Empresa.CveEmpresa
|
||||
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, ObjEmpresa.Empresa.CveEmpresa)
|
||||
@@ -5061,6 +5061,10 @@ Partial Class Ventas
|
||||
|
||||
Select Case DbRowVenta("TipoDocto").ToString()
|
||||
Case "Ing"
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
TxtAtencionA.Text = DbRowVenta("AtencionA").ToString()
|
||||
End If
|
||||
|
||||
Trsaldo.Visible = True
|
||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
@@ -7164,6 +7168,12 @@ Partial Class Ventas
|
||||
CalculaLineasAdicionales()
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If Not String.IsNullOrEmpty(UsuarioActual.CveTipoDocumento) Then
|
||||
DdlTipoComprobante.SelectedValueExist(UsuarioActual.CveTipoDocumento)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -7172,6 +7182,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, DdlMoneda.SelectedValue.ToEntero(), MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa) Then
|
||||
@@ -17330,6 +17342,15 @@ Partial Class Ventas
|
||||
Alert("No hay una lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If RBLPago.SelectedValue = "1" Then
|
||||
Dim CvePrecioListaCredito = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "ISNULL(Credito,False) = True").ToEntero()
|
||||
If CvePrecioListaCredito > 0 Then
|
||||
CvePrecioListaPS = CvePrecioListaCredito
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
@@ -17584,6 +17605,10 @@ Partial Class Ventas
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
|
||||
@@ -17615,6 +17640,10 @@ Partial Class Ventas
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
MostrarOpcionesPaqueteria()
|
||||
|
||||
TrAtencionA.Visible = True
|
||||
@@ -18099,15 +18128,30 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||
If Not UsuarioActual.TienePermisoProceso(169) Then
|
||||
If Not UsuarioActual.TienePermisoProceso(169) AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 5 Then
|
||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") OrElse ((DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119)) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ped") And UsuarioActual.CveEmpresa.Contiene(186)))) Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False)
|
||||
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1,
|
||||
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
||||
|
||||
|
||||
Dim Existencia As Decimal = 0D
|
||||
''CveAlamcenFiltroDdl
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero = 6 Then
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, CveAlamcenFiltroDdl, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=-1,
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=0, PendientePorSurtir:=1,
|
||||
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
||||
Else
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1,
|
||||
RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
@@ -23237,6 +23281,9 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged
|
||||
LimpiaEscondeContado()
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
RecalculaPrecios()
|
||||
End If
|
||||
End Sub
|
||||
Private Function ValidaPagosContado(Optional MostrarAlertas As Boolean = True, Optional TipoDoctoViejo As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -30638,7 +30685,7 @@ Partial Class Ventas
|
||||
divAnticipoMsg.Visible = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'NC' ", "")}")
|
||||
divAmortizacionTipoRelacion.Visible = False
|
||||
GVAnticipos.DataSource = DtMovtos
|
||||
@@ -37374,11 +37421,64 @@ Partial Class Ventas
|
||||
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
||||
|
||||
divAmortizacionTipoRelacion.Visible = False
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||
If DdlTipoAmortizacionAnticipo.Items.FindByValue("1") IsNot Nothing Then
|
||||
DdlTipoAmortizacionAnticipo.Items.Remove(DdlTipoAmortizacionAnticipo.Items.FindByValue("1"))
|
||||
End If
|
||||
If DdlTipoAmortizacionAnticipo.Items.FindByValue("2") IsNot Nothing Then
|
||||
DdlTipoAmortizacionAnticipo.Items.Remove(DdlTipoAmortizacionAnticipo.Items.FindByValue("2"))
|
||||
End If
|
||||
Else
|
||||
If DdlTipoAmortizacionAnticipo.Items.FindByValue("1") Is Nothing Then
|
||||
DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo en descuento", "1"))
|
||||
End If
|
||||
If DdlTipoAmortizacionAnticipo.Items.FindByValue("2") Is Nothing Then
|
||||
DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo con nota de crédito", "2"))
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UpAnticipos.Update()
|
||||
|
||||
RegistraScript("MuestraAnticipos();", "AE")
|
||||
End Sub
|
||||
|
||||
Private Sub RecalculaPrecios()
|
||||
If TmpDT IsNot Nothing Then
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
||||
Dim CvePS As Integer = Row("CvePS").ToString().ToEntero
|
||||
|
||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
||||
If ObjPrecioSugerido.PrecioSugerido > 0 Then
|
||||
Dim PU As Decimal = ObjPrecioSugerido.PrecioSugerido.RoundSQL(6)
|
||||
|
||||
Dim ObjDescuento As Modelos.VentaDescuentos = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||
If ObjDescuento.EsPUModificado Then
|
||||
PU = ObjDescuento.PU
|
||||
End If
|
||||
|
||||
Row("PU") = PU
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString().ToDecimal)
|
||||
|
||||
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||
|
||||
Row("Descuento") = (ObjDescuento.ImporteDescuento).RoundSQL(NumeroDecimales)
|
||||
Row("Total") = (Cantidad * PU)
|
||||
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||
End If
|
||||
Next
|
||||
|
||||
Me.CalculaTotalesVenta()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user