-- manejo de nueva columna de cvecolectiva, para asignación e cuentas
This commit is contained in:
@@ -968,9 +968,6 @@ Public Class ClsContabilidad
|
||||
.Add("@TCPago", SqlDbType.Decimal).Value = TipoCambioPago
|
||||
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||
'.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||
'.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
'.Add("@IdSegmentoNegocio", SqlDbType.Int).Value = IdSegmentoNegocio
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
@@ -993,6 +990,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveCreditoDetalle", SqlDbType.Int).Value = CveCreditoDetalle
|
||||
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
||||
.Add("@CveNominaMovtoPermanente", SqlDbType.Money).Value = CveNominaMovtoPermanente
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
|
||||
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
@@ -5664,7 +5662,7 @@ Public Class ClsContabilidad
|
||||
Public Function AddCuentasAsignaciones(CveConceptoContable As Integer, CveEmpresa As Integer, CveCuenta As Integer,
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1, Optional CveColectiva As Integer = -1,
|
||||
Optional RegeneraCuenta As Boolean = False,
|
||||
Optional OpActualizarClasificacion As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -5687,6 +5685,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||
.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
||||
.Add("@OpActualizarClasificacion", SqlDbType.Bit).Value = OpActualizarClasificacion
|
||||
End With
|
||||
@@ -5706,7 +5705,7 @@ Public Class ClsContabilidad
|
||||
Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1,
|
||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1,
|
||||
Optional CveCredito As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean
|
||||
Optional CveCredito As Integer = -1, Optional CveColectiva As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesUpdate")
|
||||
@@ -5727,6 +5726,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||
.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
||||
End With
|
||||
|
||||
|
||||
@@ -31,9 +31,7 @@ Public Class ClsGenerales
|
||||
Public Property Direccion As String
|
||||
Public Property Telefono As String
|
||||
Public Property Correo As String
|
||||
Public Property Tipo As Integer
|
||||
Public Property IdCtaContable As Integer
|
||||
Public Property CtaContable As String
|
||||
Public Property Tipo As Integer
|
||||
Public Property Estatus As Boolean
|
||||
Public Property FechaIng As DateTime
|
||||
Public Property CveUsuario As Integer
|
||||
@@ -1245,18 +1243,17 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O L E C T I V A S"
|
||||
Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Public Function GetColectivas(CveEmpresa As Integer, Optional CveColectiva As Integer = -1, Optional Tipo As String = "-1", Optional CveConceptoContable As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_ColectivasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@Colectiva", SqlDbType.VarChar).Value = Colectiva
|
||||
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
@@ -1270,9 +1267,7 @@ Public Class ClsGenerales
|
||||
Me.Direccion = Data.Rows(0)("Direccion").ToString
|
||||
Me.Telefono = Data.Rows(0)("Telefono").ToString
|
||||
Me.Correo = Data.Rows(0)("Correo").ToString
|
||||
Me.Tipo = Data.Rows(0)("Tipo").ToString.ToEntero
|
||||
Me.IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
Me.CtaContable = Data.Rows(0)("CtaContable").ToString
|
||||
Me.Tipo = Data.Rows(0)("Tipo").ToString.ToEntero
|
||||
Me.Estatus = CBool(Data.Rows(0)("Estatus").ToString)
|
||||
Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDateTime
|
||||
Me.Usuario = Data.Rows(0)("Usuario").ToString
|
||||
@@ -1392,7 +1387,7 @@ Public Class ClsGenerales
|
||||
DataAdapter("PA_Gral_ColectivasGetByProveedor")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
@@ -1403,10 +1398,10 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O L E C T I V A S - D E T A L L E S"
|
||||
Public Function GetColectivasDetalles(CveColectiva As Integer, Tipo As String, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -706,7 +706,8 @@ Public Class ClsOC
|
||||
Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
||||
Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1") As Boolean
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1",
|
||||
Optional CveColectiva As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraAdd")
|
||||
@@ -750,6 +751,7 @@ Public Class ClsOC
|
||||
.Add("@Promocion", SqlDbType.VarChar).Value = Promocion
|
||||
.Add("@CveProveedorContacto", SqlDbType.Int).Value = CveProveedorContacto
|
||||
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
|
||||
.Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
@@ -1156,7 +1158,7 @@ Public Class ClsOC
|
||||
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0,
|
||||
Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0,
|
||||
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
||||
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1, Optional CveColectiva As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
||||
|
||||
@@ -1189,6 +1191,7 @@ Public Class ClsOC
|
||||
.Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion
|
||||
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
||||
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
<label for="<%= TxtNumeroRegistro.ClientID.ToString()%>">Número de Registro:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProveedor" CssClass="form-control select2me " runat="server" DataTextField="RazonSocial" AppendDataBoundItems="true" DataValueField="CveProveedor" Style="width: 100%"></asp:DropDownList>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProveedor" CssStyle="width: 100%;" CssClassDdl="select2me " DataTextField="NombreCortoProveedor" DataValueField="CveProveedor" />
|
||||
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright ocultar">
|
||||
|
||||
@@ -9,21 +9,32 @@
|
||||
public partial class CATHuerta :ClsPaginas
|
||||
{
|
||||
|
||||
#region Propiedades
|
||||
private int CveHuerta
|
||||
{
|
||||
get{return (ViewState["CveHuerta"] == null) ? 0 : Convert.ToInt32(ViewState["CveHuerta"]);}
|
||||
set{ViewState["CveHuerta"] =value;}
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack){
|
||||
CargaProveedor();
|
||||
CargaHuerta();
|
||||
}
|
||||
}
|
||||
#region Propiedades
|
||||
private int CveHuerta
|
||||
{
|
||||
get{return (ViewState["CveHuerta"] == null) ? 0 : Convert.ToInt32(ViewState["CveHuerta"]);}
|
||||
set{ViewState["CveHuerta"] =value;}
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack){
|
||||
CargaProveedor();
|
||||
CargaHuerta();
|
||||
}
|
||||
}
|
||||
protected void CargaHuerta()
|
||||
{
|
||||
ClsCGame ObjHuer =new ClsCGame();
|
||||
if (ObjHuer.GetHuerta(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GVHuerta.DataSource = ObjHuer.DtResultados;
|
||||
GVHuerta.DataBind();
|
||||
}
|
||||
ObjHuer.Dispose();
|
||||
upDatosHuer.Update();
|
||||
}
|
||||
protected void CargaProveedor()
|
||||
{
|
||||
using (ClsCGame ogame =new ClsCGame())
|
||||
|
||||
@@ -181,6 +181,10 @@
|
||||
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divColectivas" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlColectivas" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Colectiva" DataValueField="CveColectiva" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlColectivas.ClientID.ToString()%>">Colectivas: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divCredito" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlCreditos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Referencia" DataValueField="CveCredito" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlCreditos.ClientID.ToString()%>">Crédito: </label>
|
||||
|
||||
@@ -202,7 +202,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
|
||||
|
||||
divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString)
|
||||
divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString)
|
||||
divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString)
|
||||
@@ -213,6 +212,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
||||
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
||||
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
|
||||
divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString)
|
||||
|
||||
DdlActivoFijo.Enabled = False
|
||||
|
||||
@@ -254,6 +254,21 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlCreditos.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If Dr("AplicaColectiva").ToString = "True" Then
|
||||
Dim ObjG As New ClsGenerales
|
||||
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
||||
DdlColectivas.DataSource = ObjG.DtResultados
|
||||
End If
|
||||
ObjG.Dispose()
|
||||
DdlColectivas.DataBind()
|
||||
|
||||
If OpAgregar Then
|
||||
DdlColectivas.Enabled = True
|
||||
Else
|
||||
DdlColectivas.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -343,7 +358,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
@@ -351,7 +366,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al actualizar"
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user