This commit is contained in:
2023-11-12 21:22:03 -07:00
6 changed files with 117 additions and 44 deletions

View File

@@ -808,7 +808,7 @@
<asp:GridView ID="GvM" runat="server" GridLines="none" Width="70%"
CssClass="table table-hover ADScroller btn-xs" ShowHeader="True"
EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,CvePS,PU,Cantidad,CveTamaño,CodigoPS"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True" OnRowDataBound="GvM_RowDataBound" >
<Columns>
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
<ItemTemplate>

View File

@@ -33,14 +33,6 @@ Partial Class Inventarios_RecepcionUsados
ViewState("DtMovimientos") = value
End Set
End Property
Private Property ConsecutivoVenta As Integer
Get
Return ViewState("ConsecutivoVenta").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("ConsecutivoVenta") = value
End Set
End Property
Public Property DtTamaños() As DataTable
Get
Return CType(ViewState("DtTamaños"), DataTable)
@@ -366,7 +358,6 @@ Partial Class Inventarios_RecepcionUsados
End Sub
Private Sub CargaInicial()
ConsecutivoVenta = 0
CveMovimiento = -1
CveMovimientoRelacionado = -1
TieneRelacionado = -1
@@ -1070,11 +1061,32 @@ Partial Class Inventarios_RecepcionUsados
txtCantidad.Focus()
End Sub
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String,
''' <summary>
''' Regeresa el id temporal del registro en el tmpdt
''' </summary>
''' <param name="CvePS"></param>
''' <param name="PS"></param>
''' <param name="CveUM"></param>
''' <param name="UM"></param>
''' <param name="Cantidad"></param>
''' <param name="PU"></param>
''' <param name="Serie"></param>
''' <param name="CodigoAF"></param>
''' <param name="Codigo"></param>
''' <param name="CveAF"></param>
''' <param name="Observaciones"></param>
''' <param name="Lote"></param>
''' <param name="CveSeccionAlmacen"></param>
''' <param name="SeccionAlmacen"></param>
''' <param name="Tamaño"></param>
''' <param name="CveTamaño"></param>
''' <param name="CveVentaDetalle"></param>
''' <returns></returns>
Protected Function AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String,
CveAF As String, Observaciones As String, Lote As String, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Tamaño As String, CveTamaño As Integer,
Optional CveVentaDetalle As Integer = -1)
Optional CveVentaDetalle As Integer = -1) As Integer
Dim Retorno As Integer = -1
'If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
Dim Valido As Boolean = True
@@ -1101,7 +1113,7 @@ Partial Class Inventarios_RecepcionUsados
If Cantidad > CantidadPermitida Then
Alert($"La cantidad es mayor a la permitida", TipoMensaje.MsgAdvertencia)
Exit Sub
Return -1
End If
'Else
@@ -1113,7 +1125,7 @@ Partial Class Inventarios_RecepcionUsados
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
If Serie <> "" And (Serie.ToUpper = dr("Codigo").ToString.ToUpper Or Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
Alert($"La serie indicada <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
Return -1
End If
Dim registro As DataRow = DtMovimientos.NewRow
@@ -1151,8 +1163,10 @@ Partial Class Inventarios_RecepcionUsados
If Not ChkSeguirAgregando.Checked Then
RegistraScript("$('#DivModalAgregar').modal('hide')", "hidemodal")
End If
Else
Retorno = DtMovimientos.FiltroPrimeroValor("No", Orderby:="No DESC").ToEntero()
Else
DtMovimientos.Rows(IndexDTUsado)("Cantidad") = Cantidad
DtMovimientos.Rows(IndexDTUsado)("CveUM") = CveUM
@@ -1182,6 +1196,8 @@ Partial Class Inventarios_RecepcionUsados
DtMovimientos.AcceptChanges()
Retorno = DtMovimientos.Rows(IndexDTUsado)("No").ToString().ToEntero()
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
If Not ChkSeguirAgregando.Checked Then
@@ -1189,7 +1205,8 @@ Partial Class Inventarios_RecepcionUsados
End If
End If
End Sub
Return Retorno
End Function
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
If DdlClientes.SelectedValue.ToEntero <= 0 Then
@@ -1676,10 +1693,6 @@ Partial Class Inventarios_RecepcionUsados
TxtTotal.Text = Total.FormatoNumero(2)
End If
End Sub
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs)
End Sub
Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing
GvM.EditIndex = e.NewEditIndex
@@ -1734,6 +1747,14 @@ Partial Class Inventarios_RecepcionUsados
End If
DtMovimientos.AcceptChanges()
If TmpDTAjustes IsNot Nothing Then
Dim DrAjustes As DataRow() = TmpDTAjustes.Select(String.Format("ConsecutivoVenta = {0}", i))
If DrAjustes.Count > 0 Then
DrAjustes(0).Delete()
End If
TmpDTAjustes.AcceptChanges()
End If
End If
GvM.EditIndex = -1
@@ -2830,7 +2851,6 @@ Partial Class Inventarios_RecepcionUsados
If AddPSRNC(ObjRemisionNC.DtDetalle, 1, CveUnidadMedida, "", CveClasificacion, "", CvePS, "", Obs, PU, 0, -1, "",
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA) Then
ConsecutivoVenta += 1
End If
Else
@@ -3260,16 +3280,23 @@ Partial Class Inventarios_RecepcionUsados
UpAjuste.Update()
End Sub
Private Sub GuardaAjuste()
Private Sub GuardaAjuste(ConsecutivoVenta As Integer)
Dim CargoAnterior As Double = 0
Dim CargoActual As Double = 0
Dim Row As DataRow = Nothing
Dim EsNuevo As Boolean = true
ConsecutivoVenta += 1
Dim RowsAjustes = TmpDTAjustes.Select($"ConsecutivoVenta = {ConsecutivoVenta}")
If RowsAjustes IsNot Nothing AndAlso RowsAjustes.Length > 0 Then
Row = RowsAjustes(0)
EsNuevo = False
Else
Row = TmpDTAjustes.NewRow
End If
Row = TmpDTAjustes.NewRow
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
@@ -3305,8 +3332,12 @@ Partial Class Inventarios_RecepcionUsados
Row("CveClienteDistribuidor") = -1
Row("CveModeloAuto") = -1
Row("Año") = ""
TmpDTAjustes.Rows.Add(Row)
If EsNuevo Then
TmpDTAjustes.Rows.Add(Row)
Else
TmpDTAjustes.AcceptChanges()
End If
End Sub
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
@@ -3352,7 +3383,7 @@ Partial Class Inventarios_RecepcionUsados
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim IdConsecutivo As Integer = -1
Dim ObjPS As New ClsProductosServicios
Try
Dim CveTamaño As Integer = -1
@@ -3364,6 +3395,7 @@ Partial Class Inventarios_RecepcionUsados
Dim Importe As Decimal = 0
Dim drTamañoPS As DataRow = Nothing
TmpDTAjustes.Rows.Clear()
DtMovimientos.Rows.Clear()
' USADOS
@@ -3385,7 +3417,7 @@ Partial Class Inventarios_RecepcionUsados
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
drTamañoPS = ObjPS.DtResultados.FiltroPrimero("")
'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos
AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe,
IdConsecutivo = AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe,
"", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
End If
Else
@@ -3400,7 +3432,7 @@ Partial Class Inventarios_RecepcionUsados
ObjPS.Dispose()
If Not ErrorAjuste Then
GuardaAjuste()
GuardaAjuste(IdConsecutivo)
End If
@@ -3714,4 +3746,12 @@ Partial Class Inventarios_RecepcionUsados
End Function
#End Region
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
'SI ES GARANTIA, NO DEBE PERMTIR ELIMINAR
If RblUsadosAjuste.SelectedValue = "1" Then
e.Row.FCLinkButton("LnkActuallizarUsado").Visible = False
End If
End If
End Sub
End Class

View File

@@ -3936,9 +3936,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (continuar)
{
cargaDatos(CvePersonal: SRCvePersonal);
cargaBitacora();
if (PnlConceptoPersonal.Visible)
{
cargaBitacora();
cargasobrericiboconceptos(SRMostrarFormulas);
cargasobrericiboconceptos(SRMostrarFormulas);
}
UpGvConceptos.Update();
RegistraScript("$('#ModalUpConcepto').modal('hide');");
@@ -7114,7 +7117,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
CcveMovtoPermanente = gvRow.DataKey("CveMovtoPermanente").ToEntero();
int cveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
int cvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
int CveCuenta = gvRow.DataKey("CveCuenta").ToEntero();
int CveCuenta = gvRow.DataKey("CveCuenta").ToEntero();
string descripcion = gvRow.DataKey("Descripcion");
int tipoDescuento = gvRow.DataKey("TipoDescuento").ToEntero();
double valor = gvRow.DataKey("Valor").ToDouble();
@@ -7141,7 +7144,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
TxtVecesAplicar.Text = vecesAplicar.ToString();
TxtMontoLimite.Text = montoLimite.ToString();
TxtFechaAplicacion.Text = $"{fechaInicioAplicacion:dd/MM/yyyy}";
DdlCtaContable.SelectedValueExist("-1");
DdlCtaContable.SelectedValueExist("-1");
ChkEstatus.Checked = estatus;
RegistraScript("$('#ModalMovtoPermanente').modal()");
@@ -10168,7 +10171,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
if (essua)
{
System.IO.Stream fs=(new CedulaSuaPDF()).writexls(dirPDF);
System.IO.Stream fs = (new CedulaSuaPDF()).writexls(dirPDF);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
@@ -10187,8 +10190,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
else
{
System.IO.Stream fs =(new CedulaEBAPDF()).writexls(dirPDF);
System.IO.Stream fs = (new CedulaEBAPDF()).writexls(dirPDF);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
@@ -10655,8 +10658,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
}
libro.Range(2, 7, row, dataEBAPDF.ContieneLic ?15:16).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
libro.Range(2, dataEBAPDF.ContieneLic ? 17:18, row, dataEBAPDF.ContieneLic ? 20:21).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
libro.Range(2, 7, row, dataEBAPDF.ContieneLic ? 15 : 16).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
libro.Range(2, dataEBAPDF.ContieneLic ? 17 : 18, row, dataEBAPDF.ContieneLic ? 20 : 21).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Right;
//libro.Range(2, 7, row, 15).Style.NumberFormat.Format = "$ #,##0.00";
//libro.Range(2, 17, row, 20).Style.NumberFormat.Format = "$ #,##0.00";
libro.Columns().AdjustToContents();
@@ -10681,7 +10684,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (!isTitulo)
{
text = text.Replace(strtitulo.ToString(), "");
}
}
cedulaSUAEmpleados cempleado = null;
string[] lines = text.Split('\n');
int pasoCaptura = 0;
@@ -10789,11 +10792,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
strb.AppendLine("/*NEWPAGE*/");
}
}
objSUA.txtTodo = strb.ToString();
return objSUA;
}
public cedulaSUAEmpleados procesapaso4(string line, cedulaSUAEmpleados empleado,bool ContieneLic)
public cedulaSUAEmpleados procesapaso4(string line, cedulaSUAEmpleados empleado, bool ContieneLic)
{
if (line.ToUpper().Contains("Página".ToUpper()))
{
@@ -10855,7 +10858,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
if (col < l && !ismsfsd) { dtos.SDI = splitedline[col++]; }
if (col < l && splitedline[col] == "") { col++; }
if(ContieneLic && col < l && !ismsfsd) { dtos.Lic = splitedline[col++]; }
if (ContieneLic && col < l && !ismsfsd) { dtos.Lic = splitedline[col++]; }
if (col < l && splitedline[col] == "") { col++; }
if (col < l && !ismsfsd) { dtos.Inc = splitedline[col++]; }
if (col < l && splitedline[col] == "") { col++; }

View File

@@ -337,6 +337,20 @@
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Días IMSS</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlDiasAsistio" Text='<%# Eval("DiasAsistio")%>' runat="server"></asp:Literal>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Salario IMSS</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSBC" Text='<%# Eval("SBC","{0:N2}")%>' runat="server"></asp:Literal>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />

View File

@@ -196,7 +196,7 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
//string ctipo = "P";
int CurrentColumn = 5;
int CurrentColumn = 7;
BoundField bf;
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows)
{
@@ -428,6 +428,18 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
libro.Cell(3, column).Value = " ";
libro.Column(column).Width = 35;
column++;
libro.Cell(1, column).Value = " ";
libro.Cell(2, column).Value = "Días IMSS";
libro.Cell(3, column).Value = " ";
libro.Column(column).Width = 35;
column++;
libro.Cell(1, column).Value = " ";
libro.Cell(2, column).Value = "Salario IMSS";
libro.Cell(3, column).Value = " ";
libro.Column(column).Width = 35;
int iniciotipe = column;
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Rows)
{
@@ -545,6 +557,10 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
libro.Cell(Fila, column).Value = string.Format("'{0}", erow["NumeroSS"]);
column++;
libro.Cell(Fila, column).Value = erow["RegistroPatronal"];
column++;
libro.Cell(Fila, column).Value = erow["DiasAsistio"];
column++;
libro.Cell(Fila, column).Value = erow["SBC"];
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' AND EsPadre = 1 ").Rows)
{
column++;

View File

@@ -29763,7 +29763,7 @@ Partial Class Ventas
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero()) Then
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
OcurrioError = True
End If