diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 0bb1ad278..c18d04b6e 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4306,6 +4306,29 @@ Public Class ClsVentas End Try Return retorno End Function + + Public Function GetRepMetasVendedores(FechaMesActual As String, CveEmpresa As Integer, CveVendedor As Integer, CveCategoria As Integer, CveClasificacion As Integer, + CveClasificacion2 As Integer, CveMarca As Integer, CveSubProyecto As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Vta_MetasVendedores", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaMesActual", SqlDbType.DateTime).Value = FechaMesActual + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de metas por vendedores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function #Region "Conciliación emitidas SAT" Public Function ConciliacionemitidasSATGet(cveEmpresa As Int32) As Boolean diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 44105439a..205ca841b 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1378,6 +1378,7 @@ Partial Class General_SaldosIniciales Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDecimal, 0) Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString, "") + Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Row("PorcentajeIVA").ToString.ToDecimal, 0) GuardaLog(Sucursal + "-" + Row("Folio").ToString) 'Temporalmente SE BORRARA @@ -1431,7 +1432,7 @@ Partial Class General_SaldosIniciales End If CveVenta = ObjVentas.CveVenta - If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, 0.16, SubTotal * 0.16, "Saldo Inicial", 0, 0, -1, 0) Then + If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, -1, 0, PorcentajeIVA:=PorcentajeIVA) Then ErrorVentas = True Exit For End If diff --git a/Ventas/MetasVendedores.aspx b/Ventas/MetasVendedores.aspx index 6fe34dd38..28ae1f483 100644 --- a/Ventas/MetasVendedores.aspx +++ b/Ventas/MetasVendedores.aspx @@ -56,6 +56,114 @@ + + +
+
+
+ + "> + +
+
+
+ +
Fecha del mes:
+
+
+ + + + +
+ + + +
+ +
Sucursal:
+
+ +
+
+
+ +
+ +
+ + +
+ +
+ + +
+ +
+
+
+ +
+ +
+ + +
+ +
+
+ +
+
+
> +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +