mejoras en conceptos de NC
This commit is contained in:
@@ -542,7 +542,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End Sub
|
||||
|
||||
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21, 18, 60) Then
|
||||
CargaProveedores()
|
||||
DdlProveedores.Visible = True
|
||||
DdlCompras.Visible = True
|
||||
@@ -557,7 +557,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Else
|
||||
DdlPersonal.Visible = False
|
||||
End If
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
|
||||
CargaClientes()
|
||||
DdlClientes.Visible = True
|
||||
DdlVentas.Visible = True
|
||||
@@ -594,11 +594,21 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End Sub
|
||||
|
||||
Private Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.SelectedIndexChanged
|
||||
CargaCompras(DdlProveedores.SelectedValue.ToEntero)
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
|
||||
CargaNotasCreditoCompras(DdlProveedores.SelectedValue.ToEntero, DdlCompras)
|
||||
Else
|
||||
CargaCompras(DdlProveedores.SelectedValue.ToEntero)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientes.selectedindexchange
|
||||
CargaVentas(DdlClientes.SelectedValue.ToEntero)
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(12, 91) Then
|
||||
CargaVentas(DdlClientes.SelectedValue.ToEntero)
|
||||
Else
|
||||
CargaVentas(DdlClientes.SelectedValue.ToEntero)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyectos()
|
||||
@@ -646,6 +656,24 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaNotasCreditoCompras(CveProveedor As Integer, ddl As DropDownList)
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
ddl.ClearSelection()
|
||||
If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, "NC", "-1", "-1", "-1", "-1", "-1", "-1", "-1", "-1", CveProveedor:=CveProveedor, TopSelect:=1000) Then
|
||||
ddl.DataSource = ObjCompras.DtResultados '.FiltraParametros("Saldo <> 0")
|
||||
ddl.DataBind()
|
||||
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
Else
|
||||
ddl.DataSource = Nothing
|
||||
ddl.DataBind()
|
||||
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClientes()
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente")
|
||||
@@ -676,6 +704,22 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaNotasCreditoVentas(CveCliente As Integer)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
DdlVentas.ClearSelection()
|
||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
|
||||
DdlVentas.DataBind()
|
||||
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
Else
|
||||
DdlVentas.DataSource = Nothing
|
||||
DdlVentas.DataBind()
|
||||
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPersonal()
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
@@ -904,15 +948,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
|
||||
'Registra movimieno bancario
|
||||
If CveConcepto = 30 Then
|
||||
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
|
||||
CveIEInsertado = CveIE
|
||||
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
FolioIE = ObjIE.Folio
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim CveProveedor As Integer = -1
|
||||
@@ -945,7 +981,18 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
|
||||
Else
|
||||
If CveConcepto = 30 Then
|
||||
'Registra movimieno bancario
|
||||
If CveConcepto = 30 Then
|
||||
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
|
||||
CveIEInsertado = CveIE
|
||||
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
FolioIE = ObjIE.Folio
|
||||
End If
|
||||
End If
|
||||
|
||||
CveIE = CveIEInsertado
|
||||
|
||||
Else
|
||||
CveIE = -1
|
||||
End If
|
||||
@@ -993,7 +1040,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
'MENSAJE PRINCIPAL
|
||||
MensajeAlert.AppendFormat("<br/><br/>Folio de Póliza: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
|
||||
MensajeAlert.AppendFormat("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
|
||||
MensajeAlert.AppendFormat("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
|
||||
'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
@@ -1671,7 +1718,12 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Protected Sub DdlProveedores_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||
Dim ddl As DropDownList = CType(sender, DropDownList)
|
||||
Dim ddl2 As DropDownList = DirectCast(ddl.BindingContainer, GridViewRow).FCDropDownList("DdlCompras")
|
||||
CargaCompras2(ddl.SelectedValue.ToEntero, ddl2)
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
|
||||
CargaNotasCreditoCompras(ddl.SelectedValue.ToEntero, ddl2)
|
||||
Else
|
||||
CargaCompras2(ddl.SelectedValue.ToEntero, ddl2)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCompras2(CveProveedor As Integer, ddl As DropDownList)
|
||||
|
||||
@@ -514,7 +514,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
DdlPersonal.Visible = False
|
||||
End If
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
|
||||
CargaClientes()
|
||||
DdlClientes.Visible = True
|
||||
DdlVentas.Visible = True
|
||||
@@ -542,7 +542,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
DdlCtaContable.DataSource = Session("DtCuentas")
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCtaContable.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlCtaContable.DataBind()
|
||||
DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
End Sub
|
||||
@@ -1058,8 +1062,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlTipoGastoE.DataBind()
|
||||
DdlTipoGastoE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
End Sub
|
||||
Private Sub CargaCtaContableE()
|
||||
DdlCtaContableE.DataSource = Session("DtCuentas")
|
||||
Private Sub CargaCtaContableE()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCtaContableE.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlCtaContableE.DataBind()
|
||||
DdlCtaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
End Sub
|
||||
@@ -1086,7 +1095,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
DdlClasificacionesE.Visible = False
|
||||
End If
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
|
||||
CargaClientesE()
|
||||
DdlClientesE.Visible = True
|
||||
DdlVentasE.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user