- manejo de usados, para que en la conta se vaya como producto ( mercanca por recibir)
This commit is contained in:
@@ -1735,11 +1735,7 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
If Validada And Not EnListadoEFOS Then
|
||||
|
||||
|
||||
|
||||
Try
|
||||
|
||||
XMLDoc.Load(Archivo)
|
||||
Catch ex As Exception
|
||||
Try
|
||||
@@ -1749,13 +1745,8 @@ Partial Class Compras_Compras
|
||||
Catch ex2 As Exception
|
||||
GuardaLog("Error al intentar leer el XML del SAT. Error:" & ex2.ToString())
|
||||
End Try
|
||||
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
CreaDTConceptos()
|
||||
|
||||
CargaComprobanteXML(XMLDoc)
|
||||
|
||||
If NuevaValidacionXML = 1 Or (Version = "3.3" Or Version = "4.0") Then
|
||||
@@ -1821,7 +1812,6 @@ Partial Class Compras_Compras
|
||||
CargaConceptosXML(XMLDoc)
|
||||
End If
|
||||
|
||||
|
||||
Select Case TipoComprobante
|
||||
Case "ingreso" : DdlTipoComprobante.SelectedValue = "Fac" : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("NC")) : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("DEV"))
|
||||
Case "egreso" : DdlTipoComprobante.SelectedValue = "NC" : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Fac")) : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) : ChkAplicaNotaCredito.Enabled = False
|
||||
@@ -5158,7 +5148,7 @@ Partial Class Compras_Compras
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If (AutoConta Or UsuarioActual.Empresa.UsaAC) And ObjContaAC Is Nothing Then
|
||||
If (AutoConta Or UsuarioActual.Empresa.UsaAC) And ObjContaAC Is Nothing AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -7833,7 +7823,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) AndAlso UsuarioActual.CveEmpresa <> 72 Then
|
||||
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorPrepolizaDescuadre = True
|
||||
@@ -8807,7 +8797,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim ErrorCompra = False
|
||||
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
If Not ObjAC.RemovePoliza(IdPoliza) Then
|
||||
@@ -9943,7 +9933,7 @@ Partial Class Compras_Compras
|
||||
Dim ObjInventario As New ClsInventarios(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjAF As New ClsAF(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing '= New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
|
||||
Dim Retorno As Boolean = True
|
||||
Dim CveEstatusFactura As Integer = HdnCveEstatusFactura.Value.ToEntero
|
||||
@@ -10427,7 +10417,7 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
|
||||
If Retorno Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If ObjContaAC Is Nothing Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
@@ -15063,7 +15053,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -18497,6 +18487,10 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If DrPS("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
||||
CveTipoPS = 2
|
||||
End If
|
||||
|
||||
Dim DecimalesPermitidos = 6
|
||||
|
||||
Row("CveConcepto") = TmpDT.Rows.Count + 1
|
||||
@@ -18653,13 +18647,19 @@ Partial Class Compras_Compras
|
||||
|
||||
'PS - CLASIFICACION
|
||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If PSRow IsNot Nothing Then
|
||||
Dim CveTipoPS As Integer = PSRow("CveTipoPS").ToString.ToEntero
|
||||
If PSRow("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
||||
CveTipoPS = 2
|
||||
End If
|
||||
|
||||
DrPS("CveClasificacion") = PSRow("CveClasificacion").ToString
|
||||
DrPS("Clasificacion") = PSRow("Clasificacion").ToString
|
||||
DrPS("CvePS") = DdlPS.SelectedValue
|
||||
DrPS("PS") = PSRow("PS").ToString
|
||||
DrPS("CveTipoPS") = PSRow("CveTipoPS").ToString.ToEntero
|
||||
DrPS("CveTipoPS") = CveTipoPS
|
||||
DrPS("CveSATPS") = PSRow("CveSATPS").ToString.ToEntero
|
||||
DrPS("SATClaveProductoServicio") = PSRow("SATClaveProductoServicio").ToString
|
||||
DrPS("CveSATPSActualizado") = 0
|
||||
|
||||
Reference in New Issue
Block a user