diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index e5770fa7b..944995939 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2734,7 +2734,7 @@ concep.DescripcionesEspecificas.NumeroSerie) #Region "C O M P L E M E N T O D E N O M I N A" If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then - + cfdi.TieneSubsidio = True ' bandera par activar que se vaya la opción de totalotrosingresos si es igual a cero 'cfdi.Esquema.AgregarEsquema("http://www.sat.gob.mx/nomina12 http://www.sat.gob.mx/sitio_internet/cfd/nomina/nomina12.xsd") cfdi.Nomina12(ObjCFDITimbre.Nomina.TipoNomina, ObjCFDITimbre.Nomina.FechaPago.ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaInicio.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaFin.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.NumDiasPagados, If(ObjCFDITimbre.Nomina.Percepciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Percepciones.Count > 0, ObjCFDITimbre.Nomina.TotalPercepciones, 0), If(ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0, ObjCFDITimbre.Nomina.TotalDeducciones, 0), If(ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing AndAlso ObjCFDITimbre.Nomina.OtrosPagos.Count > 0, ObjCFDITimbre.Nomina.TotalOtrosPagos, 0)) @@ -2742,7 +2742,6 @@ concep.DescripcionesEspecificas.NumeroSerie) If UsuarioActual.Empresa.UsaAC Then cfdi.Nomina12EntidadSNCF("IF", 90) - #Region "Receptor" cfdi.Nomina12Receptor(ObjCFDITimbre.Nomina.Receptor.CURP, diff --git a/Bancos/ConciliacionesBancarias.aspx.vb b/Bancos/ConciliacionesBancarias.aspx.vb index d7655d6e1..eac3b39ba 100644 --- a/Bancos/ConciliacionesBancarias.aspx.vb +++ b/Bancos/ConciliacionesBancarias.aspx.vb @@ -182,7 +182,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then For Each DrE As DataRow In DtDatosEdoCuenta.Rows If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then - Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate) + Dim FechaConciliado As Date = If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate) If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Or Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then ErrorTrans = True @@ -289,7 +289,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx Dim CveIE As Integer = 0 For Each Gvr As GridViewRow In GvDatos.Rows If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then - Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) + Dim FechaConciliado As Date = If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Then ErrorTrans = True Else @@ -303,7 +303,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx Next For Each Gvr As GridViewRow In GvEdoConciliacion.Rows If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then - Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) + Dim FechaConciliado As Date = If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate) If Not ObjBancos.UpdateConciliacionBancaria(CveIE, FechaConciliado, Gvr.DataKey("CveIEEstadoCuenta").ToEntero, 1, 2, UsuarioActual.CveUsuario) Then 'If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString, ' Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index b5664eab5..f98cd4fd3 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -641,7 +641,7 @@ Partial Class Bancos_FluctuacionCambiaria End Sub Private Function AjusteFluctuacion(CvePrePoliza As Integer, TipoFluctuacion As Integer, CveConcepto As Integer, FechaUltimoDaMes As Date, ByRef ObjConta As ClsContabilidad, Optional CveVenta As Integer = -1, Optional CveCliente As Integer = -1, Optional CveCompra As Integer = -1, Optional CveProveedor As Integer = -1) As Boolean - If Not UsuarioActual.CveEmpresa.Contiene(119, 172, 174) Then Return True + If Not UsuarioActual.CveEmpresa.Contiene(119, 172, 174, 189) Then Return True Dim ErrorRegistrar As Boolean = False Dim tdt As DataTable = VerificacionFluctuacion(TipoFluctuacion, FechaUltimoDiaMes) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index b9ee9e5b3..f82e1c46b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9803,7 +9803,7 @@ Partial Class Compras_Compras respuesta = False 'La fecha de la compra esta por fuera de lo permitido mes actual o mes anterior If FechaCompra.Month > MesReembolsoInt Then - Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Reembolso {TxtRembolsoNumero.Text} ,Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) + Alert($"La fecha de la compra que se quiere registrar esta adelantada al mes de la comprobación (Reembolso {TxtRembolsoNumero.Text} Personal: {DdlPersonal.SelectedItem.Text} ,Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) Else Alert($"La fecha de la compra que se quiere registrar es anterior al mes permitido por la comprobación (Reembolso {TxtRembolsoNumero.Text}, Fecha comprobación {FechaReembolso.ToString("dd/MM/yyyy")}).", TipoMensaje.MsgAdvertencia) End If diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 9125c4783..1497bda13 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -391,8 +391,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas for (int k = firstColumnIndex2; k <= lastColumnIndex2; k++) { if (k > 0) - { - bool flag = true; + { switch (NombreHoja) { case "IVA Trasladado": diff --git a/Nomina/RepMovtosPermanentes.aspx b/Nomina/RepMovtosPermanentes.aspx index 2d5190313..6a0d0edf2 100644 --- a/Nomina/RepMovtosPermanentes.aspx +++ b/Nomina/RepMovtosPermanentes.aspx @@ -207,7 +207,7 @@ - + diff --git a/OC/RepOC.aspx.vb b/OC/RepOC.aspx.vb index 0136764eb..9d82d6360 100644 --- a/OC/RepOC.aspx.vb +++ b/OC/RepOC.aspx.vb @@ -402,15 +402,16 @@ Partial Class RepOC Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra") Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1") Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2") - Dim Total As Double = TotalPesos + (TotalDolares * GlobalTipoCambio) + 'Dim Total As Double = TotalPesos + (TotalDolares * GlobalTipoCambio) + Dim TotalMN As Decimal = DtOC.AsEnumerable() _ + .Sum(Function(row) Math.Round(Convert.ToDecimal(row.Field(Of Decimal)("Total")) * Convert.ToDecimal(row.Field(Of Decimal)("TipoCambio")), 2)) - MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + Total.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares") + + MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + TotalMN.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares") UPPIndicador.Update() - DivIndicadoresCompradoRecibido.Visible = True DivIndicadoresCompradoRecibido.InnerHtml = String.Empty - Dim Recibidos As Decimal = DtOC.SUM("Comprado") Dim Comprados As Decimal = DtOC.SUM("Recibido") diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 1ead86d18..53bbac7b2 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -286,7 +286,7 @@ -
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index d57e9aae0..7198a0e00 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -414,6 +414,10 @@ Partial Class ProductosyServicios divPrecio.Visible = True End If + If UsuarioActual.CveRol = 1 Then + divPSExtranjero.Visible = True + End If + If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then '' empresa deduce IEPS divIEPS.Visible = True End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 8a1b3c747..65774ea22 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -42057,6 +42057,7 @@ Partial Class Ventas Where row.RowType = DataControlRowType.DataRow Select New With { + .CveVentaDetalle = row.DataKey("CveVentaDetalle").ToEntero(), .Codigo = row.DataKey("Codigo").Trim(), .NumeroParte = row.DataKey("NumeroParte").Trim(), .Descripcion = row.DataKey("PS").Trim(), @@ -42065,13 +42066,32 @@ Partial Class Ventas .Precio = row.FCLiteral("LtlPU").Text.Trim().ToDecimal(), .SubImporte = row.DataKey("TotalImporte").ToDecimal(), .MargenUtilidad = row.FCLabel("LblCostoPorcentaje").Text.Replace("%", "").Replace(" ", "").Trim().ToDecimal(), - .UltimoCosto = row.FCLabel("LblCosto").Text.Trim().ToDecimal() + .UltimoCosto = row.FCLabel("LblCosto").Text.Trim().ToDecimal(), + .PL1 = 0D, + .PL2 = 0D }).QueryToDataTable(True) If DtExcel.Rows.Count < 1 Then Alert("No hay resultados en la busqueda.", TipoMensaje.MsgAdvertencia) Exit Sub End If + Dim DtPreciosLista As DataTable = Nothing + + If UsuarioActual.CveEmpresa = 189 Then + Dim ObjVta As New ClsVentas + If ObjVta.GetVentaDetallePreciosLista(Me.CveVenta, UsuarioActual.CveEmpresa) Then + DtPreciosLista = ObjVta.DtResultados.Copy() + End If + ObjVta.Dispose() + + If DtPreciosLista IsNot Nothing Then + For Each Row As DataRow In DtExcel.Rows + Row("PL1") = DtPreciosLista.FiltroPrimeroValor("PL1", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToDecimal() + Row("PL2") = DtPreciosLista.FiltroPrimeroValor("PL2", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToDecimal() + Next + End If + End If + Dim folio = LblSerie.Text + "-" + TxtFolio.Text @@ -42085,6 +42105,9 @@ Partial Class Ventas DtExcel.Columns("MargenUtilidad").ColumnName = "Margen de utilidad" DtExcel.Columns("UltimoCosto").ColumnName = "Último costo" + 'QUITAR COLUMNA DE VENTA DETALLE, EL USUARIO NO DEBE VERLA + DtExcel.Columns.Remove("CveVentaDetalle") + SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) Dim FileExcel As New ExcelFile() @@ -42109,6 +42132,10 @@ Partial Class Ventas worksheet.Columns(7).Style.NumberFormat = "#,##0.00" 'ULTIMO COSTO worksheet.Columns(8).Style.NumberFormat = "$#,##0.00_);($#,##0.00)" + 'PL1 + worksheet.Columns(9).Style.NumberFormat = "$#,##0.00_);($#,##0.00)" + 'PL2 + worksheet.Columns(10).Style.NumberFormat = "$#,##0.00_);($#,##0.00)" Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns() For i As Integer = 0 To columnCount