diff --git a/.gitignore b/.gitignore
index 7bbbff371..e3e70ef3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,122 @@
/Menu
/Web.config
/Log.txt
+/.vs/localhost/v14/.suo
+/LogMail.txt
+/.vs
+/packages
+/Temp/637019018406489106-FormatoPS (1).xlsx
+/Temp/637025911245561139-FormatoAlmacenTest2.xlsx
+/Temp/637025910298823073-FormatoAlmacenTest2.xlsx
+/Temp/637025890843842072-FormatoAlmacenTest.xlsx
+/Temp/637025890070124286-FormatoAlmacenTest.xlsx
+/Temp/637025889649837823-FormatoAlmacenTest.xlsx
+/Temp/637025888979809566-FormatoAlmacenTest.xlsx
+/Temp/637025888317991027-FormatoAlmacenTest.xlsx
+/Temp/637025886969280729-FormatoAlmacenTest.xlsx
+/Temp/637025883478481189-FormatoAlmacenTest.xlsx
+/Temp/637025881893726971-FormatoAlmacenTest.xlsx
+/Temp/637025875318390368-FormatoAlmacenTest.xlsx
+/Temp/637025873461693799-FormatoAlmacenTest.xlsx
+/Temp/637025867243299753-FormatoAlmacenTest.xlsx
+/Temp/637025866028329141-FormatoAlmacenTest.xlsx
+/Temp/637025858967837880-FormatoAlmacen (8).xlsx
+/Temp/637025856623805153-FormatoAlmacenTest.xlsx
+/Temp/637025854225974598-FormatoAlmacenTest.xlsx
+/Temp/637025850746443741-FormatoAlmacenTest.xlsx
+/Temp/637025849906896827-FormatoAlmacenTest.xlsx
+/Temp/637025811751064573-FormatoAlmacen (9).xlsx
+/Temp/637025802306385270-FormatoAlmacen (9).xlsx
+/Temp/637024955677385188-FormatoAlmacen (8).xlsx
+/Temp/637024223339157610-FormatoAlmacen (8).xlsx
+/Temp/637024211080831453-FormatoAlmacen (8).xlsx
+/Temp/637024208748075824-FormatoAlmacen (8).xlsx
+/Temp/637024206124827330-FormatoAlmacen (8).xlsx
+/Temp/637024198603668842-FormatoAlmacen (8).xlsx
+/Temp/637024194937999485-FormatoAlmacen (8).xlsx
+/Temp/637024187194477421-FormatoAlmacen (8).xlsx
+/Temp/637024175396114926-FormatoAlmacen(1).xlsx
+/Temp/637024174152414578-FormatoAlmacen(1).xlsx
+/Temp/637024172516905613-FormatoAlmacen(1).xlsx
+/Temp/637024172339379953-FormatoAlmacen(1).xlsx
+/Temp/637024168678743644-FormatoAlmacen(1).xlsx
+/Temp/637024167899990250-FormatoAlmacen(1).xlsx
+/Temp/637024163796303799-FormatoAlmacen(1).xlsx
+/Temp/637024162382548932-FormatoAlmacen(1).xlsx
+/Temp/637024154734150595-FormatoAlmacen(1).xlsx
+/Temp/637024152618695056-FormatoAlmacen(1).xlsx
+/Temp/637024129146071459-FormatoAlmacen(1).xlsx
+/Temp/637024111695874769-FormatoAlmacen(1).xlsx
+/Temp/637022418959236013-FormatoAlmacen (4).xlsx
+/Temp/637022412610855769-FormatoAlmacen (4).xlsx
+/Temp/637022411585353362-FormatoAlmacen (4).xlsx
+/Temp/637022404788752537-FormatoAlmacen (3).xlsx
+/Temp/637022403501450734-FormatoAlmacen (3).xlsx
+/Temp/637022402924630398-FormatoAlmacen (3).xlsx
+/Temp/637022401250489074-FormatoAlmacen (5).xlsx
+/Temp/637022398545213986-FormatoAlmacen (3).xlsx
+/Temp/637022382214133336-FormatoAlmacen (5).xlsx
+/Temp/637022380557097080-FormatoAlmacen (5).xlsx
+/Temp/637022379412790662-FormatoAlmacen (5).xlsx
+/Temp/637022378793902185-FormatoAlmacen (5).xlsx
+/Temp/637021654534481890-FormatoAlmacen (3).xlsx
+/Temp/637021651345315739-FormatoAlmacen (3).xlsx
+/Temp/637021616508913486-FormatoAlmacen (3).xlsx
+/Temp/637021593875864770-FormatoAlmacen (3).xlsx
+/Temp/637021592631992296-FormatoAlmacen (3).xlsx
+/Temp/637021592488982043-FormatoAlmacen (3).xlsx
+/Temp/637021560097934922-FormatoAlmacen (3).xlsx
+/Temp/637021554559110062-FormatoPS (1).xlsx
+/Temp/637021550053083909-FormatoAlmacen (3).xlsx
+/Temp/637021547214247040-FormatoAlmacen (3).xlsx
+/Temp/637021545638924577-FormatoAlmacen (3).xlsx
+/Temp/637021527971651311-FormatoAlmacen (3).xlsx
+/Temp/637021527073950270-FormatoAlmacen (3).xlsx
+/Temp/637021526064707043-FormatoAlmacen (3).xlsx
+/Temp/637021522586485282-FormatoAlmacen (3).xlsx
+/Temp/637021521403851473-FormatoAlmacen (3).xlsx
+/Temp/637021519837377736-FormatoAlmacen (3).xlsx
+/Temp/637021515778751967-FormatoAlmacen (3).xlsx
+/Temp/637020728341171393-FormatoAlmacen (2).xlsx
+/Temp/637020724850629405-FormatoAlmacen (2).xlsx
+/Temp/637020723186758192-FormatoAlmacen (2).xlsx
+/Temp/637020721382428289-FormatoAlmacen (2).xlsx
+/Temp/637019818530193505-FormatoPS (1).xlsx
+/Temp/637019811169546741-FormatoPS (1).xlsx
+/Temp/637019803848526814-FormatoPS (1).xlsx
+/Temp/637019796396388291-FormatoPS (1).xlsx
+/Temp/637019783731773074-FormatoPS (1).xlsx
+/Temp/637019781961714106-FormatoPS (1).xlsx
+/Temp/637019780290041928-FormatoPS (1).xlsx
+/Temp/637019777705293557-FormatoPS (1).xlsx
+/Temp/637019766664551609-FormatoPS (1).xlsx
+/Temp/637019765307733182-FormatoPS (1).xlsx
+/Temp/637019764041447352-FormatoPS (1).xlsx
+/Temp/637019759922681271-FormatoPS (1).xlsx
+/Temp/637019028539049368-FormatoPS (1).xlsx
+/Temp/637019027752495331-FormatoPS (1).xlsx
+/Temp/637019026870914833-FormatoPS (1).xlsx
+/Temp/637019020024023961-FormatoPS (1).xlsx
+/Temp/637019018783282466-FormatoPS (1).xlsx
+/Temp/637025921934403738-FormatoAlmacen (4)(1).xlsx
+/Temp/637025871940254054-FormatoAlmacenTest.xlsx
+/Temp/637025819297716436-FormatoAlmacen (9).xlsx
+/Temp/637025813094826506-FormatoAlmacen (9).xlsx
+/Temp/637025803627482072-FormatoAlmacen (9).xlsx
+/Temp/637024210197949659-FormatoAlmacen (8).xlsx
+/Temp/637024207387517397-FormatoAlmacen (8).xlsx
+/Temp/637024203939520361-FormatoAlmacen (8).xlsx
+/Temp/637024200918571845-FormatoAlmacen (8).xlsx
+/Temp/637024199786848948-FormatoAlmacen (8).xlsx
+/Temp/637024188637374314-FormatoAlmacen (8).xlsx
+/Temp/637024170730017118-FormatoAlmacen(1).xlsx
+/Temp/637024164939543846-FormatoAlmacen(1).xlsx
+/Temp/637024164072145623-FormatoAlmacen(1).xlsx
+/Temp/637024156159485931-FormatoAlmacen(1).xlsx
+/Temp/637024153420640718-FormatoAlmacen(1).xlsx
+/Temp/637024148711869965-FormatoAlmacen(1).xlsx
+/Temp/637022414752610497-FormatoAlmacen (4).xlsx
+/Temp/637021629396074854-FormatoAlmacen (3).xlsx
+/Temp/637021627402424201-FormatoAlmacen (3).xlsx
+/Temp/637021547606916146-FormatoAlmacen (3).xlsx
+/Temp/637021529455078900-FormatoAlmacen (3).xlsx
diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb
index e892de2b1..557c15266 100644
--- a/App_Code/ClsContPAQi.vb
+++ b/App_Code/ClsContPAQi.vb
@@ -2005,7 +2005,7 @@ Public Class ClsContPAQi
'''
'''
Public Function AddPoliza(TipoPol As Integer, Concepto As String, Cargos As Double, Abonos As Double, CveUsuario As Integer, FechaPoliza As Date, Optional pFolio As String = "-1",
- Optional pTipo As String = "", Optional Guid As String = "-1") As Integer
+ Optional pTipo As String = "", Optional Guid As String = "-1", Optional CvePlantillaPoliza As Integer = -1) As Integer
'Tipo As String, pFolioPoliza As Integer) As Boolean
Dim Retorno As Integer = 0
If Guid = "-1" Then Guid = System.Guid.NewGuid().ToString()
@@ -2078,11 +2078,11 @@ Public Class ClsContPAQi
StrSQL.AppendLine(" INSERT INTO Polizas (Id, RowVersion, Ejercicio, Periodo, TipoPol, Folio, Clase, Impresa, ")
StrSQL.AppendLine(" Concepto, Fecha, Cargos, Abonos, IdDiario, SistOrig, Ajuste, IdUsuario, ")
- StrSQL.AppendLine(" ConFlujo, ConCuadre, TimeStamp,Guid)")
+ StrSQL.AppendLine(" ConFlujo, ConCuadre, TimeStamp,Guid,CvePlantillaPoliza)")
StrSQL.AppendLine(" ")
StrSQL.AppendLine(" VALUES (@IdPoliza, @RowVersion, @Ejercicio, @Periodo, @TipoPol, @Folio, @Clase, @Impresa, ")
StrSQL.AppendLine(" @Concepto, @Fecha, ROUND(@Cargos,2), ROUND(@Abonos,2), @IdDiario, @SistOrig, @Ajuste, @IdUsuario, ")
- StrSQL.AppendLine(" @ConFlujo, @ConCuadre, @TimeStamp,@Guid)")
+ StrSQL.AppendLine(" @ConFlujo, @ConCuadre, @TimeStamp,@Guid,@CvePlantillaPoliza)")
StrSQL.AppendLine(" ")
StrSQL.AppendLine(" EXEC PA_UpdateId 'Id_Poliza';")
StrSQL.AppendLine(" ")
@@ -2123,6 +2123,7 @@ Public Class ClsContPAQi
.Add("@FechaPoliza", SqlDbType.DateTime).Value = FechaPoliza
.Add("@pFolio", SqlDbType.VarChar).Value = pFolio
.Add("@Guid", SqlDbType.VarChar).Value = Guid
+ .Add("@CvePlantillaPoliza", SqlDbType.Int).Value = CvePlantillaPoliza
.Add("@IdPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
End With
@@ -7308,7 +7309,7 @@ Public Class ClsContPAQi
Return Retorno
End Function
- Public Function GetPolizasMasivo(Inicio As Date, Fin As Date, FolioI As Integer, FolioF As Integer, TipoPol As Integer, CveUsuario As Integer, CveSubProyecto As Integer, CveCuenta As Integer) As Boolean
+ Public Function GetPolizasMasivo(Inicio As Date, Fin As Date, FolioI As Integer, FolioF As Integer, TipoPol As Integer, CveUsuario As Integer, CveSubProyecto As Integer, CveCuenta As Integer, CveGrupoPlantillaPoliza As Integer) As Boolean
Dim Retorno As Boolean = False
StrSQL.Clear()
@@ -7338,6 +7339,12 @@ Public Class ClsContPAQi
StrSQL.Append(" AND (@CveSubProyecto = -1 OR ( MP.IdPoliza IN (SELECT IdPoliza FROM @DtSeg)) OR (@CveSubProyecto = -2 AND MP.IdSegNeg = 0) ) ")
StrSQL.Append(" AND (@CveUsuario = -1 OR P.IdUsuario = @CveUsuario) ")
StrSQL.Append(" AND (@Cvecuenta = -1 OR C.Id = @Cvecuenta) ")
+ StrSQL.Append(" AND (@CveGrupoPlantillaPoliza = -1
+ OR ( @CveGrupoPlantillaPoliza = 1 AND ISNULL(P.CvePlantillaPoliza,0) IN (1,22,43, 53, 60, 69, 74, 58, 59, 58, 59, 61, 62, 70,78, 89,94,95,96, 97,99,
+ 64,65,68,72,75,79,80,81,82,83,84,90,91,93,40,41,42,48,54,55,14,24,32,34,37) )
+ OR ( @CveGrupoPlantillaPoliza = 2 AND ISNULL(P.CvePlantillaPoliza,0) IN (4,7,47,10,12,74) )
+ OR ( @CveGrupoPlantillaPoliza = 3 And ISNULL(P.CvePlantillaPoliza,0) IN (2, 3, 5, 8, 9, 13,15,17,19,21, 36,44, 45, 49, 50, 51, 52, 56, 57, 67, 71,73,77,85,86,87,88, 92,98,76,23,38) )
+ OR ( @CveGrupoPlantillaPoliza = 4 AND ISNULL(P.CvePlantillaPoliza,0) IN (6, 11,16, 63,46,47,39,100) ) )")
StrSQL.Append(" ORDER BY P.Folio, MP.NumMovto ")
StrSQL.Append(" END; ")
@@ -7353,6 +7360,8 @@ Public Class ClsContPAQi
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@cvecuenta", SqlDbType.Int).Value = CveCuenta
+ .Add("@CveGrupoPlantillaPoliza", SqlDbType.Int).Value = CveGrupoPlantillaPoliza
+
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 2b556565a..c972e54df 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1050,7 +1050,7 @@ Public Class ClsContabilidad
Dim tIdPoliza As Integer
- Dim CveTipoPoliza, FolioFijo As Integer
+ Dim CveTipoPoliza, FolioFijo, CvePlantillaPoliza As Integer
Dim Cargos As Decimal
Dim Abonos As Decimal
Dim NumPoliza As String = ""
@@ -1087,6 +1087,7 @@ Public Class ClsContabilidad
FolioFijo = Data.Rows(0)("FolioFijo").ToString.ToEntero
TipoPoliza = Data.Rows(0)("TipoPoliza").ToString
CodigoNumeroPoliza = Data.Rows(0)("CodigoNumeroPoliza").ToString
+ CvePlantillaPoliza = Data.Rows(0)("CvePlantillaPoliza").ToString.ToEntero
'FolioFiscal = Data.Rows(0)("FolioFiscal").ToString
'MetodoPagoSAT = Data.Rows(0)("ClaveSAT").ToString
@@ -1106,7 +1107,7 @@ Public Class ClsContabilidad
ObjConta.RemoveCausacionesIVA(-1, tIdPoliza)
ObjConta.RemoveDevolucionesIVA(-1, tIdPoliza)
Else
- tIdPoliza = ObjConta.AddPoliza(CveTipoPoliza, Concepto, Cargos, Abonos, CveUsuario, Fecha, FolioFijo.ToString, CodigoNumeroPoliza)
+ tIdPoliza = ObjConta.AddPoliza(CveTipoPoliza, Concepto, Cargos, Abonos, CveUsuario, Fecha, FolioFijo.ToString, CodigoNumeroPoliza, CvePlantillaPoliza:=CvePlantillaPoliza)
ContaFolio = ObjConta.Folio.ToString
End If
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index a643b79af..653c048d5 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4351,6 +4351,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Sistemas/PermisosPorUsuario.aspx".ToUpper(), 700)
PaginaDict.Add("/Sistemas/Cierre.aspx".ToUpper(), 713)
PaginaDict.Add("/Sistemas/CatTareasProgramadas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/ConfiguracionEmpresa.aspx".ToUpper(), 683)
#End Region
#Region "Ventas"
'VENTAS
diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index c7465b9e7..c94f491b2 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -1796,6 +1796,87 @@ Public Class ClsProductosServicios
End Function
#End Region
+#Region "Porcentaje Marcas de Productos"
+ Public Function GetPorcentajeMarcas(CveCliente As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_PorcentajeMarcasGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los porcentajes de las Marcas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function AddPorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal, CveUsuario As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_PorcentajeMarcasAdd")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
+ .Add("@PorcentajeProducto", SqlDbType.SmallMoney).Value = PorcentajeProducto
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar el porcentaje de la Marca.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+ Public Function UpdatePorcentajeMarcas(CveCliente As Integer, CveMarca As Integer, PorcentajeProducto As Decimal) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_PorcentajeMarcasUpdate")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
+ .Add("@PorcentajeProducto", SqlDbType.SmallMoney).Value = PorcentajeProducto
+
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar el porcentaje de la Marca.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+ Public Function RemovePorcentajeMarcas(CveCliente As Integer, CveMarca As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_PorcentajeMarcasRemove")
+
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
+
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al eliminar el porcentaje de la Marca.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+#End Region
#Region "IDisposable Support"
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index c74d9d6a6..8d5a5a673 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -75,6 +75,7 @@ Public Class ClsVentas
Public Sub RollBack()
SqlTransacc.Rollback()
End Sub
+ Private CveConexion As Integer = 0
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then
@@ -82,6 +83,7 @@ Public Class ClsVentas
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Try
SqlConexion.Open()
+ ConexionAdd()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
@@ -102,6 +104,45 @@ Public Class ClsVentas
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable
End Sub
+
+#Region "Conexiones"
+
+ Private Sub ConexionAdd()
+ If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
+
+ DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsVentas',{0})", HttpContext.Current.Request.Url.Authority), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveConexion", SqlDbType.Int).Direction = ParameterDirection.Output
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ CveConexion = SqlAdapter.SelectCommand.Parameters("@Opcion").Value.ToString.ToEntero
+ Catch ex As Exception
+ OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ End If
+ End Sub
+
+ Private Sub ConexionClose()
+ If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
+
+ DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE WHERE CveConexion = ", CveConexion), CommandType.Text)
+
+ Try
+ SqlAdapter.Fill(Data)
+
+ Catch ex As Exception
+ OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ End If
+
+ End Sub
+#End Region
+
Public Function GetVenta(CveVenta As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasGet")
@@ -3630,6 +3671,23 @@ Public Class ClsVentas
Return retorno
End Function
+ Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Vta_TraspasaVentasAplicadasAnt", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveVentaNueva", SqlDbType.Int).Value = CveVentaNueva
+ .Add("@CveVentaAnterior", SqlDbType.Int).Value = CveVentaAnterior
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al traspasar las ventas aplicadas al nuevo anticipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return retorno
+ End Function
+
#Region " AUTORIZACION DESCUENTOS "
Public Function AutorizacionDescuentosGet(CveAutorizacionDescuento As Integer, CveEmpresa As Integer) As Boolean
diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb
index aa6c11579..e4404f849 100644
--- a/Bancos/CuentasBancariasDetalle.aspx.vb
+++ b/Bancos/CuentasBancariasDetalle.aspx.vb
@@ -33,7 +33,8 @@ Partial Class Bancos_CuentasBancariasDetalle
CargarMoneda()
ViewState("DTUsuarios") = Nothing
- DdlUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
+ Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", DistinctColumns:={"CveUsuario", "Nombre", "Usuario"})
+ DdlUsuarios.DataSource = CargarDdlUsuarios(tablaUsuariosAux)
DdlUsuarios.DataBind()
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
@@ -678,6 +679,27 @@ Partial Class Bancos_CuentasBancariasDetalle
End If
End Sub
+ Private Function CargarDdlUsuarios(UsuariosGlobal As DataTable) As DataTable
+ Dim tablaUsuariosFormateada As DataTable = New DataTable("Usuarios")
+
+ Dim columnaNombre As DataColumn = New DataColumn("Nombre")
+ columnaNombre.DataType = System.Type.GetType("System.String")
+ Dim columnaCveUsuario As DataColumn = New DataColumn("CveUsuario")
+ columnaCveUsuario.DataType = System.Type.GetType("System.String")
+
+ tablaUsuariosFormateada.Columns.Add(columnaNombre)
+ tablaUsuariosFormateada.Columns.Add(columnaCveUsuario)
+
+ For Each eachRegistro As DataRow In UsuariosGlobal.Rows
+ Dim renglonAux As DataRow = tablaUsuariosFormateada.NewRow()
+
+ renglonAux.Item("Nombre") = $"{eachRegistro.Item("Nombre")}({eachRegistro.Item("Usuario")})"
+ renglonAux.Item("CveUsuario") = eachRegistro.Item("CveUsuario")
+
+ tablaUsuariosFormateada.Rows.Add(renglonAux)
+ Next
+ Return tablaUsuariosFormateada
+ End Function
#End Region
End Class
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 57d76e13f..014263330 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -3939,7 +3939,7 @@ Partial Class Bancos_IE
End If
Else
- Alert("Se presento un error al cancelar el complemento.")
+ Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
End If
Else
ErrorCancelarComplemento = False
diff --git a/Bin/APP_Code_CSharp.dll b/Bin/APP_Code_CSharp.dll
index 1eeb8c17e..7e7523cc5 100644
Binary files a/Bin/APP_Code_CSharp.dll and b/Bin/APP_Code_CSharp.dll differ
diff --git a/Bin/APP_Code_CSharp.pdb b/Bin/APP_Code_CSharp.pdb
index dd15603d0..9f610333e 100644
Binary files a/Bin/APP_Code_CSharp.pdb and b/Bin/APP_Code_CSharp.pdb differ
diff --git a/Contabilidad/PolizasImpresion.aspx b/Contabilidad/PolizasImpresion.aspx
index d41f0984d..e2a9da75d 100644
--- a/Contabilidad/PolizasImpresion.aspx
+++ b/Contabilidad/PolizasImpresion.aspx
@@ -84,6 +84,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/Contabilidad/PolizasImpresion.aspx.vb b/Contabilidad/PolizasImpresion.aspx.vb
index 071311406..03f594d38 100644
--- a/Contabilidad/PolizasImpresion.aspx.vb
+++ b/Contabilidad/PolizasImpresion.aspx.vb
@@ -40,7 +40,7 @@ Partial Class Contabilidad_PolizasImpresion
Dim objcont As New ClsContPAQi(UsuarioActual.Empresa)
- If objcont.GetPolizasMasivo(TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, foli, folf, ddlTipoPoliza.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlSegmentoNeg.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero) Then
+ If objcont.GetPolizasMasivo(TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, foli, folf, ddlTipoPoliza.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlSegmentoNeg.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, DdlGrupoPlantilla.SelectedValue.ToEntero) Then
If objcont.DtResultados.Rows.Count < 10000 Then
If objcont.DtResultados.Rows.Count > 0 Then
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index be7cc478a..130eb6006 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -1058,7 +1058,7 @@ Partial Class Inventarios_EntradasSalidas
ObjConta.IniciaTransacSQL()
End If
- If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
+ If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
TieneError = True
End If
diff --git a/LogTimbrado.txt b/LogTimbrado.txt
new file mode 100644
index 000000000..670c753f4
--- /dev/null
+++ b/LogTimbrado.txt
@@ -0,0 +1,4 @@
+
+ .. PAC: 4 - Verificado : (5) 5 Certificado : (501) 506 Armado: (25) 531 Genera: (494) 1025 Timbrado: (748) 1773 ..20/08/2019:03:33 p. m.
+
+ .. PAC: 4 - Verificado : (2) 2 Certificado : (388) 390 Armado: (4) 394 Genera: (440) 834 Timbrado: (1030) 1864 Guardado: (361) 2225 Actualizado: (99) 2324 ..20/08/2019:03:39 p. m.
diff --git a/Sistemas/ConfiguracionEmpresa.aspx b/Sistemas/ConfiguracionEmpresa.aspx
new file mode 100644
index 000000000..ca36a2e4c
--- /dev/null
+++ b/Sistemas/ConfiguracionEmpresa.aspx
@@ -0,0 +1,121 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ConfiguracionEmpresa.aspx.vb" Inherits="Sistemas_ConfiguracionEmpresa" %>
+
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cuenta
+
+
+
+
+
+
+
+
+
+
+
+
+
Clientes:
+
+
+
+
+
+
+
+
+
Clave de Empresa:
+
+
+
+
+
+
+
+
Razón Social:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sistemas/ConfiguracionEmpresa.aspx.vb b/Sistemas/ConfiguracionEmpresa.aspx.vb
new file mode 100644
index 000000000..2089a9192
--- /dev/null
+++ b/Sistemas/ConfiguracionEmpresa.aspx.vb
@@ -0,0 +1,23 @@
+Option Explicit On
+Option Strict On
+
+Imports System.Data
+Imports Extensiones
+Imports System.Runtime.InteropServices
+Imports System.IO
+
+Partial Class Sistemas_ConfiguracionEmpresa
+ Inherits ClsPaginas
+
+#Region " PROPIEDADES "
+
+#End Region
+
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not IsPostBack Then
+
+
+ End If
+ End Sub
+End Class
diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx
index 9166908c9..371c4b76a 100644
--- a/Ventas/Clientes.aspx
+++ b/Ventas/Clientes.aspx
@@ -255,10 +255,18 @@
+
+
+
+
+
+
+
+
-
+
@@ -5464,13 +5472,13 @@
<%-- END MODAL UNIFICAR EMPRESA CRM --%>
- <%-- MODAL MODIFICAR PORCENTAJE PRECIOS --%>
-
- <%-- FIN MODAL IMPORTAR SALDOS --%>
+ <%-- FIN MODAL MODIFICAR PRECIOS PS --%>
+
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 62a203cb7..81f813eae 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -1253,6 +1253,7 @@ Partial Class Clientes
'CargaFormaPago33()
'CargaComboCFDI()
+ LnkPorcentajeMarcas.Visible = True
LnkPorcentajePrecios.Visible = True
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
@@ -8132,14 +8133,12 @@ Partial Class Clientes
End Sub
#End Region
-#Region "PORCENTAJE PRECIO DE PRODUCTOS"
- Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
- RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
+#Region "PORCENTAJE PRECIO DE MARCAS"
+ Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
+ RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
CreaDT()
- 'txtPorcentaje.Attributes.Add("onchange", String.Format("FnCambiaPorcentaje({0});", "5"))
- 'CargaPorcentajesProductos()
CargaMarcas()
LimpiaModalPorcentaje()
End Sub
@@ -8156,6 +8155,7 @@ Partial Class Clientes
DTPorcentajeTemp.Columns.Add(column)
DTPorcentajeTemp.Columns.Add("CveMarca", GetType(Integer))
+ DTPorcentajeTemp.Columns.Add("Marca", GetType(String))
DTPorcentajeTemp.Columns.Add("PorcentajeProducto", GetType(Decimal))
DTPorcentajeTemp.Columns.Add("Estatus", GetType(String))
DTPorcentajePrecios = DTPorcentajeTemp.Clone
@@ -8171,58 +8171,11 @@ Partial Class Clientes
CargaGridPorcentajes()
UpPorcentaje.Update()
End Sub
- 'Private Sub CargaPorcentajesProductos()
- ' 'Llenar el dropdownlist de Secciones
- ' If UsuarioActual.CveEmpresa = 66 Then
- ' DdlClasificacion2.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
- ' Else
- ' Dim ObjClasificaciones As New ClsClasificaciones
- ' If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
- ' DdlClasificacion2.DataSource = ObjClasificaciones.DtResultados
- ' End If
- ' ObjClasificaciones.Dispose()
- ' End If
- ' DdlClasificacion2.DataBind()
-
- ' CargaPS()
- ' CargaGridPorcentajes()
-
- ' UpPorcentaje.Update()
- 'End Sub
- 'Private Sub CargaPS()
- ' DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
-
- ' If UsuarioActual.CveEmpresa = 66 Then
- ' DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
- ' End If
-
- ' If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
- ' DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
-
- ' DdlProducto2.DataBind()
-
- ' DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
- ' End If
-
- 'End Sub
-
- 'Protected Sub DdlProducto2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlProducto2.selectedindexchange
- ' DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
- 'End Sub
- 'Private Sub DdlProducto2IndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
- ' Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
-
- ' If drPS IsNot Nothing Then
- ' Dim Precio = drPS("Precio").ToString.ToDouble
- ' LbPrecioG.Text = Precio.FormatoNumero()
- ' LbPrecioA.Text = ((Precio * txtPorcentaje.Text.ToDecimal) / 100).FormatoNumero
- ' End If
- 'End Sub
Private Sub CargaGridPorcentajes()
Dim ObjPS As New ClsProductosServicios
- If ObjPS.GetPorcentajeProductos(CveCliente) Then
+ If ObjPS.GetPorcentajeMarcas(CveCliente) Then
DTPorcentajePrecios = ObjPS.DtResultados
GvM.DataSource = DTPorcentajePrecios
End If
@@ -8244,13 +8197,14 @@ Partial Class Clientes
DdlMarcaPS.SelectedValue = "-1"
End Sub
- Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
+ Protected Sub LbAgregarMarca_Click(sender As Object, e As EventArgs) Handles LbAgregarMarca.Click
If txtPorcentaje.Text.ToDecimal >= 0 And txtPorcentaje.Text.ToDecimal <= 100 Then
Dim registro As DataRow = DTPorcentajePrecios.NewRow
registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1
registro.Item("CveMarca") = DdlMarcaPS.SelectedValue.ToEntero
+ registro.Item("Marca") = DdlMarcaPS.SelectedItem.Text
registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal
registro.Item("Estatus") = "I"
DTPorcentajePrecios.Rows.Add(registro)
@@ -8262,7 +8216,7 @@ Partial Class Clientes
LimpiaModalPorcentaje()
End Sub
- Protected Sub DeleteRow(sender As Object, e As EventArgs)
+ Protected Sub DeleteRowMarca(sender As Object, e As EventArgs)
Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton)
@@ -8322,6 +8276,238 @@ Partial Class Clientes
End Sub
+ Protected Sub BtnGuardarPorcentajesMarca_Click(sender As Object, e As EventArgs) Handles BtnGuardarPorcentajesMarca.Click
+
+ Dim TieneError As Boolean = False
+
+ Dim ObjPS As New ClsProductosServicios
+ ObjPS.IniciaTransacSQL()
+
+ For Each Dr As DataRow In DTPorcentajePrecios.Rows
+
+ If Dr("Estatus").ToString <> "" Then
+
+ If Dr("Estatus").ToString = "I" Then
+ If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, UsuarioActual.CveUsuario) Then
+ TieneError = True
+ End If
+ ElseIf Dr("Estatus").ToString = "U" Then
+ If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal) Then
+ TieneError = True
+ End If
+ ElseIf Dr("Estatus").ToString = "D" Then
+ If Not ObjPS.RemovePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero) Then
+ TieneError = True
+ End If
+ End If
+
+ End If
+ Next
+
+ If TieneError Then
+ ObjPS.RollBack()
+ Else
+ ObjPS.Commit()
+ Alert("Los Porcentajes se guardaron correctamente.", TipoMensaje.MsgInformacion)
+ RegistraScript("$('#DivPorcentajeMarcas').modal('hide')", "hidemodal")
+ End If
+
+ ObjPS.Dispose()
+
+ End Sub
+#End Region
+
+#Region "PORCENTAJE PRECIO DE PRODUCTOS"
+ Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
+ RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
+
+ CreaDT2()
+
+ TxtPorcentajePS.Attributes.Add("onchange", String.Format("FnCambiaPorcentaje({0});", "5"))
+ CargaPorcentajesProductos()
+ LimpiaModalPorcentaje2()
+ End Sub
+ Private Sub CreaDT2()
+ Dim DTPorcentajeTemp As New DataTable
+
+ Dim column As DataColumn = New DataColumn("No")
+ column.DataType = Type.GetType("System.Int32")
+ With column
+ .AutoIncrement = True
+ .AutoIncrementSeed = 1
+ .AutoIncrementStep = 1
+ End With
+
+ DTPorcentajeTemp.Columns.Add(column)
+ DTPorcentajeTemp.Columns.Add("CvePS", GetType(Integer))
+ DTPorcentajeTemp.Columns.Add("Producto", GetType(String))
+ DTPorcentajeTemp.Columns.Add("PrecioG", GetType(Decimal))
+ DTPorcentajeTemp.Columns.Add("PorcentajeProducto", GetType(Decimal))
+ DTPorcentajeTemp.Columns.Add("PrecioA", GetType(Decimal))
+ DTPorcentajeTemp.Columns.Add("Estatus", GetType(String))
+ DTPorcentajePrecios = DTPorcentajeTemp.Clone
+ End Sub
+ Private Sub CargaPorcentajesProductos()
+ 'Llenar el dropdownlist de Secciones
+ If UsuarioActual.CveEmpresa = 66 Then
+ DdlClasificacion2.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
+ Else
+ Dim ObjClasificaciones As New ClsClasificaciones
+ If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
+ DdlClasificacion2.DataSource = ObjClasificaciones.DtResultados
+ End If
+ ObjClasificaciones.Dispose()
+ End If
+ DdlClasificacion2.DataBind()
+
+ CargaPS()
+ CargaGridPorcentajes2()
+
+ UpPorcentajeP.Update()
+ End Sub
+ Private Sub CargaPS()
+ DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
+
+ If UsuarioActual.CveEmpresa = 66 Then
+ DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
+ End If
+
+ If Not DdlProducto2.UsaWebService AndAlso CType(DdlProducto2.DataSource, DataTable) Is Nothing Then
+ DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
+
+ DdlProducto2.DataBind()
+
+ DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ End If
+
+ End Sub
+
+ Protected Sub DdlProducto2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlProducto2.selectedindexchange
+ DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
+ End Sub
+ Private Sub DdlProducto2IndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
+ Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
+
+ If drPS IsNot Nothing Then
+ Dim Precio = drPS("Precio").ToString.ToDouble
+ LbPrecioG.Text = Precio.FormatoNumero()
+ LbPrecioA.Text = ((Precio * TxtPorcentajePS.Text.ToDecimal) / 100).FormatoNumero
+ End If
+ End Sub
+
+ Private Sub CargaGridPorcentajes2()
+ Dim ObjPS As New ClsProductosServicios
+
+ If ObjPS.GetPorcentajeProductos(CveCliente) Then
+ DTPorcentajePrecios = ObjPS.DtResultados
+ GvP.DataSource = DTPorcentajePrecios
+ End If
+ ObjPS.Dispose()
+
+ GvP.DataBind()
+ UpPorcentajePS.Update()
+
+ End Sub
+ Private Sub CargaDTPorcentajePrecios2(DtTemp As DataTable)
+ GvP.DataSource = DtTemp
+ GvP.DataBind()
+
+ UpPorcentajePS.Update()
+ End Sub
+
+ Private Sub LimpiaModalPorcentaje2()
+ TxtPorcentajePS.Text = ""
+ DdlClasificacion2.SelectedValue = "-1"
+ DdlProducto2.SelectedText = ""
+ End Sub
+
+ Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
+
+ If DdlProducto2.SelectedText <> "" Then
+ If TxtPorcentajePS.Text.ToDecimal >= 0 And TxtPorcentajePS.Text.ToDecimal <= 100 Then
+
+ Dim registro As DataRow = DTPorcentajePrecios.NewRow
+
+ registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1
+ registro.Item("CvePS") = DdlProducto2.SelectedValue.ToEntero
+ registro.Item("Producto") = DdlProducto2.SelectedText
+ registro.Item("PrecioG") = LbPrecioG.Text.ToDecimal
+ registro.Item("PrecioA") = LbPrecioG.Text.ToDecimal * TxtPorcentajePS.Text.ToDecimal / 100
+ registro.Item("PorcentajeProducto") = TxtPorcentajePS.Text.ToDecimal
+ registro.Item("Estatus") = "I"
+ DTPorcentajePrecios.Rows.Add(registro)
+ CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
+ Else
+ Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
+ End If
+ Else
+ Alert("El campo ''Producto'' es necesario, por favor ingréselo.", TipoMensaje.MsgAdvertencia)
+ End If
+
+ LimpiaModalPorcentaje()
+ End Sub
+
+ Protected Sub DeleteRow(sender As Object, e As EventArgs)
+
+ Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton)
+
+
+ If DTPorcentajePrecios.Rows.Count > 0 And lnkRemove.CommandArgument.ToString.Length > 0 Then
+ Dim i As Integer
+ i = lnkRemove.CommandArgument.ToString.ToEntero
+ Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", i))
+ If Drs.Count > 0 Then
+ If CveCliente > 0 AndAlso Drs(0)("CvePS").ToString.ToEntero > 0 Then
+ Drs(0)("Estatus") = "D"
+ Else
+ Drs(0).Delete()
+ End If
+
+ End If
+ DTPorcentajePrecios.AcceptChanges()
+ End If
+
+ GvP.EditIndex = -1
+
+ CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
+
+ End Sub
+
+ Protected Sub GvP_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvP.RowEditing
+ GvP.EditIndex = e.NewEditIndex
+
+ CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
+ End Sub
+ Protected Sub GvP_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvP.RowCancelingEdit
+ GvP.EditIndex = -1
+
+ CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
+ End Sub
+ Protected Sub GvP_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvP.RowUpdating
+
+ Dim PorcentajeProducto As Double = GvP.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP").Text.ToDouble
+
+ If PorcentajeProducto >= 0 And PorcentajeProducto <= 100 Then
+ Dim No As Integer = GvP.Rows(e.RowIndex).DataKey("No").ToEntero
+
+ Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", No))
+
+ If Drs.Count > 0 Then
+ Drs(0)("PorcentajeProducto") = PorcentajeProducto
+ Drs(0)("PrecioA") = Drs(0)("PrecioG").ToString.ToDouble * PorcentajeProducto / 100
+ Drs(0)("Estatus") = "U"
+ End If
+
+ DTPorcentajePrecios.AcceptChanges()
+ GvP.EditIndex = -1
+
+ CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
+ Else
+ Alert("El Porcentaje debe estar en un rango entre 0 y 100", TipoMensaje.MsgAdvertencia)
+ End If
+
+ End Sub
+
Protected Sub BtnGuardarPorcentajes_Click(sender As Object, e As EventArgs) Handles BtnGuardarPorcentajes.Click
Dim TieneError As Boolean = False
@@ -8362,9 +8548,9 @@ Partial Class Clientes
End Sub
- 'Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
- ' DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
- 'End Sub
+ Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
+ DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
+ End Sub
#End Region
#Region " A C U M U L A D O R E S"
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index f5bf8561c..1bfa9e03d 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -10281,6 +10281,13 @@ Partial Class Ventas
End If
End If
+ 'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
+ If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
+ If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa) Then
+ ErrorPrepoliza = True
+ End If
+ End If
+
Return ErrorPrepoliza
Catch ex As Exception
GuardaLog(ex.ToString())
@@ -15755,7 +15762,7 @@ Partial Class Ventas
If UsuarioActual.CveEmpresa.Contiene(126) Then
If CveVenta > 0 And DdlOrdenProduccion.SelectedValue.ToEntero > 0 Then
If Not ObjCGame.UpdateOrdenProduccionVenta(DdlOrdenProduccion.SelectedValue.ToEntero(), CveVenta) Then
- ErrorList.Add("Ocurrió un error al actualizar la orden de producción")
+ OcurrioError = True
End If
End If
End If
@@ -15765,7 +15772,7 @@ Partial Class Ventas
If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre = 2 Then
OcurrioError = True
- ErrorList.Add(ObjConta.MensajePolizaDescuadre)
+ Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
End If
End If
End If
@@ -21439,6 +21446,11 @@ Partial Class Ventas
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero)
DdlFormaPago33.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveFormaPago"))
+ DiasCredito = dtSeleccionadas.FiltroPrimeroValor("DiasCredito").ToEntero
+ EsDiasCreditoFijo = CBool(dtSeleccionadas.FiltroPrimeroValor("EsDiasCreditoFijo"))
+
+
+
'validación, cuando las remisiones sean de una sucursal y el usuario solo tenga acceso a otra, deberá tener priodidad la sucursal de la que solo se factura
If DdlSubProyectoDatos.Enabled = True Then
DdlSubProyectoDatos.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveSubProyecto"))
@@ -21572,11 +21584,14 @@ Partial Class Ventas
End If
End If
+ TxtFechaPago.Text = If(EsDiasCreditoFijo, Now.AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text)
+
UpRemisionesFacturas.Update()
UpFacturar.Update()
UpPS.Update()
UpParametros.Update()
UPEstimaciones.Update()
+ UPCondicionesPago.Update()
HuboCambioRemi = Not HuboCambioRemi
RegistraScript("$('#DivRemisiones').modal('hide');", "DivRemisionesHide")
End Sub
diff --git a/localhost.sln b/localhost.sln
new file mode 100644
index 000000000..888c06549
--- /dev/null
+++ b/localhost.sln
@@ -0,0 +1,45 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27703.2035
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "http://localhost", "http://localhost", "{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}"
+ ProjectSection(WebsiteProperties) = preProject
+ SccProjectName = ""$/localhost", CAAAAAAA"
+ SccAuxPath = ""
+ SccLocalPath = "."
+ SccProvider = "MSSCCI:Microsoft Visual SourceSafe"
+ UseIISExpress = "false"
+ TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.6"
+ Debug.AspNetCompiler.VirtualPath = "/localhost"
+ Debug.AspNetCompiler.PhysicalPath = "..\..\..\..\..\inetpub\SIGIT\"
+ Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\"
+ Debug.AspNetCompiler.Updateable = "true"
+ Debug.AspNetCompiler.ForceOverwrite = "true"
+ Debug.AspNetCompiler.FixedNames = "false"
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.VirtualPath = "/localhost"
+ Release.AspNetCompiler.PhysicalPath = "..\..\..\..\..\inetpub\SIGIT\"
+ Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\"
+ Release.AspNetCompiler.Updateable = "true"
+ Release.AspNetCompiler.ForceOverwrite = "true"
+ Release.AspNetCompiler.FixedNames = "false"
+ Release.AspNetCompiler.Debug = "False"
+ SlnRelativePath = "..\..\..\..\..\inetpub\SIGIT\"
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {B4590109-7BF9-411C-A1AE-792C02707CE6}
+ EndGlobalSection
+EndGlobal