Correciones saldos inicales,Compras documentos relacionados
This commit is contained in:
@@ -197,7 +197,7 @@ Public Class ClsCompras
|
||||
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
|
||||
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
|
||||
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
|
||||
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1) As Boolean
|
||||
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1, Optional DoctosRelacionados As String = "-1") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -251,6 +251,9 @@ Public Class ClsCompras
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@EsImportacion", SqlDbType.Bit).Value = EsImportacion
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@DoctosRelacionados", SqlDbType.VarChar).Value = DoctosRelacionados
|
||||
|
||||
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -4919,9 +4919,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
'Compra
|
||||
Dim DoctosRelacionados As String = If(UUIDSList.Count > 0, String.Join(",", UUIDSList.ToArray()), "-1")
|
||||
|
||||
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
||||
LblAmortizacion.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtIEPS.Text.ToDouble, TxtOtrosImpuestos.Text.ToDouble,
|
||||
@@ -4929,7 +4927,7 @@ Partial Class Compras_Compras
|
||||
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
|
||||
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
|
||||
CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto,
|
||||
EsImportacion:=EsImportacion, CveFactura:=CveFactura, CveSubProyecto:=CveSubProyectoPrincipal) Then
|
||||
EsImportacion:=EsImportacion, CveFactura:=CveFactura, CveSubProyecto:=CveSubProyectoPrincipal, DoctosRelacionados:=DoctosRelacionados) Then
|
||||
|
||||
ViewState("CveCompra") = ObjCompras.CveCompra
|
||||
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
|
||||
|
||||
@@ -1821,7 +1821,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim Codigo As String = Row("Código").ToString()
|
||||
Dim Descripcion As String = Row("Descripción").ToString()
|
||||
|
||||
Dim CuentaContable As String = Row("CuentaContable").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
Dim CuentaContable As String = Row("Cuenta Contable").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
If CuentaContable.Length > 0 Then
|
||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
||||
@@ -1833,8 +1833,8 @@ Partial Class General_SaldosIniciales
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
If CuentaContable.Length > 0 Then
|
||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
||||
|
||||
@@ -1845,6 +1845,7 @@ Partial Class General_SaldosIniciales
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If Not ErrorAF Then
|
||||
@@ -1869,8 +1870,8 @@ Partial Class General_SaldosIniciales
|
||||
Dim Descripcion As String = Row("Descripción").ToString()
|
||||
Dim TipoAF As String = Row("Tipo").ToString().Trim
|
||||
Dim SubTipo As String = Row("SubTipo").ToString().Trim
|
||||
Dim Valor As Decimal = Row("Valor de compra").ToString().ToDecimal
|
||||
Dim FechaAF As Date = Row("Fecha de compra").ToString().ToDate
|
||||
Dim Valor As Decimal = Row("Valor").ToString().ToDecimal
|
||||
Dim FechaAF As Date = Row("Fecha").ToString().ToDate
|
||||
Dim NumeroSerie As String = Row("No. Serie").ToString()
|
||||
Dim Año As Integer = Row("Año").ToString().ToEntero()
|
||||
Dim CuentaContable As String = Row("Cuenta Contable").ToString()
|
||||
@@ -1889,7 +1890,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero()
|
||||
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero()
|
||||
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero()
|
||||
Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContable").ToString().ToEntero()
|
||||
Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContableDepreciacion").ToString().ToEntero()
|
||||
|
||||
'VALIDACIONES
|
||||
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
|
||||
|
||||
@@ -3135,7 +3135,17 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
'AutoConta - El movimiento 1 es el de Venta
|
||||
|
||||
|
||||
If Not ErrorMovInv AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If AutoConta And Not ErrorMovInv Then
|
||||
|
||||
@@ -1316,6 +1316,12 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
If DdlFraccionArancelaria.SelectedValue.ToEntero > 0 AndAlso TxtCodigo.Text.Trim.Length = 0 Then
|
||||
Alert("El campo Numero de Parte / Código es requerido (al seleccionar una Fracción Arancelaria el campo Numero de Parte / Código se vuelve requerido).", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlSATPS.txtValue.Value.ToEntero > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then ' si tiene activada la carta porte
|
||||
|
||||
|
||||
Reference in New Issue
Block a user