-- parametro de actualizar porcentajeimpuesto al ediitar prepoliza
This commit is contained in:
@@ -258,7 +258,7 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
||||||
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
||||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
|
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -279,6 +279,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -204,6 +204,7 @@
|
|||||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||||
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
|
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||||
@@ -454,7 +455,7 @@
|
|||||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||||
|
|
||||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta" Width="100%" >
|
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto" Width="100%" >
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||||
@@ -729,6 +730,10 @@
|
|||||||
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="160px" Visible="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
|
<asp:DropDownList ID="DdlPorcentajeIVAE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" VISIBLE="false" Width="160px" >
|
||||||
|
<asp:ListItem Text="16%" Value="0.16"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="8%" Value="0.08"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
.Add("ContadoImporte", Type.GetType("System.Double"))
|
.Add("ContadoImporte", Type.GetType("System.Double"))
|
||||||
.Add("ContadoBeneficiario", Type.GetType("System.String"))
|
.Add("ContadoBeneficiario", Type.GetType("System.String"))
|
||||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||||
|
.Add("PorcentajeImpuesto", Type.GetType("System.Double"))
|
||||||
.Add("Modificado", Type.GetType("System.Boolean"))
|
.Add("Modificado", Type.GetType("System.Boolean"))
|
||||||
|
|
||||||
|
|
||||||
@@ -579,6 +580,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
|
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
|
||||||
|
|
||||||
|
|
||||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||||
CargaProveedores()
|
CargaProveedores()
|
||||||
DdlProveedores.Visible = True
|
DdlProveedores.Visible = True
|
||||||
@@ -1051,7 +1054,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||||
|
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1065,7 +1069,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
||||||
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero) Then
|
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1119,6 +1123,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim CveCuenta As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveCuenta").ToString.ToEntero
|
Dim CveCuenta As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveCuenta").ToString.ToEntero
|
||||||
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
|
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
|
||||||
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
|
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
|
||||||
|
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
|
||||||
|
|
||||||
CargaConceptosContablesE()
|
CargaConceptosContablesE()
|
||||||
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
||||||
@@ -1188,6 +1193,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||||
|
Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
|
If dr IsNot Nothing Then
|
||||||
|
DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
|
||||||
|
End If
|
||||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||||
CargaProveedoresE()
|
CargaProveedoresE()
|
||||||
DdlProveedoresE.Visible = True
|
DdlProveedoresE.Visible = True
|
||||||
@@ -1303,9 +1312,14 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
|
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
|
||||||
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
||||||
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
||||||
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
||||||
|
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
|
||||||
dr("Modificado") = True
|
dr("Modificado") = True
|
||||||
|
|
||||||
|
If DdlPorcentajeIVAE.Visible Then
|
||||||
|
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
DtMovimientos.Rows.Add(dr)
|
DtMovimientos.Rows.Add(dr)
|
||||||
DtMovimientos.AcceptChanges()
|
DtMovimientos.AcceptChanges()
|
||||||
|
|||||||
Reference in New Issue
Block a user