diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 16dfd0000..81615630c 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -39,6 +39,7 @@ Public Class ClsNominas Public Property SDI As Double Public Property SBC As Double + Public Property RegistroPatronal As String Public Property SerieFolio As String Public Property NominaFolio As String @@ -614,7 +615,7 @@ Public Class ClsNominas End Try Return retorno End Function - + Public Function GuardarAguinaldo(CveEmpresa As Integer, CveUsuario As Integer, registros As String) As Boolean Dim retorno As Boolean = False @@ -2742,7 +2743,7 @@ Public Class ClsNominas End Try Return retorno End Function - + Public Function ReporteVacacionesCalendario(CveProyecto As Integer, CveSubProyecto As Integer, cveEmpresa As Integer, fechaInicio As String, fechaFin As String) As Boolean Dim retorno As Boolean = False Try diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 86c935ff1..2ce03c048 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -34,6 +34,7 @@ Public Class ClsProductosServicios Public Property NumeroParte As String Public Property CodigoBarras As String Public Property PS As String + Public Property PSExtranjero As String Public Property Precio As Double Public Property PrecioMinimo As Double Public Property Oferta As Double @@ -203,7 +204,7 @@ Public Class ClsProductosServicios End Sub #End Region Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional NumeroParte As String = "-1", - Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, + Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional PSExtranjero As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -216,6 +217,7 @@ Public Class ClsProductosServicios .Add("@NumeroParte", SqlDbType.VarChar).Value = NumeroParte .Add("@CodigoBarras", SqlDbType.VarChar).Value = CodigoBarras .Add("@PS", SqlDbType.VarChar).Value = PS + .Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@EsPaquete", SqlDbType.SmallInt).Value = EsPaquete .Add("@AplicaParaVenta", SqlDbType.Int).Value = pAplicaParaVenta @@ -245,6 +247,7 @@ Public Class ClsProductosServicios Me.NumeroParte = Data.Rows(0)("NumeroParte").ToString Me.CodigoBarras = Data.Rows(0)("CodigoBarras").ToString Me.PS = Data.Rows(0)("PS").ToString + Me.PSExtranjero = Data.Rows(0)("PSExtranjero").ToString Precio = Data.Rows(0)("Precio").ToString.ToDouble PrecioMinimo = Data.Rows(0)("PrecioMinimo").ToString.ToDouble Oferta = Data.Rows(0)("Oferta").ToString.ToDouble @@ -402,7 +405,7 @@ Public Class ClsProductosServicios Return Retorno End Function Public Function AddPS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer, - AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, + AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, Optional PSExtranjero As String = "-1", Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, @@ -438,6 +441,7 @@ Public Class ClsProductosServicios .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@EsPaquete", SqlDbType.Bit).Value = EsPaquete + .Add("@PSExtranjero", SqlDbType.VarChar).Value = If(PSExtranjero.Length > 845, PSExtranjero.Substring(0, 845), PSExtranjero) .Add("@CveMetodoInventario", SqlDbType.Int).Value = CveMetodoInventario .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS @@ -687,7 +691,7 @@ Public Class ClsProductosServicios End Function Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer, - AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, + AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional PSExtranjero As String = "-1", Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, @@ -734,6 +738,7 @@ Public Class ClsProductosServicios .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero 'Nuevo R: 26/09/2017' .Add("@Inventariable", SqlDbType.Bit).Value = Inventariable diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 2ddf94156..9125c4783 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -401,6 +401,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas { excelWorksheet.Columns[k + 1].Style.NumberFormat = "#,##0.00"; } + //FOLIOS + if (excelWorksheet.Columns[k + 1].Name.Contiene("C", "M")) + { + excelWorksheet.Columns[k + 1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Left; + } break; case "IVA Acreditable": //FECHAS,FOLIOS, NUM CUENTA @@ -414,6 +419,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas excelWorksheet.Columns[k + 1].Style.NumberFormat = "0"; excelWorksheet.Columns[k + 1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Left; } + //FOLIOS + if (excelWorksheet.Columns[k + 1].Name.Contiene("E", "Z")) + { + excelWorksheet.Columns[k + 1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Left; + } break; default: break; diff --git a/General/Dashboard.aspx b/General/Dashboard.aspx index 9a655c1f0..3db415956 100644 --- a/General/Dashboard.aspx +++ b/General/Dashboard.aspx @@ -428,6 +428,15 @@ overflow: auto; } */ + .thcenternowrap th{ + text-align:center; + white-space:nowrap + } + .thcenternowrap th div{ + display:inline-block !important; + text-align:center; + white-space:nowrap + } @@ -492,7 +501,7 @@
+ + Días Pagados + + + + + Días IMSS diff --git a/Nomina/ReportedeAcumulados.aspx.cs b/Nomina/ReportedeAcumulados.aspx.cs index 76d441dfe..cb9b30d12 100644 --- a/Nomina/ReportedeAcumulados.aspx.cs +++ b/Nomina/ReportedeAcumulados.aspx.cs @@ -197,7 +197,7 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas //string ctipo = "P"; - int CurrentColumn = 7; + int CurrentColumn = 8; BoundField bf; foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows) { diff --git a/RH/CatChecadores.aspx.cs b/RH/CatChecadores.aspx.cs index 7e3ca781d..cb3c9138b 100644 --- a/RH/CatChecadores.aspx.cs +++ b/RH/CatChecadores.aspx.cs @@ -42,7 +42,10 @@ public partial class RH_CatChecadores : ClsPaginas ObjRH.Dispose(); GvDatos.DataBind(); - GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text; + if(GvDatos.HeaderRow != null && GvDatos.HeaderRow.Cells.Count > 0) + { + GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text; + } } private void CargaSubProyectos() diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 5d6a9c720..67455a4b5 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -1358,7 +1358,6 @@ Partial Class Ventas_PVCobranza RemisionesLista.Add(VentaRemision.CveVenta) Dim DtRemisionesPS As New DataTable() - Dim DtPagosFacturaGlobal As New DataTable() If ObjClientes.GetVentasRemisionesTotales(VentaRemision.CveCliente, VentaRemision.CveVenta.ToString(), 1, UsuarioActual.CveEmpresa) Then DtRemisionesPS = ObjClientes.DtResultados.Copy() @@ -1399,6 +1398,21 @@ Partial Class Ventas_PVCobranza If GvRow.DataKey("Tipo").Contiene("NC", "IxC", "Ant") AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then Dim CveFormaPagoAnt = GvRow.DataKey("CveFormaPago").ToEntero() + + If GvRow.DataKey("Tipo").Contiene("Ant") Then + 'SI NO ES AMORTIZACION DE ANTICIPO + If Not CveFormaPagoAnt = 21 Then + CveFormaPagoAnt = 21 + End If + End If + + 'If GvRow.DataKey("Tipo").Contiene("NC") Then + ' 'SI NO ES AMORTIZACION DE ANTICIPO o DEVOLUCION + ' If Not CveFormaPagoAnt.Contiene(21, 11) Then + ' CveFormaPagoAnt = 21 + ' End If + 'End If + Dim Importe = GvRow.FCTextBox(String.Format("TxtAnticipo{0}", GvRow.RowIndex)).Text.ToDecimal() DtPagos.Rows.Add({CveFormaPagoAnt, Importe}) @@ -1423,17 +1437,22 @@ Partial Class Ventas_PVCobranza If TxtImporteEfectivo.Text.ToDecimal > 0 Then Dim tpag As Decimal = LtlSaldo.Text.ToDecimal - PagadoSinEfectivo If TxtImporteEfectivo.Text.ToDecimal < tpag Then tpag = TxtImporteEfectivo.Text.ToDecimal - DtPagos.Rows.Add({1, tpag}) + + If tpag > 0 Then + DtPagos.Rows.Add({1, tpag}) + End If End If Dim PagoMaximo = DtPagos.MAX("Importe") Dim CveFormaPago As Integer = DtPagos.FiltroPrimeroValor("CveFormaPago", $"Importe = {PagoMaximo}").ToEntero() + If CveFormaPago > 0 Then ObjFactura.CveFormaPago = CveFormaPago ObjFactura.CveMetodoPago = 1 ObjFactura.ClaveMetodoPagoSAT = "PUE" ObjFactura.ClaveFormaPagoSAT = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjFactura.CveFormaPago}") End If + ObjFactura.FechaPago = Now 'venta de cantado el mismo dia Else 'venta a crédito @@ -2331,19 +2350,23 @@ Partial Class Ventas_PVCobranza DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("") End If ObjVentas.Dispose() - Dim tTipoDocto As String + + Dim tTipoDocto As String = "" + Dim PorcentajeIVA As Decimal = -1 + If DbRowVenta IsNot Nothing Then CveCliente = DbRowVenta("CveCliente").ToString().ToEntero() CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero() tTipoDocto = DbRowVenta("TipoDocto").ToString() + PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString().ToDecimal() End If If CveCliente > 0 Then - CargaAnticipos(CveCliente, tTipoDocto) + CargaAnticipos(CveCliente, tTipoDocto, PorcentajeIVA) End If End Sub - Private Sub CargaAnticipos(CveCliente As Integer, TipoDocto As String) + Private Sub CargaAnticipos(CveCliente As Integer, TipoDocto As String, PorcentajeIVA As Decimal) If CveCliente > 0 Then Dim ObjMovtos As New ClsMovimientos() If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then @@ -2355,7 +2378,8 @@ Partial Class Ventas_PVCobranza If TipoDocto = "Ant" Then TipoAnticipo = " 'IxC' " If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then - GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN ({TipoAnticipo}) ") + GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN ({TipoAnticipo}) AND (PorcentajeIVA = {PorcentajeIVA} OR Tipo = 'IxC')") + 'GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN ({TipoAnticipo})") Else GVAnticipos.DataSource = Nothing End If diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index f9011af81..a5ad37be6 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -285,6 +285,17 @@
+ +
+
+
+ + + +
+
+
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index f46fe49a4..d57e9aae0 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -983,6 +983,7 @@ Partial Class ProductosyServicios TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString TxtPS.Text = ObjProductosServicios.PS + TxtPSExtranjero.Text = ObjProductosServicios.PSExtranjero TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma TxtPrecioMinimo.Text = ObjProductosServicios.PrecioMinimo.ToString("F4") @@ -1577,10 +1578,12 @@ Partial Class ProductosyServicios End If If CvePS = -1 Then Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") + Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "") If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, - ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, + ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, PSSExtranjero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, @@ -1650,11 +1653,12 @@ Partial Class ProductosyServicios 'End If Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") + Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "") If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper - + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, - ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, + ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PSSExtranjero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,