Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -223,6 +223,11 @@ Public Class Timbrado
|
|||||||
ValidaFactura = False
|
ValidaFactura = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'TEMPORAL. PARCHE PARA CANCELAR DOCUMENTOS EMITIDOS CON EL PAC 5
|
||||||
|
If CvePACCancelacion = 5 Then
|
||||||
|
CvePACCancelacion = 4
|
||||||
|
End If
|
||||||
|
|
||||||
If Not (Empresa.Funcionalidad(529) = "1") Then
|
If Not (Empresa.Funcionalidad(529) = "1") Then
|
||||||
If ValidaFactura Then
|
If ValidaFactura Then
|
||||||
Dim Vigencia = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
Dim Vigencia = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||||
|
|||||||
@@ -5782,17 +5782,16 @@ Partial Class PopUpVerFactura
|
|||||||
Dim EstadoCancelacion = drv("EstadoCancelacion").ToString()
|
Dim EstadoCancelacion = drv("EstadoCancelacion").ToString()
|
||||||
Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime
|
Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime
|
||||||
|
|
||||||
Dim MotivoCancelacion As String = "" ' drv("MotivoCancelacion").ToString()
|
Dim MotivoCancelacion As String = ""
|
||||||
Dim FolioSustitucion As String = "" ' drv("FolioFiscalPadre").ToString()
|
Dim FolioSustitucion As String = ""
|
||||||
|
|
||||||
Dim DirectorioArchivo As String = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.mrt", ModExtensiones.DirectorioBaseEmpresas)
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/AcuseCancelacion.mrt"
|
||||||
|
|
||||||
Dim RFCEmisor = UsuarioActual.Empresa.RFC
|
Dim RFCEmisor = UsuarioActual.Empresa.RFC
|
||||||
|
|
||||||
Dim Titulo As String = "Acuse de cancelación de CFDI"
|
Dim Titulo As String = "Acuse de cancelación de CFDI"
|
||||||
Dim EstadoCFDI As String = "Cancelado"
|
Dim EstadoCFDI As String = "Cancelado"
|
||||||
|
|
||||||
|
|
||||||
'SI NO TIENE EL SELLO BUSCA OBTNERLO DE NUEVO
|
'SI NO TIENE EL SELLO BUSCA OBTNERLO DE NUEVO
|
||||||
If String.IsNullOrEmpty(SelloCancelacion) Then
|
If String.IsNullOrEmpty(SelloCancelacion) Then
|
||||||
Dim ObjCancelacion As New Timbrado
|
Dim ObjCancelacion As New Timbrado
|
||||||
@@ -5807,7 +5806,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
If CveEstatusFactura = 20 Then
|
If CveEstatusFactura = 20 Then
|
||||||
|
|
||||||
DirectorioArchivo = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacionSolicitud.mrt", ModExtensiones.DirectorioBaseEmpresas)
|
DirectorioArchivo = "Empresas/Grales/Formatos/AcuseCancelacionSolicitud.mrt"
|
||||||
|
|
||||||
Titulo = "Acuse de solicitud de cancelación de CFDI"
|
Titulo = "Acuse de solicitud de cancelación de CFDI"
|
||||||
EstadoCFDI = "Vigente"
|
EstadoCFDI = "Vigente"
|
||||||
@@ -5851,8 +5850,6 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Archivo As New System.IO.FileInfo(DirectorioArchivo)
|
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("Titulo", Titulo))
|
params.Add(New ReportParameter("Titulo", Titulo))
|
||||||
params.Add(New ReportParameter("FolioFiscal", FolioFiscal))
|
params.Add(New ReportParameter("FolioFiscal", FolioFiscal))
|
||||||
@@ -5864,16 +5861,13 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("MsgError", ""))
|
params.Add(New ReportParameter("MsgError", ""))
|
||||||
params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss")))
|
params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss")))
|
||||||
|
|
||||||
'ImprimirPDF(Archivo.FullName, DtDetalle, params, "AcuseCancelacion" & CveVenta)
|
Dim DtAcuse = New DataTable("DtAcuse")
|
||||||
|
DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String)))
|
||||||
Dim DtAcuse As DataTable = Nothing
|
DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String)))
|
||||||
|
DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String)))
|
||||||
|
DtAcuse.Columns.Add(New DataColumn("FolioSustitucion", GetType(String)))
|
||||||
|
|
||||||
If CveEstatusFactura = 20 Then
|
If CveEstatusFactura = 20 Then
|
||||||
DtAcuse = New DataTable("DtAcuse")
|
|
||||||
DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String)))
|
|
||||||
DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String)))
|
|
||||||
DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String)))
|
|
||||||
DtAcuse.Columns.Add(New DataColumn("FolioSustitucion", GetType(String)))
|
|
||||||
|
|
||||||
Dim RowCFDI = DtAcuse.NewRow()
|
Dim RowCFDI = DtAcuse.NewRow()
|
||||||
|
|
||||||
@@ -5886,7 +5880,7 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ImprimirPDFStimulsoft(Archivo.FullName, DtAcuse, params, "AcuseCancelacion" & CveVenta)
|
ImprimirPDFStimulsoft(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Imports System.Xml
|
|||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
Imports System.Data.SqlClient
|
||||||
'Imports VBIDE
|
'Imports VBIDE
|
||||||
|
|
||||||
Partial Class Compras_Proveedores
|
Partial Class Compras_Proveedores
|
||||||
@@ -1571,11 +1572,15 @@ Partial Class Compras_Proveedores
|
|||||||
Dim ErrorContactos As Boolean = False
|
Dim ErrorContactos As Boolean = False
|
||||||
Dim ErrorSucursales As Boolean = False
|
Dim ErrorSucursales As Boolean = False
|
||||||
Dim ErrorCuentasContables As Boolean = False
|
Dim ErrorCuentasContables As Boolean = False
|
||||||
|
Dim ErrorCuentasContablesSIG As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
Dim codigo As String = "-1"
|
Dim codigo As String = "-1"
|
||||||
Dim MsgCuentaContable As String = ""
|
Dim MsgCuentaContable As String = ""
|
||||||
Dim IdCuentaContable As Integer = -1
|
Dim IdCuentaContable As Integer = -1
|
||||||
|
Dim IdCuentaAltaCompaq As Integer = -1
|
||||||
|
Dim CodigoCuentaAltaCompaq As String = ""
|
||||||
|
Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||||
|
|
||||||
Dim IdProveedor As Integer = -1
|
Dim IdProveedor As Integer = -1
|
||||||
|
|
||||||
@@ -1634,6 +1639,7 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
Dim ClaveFuncionalidad As Integer = UsuarioActual.Empresa.Funcionalidad(201).ToEntero
|
||||||
|
|
||||||
If CveProveedor = -1 Then
|
If CveProveedor = -1 Then
|
||||||
|
|
||||||
@@ -1644,7 +1650,7 @@ Partial Class Compras_Proveedores
|
|||||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjContaAC.IniciaTransacSQL()
|
ObjContaAC.IniciaTransacSQL()
|
||||||
|
|
||||||
Dim ClaveFuncionalidad As Integer = UsuarioActual.Empresa.Funcionalidad(201).ToEntero
|
|
||||||
If DdlCveTipoProveedor.SelectedValue = "2" Then 'cuando es acreedor
|
If DdlCveTipoProveedor.SelectedValue = "2" Then 'cuando es acreedor
|
||||||
ClaveFuncionalidad = UsuarioActual.Empresa.Funcionalidad(202).ToEntero
|
ClaveFuncionalidad = UsuarioActual.Empresa.Funcionalidad(202).ToEntero
|
||||||
End If
|
End If
|
||||||
@@ -1654,6 +1660,7 @@ Partial Class Compras_Proveedores
|
|||||||
IdCuentaContable = UsuarioActual.Empresa.Funcionalidad(322).ToString.Trim.ToEntero
|
IdCuentaContable = UsuarioActual.Empresa.Funcionalidad(322).ToString.Trim.ToEntero
|
||||||
Else
|
Else
|
||||||
IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(ClaveFuncionalidad, TxtRazonSocial.Text.Trim, "D", 2)
|
IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(ClaveFuncionalidad, TxtRazonSocial.Text.Trim, "D", 2)
|
||||||
|
IdCuentaAltaCompaq = IdCuentaContable
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1667,46 +1674,12 @@ Partial Class Compras_Proveedores
|
|||||||
If dt.Rows.Count = 1 Then
|
If dt.Rows.Count = 1 Then
|
||||||
Dim row As DataRow = dt.Rows(0)
|
Dim row As DataRow = dt.Rows(0)
|
||||||
CtaCodigo = CStr(row("CtaCodigo"))
|
CtaCodigo = CStr(row("CtaCodigo"))
|
||||||
|
CodigoCuentaAltaCompaq = CStr(row("Codigo"))
|
||||||
|
NombreCuentaCuentaAltaCompaq = TxtRazonSocial.Text.Trim
|
||||||
DdlCtaContProveedores.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString)) : DdlCtaContProveedores.SelectedValueExist(IdCuentaContable.ToString)
|
DdlCtaContProveedores.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString)) : DdlCtaContProveedores.SelectedValueExist(IdCuentaContable.ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(522).ToString = "1" Then
|
|
||||||
' If UsuarioActual.Empresa.UsaContabilidad Then
|
|
||||||
|
|
||||||
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
' If Not errorContPaq Then
|
|
||||||
' If ObjContPaqi.GetProveedor(TxtRFC.Text.Trim) Then
|
|
||||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
|
||||||
' IdProveedor = ObjContPaqi.DtResultados.Rows(0)("Id").ToString.ToEntero
|
|
||||||
' errorContPaq = False
|
|
||||||
' Else
|
|
||||||
' IdProveedor = ObjContPaqi.AddProveedor(IdCuentaContable, TxtRFC.Text.Trim, TxtNombreComercial.Text.Trim, "", CodigoPersona)
|
|
||||||
' If IdProveedor > 0 Then
|
|
||||||
' errorContPaq = False
|
|
||||||
' Else
|
|
||||||
' errorContPaq = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' errorContPaq = True
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' If Not errorContPaq Then
|
|
||||||
' ObjContPaqi.Commit()
|
|
||||||
' ObjContPaqi.Dispose()
|
|
||||||
' Else
|
|
||||||
' ObjContPaqi.RollBack()
|
|
||||||
' ObjContPaqi.Dispose()
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
|
|
||||||
' IdProveedor = ObjContaAC.AddProveedor(IdCuentaContable, TxtRFC.Text.Trim, TxtRazonSocial.Text.Trim, "")
|
|
||||||
'End If
|
|
||||||
|
|
||||||
IdProveedor = ObjContaAC.AddProveedor(IdCuentaContable, TxtRFC.Text.Trim, TxtRazonSocial.Text.Trim, "")
|
IdProveedor = ObjContaAC.AddProveedor(IdCuentaContable, TxtRFC.Text.Trim, TxtRazonSocial.Text.Trim, "")
|
||||||
|
|
||||||
@@ -1802,7 +1775,23 @@ Partial Class Compras_Proveedores
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ErrorBancos Or ErrorContactos Or ErrorSucursales Or ErrorCuentasContables Then ''se deben validar las 3 juntas????????
|
If IdCuentaAltaCompaq > 0 Then
|
||||||
|
|
||||||
|
Dim CveConceptoContable As Integer
|
||||||
|
If DdlCveTipoProveedor.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||||
|
CveConceptoContable = 5
|
||||||
|
Else
|
||||||
|
CveConceptoContable = 305
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, CveConceptoContable, ObjProveedores.IniciaTransacSQL, IdCompaqPadre:=ClaveFuncionalidad, CveProveedorCuenta:=NuevoCveProveedor) Then
|
||||||
|
ErrorCuentasContablesSIG = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If ErrorBancos Or ErrorContactos Or ErrorSucursales Or ErrorCuentasContables Or ErrorCuentasContablesSIG Then ''se deben validar las 3 juntas????????
|
||||||
ObjProveedores.RollBack()
|
ObjProveedores.RollBack()
|
||||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||||
If ErrorBancos Then
|
If ErrorBancos Then
|
||||||
@@ -1816,7 +1805,10 @@ Partial Class Compras_Proveedores
|
|||||||
End If
|
End If
|
||||||
If ErrorCuentasContables Then
|
If ErrorCuentasContables Then
|
||||||
Alert("Ocurrió un error al asignar las cuentas contables", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al asignar las cuentas contables", TipoMensaje.MsgError)
|
||||||
|
ElseIf ErrorCuentasContablesSIG Then
|
||||||
|
Alert("Ocurrió un error al asignar las cuentas contables SIG", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ObjProveedores.Commit()
|
ObjProveedores.Commit()
|
||||||
@@ -2073,6 +2065,78 @@ Partial Class Compras_Proveedores
|
|||||||
CargaEventoBitacora()
|
CargaEventoBitacora()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing, Optional IdCompaqPadre As Integer = -1, Optional CveProveedorCuenta As Integer = -1) As Boolean
|
||||||
|
|
||||||
|
If Not UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not IdCompaqPadre > 0 Then
|
||||||
|
Alert("Erroa al agregar la cuenta SIG, IdCompaq sin definir.", TipoMensaje.MsgError)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
Dim DisposeClases As Boolean = False
|
||||||
|
Dim Tipo As String = "B"
|
||||||
|
|
||||||
|
If CveConceptoContable.Contiene(5, 305) Then
|
||||||
|
Tipo = "D"
|
||||||
|
ElseIf CveConceptoContable.Contiene(10) Then
|
||||||
|
Tipo = "A"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjContabilidad As ClsContabilidad
|
||||||
|
|
||||||
|
If Transaccion Is Nothing Then
|
||||||
|
ObjContabilidad = New ClsContabilidad
|
||||||
|
DisposeClases = True
|
||||||
|
Else
|
||||||
|
ObjContabilidad = New ClsContabilidad(Transaccion)
|
||||||
|
DisposeClases = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
|
||||||
|
If ObjContabilidad.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta", $"IdCompaq={IdCompaqPadre}").ToEntero
|
||||||
|
|
||||||
|
If CvePadre > 0 Then
|
||||||
|
|
||||||
|
Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, Tipo, 2, 1, CveProveedor:=CveProveedor, IdCompaq:=IdCuentaAltaCompaq)
|
||||||
|
|
||||||
|
If CvecuentaNueva > 0 Then
|
||||||
|
If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, UsuarioActual.CveEmpresa, CvecuentaNueva, CveProveedor:=CveProveedorCuenta, PorcentajeIVA:=0) Then
|
||||||
|
Respuesta = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Respuesta = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DisposeClases Then
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
|
||||||
|
If Not Respuesta Then
|
||||||
|
Alert("Se presento un error al agregar y asignar la cuenta (Conta SIG).", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "U S U A R I O S"
|
#Region "U S U A R I O S"
|
||||||
@@ -4113,7 +4177,7 @@ Partial Class Compras_Proveedores
|
|||||||
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
'' 17/03/2017 FUNCIONALIDADES 249,250,251
|
'' 17/03/2017 FUNCIONALIDADES 249,250,251
|
||||||
'' Proveedores
|
''
|
||||||
Dim ClaveFuncionalidad As Integer = UsuarioActual.Empresa.Funcionalidad(201).ToEntero
|
Dim ClaveFuncionalidad As Integer = UsuarioActual.Empresa.Funcionalidad(201).ToEntero
|
||||||
If DdlCveTipoProveedor.SelectedValue = "2" Then ClaveFuncionalidad = UsuarioActual.Empresa.Funcionalidad(202).ToEntero
|
If DdlCveTipoProveedor.SelectedValue = "2" Then ClaveFuncionalidad = UsuarioActual.Empresa.Funcionalidad(202).ToEntero
|
||||||
If DdlCtaContProveedores.SelectedValue.ToEntero <= 0 And ClaveFuncionalidad > 0 Then
|
If DdlCtaContProveedores.SelectedValue.ToEntero <= 0 And ClaveFuncionalidad > 0 Then
|
||||||
@@ -4282,15 +4346,19 @@ Partial Class Compras_Proveedores
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AgregarCuentaContable(btn As Button, ddl As DropDownList)
|
Private Sub AgregarCuentaContable(btn As Button, ddl As DropDownList)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad = True Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad = True Then
|
||||||
Dim IdCuentaContable As Integer = -1
|
Dim IdCuentaContable As Integer = -1
|
||||||
Dim CtaCodigo As String = ""
|
Dim CtaCodigo As String = ""
|
||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
Dim IdCtaContableProveedores As Integer = -1, IdCtaContableAcreedores As Integer = -1, IdCtaContableDocsXPagar As Integer = -1, IdCtaContableAnticipos As Integer = -1, IdCtaContableDeudor As Integer = -1
|
Dim IdCtaContableProveedores As Integer = -1, IdCtaContableAcreedores As Integer = -1, IdCtaContableDocsXPagar As Integer = -1, IdCtaContableAnticipos As Integer = -1, IdCtaContableDeudor As Integer = -1
|
||||||
Dim CtaCodigoProveedores As String = "-1", CtaCodigoAcreedores As String = "-1", CtaCodigoDocsXPagar As String = "-1", CtaCodigoAnticipos As String = "-1", CtaCodigoDeudor As String = "-1"
|
Dim CtaCodigoProveedores As String = "-1", CtaCodigoAcreedores As String = "-1", CtaCodigoDocsXPagar As String = "-1", CtaCodigoAnticipos As String = "-1", CtaCodigoDeudor As String = "-1"
|
||||||
|
Dim CveConceptoContable As Integer = -1
|
||||||
|
Dim Codigo As String = ""
|
||||||
|
|
||||||
Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
Dim ObjProveedores As New ClsCompProveedores()
|
Dim ObjProveedores As New ClsCompProveedores()
|
||||||
|
|
||||||
ObjContaAC.IniciaTransacSQL()
|
ObjContaAC.IniciaTransacSQL()
|
||||||
ObjProveedores.IniciaTransacSQL()
|
ObjProveedores.IniciaTransacSQL()
|
||||||
|
|
||||||
@@ -4302,15 +4370,26 @@ Partial Class Compras_Proveedores
|
|||||||
Select Case btn.CommandArgument.ToString
|
Select Case btn.CommandArgument.ToString
|
||||||
Case "Proveedores"
|
Case "Proveedores"
|
||||||
CuentaPadre = If(DdlCveTipoProveedor.SelectedValue = "2", UsuarioActual.Empresa.Funcionalidad(202).ToEntero, UsuarioActual.Empresa.Funcionalidad(201).ToEntero)
|
CuentaPadre = If(DdlCveTipoProveedor.SelectedValue = "2", UsuarioActual.Empresa.Funcionalidad(202).ToEntero, UsuarioActual.Empresa.Funcionalidad(201).ToEntero)
|
||||||
|
|
||||||
|
If DdlCveTipoProveedor.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||||
|
CveConceptoContable = 5
|
||||||
|
Else
|
||||||
|
CveConceptoContable = 305
|
||||||
|
End If
|
||||||
|
|
||||||
Case "Acreedores"
|
Case "Acreedores"
|
||||||
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(202).ToEntero
|
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(202).ToEntero
|
||||||
|
CveConceptoContable = 305
|
||||||
Case "DocsXPagar"
|
Case "DocsXPagar"
|
||||||
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(203).ToEntero
|
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(203).ToEntero
|
||||||
|
CveConceptoContable = 50
|
||||||
Case "Anticipos"
|
Case "Anticipos"
|
||||||
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(204).ToEntero
|
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(204).ToEntero
|
||||||
TipoCuenta = "A"
|
TipoCuenta = "A"
|
||||||
|
CveConceptoContable = 10
|
||||||
Case "Deudores"
|
Case "Deudores"
|
||||||
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(205).ToEntero
|
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(205).ToEntero
|
||||||
|
CveConceptoContable = 10
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -4327,6 +4406,7 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
Dim row As DataRow = dt.Rows(0)
|
Dim row As DataRow = dt.Rows(0)
|
||||||
CtaCodigo = CStr(row("CtaCodigo"))
|
CtaCodigo = CStr(row("CtaCodigo"))
|
||||||
|
Codigo = CStr(row("Codigo"))
|
||||||
|
|
||||||
Select Case btn.CommandArgument.ToString
|
Select Case btn.CommandArgument.ToString
|
||||||
Case "Proveedores"
|
Case "Proveedores"
|
||||||
@@ -4359,6 +4439,12 @@ Partial Class Compras_Proveedores
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not AltaCuentaContabilidadSIG(Codigo, NombreCuenta, IdCuentaContable, CveConceptoContable, ObjProveedores.IniciaTransacSQL, IdCompaqPadre:=CuentaPadre, CveProveedorCuenta:=CveProveedor) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion))
|
Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion))
|
||||||
ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString)) : ddl.SelectedValueExist(IdCuentaContable.ToString)
|
ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString)) : ddl.SelectedValueExist(IdCuentaContable.ToString)
|
||||||
|
|||||||
Reference in New Issue
Block a user