se agrego la columna de CveUsuarioModifico a las tablas de PrePoliza y prepolizadetalle

This commit is contained in:
Antonio Gonzalez
2020-09-24 19:30:27 -07:00
parent 79c9d30fcf
commit 2ad7ba3297
8 changed files with 276 additions and 268 deletions

View File

@@ -253,7 +253,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,
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") As Boolean
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -274,6 +274,7 @@ Public Class ClsContabilidad
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
Try
@@ -1360,7 +1361,7 @@ Public Class ClsContabilidad
End If
If Not OcurrioError Then
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa) Then
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then
OcurrioError = True
End If
End If
@@ -1506,7 +1507,8 @@ Public Class ClsContabilidad
End Function
Public Function UpdatePrePoliza(FechaConta As Date, FolioPoliza As Integer, CveTipoPoliza As Integer, IdPoliza As Integer, CvePrePoliza As Integer, CveEmpresa As Integer, Optional Concepto As String = "-1", Optional FechaPoliza As Date = MinFecha, Optional xxx As Integer = -1) As Boolean
Public Function UpdatePrePoliza(FechaConta As Date, FolioPoliza As Integer, CveTipoPoliza As Integer, IdPoliza As Integer, CvePrePoliza As Integer, CveEmpresa As Integer,
Optional Concepto As String = "-1", Optional FechaPoliza As Date = MinFecha, Optional xxx As Integer = -1, Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1521,6 +1523,7 @@ Public Class ClsContabilidad
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
Try

View File

@@ -37,9 +37,6 @@
<li>
<asp:LinkButton ID="LnkAddOtrosGastos" OnClick="LnkAddOtrosGastos_Click" Visible="false" runat="server"><i class="fa fa-plus-circle"></i> Agregar Otros Gastos</asp:LinkButton>
</li>
<li runat="server" visible="false" id="liServicios">
<asp:LinkButton ID="LbServicios" OnClick="LbServicios_Click" runat="server"><i class='fa fa-truck'></i> Gastos y Servicios</asp:LinkButton>
</li>
<li runat="server" visible="false" id="liFletesImportaciones">
<asp:LinkButton ID="LnkFletesImportaciones" runat="server"><i class='fa fa-truck'></i> Costo Indirecto/Importaciones</asp:LinkButton>
</li>
@@ -147,6 +144,17 @@
border: 1px solid black;
width: 85%;
}
.GastoIndirectoOpciones {
margin-left:auto;
margin-right:auto;
width:400px;
}
.GastoIndirectoOpciones td
{
text-align:right /* Or any other value */
}
/*IPP*/
</style>
</asp:Content>
@@ -3296,195 +3304,6 @@
</ContentTemplate>
</asp:UpdatePanel>
<%--MODAL VINCULAR FLETES Y SERVICIOS--%>
<asp:UpdatePanel runat="server" class="modal-content rowpadding" UpdateMode="Conditional" ID="UPFS">
<ContentTemplate>
<div id="DivFletesYServicios" class="modal fade">
<div class="modal-dialog">
<div class="modal-content" style="width: 600px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h3 class="modal-title" runat="server" id="headeralias">Vincular Costo indirectos </h3>
</div>
<div class="modal-body" style="min-height: 300px">
<div class="row" style="align-items: center">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="width: 98%; margin-left: auto; margin-right: auto">
<div class="portlet-title portlet-filterT portletfiltrostitlee">
<div class="tools">
<asp:Button ID="BtnFiltrar" OnClick="BtnFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Visible="True" Text="Consultar" ValidationGroup="GrpFiltrar2"></asp:Button>
<%--<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />--%>
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="font-size: medium">Tipo:</div>
<div class="col-md-1" style="width: 200px;">
<asp:DropDownList ID="DdlTipo" AutoPostBack="true" runat="server" Style="width: 200px;" CssClass="form-control input-sm select2me" CausesValidation="true" MaxLength="50" ValidationGroup="GrpFiltrar2" Width="100%">
<%--<asp:ListItem Text="Seleccione" Value="-1" Selected="True" />--%>
<asp:ListItem Text="Una Sola Factura" Value="1" Selected="True" />
<%-- <asp:ListItem Text="Varias Facturas" Value="2" />--%>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''tipo''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpFiltrar2"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<br />
<asp:UpdatePanel ID="UpGVServicios" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron fletes o servicios en la factura" ShowHeaderWhenEmpty="true"
ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall
ScrollAD "
data-height="320" Style="text-align: left;" GridLines="None" DataKeyNames="CvePS">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="chkServicios" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Consec" ItemStyle-HorizontalAlign="Center" Visible="true">
<ItemTemplate>
<asp:Label ID="LblConsec" Text='<%# Eval("Consec") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlPSmodal" Text='<%# Eval("PS") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlTotalmodal" Text='<%# Eval("Total") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div style="align-items: center">
<asp:UpdatePanel ID="UpFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-5" runat="server" id="dvFacturas" style="width: 60%; margin-left: 20%; margin-right: auto;">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Agregar Facturas</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
<div class="portlet-body form">
<table class="Widthall">
<tr>
<td style="width: 50px;">Proveedor:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlProveedores" Style="width: 200px" AutoPostBack="true" DataTextField="RazonSocial" DataValueField="CveProveedor" OnSelectedIndexChanged="DdlProveedores_SelectedIndexChanged"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 50px;">Folio:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlFacturas" Style="width: 200px" AutoPostBack="false" DataTextField="Folio" DataValueField="CveCompra"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVFacturas" runat="server" ControlToValidate="DdlFacturas" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpCargaFactura"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFacturas" runat="server" HighlightCssClass="vco" TargetControlID="RFVFacturas" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button Text="Agregar Factura" CssClass="btn btn-primary" ID="BtnAgregaFactura" OnClick="BtnAgregaFactura_Click" ValidationGroup="GrpCargaFactura" runat="server" />
</td>
</tr>
</table>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel ID="UPGVFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="false" EmptyDataText="Aun No Registra Facturas" DataKeyNames="CveCompra" ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall ScrollAD " data-height="320" Style="text-align: left;" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFolio" Text='<%# Eval("Folio") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFecha" Text='<%# Eval("Fecha") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="lbEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" Style="text-align: left" CommandName="Delete" OnClientClick="return confirm('¿Está seguro de eliminar la factura?')" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:Button Text="Continuar" ID="BtnAgregarFlete" runat="server" OnClick="btnAgregarFlete_Click" class="btn default"></asp:Button>
<asp:Button Text="Cancelar" CssClass="btn btn-primary" ID="BtnCancelarFlete" OnClick="BtnCancelar_Click" runat="server" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<%-- MODAL SERIE-LOTE ALMACEN --%>
<div id="DivSerie" class="modal fade" role="dialog">
@@ -5016,7 +4835,175 @@
<asp:Label ID="LblTitulo" Text="" runat="server">Costo Indirecto/Importación</asp:Label></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="row" style="border-bottom:1px solid #e5e5e5">
<div class="col-md-1" style="width:100%">
<asp:RadioButtonList ID="RblGastosVincularCrear" runat="server" OnSelectedIndexChanged="RblGastosVincularCrear_Click" AutoPostBack="true" CssClass="GastoIndirectoOpciones" RepeatDirection="Horizontal">
<asp:ListItem Text="Gasto y Servicios" Value="1" />
<asp:ListItem Text="Costo Indirecto/Importaciones" Value="0" selected="True" />
</asp:RadioButtonList>
</div>
</div>
<div runat="server" id="DivGastosyServicios" visible="false">
<%--<div class="row" style="align-items: center">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="width: 98%; margin-left: auto; margin-right: auto">
<div class="portlet-title portlet-filterT portletfiltrostitlee">
<div class="tools">
<asp:Button ID="BtnFiltrar" OnClick="BtnFiltrar_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary " Visible="True" Text="Consultar" ValidationGroup="GrpFiltrar2"></asp:Button>
<%--<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="font-size: medium">Tipo:</div>
<div class="col-md-1" style="width: 200px;">
<asp:DropDownList ID="DdlTipo" AutoPostBack="true" runat="server" Style="width: 200px;" CssClass="form-control input-sm select2me" CausesValidation="true" MaxLength="50" ValidationGroup="GrpFiltrar2" Width="100%">
<%--<asp:ListItem Text="Seleccione" Value="-1" Selected="True" />
<asp:ListItem Text="Una Sola Factura" Value="1" Selected="True" />
<%-- <asp:ListItem Text="Varias Facturas" Value="2" />
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''tipo''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpFiltrar2"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>--%>
<br />
<asp:UpdatePanel ID="UpGVServicios" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron fletes o servicios en la factura" ShowHeaderWhenEmpty="true"
ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall
ScrollAD "
data-height="320" Style="text-align: left;" GridLines="None" DataKeyNames="CvePS">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="chkServicios" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Consec" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:Label ID="LblConsec" Text='<%# Eval("Consec") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlPSmodal" Text='<%# Eval("PS") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlTotalmodal" Text='<%# Eval("Total") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div style="align-items: center">
<asp:UpdatePanel ID="UpFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-5" runat="server" id="dvFacturas" style="width: 60%; margin-left: 20%; margin-right: auto;">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Agregar Facturas</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
<div class="portlet-body form">
<table class="Widthall">
<tr>
<td style="width: 50px;">Proveedor:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlProveedores" Style="width: 200px" AutoPostBack="true" DataTextField="RazonSocial" DataValueField="CveProveedor" OnSelectedIndexChanged="DdlProveedores_SelectedIndexChanged"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 50px;">Folio:</td>
<td>
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlFacturas" Style="width: 200px" AutoPostBack="false" DataTextField="Folio" DataValueField="CveCompra"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVFacturas" runat="server" ControlToValidate="DdlFacturas" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario para cargar la Refacturación, por favor seleccione uno." ValidationGroup="GrpCargaFactura"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFacturas" runat="server" HighlightCssClass="vco" TargetControlID="RFVFacturas" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button Text="Agregar Factura" CssClass="btn btn-primary" ID="BtnAgregaFactura" OnClick="BtnAgregaFactura_Click" ValidationGroup="GrpCargaFactura" runat="server" />
</td>
</tr>
</table>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel ID="UPGVFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="false" EmptyDataText="Aun No Registra Facturas" DataKeyNames="CveCompra" ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall ScrollAD " data-height="320" Style="text-align: left;" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFolio" Text='<%# Eval("Folio") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlFecha" Text='<%# Eval("Fecha") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="lbEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" Style="text-align: left" CommandName="Delete" OnClientClick="return confirm('¿Está seguro de eliminar la factura?')" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="row" runat="server" id="DivVincularCrear">
<div class="col-md-12">
<div class="row" runat="server" id="DivActualizarVincular" visible="false" align="center">
<h4>Los cambios se realizaran al dar click en vincular</h4>
@@ -5112,8 +5099,14 @@
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnGuardarModalFletesImportaciones" OnClick="BtnGuardarModalFletesImportaciones_Click" runat="server" Text="Vincular" CssClass="btn btn-primary" ValidationGroup="VGMModalIMPFLE" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
<div runat="server" id="DivGastosyServiciosFooter" visible="false">
<asp:Button Text="Continuar" ID="BtnAgregarFlete" runat="server" OnClick="btnAgregarFlete_Click" class="btn default"></asp:Button>
<asp:Button Text="Cancelar" CssClass="btn btn-primary" ID="BtnCancelarFlete" data-dismiss="modal" runat="server" />
</div>
<div runat="server" id="DivVincularCrearFooter">
<asp:Button ID="BtnGuardarModalFletesImportaciones" OnClick="BtnGuardarModalFletesImportaciones_Click" runat="server" Text="Vincular" CssClass="btn btn-primary" ValidationGroup="VGMModalIMPFLE" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -1533,7 +1533,7 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.CvePlataforma = 2 Then
TabActivosFijos.Visible = False
VerRefacturacion.Visible = False
liServicios.Visible = False
'liServicios.Visible = False
DivConsignaciones.Visible = False
End If
CargarCentrosDeCosto(DdlAsignarProyecto, DdlAsignaSubProyecto, LitHProyecto, LblSubProyectoHeader)
@@ -9545,7 +9545,7 @@ Partial Class Compras_Compras
Retorno = False
End If
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa) Then
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Retorno = False
End If
End If
@@ -9987,7 +9987,7 @@ Partial Class Compras_Compras
Retorno = False
End If
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa) Then
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Retorno = False
End If
End If
@@ -14642,7 +14642,7 @@ Partial Class Compras_Compras
dt = ObjContabilidad.DtResultados
For Each dr As DataRow In dt.Rows
If Not ObjContabilidad.UpdatePrepolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0) Then
If Not ObjContabilidad.UpdatePrepolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorCancelar = True : Exit For
End If
Next
@@ -15892,71 +15892,71 @@ Partial Class Compras_Compras
End Sub
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
If DdlTipo.SelectedValue.ToEntero = 1 Then
'POR SI LLEGARA A TRONAR
If DtServicios Is Nothing Then CreaDTServicios()
DtServicios.Rows.Clear()
'POR SI LLEGARA A TRONAR
If DtServicios Is Nothing Then CreaDTServicios()
DtServicios.Rows.Clear()
Dim objps As New ClsProductosServicios
Dim dr As DataRow
dvFacturas.Visible = False
GvFacturas.Visible = False
Dim objps As New ClsProductosServicios
Dim dr As DataRow
dvFacturas.Visible = False
GvFacturas.Visible = False
For Each DrGv As DataRow In TmpDT.Rows
If DrGv("CvePS").ToString.ToEntero > 0 Then
If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
dr = DtServicios.NewRow()
dr("Consec") = DrGv("Consec").ToString.ToEntero
dr("Total") = DrGv("Total").ToString.ToDecimal
dr("CvePS") = DrGv("CvePS").ToString.ToEntero
dr("PS") = DrGv("PS").ToString
DtServicios.Rows.Add(dr)
End If
For Each DrGv As DataRow In TmpDT.Rows
If DrGv("CvePS").ToString.ToEntero > 0 Then
If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
dr = DtServicios.NewRow()
dr("Consec") = DrGv("Consec").ToString.ToEntero
dr("Total") = DrGv("Total").ToString.ToDecimal
dr("CvePS") = DrGv("CvePS").ToString.ToEntero
dr("PS") = DrGv("PS").ToString
DtServicios.Rows.Add(dr)
End If
End If
Next
'[IPP] COMENTADO - MIRAS DE ELIMINAR - 8/FEBRERO/2018
'For Each gvr As GridViewRow In GvPS.Rows
' If objps.GetPS(gvr.DataKey("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa) Then
' If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
' dr = DtServicios.NewRow()
' dr("Consec") = gvr.FCLabel("LtlConsecutivo").Text.ToEntero
' dr("Total") = gvr.FCLiteral("LtlTotal").Text.ToDecimal
' dr("PS") = gvr.DataKey("PS").ToString
' DtServicios.Rows.Add(dr)
' End If
' End If
'Next
objps.Dispose()
If DtServicios.Rows.Count > 0 Then
GVServicios.DataSource = DtServicios
GVServicios.DataBind()
GVServicios.Visible = True
Else
GVServicios.DataSource = Nothing
GVServicios.DataBind()
End If
Next
UpGVServicios.Update()
UpFacturas.Update()
UPGVFacturas.Update()
ElseIf DdlTipo.SelectedValue.ToEntero = 2 Then
GVServicios.Visible = False
dvFacturas.Visible = True
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpFacturas.Update()
UpGVServicios.Update()
'[IPP] COMENTADO - MIRAS DE ELIMINAR - 8/FEBRERO/2018
'For Each gvr As GridViewRow In GvPS.Rows
' If objps.GetPS(gvr.DataKey("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa) Then
' If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
' dr = DtServicios.NewRow()
' dr("Consec") = gvr.FCLabel("LtlConsecutivo").Text.ToEntero
' dr("Total") = gvr.FCLiteral("LtlTotal").Text.ToDecimal
' dr("PS") = gvr.DataKey("PS").ToString
' DtServicios.Rows.Add(dr)
' End If
' End If
'Next
objps.Dispose()
If DtServicios.Rows.Count > 0 Then
GVServicios.DataSource = DtServicios
GVServicios.DataBind()
GVServicios.Visible = True
Else
GVServicios.DataSource = Nothing
GVServicios.DataBind()
End If
UpGVServicios.Update()
UpFacturas.Update()
UPGVFacturas.Update()
'If DdlTipo.SelectedValue.ToEntero = 1 Then
'ElseIf DdlTipo.SelectedValue.ToEntero = 2 Then
' GVServicios.Visible = False
' dvFacturas.Visible = True
' DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
' DdlProveedores.DataBind()
' DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
' UpFacturas.Update()
' UpGVServicios.Update()
'End If
End Sub
Public Sub btnAgregarFlete_Click(sender As Object, e As EventArgs) Handles BtnAgregarFlete.Click
@@ -16212,7 +16212,7 @@ Partial Class Compras_Compras
End If
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.CvePlataforma <> 2 Then
liServicios.Visible = True
'liServicios.Visible = True
liFletesImportaciones.Visible = True
End If
@@ -20040,6 +20040,17 @@ Partial Class Compras_Compras
End If
End Sub
Protected Sub RblGastosVincularCrear_Click(sender As Object, e As EventArgs)
Dim MostrarGastosServicios As Boolean = RblGastosVincularCrear.SelectedValue = "1"
DivGastosyServicios.Visible = MostrarGastosServicios
DivGastosyServiciosFooter.Visible = MostrarGastosServicios
DivVincularCrear.Visible = Not MostrarGastosServicios
DivVincularCrearFooter.Visible = Not MostrarGastosServicios
End Sub
End Class

