Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -457,9 +457,9 @@ Partial Class AIMMGM_Registro
|
|||||||
Venta.Commit()
|
Venta.Commit()
|
||||||
|
|
||||||
Alert("<br>Su Registro se ha realizado correctamente.<br><br> Se le estará enviando al correo proporcionado la información necesaria para el acceso de su portal.<br><br>", TipoMensaje.MsgInformacion, "tb_remove();")
|
Alert("<br>Su Registro se ha realizado correctamente.<br><br> Se le estará enviando al correo proporcionado la información necesaria para el acceso de su portal.<br><br>", TipoMensaje.MsgInformacion, "tb_remove();")
|
||||||
'EnviaNotificacion(TmpDT, "nunezothon@yahoo.com.mx") '"rene.molina@adsistemas.mx") '
|
|
||||||
If TieneExcursion Then
|
If TieneExcursion Then
|
||||||
EnviaNotificacion(TmpDT, "ppadilla@imdex-cascabel.com") '"rene.molina@adsistemas.mx") '
|
EnviaNotificacion(TmpDT, "ppadilla@imdex-cascabel.com")
|
||||||
End If
|
End If
|
||||||
'ActivaPortal(CveCliente, TxtEmail.Text.Trim) '"rene.molina@adsistemas.mx") '
|
'ActivaPortal(CveCliente, TxtEmail.Text.Trim) '"rene.molina@adsistemas.mx") '
|
||||||
'envio de correo a la persona que controla el area, Aristeo,.. .
|
'envio de correo a la persona que controla el area, Aristeo,.. .
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Public Class ClsAcumuladores
|
|||||||
If TransaccionCompartida Is Nothing Then
|
If TransaccionCompartida Is Nothing Then
|
||||||
|
|
||||||
SqlConexion = New SqlConnection
|
SqlConexion = New SqlConnection
|
||||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
SqlConexion.ConnectionString = CadenaConexion() ' ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -810,7 +810,7 @@ Public Class ClsContabilidad
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CveConceptoContable = 30 AndAlso CveIE < 1 Then
|
If CveConceptoContable = 30 AndAlso CveIE < 1 Then
|
||||||
OnError("La ClaveIE es invalidad para este Movimiento", New Exception, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("La ClaveIE es inválida para este Movimiento", New Exception, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1170,11 +1170,11 @@ Public Class ClsContabilidad
|
|||||||
CveConceptoContable = dr("CveConceptoContable").ToString().ToEntero
|
CveConceptoContable = dr("CveConceptoContable").ToString().ToEntero
|
||||||
|
|
||||||
Select Case CveConceptoContable
|
Select Case CveConceptoContable
|
||||||
Case 6, 5, 17, 14, 19, 15, 16
|
Case 6, 5, 17, 14, 19, 15, 16, 272, 275
|
||||||
SigReferencia = dr("CveCompra").ToString.ContaReferencia(TipoContaReferencia.Compra)
|
SigReferencia = dr("CveCompra").ToString.ContaReferencia(TipoContaReferencia.Compra)
|
||||||
Case 2, 4, 1, 13, 61, 62, 63, 8, 9
|
Case 2, 4, 1, 13, 61, 62, 63, 8, 9, 91, 251, 226
|
||||||
SigReferencia = dr("CveVenta").ToString.ContaReferencia(TipoContaReferencia.Venta)
|
SigReferencia = dr("CveVenta").ToString.ContaReferencia(TipoContaReferencia.Venta)
|
||||||
Case 30
|
Case 30, 66, 92
|
||||||
SigReferencia = dr("CveIE").ToString.ContaReferencia(TipoContaReferencia.Banco)
|
SigReferencia = dr("CveIE").ToString.ContaReferencia(TipoContaReferencia.Banco)
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|||||||
@@ -1453,7 +1453,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0) As Boolean
|
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
|
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
|
||||||
@@ -1461,7 +1461,8 @@ Public Class ClsInventarios
|
|||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
'.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
'.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||||
|
|||||||
@@ -4585,7 +4585,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
|
PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
|
||||||
PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036)
|
PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036)
|
||||||
PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 2055)
|
PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 2055)
|
||||||
'PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543)
|
PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543)
|
||||||
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
|
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
|
||||||
|
|
||||||
|
|
||||||
@@ -6708,15 +6708,15 @@ Public Class ClsPaginas
|
|||||||
' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
|
' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
|
||||||
'End If
|
'End If
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta))
|
||||||
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 72, 80, 122, 126) Then
|
If Not Archivo.Exists OrElse EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then
|
||||||
params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
|
params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
|
||||||
End If
|
End If
|
||||||
'DATOS PARA DESCUENTO
|
'DATOS PARA DESCUENTO
|
||||||
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 72, 80, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
|
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO
|
||||||
params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
|
params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
|
||||||
params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString))
|
params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
|
params.Add(New ReportParameter("SubTotal", DtDetalle.SUM("Total").ToString))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 122) Then
|
If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 122) Then
|
||||||
|
|||||||
@@ -1422,7 +1422,8 @@ Public Class ClsVentas
|
|||||||
FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
|
FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
|
||||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer,
|
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer,
|
||||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1,
|
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||||
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1) As Boolean
|
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1,
|
||||||
|
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_GetRepPS")
|
DataAdapter("PA_Vta_GetRepPS")
|
||||||
|
|
||||||
@@ -1450,6 +1451,8 @@ Public Class ClsVentas
|
|||||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||||
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
|
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
|
||||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
|
.Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Public Class Empresa
|
|||||||
Public GrupoEmpresa As Integer
|
Public GrupoEmpresa As Integer
|
||||||
Public Extension As String
|
Public Extension As String
|
||||||
Public EsComercializadora As Boolean
|
Public EsComercializadora As Boolean
|
||||||
|
Public BaseDatosNombre As String = "Ventas"
|
||||||
'Nuevos
|
'Nuevos
|
||||||
|
|
||||||
Public AreaGeografica As String
|
Public AreaGeografica As String
|
||||||
|
|||||||
@@ -44,9 +44,23 @@ Namespace Extensiones
|
|||||||
Private ReadOnly _IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
|
Private ReadOnly _IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
|
||||||
Private ReadOnly _IVAES() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF, &H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
|
Private ReadOnly _IVAES() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF, &H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
|
||||||
Private Const SEncryptionKey As String = "$Ap7+5&z"
|
Private Const SEncryptionKey As String = "$Ap7+5&z"
|
||||||
Private Const SEncryptionKeyAES As String = "$Ap7+5&z$Ap7+5&z$Ap7+5&z$Ap7+5&z"
|
Private Const SEncryptionKeyAES As String = "$Ap7+5&z$Ap7+5&z$Ap7+5&z$Ap7+5&z"
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Public Function CadenaConexion() As String
|
||||||
|
Dim BaseDatos As String = "Ventas"
|
||||||
|
If Not IsNothing(System.Web.HttpContext.Current) AndAlso Not IsNothing(System.Web.HttpContext.Current.Session) Then
|
||||||
|
|
||||||
|
BaseDatos = CType(System.Web.HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.BaseDatosNombre
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return String.Format("Data Source=192.168.0.2;Initial Catalog={0};User Id=JCaudillo;Password=JCau127*953;pooling=True; Min Pool Size=10;Application Name=SIG;", BaseDatos)
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function IfNull(Valor As Object, Predeterminado As Object, Optional IfNotNull As Object = Nothing) As Object
|
Public Function IfNull(Valor As Object, Predeterminado As Object, Optional IfNotNull As Object = Nothing) As Object
|
||||||
|
|
||||||
If Valor Is Nothing OrElse IsDBNull(Valor) Then ' si es nulo, manda el valor predeterminado
|
If Valor Is Nothing OrElse IsDBNull(Valor) Then ' si es nulo, manda el valor predeterminado
|
||||||
@@ -2955,7 +2969,7 @@ Namespace Extensiones
|
|||||||
Dim ObjEmp As New ClsSisEmpresas
|
Dim ObjEmp As New ClsSisEmpresas
|
||||||
If ObjEmp.GetEmpresas(1, "-1", "-1", "-1", "-1") Then
|
If ObjEmp.GetEmpresas(1, "-1", "-1", "-1", "-1") Then
|
||||||
|
|
||||||
If ObjMail.SendMail(ObjEmp.Empresa, "rene.molina@adsistemas.mx", "Error del Sistema", Mensaje) Then
|
If ObjMail.SendMail(ObjEmp.Empresa, "rene.molina@adssistemas.mx", "Error del Sistema", Mensaje) Then
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
UpGvFacturas.Update()
|
UpGvFacturas.Update()
|
||||||
GvFacturas.DataBind()
|
GvFacturas.DataBind()
|
||||||
|
lblValorTotal.Text = "00.00"
|
||||||
divLabelTotal.Visible = True
|
divLabelTotal.Visible = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -166,7 +167,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Total += Gvr.DataKey("Importe").ToDouble
|
Total += Gvr.DataKey("Importe").ToDouble
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
lblValorTotal.Text = Total.ToString
|
lblValorTotal.Text = Total.ToString("N")
|
||||||
UpGvFacturas.Update()
|
UpGvFacturas.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -2462,7 +2462,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If CveIE > 0 Then
|
If CveIE > 0 Then
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
|
If DdlTipoTransaccion.SelectedValue = "1" AndAlso usuarioactual.cveempresa <> 119 Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
|
||||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
|
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
|
||||||
|
|
||||||
'valida prepoliza
|
'valida prepoliza
|
||||||
|
|||||||
@@ -1472,7 +1472,7 @@ Partial Class Bancos_PopIEVentas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim tipoCambioVentaDiferenciaCambiaria As Decimal = 1
|
|
||||||
|
|
||||||
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos
|
||||||
tipoCambioPago = 1
|
tipoCambioPago = 1
|
||||||
@@ -2062,8 +2062,8 @@ Partial Class Bancos_PopIEVentas
|
|||||||
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||||
tipoCambioVentaDiferenciaCambiaria = If(FechaVenta < FechaUltimaFluctuacion, TipoCambioFluctuacion, TipoCambioOriginal)
|
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVentaDiferenciaCambiaria)
|
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
TimpocambioGeneral = TCImpuestos
|
TimpocambioGeneral = TCImpuestos
|
||||||
|
|
||||||
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
@@ -2090,8 +2090,8 @@ Partial Class Bancos_PopIEVentas
|
|||||||
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||||
tipoCambioVentaDiferenciaCambiaria = If(FechaVenta < FechaUltimaFluctuacion, TipoCambioFluctuacion, TipoCambioOriginal)
|
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVentaDiferenciaCambiaria)
|
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
TimpocambioGeneral = TCImpuestos
|
TimpocambioGeneral = TCImpuestos
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -936,8 +936,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||||
'cuando son dolares, y tienen complementaria, se hace el registro
|
'cuando son dolares, y tienen complementaria, se hace el registro
|
||||||
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
IdCtaContable = CtaProveedor
|
IdCtaContable = CtaProveedor
|
||||||
@@ -1260,187 +1260,187 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
'Case 16 'Ret ISR X Acreditar
|
'Case 16 'Ret ISR X Acreditar
|
||||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then
|
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then
|
||||||
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
||||||
' importeMX = ImporteMovimiento
|
' importeMX = ImporteMovimiento
|
||||||
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * tipoCambioCompra
|
' importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * tipoCambioCompra
|
' importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * tipoCambioCompra
|
' importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
' End If
|
' End If
|
||||||
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
' TipoCambioGeneral = tipoCambioCompra
|
' TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
' If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
' If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
' 'Conta ContPAQ
|
' 'Conta ContPAQ
|
||||||
' If IdCtaContRetISR > 0 Then
|
' If IdCtaContRetISR > 0 Then
|
||||||
' IdCtaContable = IdCtaContRetISR
|
' IdCtaContable = IdCtaContRetISR
|
||||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
|
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
|
||||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
|
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' 'Conta SIG
|
' 'Conta SIG
|
||||||
' If CveCuentaRetISR <> 0 Then
|
' If CveCuentaRetISR <> 0 Then
|
||||||
' CveCuenta = CveCuentaRetISR
|
' CveCuenta = CveCuentaRetISR
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
'Case 23 'Ret ISR Acreditable
|
'Case 23 'Ret ISR Acreditable
|
||||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then
|
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then
|
||||||
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
||||||
' importeMX = ImporteMovimiento
|
' importeMX = ImporteMovimiento
|
||||||
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * tipoCambioCompra
|
' importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||||
' End If
|
' End If
|
||||||
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
' TipoCambioGeneral = TipoCambioPago
|
' TipoCambioGeneral = TipoCambioPago
|
||||||
|
|
||||||
' If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
' If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
' 'Conta ContPAQ
|
' 'Conta ContPAQ
|
||||||
' If IdCtaContRetISRAcreditable > 0 Then
|
' If IdCtaContRetISRAcreditable > 0 Then
|
||||||
' IdCtaContable = IdCtaContRetISRAcreditable
|
' IdCtaContable = IdCtaContRetISRAcreditable
|
||||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
|
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
|
||||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero
|
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' 'Conta SIG
|
' 'Conta SIG
|
||||||
' If CveCuentaRetISR <> 0 Then
|
' If CveCuentaRetISR <> 0 Then
|
||||||
' CveCuenta = CveCuentaRetISR
|
' CveCuenta = CveCuentaRetISR
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento
|
'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento
|
||||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||||
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
||||||
' importeMX = ImporteMovimiento
|
' importeMX = ImporteMovimiento
|
||||||
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * tipoCambioCompra
|
' importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||||
' End If
|
' End If
|
||||||
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
' TipoCambioGeneral = TipoCambioPago
|
' TipoCambioGeneral = TipoCambioPago
|
||||||
|
|
||||||
' If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
' If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
' 'Conta ContPAQ
|
' 'Conta ContPAQ
|
||||||
' If IdCtaContRetISR > 0 Then
|
' If IdCtaContRetISR > 0 Then
|
||||||
' IdCtaContable = IdCtaContRetISR
|
' IdCtaContable = IdCtaContRetISR
|
||||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
|
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
|
||||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
|
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' 'Conta SIG
|
' 'Conta SIG
|
||||||
' If CveCuentaRetISR <> 0 Then
|
' If CveCuentaRetISR <> 0 Then
|
||||||
' CveCuenta = CveCuentaRetISR
|
' CveCuenta = CveCuentaRetISR
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento
|
'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento
|
||||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||||
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
' ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
|
||||||
' importeMX = ImporteMovimiento
|
' importeMX = ImporteMovimiento
|
||||||
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * tipoCambioCompra
|
' importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
' ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
|
||||||
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
' importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioCompra, TipoCambioPago)
|
||||||
' End If
|
' End If
|
||||||
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
' importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
' TipoCambioGeneral = TipoCambioPago
|
' TipoCambioGeneral = TipoCambioPago
|
||||||
|
|
||||||
' If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
' If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
' 'Conta ContPAQ
|
' 'Conta ContPAQ
|
||||||
' If IdCtaContRetISRAcreditable > 0 Then
|
' If IdCtaContRetISRAcreditable > 0 Then
|
||||||
' IdCtaContable = IdCtaContRetISRAcreditable
|
' IdCtaContable = IdCtaContRetISRAcreditable
|
||||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
|
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
|
||||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
|
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' 'Conta SIG
|
' 'Conta SIG
|
||||||
' If CveCuentaRetISR <> 0 Then
|
' If CveCuentaRetISR <> 0 Then
|
||||||
' CveCuenta = CveCuentaRetISR
|
' CveCuenta = CveCuentaRetISR
|
||||||
' Else
|
' Else
|
||||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
Case 14 'Iva X Acreditar
|
Case 14 'Iva X Acreditar
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
@@ -1744,6 +1744,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
If MsgError <> "" Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
If ImporteMovimiento <> 0 Then
|
If ImporteMovimiento <> 0 Then
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If IdCtaContable = 0 Then
|
If IdCtaContable = 0 Then
|
||||||
@@ -1764,7 +1768,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'Unificacion de PrePolizas
|
'Unificacion de PrePolizas
|
||||||
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
||||||
If Not ObjMov.PrePolizaUnificacion(CvePrePoliza, gvr.DataKey("CvePrePoliza").ToEntero) Then
|
If Not ObjMov.PrePolizaUnificacion(CvePrePoliza, gvr.DataKey("CvePrePoliza").ToEntero) Then
|
||||||
MsgError = "No se pudo unificar la prepoliza"
|
MsgError = "No se pudo unificar la prepoliza"
|
||||||
Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError)
|
Alert("No se pudo unificar la prepoliza", TipoMensaje.MsgError)
|
||||||
@@ -1775,7 +1779,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
'DESPROGRAMA LO PROGRAMADO DESPUES DE HACERLE UN PAGO
|
'DESPROGRAMA LO PROGRAMADO DESPUES DE HACERLE UN PAGO
|
||||||
' If DdlTipoTransaccion.SelectedValue <> "9" Then 'SI ES LAYOUT SE DESPROGRAMA EN BANCOS/PAGOELECTRONICO, se comentó, 2018.07.31 peticion marilú.
|
' If DdlTipoTransaccion.SelectedValue <> "9" Then 'SI ES LAYOUT SE DESPROGRAMA EN BANCOS/PAGOELECTRONICO, se comentó, 2018.07.31 peticion marilú.
|
||||||
If gvr.DataKey("ImporteProgramo").ToDouble > 0 Then
|
If MsgError = "" AndAlso gvr.DataKey("ImporteProgramo").ToDouble > 0 Then
|
||||||
ObjComp.ProgramarCompra(gvr.DataKey("CveCompra").ToEntero, 0, UsuarioActual.CveUsuario, -1)
|
ObjComp.ProgramarCompra(gvr.DataKey("CveCompra").ToEntero, 0, UsuarioActual.CveUsuario, -1)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1834,7 +1838,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgError = "" And UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
MsgError = "No se pudo simplificar los movimientos"
|
MsgError = "No se pudo simplificar los movimientos"
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||||
@@ -2733,25 +2737,12 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, gr.DataKey("SerieFolio").ToString, 17, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCCompra), ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, gr.DataKey("SerieFolio").ToString, 17, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCCompra), ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra, CveCuenta:=CveCuenta) Then
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'fluctuación.
|
|
||||||
If CveMoneda > 1 Then
|
|
||||||
Dim ImporteFluctuacion As Decimal = 0
|
|
||||||
ImporteFluctuacion = Saldo * (TCPago - TCCompra)
|
|
||||||
If TCCompra > TCPago Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
|
||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
|
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
|
||||||
|
|
||||||
If gr.DataKey("IVA").ToDecimal > 0 Then
|
If gr.DataKey("IVA").ToDecimal > 0 Then
|
||||||
@@ -2797,13 +2788,42 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'fluctuación.
|
||||||
|
If CveMoneda > 1 Then
|
||||||
|
Dim ImporteFluctuacion As Decimal = 0
|
||||||
|
ImporteFluctuacion = Saldo * (TCPago - TCCompra)
|
||||||
|
If TCCompra > TCPago Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||||
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||||
|
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
|
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
|
||||||
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
Exit For
|
Exit For
|
||||||
|
Else
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||||
|
|
||||||
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
|
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||||
|
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -2892,19 +2892,29 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
If Saldo < Total Then
|
If Saldo < Total Then
|
||||||
LblCompraEstatus.Text = "ABONADA"
|
LblCompraEstatus.Text = "ABONADA"
|
||||||
LblCompraEstatus.Font.Bold = True
|
LblCompraEstatus.Font.Bold = True
|
||||||
LblCompraEstatus.ForeColor = Drawing.Color.Navy
|
|
||||||
trSaldo.Visible = True
|
|
||||||
HplSaldoAuxiliar.Text = String.Format("$ {0}", Saldo.FormatoNumero())
|
|
||||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=700&width=920", CveProveedor, CveCompra)
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
LblCompraEstatus.ForeColor = Drawing.Color.Navy
|
||||||
|
trSaldo.Visible = True
|
||||||
|
HplSaldoAuxiliar.Text = String.Format("$ {0}", Saldo.FormatoNumero())
|
||||||
|
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=700&width=920", CveProveedor, CveCompra)
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
UpEstatus.Update()
|
||||||
UpEstatus.Update()
|
Else
|
||||||
|
|
||||||
|
If CveCompra > 0 Then
|
||||||
|
LblCompraEstatus.Font.Bold = True
|
||||||
|
LblCompraEstatus.ForeColor = Drawing.Color.Navy
|
||||||
|
trSaldo.Visible = True
|
||||||
|
HplSaldoAuxiliar.Text = String.Format("$ {0}", Saldo.FormatoNumero())
|
||||||
|
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=700&width=920", CveProveedor, CveCompra)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -6093,8 +6103,9 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Case 6 'Compra
|
Case 6 'Compra
|
||||||
|
|
||||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
|
||||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||||
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
||||||
End If
|
End If
|
||||||
@@ -6316,7 +6327,7 @@ Partial Class Compras_Compras
|
|||||||
'falta el registro de la NC cuando es
|
'falta el registro de la NC cuando es
|
||||||
Dim RegistroCuentaPuente As Boolean = False
|
Dim RegistroCuentaPuente As Boolean = False
|
||||||
'NC CON PRODUCTOS - CUENTA PUENTE
|
'NC CON PRODUCTOS - CUENTA PUENTE
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
If RegistraConcepto225 Then
|
||||||
|
|
||||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal
|
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal
|
||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||||
@@ -6381,7 +6392,7 @@ Partial Class Compras_Compras
|
|||||||
' adfasdasd
|
' adfasdasd
|
||||||
'ChkNCInvNC
|
'ChkNCInvNC
|
||||||
|
|
||||||
If Not ChkNCInvNC.Checked OrElse Not RegistroCuentaPuente Then
|
If Not RegistroCuentaPuente AndAlso Not ChkNCInvNC.Checked Then
|
||||||
'GASTO
|
'GASTO
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
DT = TmpDT
|
DT = TmpDT
|
||||||
@@ -18735,15 +18746,19 @@ Partial Class Compras_Compras
|
|||||||
DtInvOC = ObjInventarios.DtResultados.FiltraParametros($"CvePS > 0 AND CveOrdenCompraDetalle = {dr2("CveOrdenCompraDetalle").ToString.ToEntero}").Copy
|
DtInvOC = ObjInventarios.DtResultados.FiltraParametros($"CvePS > 0 AND CveOrdenCompraDetalle = {dr2("CveOrdenCompraDetalle").ToString.ToEntero}").Copy
|
||||||
End If
|
End If
|
||||||
Dim drInv As DataRow = DtInvOC.FiltroPrimero("")
|
Dim drInv As DataRow = DtInvOC.FiltroPrimero("")
|
||||||
DrInvOCDiferencias("TipoCambioAjuste") = drInv("TipoCambioAjuste").ToString.ToDecimal
|
If drInv IsNot Nothing Then 'sino existe no hay problema, porque puede ser le producto un servicio
|
||||||
DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PU").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal '
|
DrInvOCDiferencias("TipoCambioAjuste") = drInv("TipoCambioAjuste").ToString.ToDecimal
|
||||||
DrInvOCDiferencias("CveAlmacen") = drInv("CveAlmacen").ToString.ToEntero
|
DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PU").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal '
|
||||||
DrInvOCDiferencias("CveMovimiento") = drInv("CveMovimiento").ToString.ToEntero
|
DrInvOCDiferencias("CveAlmacen") = drInv("CveAlmacen").ToString.ToEntero
|
||||||
DrInvOCDiferencias("ConceptoSalida") = drInv("ConceptoSalida").ToString.ToEntero
|
DrInvOCDiferencias("CveMovimiento") = drInv("CveMovimiento").ToString.ToEntero
|
||||||
DtInvOCDiferencias.Rows.Add(DrInvOCDiferencias)
|
DrInvOCDiferencias("ConceptoSalida") = drInv("ConceptoSalida").ToString.ToEntero
|
||||||
End If
|
DtInvOCDiferencias.Rows.Add(DrInvOCDiferencias)
|
||||||
End If
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -18825,7 +18840,7 @@ Partial Class Compras_Compras
|
|||||||
CveOrdenCompra = DrDiferencias("CveOrdenCompra").ToString.ToEntero
|
CveOrdenCompra = DrDiferencias("CveOrdenCompra").ToString.ToEntero
|
||||||
CveOCDetalle = DrDiferencias("CveOrdenCompraDetalle").ToString.ToEntero
|
CveOCDetalle = DrDiferencias("CveOrdenCompraDetalle").ToString.ToEntero
|
||||||
CveMoneda = DrDiferencias("CveMoneda").ToString.ToEntero
|
CveMoneda = DrDiferencias("CveMoneda").ToString.ToEntero
|
||||||
DiferenciaInvOC = DrDiferencias("Diferencia").ToString.ToDecimal
|
DiferenciaInvOC = DrDiferencias("Diferencia").ToString.ToDecimal.RoundSQL()
|
||||||
PUCompra = DrDiferencias("PUCompra").ToString.ToDecimal
|
PUCompra = DrDiferencias("PUCompra").ToString.ToDecimal
|
||||||
PS = DrDiferencias("PS").ToString
|
PS = DrDiferencias("PS").ToString
|
||||||
|
|
||||||
@@ -18849,25 +18864,33 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If CveMoneda = 2 And UsuarioActual.CveEmpresa.Contiene(119) Then
|
If CveMoneda = 2 And UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||||
ImporteME = (DiferenciaInvOC / TCInvOC).RoundSQL()
|
ImporteME = (DiferenciaInvOC / TCInvOC).RoundSQL()
|
||||||
ImporteMEComp = (DiferenciaInvOC - ImporteME).RoundSQL()
|
ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundSQL()
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, 177, ConceptoPartida, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then
|
Dim DifImporte As Decimal = DiferenciaInvOC - (ImporteME + ImporteMEComp)
|
||||||
Retorno = False
|
|
||||||
Exit For
|
|
||||||
End If
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, 177, ConceptoPartida, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||||
|
Retorno = False
|
||||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteME, SerieFolio, 228, ConceptoPartida, Fecha, IdCtaContableRecepcionOCME, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
Exit For
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, SerieFolio, 229, ConceptoPartida, Fecha, IdCtaContableRecepcionOCComplementaria, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteMEComp, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
End If
|
||||||
Retorno = False
|
|
||||||
Exit For
|
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteME, SerieFolio, 228, ConceptoPartida, Fecha, IdCtaContableRecepcionOCME, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||||
End If
|
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, SerieFolio, 229, ConceptoPartida, Fecha, IdCtaContableRecepcionOCComplementaria, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteMEComp, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||||
Else
|
If DifImporte <> 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifImporte, SerieFolio, 69, ConceptoPartida, Fecha, IdCtaContableRecepcionOCComplementaria, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DifImporte, ImporteME:=DifImporte, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||||
Retorno = False
|
Retorno = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL
|
Retorno = False
|
||||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, If(ConceptoSalida = 0, IdCtaContableAlmacen, IdCtaContableRecepcionOCER), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle) Then
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Retorno = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL
|
||||||
|
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, If(ConceptoSalida = 0, IdCtaContableAlmacen, IdCtaContableRecepcionOCER), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle) Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, ConceptoPartida, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, ConceptoPartida, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then
|
||||||
Retorno = False
|
Retorno = False
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
@@ -495,13 +495,17 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
MsgError = "Error al registrar detalle de concepto bancario"
|
MsgError = "Error al registrar detalle de concepto bancario"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
Dim Importe28 As Decimal = TxtImporte.Text.ToDecimal
|
||||||
|
If chkajusteoi.checked Then
|
||||||
|
Importe28 = txttotal.text.todecimal
|
||||||
|
End If
|
||||||
'AGREGO PREPOLIZA FyE
|
'AGREGO PREPOLIZA FyE
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 28, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, False, Importe28, TxtObservaciones.Text, 28, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCtaPersonal, -1, CvePersonal:=CvePersonal, CveIE:=CveIERegistrado, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=Importe28 * tipoCambio, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
|
||||||
MsgError = "Error al registrar detalle de concepto bancario"
|
MsgError = "Error al registrar detalle de concepto bancario"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
|
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
|
||||||
@@ -656,7 +660,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL Else PorcentajePago = 1
|
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1
|
||||||
|
|
||||||
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then
|
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then
|
||||||
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
|
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
|
|
||||||
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
||||||
|
|
||||||
If CveConceptoContable.Contiene(1, 2, 12, 13, 38, 207, 203, 39, 61, 62, 63, 150, 251) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
If CveConceptoContable.Contiene(1, 2, 12, 13, 38, 207, 203, 39, 61, 62, 63, 150, 251, 226) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||||
If CveConceptoContable.Contiene(176) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/OC/OC.aspx?CveOrdenCompra={0}", e.Row.DataKey("CveOC"))
|
If CveConceptoContable.Contiene(176) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/OC/OC.aspx?CveOrdenCompra={0}", e.Row.DataKey("CveOC"))
|
||||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
'inicio()
|
'inicio()
|
||||||
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
|
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
' If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
CargaMonedas()
|
CargaMonedas()
|
||||||
CargaAgrupadorSAT()
|
CargaAgrupadorSAT()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
Else
|
'Else
|
||||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
' Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||||
MEECuenta.Enabled = False
|
' MEECuenta.Enabled = False
|
||||||
End If
|
'End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1797,40 +1797,52 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim NombreCuenta As String = ""
|
Dim NombreCuenta As String = ""
|
||||||
Dim CuentaPadre As String = ""
|
Dim CuentaPadre As String = ""
|
||||||
|
|
||||||
For Each Row As DataRow In dt.Rows
|
Dim AgrupadoresSAT As DataTable = New DataTable
|
||||||
NombreCuenta = Row("NombreCuenta").ToString
|
If ObjConta.GetAgrupadoresSAT(UsuarioActual.CveEmpresa) Then
|
||||||
CuentaPadre = Row("CuentaPadre").ToString
|
AgrupadoresSAT = ObjConta.DtResultados
|
||||||
Dim Cuenta As String = Row("Cuenta").ToString
|
End If
|
||||||
Dim TipoCuenta As String = Row("TipoCuenta").ToString
|
|
||||||
Dim AgrupadorSAT As String = Row("AgrupadorSAT").ToString
|
|
||||||
Dim CveCuentaPadre As Integer = -1
|
|
||||||
|
|
||||||
If Not CuentaPadre = "" Then
|
|
||||||
If ObjConta.GetCuentas(-1, CuentaPadre.Replace("-", ""), -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
|
||||||
CveCuentaPadre = ObjConta.DtResultados().FiltroPrimeroValor("Id").ToEntero
|
|
||||||
Else
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
CveCuentaPadre = -2
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim IdNew = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1, CveEmpresaParam:=UsuarioActual.CveEmpresa)
|
|
||||||
If IdNew > 0 Then
|
|
||||||
ContadorUpdate = ContadorUpdate + 1
|
|
||||||
Else
|
|
||||||
TieneError = True
|
|
||||||
ContadorError = ContadorError + 1
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
|
If AgrupadoresSAT.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
For Each Row As DataRow In dt.Rows
|
||||||
|
NombreCuenta = Row("NombreCuenta").ToString
|
||||||
|
CuentaPadre = Row("CuentaPadre").ToString
|
||||||
|
Dim Cuenta As String = Row("Cuenta").ToString
|
||||||
|
Dim TipoCuenta As String = Row("TipoCuenta").ToString
|
||||||
|
Dim AgrupadorSAT As String = Row("AgrupadorSAT").ToString
|
||||||
|
Dim CveCuentaPadre As Integer = -1
|
||||||
|
Dim CveAgrupadorSAT As Integer = If(AgrupadorSAT = "0", -1, AgrupadoresSAT.FiltroPrimeroValor("CveAgrupadorSAT", String.Format("CodigoNombre LIKE '%{0}%'", AgrupadorSAT)).ToEntero)
|
||||||
|
|
||||||
|
If Not CuentaPadre = "" Then
|
||||||
|
If ObjConta.GetCuentas(-1, CuentaPadre.Replace("-", ""), -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
|
CveCuentaPadre = ObjConta.DtResultados().FiltroPrimeroValor("Id").ToEntero
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CveCuentaPadre = -2
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim IdNew = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1, CveEmpresaParam:=UsuarioActual.CveEmpresa, CveAgrupadorSAT:=CveAgrupadorSAT)
|
||||||
|
If IdNew > 0 Then
|
||||||
|
ContadorUpdate = ContadorUpdate + 1
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
ContadorError = ContadorError + 1
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
Alert("No se tienen asociados Agrupadores para esta empresa")
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjConta.Commit()
|
ObjConta.Commit()
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -3708,12 +3708,12 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ValorEntrada > ValorSalida Then
|
If ValorEntrada >= ValorSalida Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorEntrada + ValorSalida, "", 260, tConcepto, Fecha, IdCuentaOtrosIngresos, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorEntrada + ValorSalida) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorEntrada + ValorSalida, "", 260, tConcepto, Fecha, IdCuentaOtrosIngresos, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorEntrada + ValorSalida) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de ingreso"
|
Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de ingreso"
|
||||||
End If
|
End If
|
||||||
ElseIf ValorSalida > ValorEntrada Then
|
ElseIf ValorSalida >= ValorEntrada Then
|
||||||
'inserta el gasto
|
'inserta el gasto
|
||||||
Dim dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
Dim dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||||
Dim tCveClasificacion As Integer = -1
|
Dim tCveClasificacion As Integer = -1
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ Partial Class Inventarios_KardexAlmacen
|
|||||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||||
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
|
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
|
||||||
|
|
||||||
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), If(ChkIncluyeTransitorios.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue) Then
|
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), If(ChkIncluyeTransitorios.Checked, 1, 0), DdlClasificacion_SelectedIndexChanged.selectedvalue.toentero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue) Then
|
||||||
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
|
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
|
||||||
dt = ObjMovimientos.DtResultados
|
dt = ObjMovimientos.DtResultados
|
||||||
Dim ListaBorrar As New List(Of DataColumn)
|
Dim ListaBorrar As New List(Of DataColumn)
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If UsuarioActual.CveSubProyecto = 8804 Then 'AGS
|
If UsuarioActual.CveSubProyecto = 8804 Then 'AGS
|
||||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,12,15")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,12,15")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||||
Else
|
Else
|
||||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,6")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlAlmacen.Items.Clear()
|
DdlAlmacen.Items.Clear()
|
||||||
@@ -680,7 +680,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim DtPendientes As New DataTable
|
Dim DtPendientes As New DataTable
|
||||||
|
|
||||||
If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||||
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa = 119, "AND TipoDocto IN ('Fac','NC')", "AND TipoDocto IN ('Fac')")
|
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
|
||||||
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
|
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
|
||||||
Else
|
Else
|
||||||
DtPendientes = Nothing
|
DtPendientes = Nothing
|
||||||
@@ -830,12 +830,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
TipoCambio = ObjCompras.DtResultados.Rows(0)("TipoCambio").ToString.ToDecimal
|
TipoCambio = ObjCompras.DtResultados.Rows(0)("TipoCambio").ToString.ToDecimal
|
||||||
TipoMovimiento = If(ObjCompras.DtResultados.Rows(0)("EstatusAlmacen").ToString.ToEntero = 1, 2, 1)
|
TipoMovimiento = If(ObjCompras.DtResultados.Rows(0)("EstatusAlmacen").ToString.ToEntero = 1, 2, 1)
|
||||||
TipoMovimiento = If(ObjCompras.DtResultados.Rows(0)("TipoDocto").ToString = "NC", 3, TipoMovimiento)
|
TipoMovimiento = If(ObjCompras.DtResultados.Rows(0)("TipoDocto").ToString.Contiene("NC", "DEV"), 3, TipoMovimiento)
|
||||||
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal
|
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal
|
||||||
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
|
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
|
||||||
|
|
||||||
If TipoMovimiento = 3 Then
|
If TipoMovimiento = 3 Then
|
||||||
CargaAlmacenes(-1, "21")
|
CargaAlmacenes(-1, "21,2")
|
||||||
End If
|
End If
|
||||||
RecibidaCompleta = False
|
RecibidaCompleta = False
|
||||||
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
|
|||||||
@@ -1475,7 +1475,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
'' verifica que no se halla recibido previamente, si ya se recibió da salida
|
'' verifica que no se halla recibido previamente, si ya se recibió da salida
|
||||||
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
|
||||||
Dtt = ObjInventario.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"Codigo", "Cantidad"})
|
Dtt = ObjInventario.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"CveMovimientoDetalle", "Codigo", "Cantidad"})
|
||||||
If Dtt IsNot Nothing AndAlso Dtt.FiltraParametros("Cantidad < 0").Rows.Count > 0 Then
|
If Dtt IsNot Nothing AndAlso Dtt.FiltraParametros("Cantidad < 0").Rows.Count > 0 Then
|
||||||
|
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
@@ -1500,8 +1500,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Dim CveMovimientoDetalleEntrada As Integer = 0
|
Dim CveMovimientoDetalleEntrada As Integer = 0
|
||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
For Each gvr As GridViewRow In GvDatosRecepcion.Rows
|
For Each gvr As GridViewRow In GvDatosRecepcion.Rows
|
||||||
Dim dataRowAux As DataRow = Dtt.FiltroPrimero(String.Format("Codigo = '{0}'", If(gvr.DataKey("Codigo").ToString = "", "0", gvr.DataKey("Codigo").ToString)))
|
|
||||||
|
Dim dataRowAux As DataRow = Dtt.FiltroPrimero(String.Format(" CveMovimientoDetalle = '{0}'", If(gvr.DataKey("CveMovimientoDetalle").ToString = "", "0", gvr.DataKey("CveMovimientoDetalle").ToString)))
|
||||||
Dim cantidadDisponibleValidacion As Decimal = 0
|
Dim cantidadDisponibleValidacion As Decimal = 0
|
||||||
|
|
||||||
If gvr.DataKey("Codigo").ToString IsNot "" Then
|
If gvr.DataKey("Codigo").ToString IsNot "" Then
|
||||||
@@ -2545,57 +2546,61 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Try
|
Try
|
||||||
Dim DtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
|
Dim DtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
|
||||||
For Each RowExcel As DataRow In dt.Rows
|
For Each RowExcel As DataRow In dt.Rows
|
||||||
Dim RowPS = DtPS.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Codigo").ToString()))
|
If RowExcel("Codigo").ToString() <> "" Then
|
||||||
|
|
||||||
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
|
|
||||||
Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
|
||||||
|
|
||||||
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
|
Dim RowPS = DtPS.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Codigo").ToString()))
|
||||||
Dim SerieLote As String = RowExcel("SerieLote").ToString()
|
|
||||||
Dim Observaciones As String = RowExcel("Observaciones").ToString()
|
|
||||||
|
|
||||||
If CveProducto > 0 Then
|
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
|
||||||
|
Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
||||||
|
|
||||||
Dim Valido As Boolean = True
|
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
|
||||||
|
Dim SerieLote As String = RowExcel("SerieLote").ToString()
|
||||||
|
Dim Observaciones As String = RowExcel("Observaciones").ToString()
|
||||||
|
|
||||||
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero()
|
If CveProducto > 0 Then
|
||||||
|
|
||||||
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
|
Dim Valido As Boolean = True
|
||||||
Valido = False
|
|
||||||
Alert($"El producto '{RowPS("PS")}' requiere 'SerieLote'", TipoMensaje.MsgAdvertencia)
|
|
||||||
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveMetodoInventario = 5 AndAlso Not String.IsNullOrEmpty(SerieLote.Trim()) Then
|
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero()
|
||||||
NoPSConSerieLote = NoPSConSerieLote + 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Valido AndAlso (Cantidad > 0 AndAlso RowPS("VentaMinima").ToString.ToDecimal > 0) Then
|
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
|
||||||
If Cantidad Mod RowPS("VentaMinima").ToString.ToDecimal <> 0 Then
|
|
||||||
Valido = False
|
Valido = False
|
||||||
|
Alert($"El producto '{RowPS("PS")}' requiere 'SerieLote'", TipoMensaje.MsgAdvertencia)
|
||||||
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If Valido Then
|
If CveMetodoInventario = 5 AndAlso Not String.IsNullOrEmpty(SerieLote.Trim()) Then
|
||||||
Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, If(Not String.IsNullOrEmpty(SerieLote), SerieLote, "-1"), "-1", "-1")
|
NoPSConSerieLote = NoPSConSerieLote + 1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Valido AndAlso (Cantidad > 0 AndAlso RowPS("VentaMinima").ToString.ToDecimal > 0) Then
|
||||||
|
If Cantidad Mod RowPS("VentaMinima").ToString.ToDecimal <> 0 Then
|
||||||
|
Valido = False
|
||||||
|
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Valido Then
|
||||||
|
Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, If(Not String.IsNullOrEmpty(SerieLote), SerieLote, "-1"), "-1", "-1")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Valido Then
|
||||||
|
AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, If(Not String.IsNullOrEmpty(SerieLote), SerieLote, ""), "", "", False)
|
||||||
|
RowsCargados = RowsCargados + 1
|
||||||
|
Else
|
||||||
|
RowsNoCargados = RowsNoCargados + 1
|
||||||
|
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
If Valido Then
|
|
||||||
AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, If(Not String.IsNullOrEmpty(SerieLote), SerieLote, ""), "", "", False)
|
|
||||||
RowsCargados = RowsCargados + 1
|
|
||||||
Else
|
Else
|
||||||
RowsNoCargados = RowsNoCargados + 1
|
RowsNoCargados = RowsNoCargados + 1
|
||||||
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
|
||||||
RowsNoCargados = RowsNoCargados + 1
|
|
||||||
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al cargar los productos.", ex)
|
OnError("Ocurrió un error al cargar los productos." & ProductosNoCargados.ToString(), ex)
|
||||||
Finally
|
Finally
|
||||||
|
|
||||||
If NoPSConSerieLote > 0 Then
|
If NoPSConSerieLote > 0 Then
|
||||||
|
|||||||
@@ -872,7 +872,6 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero)
|
CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero)
|
||||||
SeriesPago.Add(gvr.DataKey("SerieFolio"))
|
SeriesPago.Add(gvr.DataKey("SerieFolio"))
|
||||||
|
|
||||||
Dim tipoCambioVentaDiferenciaCambiaria As Double = 1
|
|
||||||
Dim EsAnticipoEspecial As Boolean = False
|
Dim EsAnticipoEspecial As Boolean = False
|
||||||
|
|
||||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True
|
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True
|
||||||
@@ -1244,7 +1243,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||||
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
|
|
||||||
|
|
||||||
@@ -1282,7 +1281,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||||
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
|
|
||||||
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
|
|||||||
@@ -288,6 +288,14 @@
|
|||||||
<div runat="server" id="DivMarca" class="col-md-2" visible="false">
|
<div runat="server" id="DivMarca" class="col-md-2" visible="false">
|
||||||
<asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" style="width:100%" Height="22px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" style="width:100%" Height="22px"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label runat="server" id="LblLitraje" title="Mostrar Litraje" data-toggle="tooltip" data-placement="top" class="col-md-1" >Litraje:</label>
|
||||||
|
<div runat="server" id="Div1" class="col-md-2" >
|
||||||
|
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -264,7 +264,8 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente,
|
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente,
|
||||||
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
||||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
||||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero) Then
|
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
|
||||||
|
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
DtVentas = ObjVentas.DtResultados
|
DtVentas = ObjVentas.DtResultados
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -5739,6 +5739,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||||
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
|
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
|
||||||
|
Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString.ToEntero
|
||||||
|
|
||||||
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal
|
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal
|
||||||
|
|
||||||
@@ -5748,7 +5749,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia As Decimal
|
Dim Existencia As Decimal
|
||||||
If ValidaExistencia Then
|
If ValidaExistencia Then
|
||||||
@@ -21071,10 +21072,16 @@ Partial Class Ventas
|
|||||||
Dr("ImporteTotal") = Math.Round(Porcentaje * (TmpDT.SUM("TotalImporte", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ") - TmpDT.SUM("Descuento", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ")), 2)
|
Dr("ImporteTotal") = Math.Round(Porcentaje * (TmpDT.SUM("TotalImporte", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ") - TmpDT.SUM("Descuento", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ")), 2)
|
||||||
' COMENTANDO POR JESUS MURUA ALIAS EL CHOLO, LO HIZO EL RAUL ARRIBA ALV ! 28/02/2018
|
' COMENTANDO POR JESUS MURUA ALIAS EL CHOLO, LO HIZO EL RAUL ARRIBA ALV ! 28/02/2018
|
||||||
'Dr("ImporteTotal") = Porcentaje * TmpDT.SUM("TotalImporte", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ")
|
'Dr("ImporteTotal") = Porcentaje * TmpDT.SUM("TotalImporte", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' ")
|
||||||
Dr("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' "), 2)
|
|
||||||
Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' "), 2)
|
Dr("ImporteIVA") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}'"), 2)
|
Dr("ImporteRetIVA") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}'"), 2)
|
Dr("ImporteRetISR") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
Dr("ImporteIEPS") = (Porcentaje * Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
|
'Dr("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' "), 2)
|
||||||
|
'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}' "), 2)
|
||||||
|
'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}'"), 2)
|
||||||
|
'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", $"ISNULL(PorcentajeIVA,0) = {Dr("PorcentajeIVA").ToString.ToDecimal} AND ISNULL(PorcentajeRetIVA,0) = '{Dr("PorcentajeRetIVA").ToString.ToDecimal}' AND ISNULL(PorcentajeRetISR,0) = '{Dr("PorcentajeRetISR").ToString.ToDecimal}' AND ISNULL(PorcentajeIEPS,0) = '{Dr("PorcentajeIEPS").ToString.ToDecimal}' AND ISNULL(CveSubProyecto,0) = '{Dr("CveSubProyecto").ToString.ToEntero}'"), 2)
|
||||||
Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
|
Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
|
||||||
Next
|
Next
|
||||||
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
|
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
|
||||||
@@ -23432,7 +23439,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
Private Sub CalculaUsados()
|
Private Sub CalculaUsados()
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot") Then
|
||||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||||
|
|
||||||
Dim DTCvePSCostos As DataTable
|
Dim DTCvePSCostos As DataTable
|
||||||
|
|||||||
Reference in New Issue
Block a user