Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1429,7 +1429,7 @@ Public Class ClsContabilidad
|
||||
|
||||
If Not ContaCompartida Then ObjConta.Dispose()
|
||||
End If
|
||||
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1} ", Retorno, OcurrioError)
|
||||
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1}) ", Retorno, OcurrioError)
|
||||
StrLog.AppendFormat(" - Fin")
|
||||
StrLog.ToString.GuardaLogAD("LogContabilizacion")
|
||||
Return Retorno
|
||||
@@ -4237,7 +4237,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer ) As Boolean
|
||||
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
|
||||
@@ -5538,7 +5538,7 @@ Public Class ClsContabilidad
|
||||
End Function
|
||||
|
||||
#Region "IVAS"
|
||||
Public Function GetRepIVA(FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveUsuarioConsulta As Integer, Conciliado As Integer, CveEmpresa As Integer, TipoCambio As Integer, TCEspecifico As Double, Optional Cuenta As String = "-1") As Boolean
|
||||
Public Function GetRepIVA(FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveUsuarioConsulta As Integer, CveCuentaBancaria As Integer, Conciliado As Integer, CveEmpresa As Integer, TipoCambio As Integer, TCEspecifico As Double) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_RepIVA")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5546,6 +5546,7 @@ Public Class ClsContabilidad
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveCuentaBancaria", SqlDbType.Int).Value = CveCuentaBancaria
|
||||
.Add("@Conciliado", SqlDbType.Int).Value = Conciliado
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
|
||||
@@ -5583,13 +5584,14 @@ Public Class ClsContabilidad
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetRepIVAComparativo(FechaInicio As Date, FechaFin As Date, CveUsuarioConsulta As Integer, Conciliado As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetRepIVAComparativo(FechaInicio As Date, FechaFin As Date, CveUsuarioConsulta As Integer, CveCuentaBancaria As Integer, Conciliado As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_ImpuestosComparativo")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveCuentaBancaria", SqlDbType.Int).Value = CveCuentaBancaria
|
||||
.Add("@Conciliado", SqlDbType.Int).Value = Conciliado
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
@@ -5603,7 +5605,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetRepIVAAcumulado(FechaInicio As Date, FechaFin As Date, Conciliado As Integer, TipoImpuesto As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetRepIVAAcumulado(FechaInicio As Date, FechaFin As Date, Conciliado As Integer, TipoImpuesto As Integer, CveCuentaBancaria As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_IVAAcumulado")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5611,6 +5613,7 @@ Public Class ClsContabilidad
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@TipoImpuesto", SqlDbType.Int).Value = TipoImpuesto
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveCuentaBancaria", SqlDbType.Int).Value = CveCuentaBancaria
|
||||
.Add("@Conciliado", SqlDbType.Int).Value = Conciliado
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
|
||||
@@ -2921,6 +2921,24 @@ Namespace Extensiones
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function ContabilizaMovimientoAlmacen(ByRef ObjConta As ClsContabilidad, Fecha As Date, Concepto As String, Modulo As String, CveMovimientoSalida As Integer, CveMovimientoEntrada As Integer, Importe As Decimal, CveUsuario As Integer, CveEmpresa As Integer, Contabilizable As Boolean) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 53, 0, 0, 1, Fecha, Concepto, CveUsuario, CveEmpresa)
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then Retorno = CvePrePoliza
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "GPS"
|
||||
|
||||
@@ -10,7 +10,27 @@ Imports System.IO
|
||||
Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
context.Response.ContentType = "text/plain"
|
||||
If context.Request("metodo").ToString() = "GetTokenAngular" Then
|
||||
'context.Response.ContentType = "application/json; charset=utf-8"
|
||||
|
||||
context.Response.ContentType = "text/json"
|
||||
Dim origin As String = context.Request.UrlReferrer.ToString()
|
||||
context.Response.AddHeader("Access-Control-Allow-Origin", origin.Substring(0, origin.Length - 1))
|
||||
'context.Response.AddHeader("Access-Control-Allow-Origin", "http://localhost:4200")
|
||||
'context.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST")
|
||||
context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept")
|
||||
context.Response.AddHeader("Access-Control-Allow-Credentials", "true")
|
||||
context.Response.StatusCode = 200
|
||||
Dim key As String = GetTokenAngular(context)
|
||||
Dim json As String = JsonConvert.SerializeObject(key)
|
||||
context.Response.Write(json)
|
||||
context.Response.Flush()
|
||||
context.Response.Close()
|
||||
context.Response.End()
|
||||
Else
|
||||
context.Response.ContentType = "text/plain"
|
||||
End If
|
||||
|
||||
Try
|
||||
Select Case context.Request("metodo")
|
||||
Case "getps"
|
||||
@@ -53,10 +73,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Write(sendMail(context))
|
||||
Case "sendMailLPM"
|
||||
context.Response.Write(sendMailLPM(context))
|
||||
Case "GetTokenAngular"
|
||||
context.Response.Write(GetTokenAngular(context))
|
||||
context.Response.End()
|
||||
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
@@ -74,11 +90,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Microsoft.IdentityModel.Tokens.SecurityAlgorithms.HmacSha256Signature)}
|
||||
Dim tokenHandler = New System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler()
|
||||
Dim newtoken = tokenHandler.CreateToken(tokenDescriptor)
|
||||
'context.Response.AddHeader("Access-Control-Allow-Origin", "http://localhost:4200")
|
||||
'context.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST")
|
||||
'context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept")
|
||||
context.Response.AddHeader("Access-Control-Allow-Credentials", true )
|
||||
context.Response.StatusCode = 200
|
||||
Dim stokenn As String = tokenHandler.WriteToken(newtoken)
|
||||
Return stokenn
|
||||
|
||||
|
||||
@@ -6698,8 +6698,15 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Next
|
||||
|
||||
'obtengo si hay servicios
|
||||
Dim CostosIndirectosTardados As Decimal = TmpDT.SUMD("Total", "ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 1")
|
||||
'consideracion, si la oc, se le agrego un servicio y este no se cargo en la entrada al almacen.
|
||||
If CostoIndirectoAcum176 = 0 AndAlso CostosIndirectosTardados > 0 Then
|
||||
CostosIndirectosTardados = CostosIndirectosTardados * TCO
|
||||
End If
|
||||
|
||||
'calcula la diferencia entre lo recibido por la OC, considerando costos indirectos y lo que se ingresaria en la compra
|
||||
SumatoriaOCINV = SumatoriaInventario - (TmpDT.SUMD("Total") * TCO).RoundSQL 'sumatoria de la factura
|
||||
SumatoriaOCINV = SumatoriaInventario - (TmpDT.SUMD("Total") * TCO).RoundSQL + CostosIndirectosTardados 'sumatoria de la factura
|
||||
If SumatoriaOCINV.RoundSQL <> 0 Then
|
||||
' se abona el costo, cambiamos su naturaleza
|
||||
'SumatoriaOCINV = -SumatoriaOCINV
|
||||
|
||||
@@ -76,24 +76,24 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
string Cuenta = TxtCuenta.Text == "" ? "-1" : TxtCuenta.Text;
|
||||
|
||||
ClsContabilidad ObjCont = new ClsContabilidad();
|
||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico, Cuenta))
|
||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
{
|
||||
GvT.DataSource = ObjCont.DtResultados;
|
||||
DtIVATrasladado = ObjCont.DtResultados;
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvIEPSA.DataSource = ObjCont.DtResultados;
|
||||
DtIEPSA = ObjCont.DtResultados;
|
||||
}
|
||||
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvIVAA.DataSource = ObjCont.DtResultados;
|
||||
DtIVAA = ObjCont.DtResultados;
|
||||
}
|
||||
|
||||
}
|
||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico, Cuenta))
|
||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
{
|
||||
GvA.DataSource = ObjCont.DtResultados;
|
||||
DtIVAAcreditable = ObjCont.DtResultados;
|
||||
@@ -103,7 +103,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvIVA2.DataSource = ObjCont.DtResultados;
|
||||
}
|
||||
@@ -277,7 +277,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
StringBuilder SBDIOT = new StringBuilder();
|
||||
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
||||
|
||||
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||
{
|
||||
|
||||
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
|
||||
@@ -353,7 +353,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
|
||||
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
||||
|
||||
if (Objconta.GetRepIVAComparativo(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa ))
|
||||
if (Objconta.GetRepIVAComparativo(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa ))
|
||||
{
|
||||
GvCompara.DataSource = Objconta.DtResultados;
|
||||
}
|
||||
|
||||
@@ -1054,7 +1054,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
'DdlClasificacion.SelectedValue = "-1"
|
||||
'DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
|
||||
|
||||
If ChkEmitirTimbrado.Checked Then CveMovimientoTimbrado = CveMovimientoSalida : Timbrar()
|
||||
If ChkEmitirTimbrado.Checked AndAlso ChkTransitorio.Checked Then CveMovimientoTimbrado = CveMovimientoSalida : Timbrar()
|
||||
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, "")
|
||||
|
||||
@@ -1072,21 +1072,21 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
LimpiaMovimiento()
|
||||
|
||||
Else
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert(TextoError, TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
End If
|
||||
End If
|
||||
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
|
||||
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
|
||||
If ErrorExistencia Then
|
||||
CargaGvDatos()
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
ObjInventario.Dispose()
|
||||
End Sub
|
||||
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
|
||||
If ErrorExistencia Then
|
||||
CargaGvDatos()
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
ObjInventario.Dispose()
|
||||
End Sub
|
||||
|
||||
Function ConsumoInterno(TipoAlmacenOrigen As Integer, TipoAlmacenDestino As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -126,6 +126,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user