View File

@@ -1143,7 +1143,7 @@ Partial Class RegPoliza
End If
End If
If Not ObjContabilidad.UpdatePrePoliza(TxtFechaPoliza.Text.ToDate, TxtNumeroPoliza.Text.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, IDPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, TxtConcepto.Text.Trim, TxtFechaPoliza.Text.ToDate) Then
If Not ObjContabilidad.UpdatePrePoliza(TxtFechaPoliza.Text.ToDate, TxtNumeroPoliza.Text.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, IDPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, TxtConcepto.Text.Trim, TxtFechaPoliza.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
End If

View File

@@ -464,9 +464,10 @@ Partial Class ContabilidadC_RegPrePoliza
End If
End If
CargaGvBitacora()
ObjContabilidad.Dispose()
UpPoliza.Update()
UpBitacora.Update()
End Sub
Private Sub GvPrePoliza_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPrePoliza.RowDataBound
@@ -1012,7 +1013,7 @@ Partial Class ContabilidadC_RegPrePoliza
If ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate) Then
If ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
@@ -1020,7 +1021,7 @@ Partial Class ContabilidadC_RegPrePoliza
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero)) Then
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If

View File

@@ -926,7 +926,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL()
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
@@ -934,7 +934,7 @@ Partial Class ContabilidadC_RegPrePoliza
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),
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) Then
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If

View File

@@ -914,7 +914,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL()
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
@@ -922,7 +922,7 @@ 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.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,
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text) Then
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If

View File

@@ -478,7 +478,7 @@ Partial Class Contabilidad_RegPrePoliza
For Each row As GridViewRow In GvPrePoliza.Rows
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal)) Then
row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
End If
Next