Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -6599,26 +6599,6 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateCompraTCValuacion(CveCompra As Integer, TCValuacion As Decimal) As Boolean
|
|
||||||
Dim Retorno = False
|
|
||||||
|
|
||||||
DataAdapter("PA_Conta_ComprasTCValuacionUpdate")
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
|
||||||
.Add("@TCValuacion", SqlDbType.Decimal).Value = TCValuacion
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
Me.OnError("Ocurrió un error al actualizar el tipo de cambio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|||||||
@@ -155,8 +155,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<asp:UpdatePanel ID="UpTabs" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpTabs" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<ajax:TabContainer runat="server" ID="T">
|
<ajax:TabContainer runat="server" ID="T">
|
||||||
@@ -219,11 +218,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<br />
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoCompras" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control marginFixRow" Width="96%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoCompras" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control marginFixRow" Width="96%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoCompras" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoCompras"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoCompras" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoCompras"
|
||||||
@@ -242,21 +238,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2" style="text-align: right!important">
|
<div class="col-md-2" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" Visible="false" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
||||||
<asp:HiddenField ID="HdnProveedorCvePrePoliza" runat="server" />
|
<asp:HiddenField ID="HdnProveedorCvePrePoliza" runat="server" />
|
||||||
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" OnClick="BtnProveedoresRemove_Click" class="btn btn-primary" /></div>
|
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnProveedoresRemove_Click" class="btn btn-primary" /></div>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GvCompras" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvProveedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveCompra,CveProveedor,TipoCambio, Fluctuacion,SerieFolio, CveConceptoContable,FluctuacionTotal,PerdidaGanancia,IdCtaContComplementaria,CveIE"
|
DataKeyNames="CveCompra,CveProveedor,TipoCambio, Fluctuacion,SerieFolio, CveConceptoContable,FluctuacionTotal,PerdidaGanancia,IdCtaContComplementaria,CveIE"
|
||||||
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||||
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||||
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="FluctuacionTotal" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="FluctuacionTotal" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -266,6 +260,108 @@
|
|||||||
<%--<asp:Label ID="LblTotalCompras" runat="server" Text=""></asp:Label>--%>
|
<%--<asp:Label ID="LblTotalCompras" runat="server" Text=""></asp:Label>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
<ajax:TabPanel runat="server" ID="TabComprasAnt" HeaderText="Proveedores Ant">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server" Visible="False">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="Div1" visible="true" class="row" runat="server">
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">PÉRDIDA</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-red fa fa-money"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="Literal1" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">GANANCIA</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-green fa fa-money"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="Literal2" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">
|
||||||
|
<asp:Label ID="Label3" runat="server" Text=""></asp:Label></h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i id="I1" runat="server" class=""></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="Literal3" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtConceptoComprasAnt" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control marginFixRow" Width="96%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoComprasAnt" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoComprasAnt"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarComprasAnt"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtConceptoComprasAnt.ClientID.ToString()%>">Concepto:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlSubProyectoComprasAnt" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlSubProyectoComprasAnt.ClientID.ToString()%>">
|
||||||
|
<asp:Label runat="server" ID="LblSubProyectoComprasAnt"></asp:Label></label>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoComprasAnt" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoComprasAnt" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarComprasAnt"></asp:RequiredFieldValidator>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2" style="text-align: right!important">
|
||||||
|
<asp:Button Text="Generar Proveedores Ant" runat="server" ID="BtnGeneraComprasAnt" Visible="false" OnClick="BtnGeneraComprasAnt_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarComprasAnt" />
|
||||||
|
<asp:HiddenField ID="HdnProveedorAntCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnProveedoresAntRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnProveedoresAntRemove_Click" class="btn btn-primary" /></div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<asp:GridView ID="GvProveedoresAnt" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveCompra,CveProveedor,TipoCambio, Fluctuacion,SerieFolio, CveConceptoContable,FluctuacionTotal,PerdidaGanancia,IdCtaContComplementaria,CveIE"
|
||||||
|
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||||
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||||
|
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||||
|
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||||
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="FluctuacionTotal" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Perdida o Ganancia" DataField="PerdidaGanancia" ItemStyle-Width="100" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<%--<asp:Label ID="LblTotalCompras" runat="server" Text=""></asp:Label>--%>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
<ajax:TabPanel runat="server" ID="TabVentas" HeaderText="Clientes">
|
<ajax:TabPanel runat="server" ID="TabVentas" HeaderText="Clientes">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UpIndicadoresVentas" UpdateMode="Conditional" runat="server" Visible="false">
|
<asp:UpdatePanel ID="UpIndicadoresVentas" UpdateMode="Conditional" runat="server" Visible="false">
|
||||||
@@ -335,7 +431,7 @@
|
|||||||
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtConceptoCompras.ClientID.ToString()%>">Concepto:</label>
|
<label for="<%= TxtConceptoVentas.ClientID.ToString()%>">Concepto:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -347,22 +443,19 @@
|
|||||||
</label>
|
</label>
|
||||||
<asp:RequiredFieldValidator ID="RFVDdlsubProyectoVentas" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlsubProyectoVentas" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlsubProyectoVentas" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlsubProyectoVentas" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" style="text-align: right!important">
|
||||||
|
<asp:Button Text="Generar Ventas" runat="server" ID="BtnGeneraVentas" Visible="false" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
||||||
|
<asp:HiddenField ID="HdnClienteCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnClientesRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnClientesRemove_Click" class="btn btn-primary" /></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
|
||||||
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<br />
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto,CveIE" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
||||||
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
||||||
@@ -379,12 +472,221 @@
|
|||||||
<asp:Label ID="LblTotalVentas" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblTotalVentas" runat="server" Text=""></asp:Label>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel runat="server" ID="TabCuentasBancarias" HeaderText="Cuentas Bancarias">
|
<ajax:TabPanel runat="server" ID="TabVentasAnt" HeaderText="Clientes Ant">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server" Visible="false">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="Div2" visible="true" class="row" runat="server">
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">PÉRDIDA</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-red fa fa-money"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="Literal4" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">GANANCIA</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-green fa fa-money"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="Literal5" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">
|
||||||
|
<asp:Label ID="Label5" runat="server" Text=""></asp:Label></h4>
|
||||||
|
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i id="I2" runat="server" class=""></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<span class="widget-thumb-subtitle">MXN</span>
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="Literal6" Text="" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtConceptoVentasAnt" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentasAnt"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentasAnt"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtConceptoVentasAnt.ClientID.ToString()%>">Concepto:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlsubProyectoVentasAnt" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlsubProyectoVentasAnt.ClientID.ToString()%>">
|
||||||
|
<asp:Label runat="server" ID="LblSubProyectoVentasAnt"></asp:Label>
|
||||||
|
</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlsubProyectoVentasAnt" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentasAnt"></asp:RequiredFieldValidator>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" style="text-align: right!important">
|
||||||
|
<asp:Button Text="Generar Clientes Anticipos" runat="server" ID="BtnClientesAnticipos" Visible="false" OnClick="BtnClientesAnticipos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentasAnt" />
|
||||||
|
<asp:HiddenField ID="HdnClienteAntCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnClientesAntRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnClientesAntRemove_Click" class="btn btn-primary" /></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<asp:GridView ID="GvClientesAnt" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
||||||
|
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
||||||
|
<asp:HyperLinkField DataTextField="SerieFolio" HeaderText="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||||
|
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||||
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia TC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N4}" />
|
||||||
|
<asp:BoundField DataField="FluctuacionPesos" HeaderText="Fluctuacion Pesos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="PerdidaGanancia" HeaderText="Acción" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<asp:Label ID="LblTotalVentasAnt" runat="server" Text=""></asp:Label>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
<ajax:TabPanel runat="server" ID="TabAcreedores" HeaderText="Compras Acreedores">
|
||||||
|
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtConceptoAcreedores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoAcreedores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoAcreedores"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtConceptoAcreedores.ClientID.ToString()%>">Concepto:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlSubProyectoAcreedores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlSubProyectoAcreedores.ClientID.ToString()%>">
|
||||||
|
<asp:Label runat="server" ID="LblSubProyectoAcreedores"></asp:Label>
|
||||||
|
</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" style="text-align: right!important">
|
||||||
|
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" Visible="false" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
||||||
|
<asp:HiddenField ID="HdnAcreedorCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnAcreedoresRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnAcreedoresRemove_Click" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveCompra,CveProveedor,TipoCambio,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
||||||
|
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||||
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||||
|
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||||
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="PerdidaGanancia" HeaderText="Acción" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<asp:Label ID="LblTotalAcreedores" runat="server" Text=""></asp:Label>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
<ajax:TabPanel runat="server" ID="TabAcreedoresAnticipos" HeaderText="Acreedores Ant">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtConceptoAcreedoresAnt" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVConceptoAcreedoresAnt" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoAcreedoresAnt"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedoresAnt"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtConceptoAcreedoresAnt.ClientID.ToString()%>">Concepto:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlSubProyectoAcreeedoresAnt" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlSubProyectoAcreeedoresAnt.ClientID.ToString()%>">
|
||||||
|
<asp:Label runat="server" ID="LblSubProyectoAcreedoresAnt"></asp:Label>
|
||||||
|
</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreeedoresAnt" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedoresAnt"></asp:RequiredFieldValidator>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" style="text-align: right!important">
|
||||||
|
<asp:Button Text="Generar Acreedores Ant" runat="server" ID="BtnGeneraAcreedoresAnt" Visible="false" OnClick="BtnGeneraAcreedoresAnt_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedoresAnt" />
|
||||||
|
<asp:HiddenField ID="HdnAcreedorAntCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnAcreedoresAntRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnAcreedoresAntRemove_Click" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<asp:GridView ID="GvAcreedoresAnt" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveCompra,CveProveedor,TipoCambio,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
||||||
|
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||||
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||||
|
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||||
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="PerdidaGanancia" HeaderText="Acción" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<asp:Label ID="LblTotalAcreedoresAnt" runat="server" Text=""></asp:Label>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
<ajax:TabPanel runat="server" ID="TabCuentasBancarias" HeaderText="Cuentas Bancarias">
|
||||||
|
<ContentTemplate>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
@@ -402,17 +704,12 @@
|
|||||||
</label>
|
</label>
|
||||||
<asp:RequiredFieldValidator ID="RFVDdlSubproyectoBancos" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubproyectoBancos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlSubproyectoBancos" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubproyectoBancos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
|
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
@@ -436,107 +733,7 @@
|
|||||||
<asp:Label ID="LblTotalBancos" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblTotalBancos" runat="server" Text=""></asp:Label>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel runat="server" ID="TabDeudores" HeaderText="Deudores">
|
|
||||||
<ContentTemplate>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtConceptoDeudores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoDeudores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoDeudores"
|
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
|
|
||||||
<label for="<%= TxtConceptoDeudores.ClientID.ToString()%>">Concepto:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSubProyectoDeudores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<label for="<%= DdlSubProyectoDeudores.ClientID.ToString()%>">
|
|
||||||
<asp:Label runat="server" ID="LblSubProyectoDeudores"></asp:Label>
|
|
||||||
</label>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVRFVDdlSubProyectoDeudores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoDeudores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
|
||||||
<asp:Button Text="Generar Deudores" runat="server" ID="BtnGeneraDedudores" OnClick="BtnGeneraDedudores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarDeudores" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvDeudores" Width="99%" runat="server" AutoGenerateColumns="False"
|
|
||||||
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE"
|
|
||||||
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField HeaderText="Deudor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="Fluctuación" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
<asp:Label ID="LblTotalDeudores" runat="server" Text=""></asp:Label>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
|
|
||||||
<ajax:TabPanel runat="server" ID="TabAcreedores" HeaderText="Compras Acreedores">
|
|
||||||
|
|
||||||
<ContentTemplate>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtConceptoAcreedores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoAcreedores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoAcreedores"
|
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
|
||||||
<label for="<%= TxtConceptoAcreedores.ClientID.ToString()%>">Concepto:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSubProyectoAcreedores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<label for="<%= DdlSubProyectoAcreedores.ClientID.ToString()%>">
|
|
||||||
<asp:Label runat="server" ID="LblSubProyectoAcreedores"></asp:Label>
|
|
||||||
</label>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
|
||||||
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
|
||||||
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
|
||||||
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
|
||||||
<asp:BoundField HeaderText="# Facturas" DataField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="PerdidaGanancia" HeaderText="Acción" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
<asp:Label ID="LblTotalAcreedores" runat="server" Text=""></asp:Label>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
<ajax:TabPanel runat="server" ID="TabFilial" HeaderText="Filial">
|
<ajax:TabPanel runat="server" ID="TabFilial" HeaderText="Filial">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
@@ -559,20 +756,17 @@
|
|||||||
</label>
|
</label>
|
||||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoFiliales" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoFiliales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarFiliales"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoFiliales" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoFiliales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarFiliales"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Filiales" runat="server" ID="BtnGeneraFiliales" OnClick="BtnGeneraFiliales_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarFiliales" />
|
<asp:Button Text="Generar Filiales" runat="server" ID="BtnGeneraFiliales" OnClick="BtnGeneraFiliales_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarFiliales" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<div style="float: right; margin-right: 50px;">
|
<div style="float: right; margin-right: 50px;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvFiliales" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvFiliales" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE,Folio"
|
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE,Folio"
|
||||||
@@ -590,6 +784,54 @@
|
|||||||
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
|
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
<ajax:TabPanel runat="server" ID="TabDeudores" HeaderText="Deudores">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtConceptoDeudores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoDeudores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoDeudores"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtConceptoDeudores.ClientID.ToString()%>">Concepto:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlSubProyectoDeudores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlSubProyectoDeudores.ClientID.ToString()%>">
|
||||||
|
<asp:Label runat="server" ID="LblSubProyectoDeudores"></asp:Label>
|
||||||
|
</label>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVRFVDdlSubProyectoDeudores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoDeudores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
|
<asp:Button Text="Generar Deudores" runat="server" ID="BtnGeneraDedudores" OnClick="BtnGeneraDedudores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarDeudores" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<asp:GridView ID="GvDeudores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE"
|
||||||
|
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
||||||
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Deudor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Fluctuación" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<asp:Label ID="LblTotalDeudores" runat="server" Text=""></asp:Label>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|||||||
@@ -28,11 +28,14 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
CargaFechas()
|
CargaFechas()
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "")
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoComprasAnt, Nothing, LblSubProyectoComprasAnt, "")
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "")
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlsubProyectoVentasAnt, Nothing, LblSubProyectoVentasAnt, "")
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedores, Nothing, LblSubProyectoAcreedores, "")
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreeedoresAnt, Nothing, LblSubProyectoAcreedoresAnt, "")
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos, "")
|
CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos, "")
|
||||||
CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "")
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "")
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "")
|
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "")
|
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedores, Nothing, LblSubProyectoAcreedores, "")
|
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores, "")
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores, "")
|
||||||
|
|
||||||
CargaUltimaFluctuacion()
|
CargaUltimaFluctuacion()
|
||||||
@@ -62,14 +65,18 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
CargaTipoCambio()
|
CargaTipoCambio()
|
||||||
If T.ActiveTabIndex = 0 Then CargaDatosCompra()
|
If T.ActiveTabIndex = 0 Then CargaDatosProveedores()
|
||||||
If T.ActiveTabIndex = 1 Then CargaDatosVentas()
|
If T.ActiveTabIndex = 1 Then CargaDatosProveedoresAnticipos()
|
||||||
If T.ActiveTabIndex = 2 Then CargaDatosCuentas()
|
If T.ActiveTabIndex = 2 Then CargaDatosClientes()
|
||||||
If T.ActiveTabIndex = 3 Then CargaDatosDeudores()
|
If T.ActiveTabIndex = 3 Then CargaDatosClientesAnticipos()
|
||||||
If T.ActiveTabIndex = 4 Then CargaDatosAcreedores()
|
If T.ActiveTabIndex = 4 Then CargaDatosAcreedores()
|
||||||
If T.ActiveTabIndex = 5 Then CargaDatosFiliales()
|
If T.ActiveTabIndex = 5 Then CargaDatosAcreedoresAnticipos()
|
||||||
|
If T.ActiveTabIndex = 6 Then CargaDatosCuentas()
|
||||||
|
|
||||||
|
If T.ActiveTabIndex = 7 Then CargaDatosFiliales()
|
||||||
|
If T.ActiveTabIndex = 8 Then CargaDatosDeudores()
|
||||||
UpTabs.Update()
|
UpTabs.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -84,21 +91,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
ObjGenerales.Dispose()
|
ObjGenerales.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaUltimaFluctuacion()
|
Private Sub CargaUltimaFluctuacion()
|
||||||
'Dim Obj As New ClsBancos
|
|
||||||
'If Obj.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
|
|
||||||
' Dim dt As DataTable = Obj.DtResultados.FiltraParametros("TipoFluctuacion = 1", "Fecha DESC")
|
|
||||||
' If dt.Rows.Count > 0 Then
|
|
||||||
' LtlUltimaFluctuacion.Text = String.Format("Ultima Fluctuación : {0}", dt.Rows(0)("Fecha").ToString.ToDate.ToShortDateString)
|
|
||||||
' 'si la ultima fluctuacion es mayor o igual al fin de mes anterior, entonces pon la fecha actual
|
|
||||||
' If dt.Rows(0)("Fecha").ToString.ToDate >= Now.AddMonths(-1).LastDayOfMonth Then
|
|
||||||
' TxtFecha.Text = Now.ToShortDateString
|
|
||||||
' Else
|
|
||||||
' TxtFecha.Text = Now.AddMonths(-1).LastDayOfMonth.ToShortDateString()
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'Obj.Dispose()
|
|
||||||
|
|
||||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now)
|
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now)
|
||||||
|
|
||||||
@@ -111,24 +105,23 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Else
|
Else
|
||||||
DdlMes.SelectedValueExist(Now.AddMonths(-1).Month)
|
DdlMes.SelectedValueExist(Now.AddMonths(-1).Month)
|
||||||
DdlAnio.SelectedValueExist(Now.AddMonths(-1).Year)
|
DdlAnio.SelectedValueExist(Now.AddMonths(-1).Year)
|
||||||
'TxtFecha.Text = Now.AddMonths(-1).LastDayOfMonth.ToShortDateString()
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaTipoCambio()
|
CargaTipoCambio()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatosCompra()
|
Private Sub CargaDatosProveedores()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
'LblTotalCompras.Text = "0.00"
|
|
||||||
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 1, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 1, UsuarioActual.CveEmpresa) Then
|
||||||
GvCompras.DataSource = ObjBancos.DtResultados
|
GvProveedores.DataSource = ObjBancos.DtResultados
|
||||||
'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0 ")
|
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0 ")
|
||||||
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0 ")
|
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0 ")
|
||||||
|
|
||||||
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion").Abs
|
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion").Abs
|
||||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion")
|
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion").Abs
|
||||||
|
|
||||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||||
HdnProveedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
HdnProveedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
@@ -138,6 +131,44 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||||
|
|
||||||
|
LtIndicador_ExistenciaPerdida.Text = PerdidaAux.ToString.FormatoNumero
|
||||||
|
LtIndicador_ValorPesosGanancia.Text = GanaciaAux.ToString.FormatoNumero
|
||||||
|
LtIndicador_CPPesosFinal.Text = Final.Abs.ToString.FormatoNumero
|
||||||
|
LblComprasPerdidaGanancia.Text = If(Final < 0, "Ganancia", "Pérdida")
|
||||||
|
|
||||||
|
LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
|
Else
|
||||||
|
GvProveedores.DataSource = Nothing
|
||||||
|
Alert("Ocurrio un error al cargar las compras", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
GvProveedores.DataBind()
|
||||||
|
UpIndicadores.Visible = True
|
||||||
|
If GvProveedores.Rows.Count > 0 Then
|
||||||
|
GvProveedores.Rows(GvProveedores.Rows.Count - 1).CssClass = "SubTotales2"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatosProveedoresAnticipos()
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 2, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvProveedoresAnt.DataSource = ObjBancos.DtResultados
|
||||||
|
'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
|
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0 ")
|
||||||
|
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0 ")
|
||||||
|
|
||||||
|
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion").Abs
|
||||||
|
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion")
|
||||||
|
|
||||||
|
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||||
|
HdnProveedorAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||||
|
BtnProveedoresAntRemove.Visible = HdnProveedorAntCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnGeneraComprasAnt.Visible = Not HdnProveedorAntCvePrePoliza.Value.ToEntero > 0
|
||||||
|
|
||||||
|
IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||||
|
|
||||||
LtIndicador_ExistenciaPerdida.Text = PerdidaAux.ToString.FormatoNumero
|
LtIndicador_ExistenciaPerdida.Text = PerdidaAux.ToString.FormatoNumero
|
||||||
LtIndicador_ValorPesosGanancia.Text = GanaciaAux.ToString.FormatoNumero
|
LtIndicador_ValorPesosGanancia.Text = GanaciaAux.ToString.FormatoNumero
|
||||||
LtIndicador_CPPesosFinal.Text = Final.Abs.ToString.FormatoNumero
|
LtIndicador_CPPesosFinal.Text = Final.Abs.ToString.FormatoNumero
|
||||||
@@ -145,30 +176,32 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
Else
|
Else
|
||||||
GvCompras.DataSource = Nothing
|
GvProveedoresAnt.DataSource = Nothing
|
||||||
Alert("Ocurrio un error al cargar las compras", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrio un error al cargar las compras", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
GvCompras.DataBind()
|
GvProveedoresAnt.DataBind()
|
||||||
UpIndicadores.Visible = True
|
UpIndicadores.Visible = True
|
||||||
If GvCompras.Rows.Count > 0 Then
|
|
||||||
GvCompras.Rows(GvCompras.Rows.Count - 1).CssClass = "SubTotales2"
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatosVentas()
|
Private Sub CargaDatosClientes()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
LblTotalVentas.Text = "0.00"
|
LblTotalVentas.Text = "0.00"
|
||||||
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 2, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 3, UsuarioActual.CveEmpresa) Then
|
||||||
GvVentas.DataSource = ObjBancos.DtResultados
|
GvVentas.DataSource = ObjBancos.DtResultados
|
||||||
|
|
||||||
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0")
|
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0")
|
||||||
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0")
|
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0")
|
||||||
|
|
||||||
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion", "Fluctuacion < 0").Abs
|
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion", "Fluctuacion > 0").Abs
|
||||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion", "Fluctuacion > 0")
|
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion", "Fluctuacion < 0").Abs
|
||||||
|
|
||||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||||
|
HdnClienteCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||||
|
BtnClientesRemove.Visible = HdnClienteCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnGeneraVentas.Visible = Not HdnClienteCvePrePoliza.Value.ToEntero > 0
|
||||||
|
|
||||||
IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||||
|
|
||||||
@@ -186,12 +219,84 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
GvVentas.DataBind()
|
GvVentas.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatosClientesAnticipos()
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 4, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvClientesAnt.DataSource = ObjBancos.DtResultados
|
||||||
|
|
||||||
|
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0")
|
||||||
|
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0")
|
||||||
|
|
||||||
|
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion", "Fluctuacion < 0").Abs
|
||||||
|
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion", "Fluctuacion > 0")
|
||||||
|
|
||||||
|
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||||
|
HdnClienteAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||||
|
BtnClientesAntRemove.Visible = HdnClienteAntCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnClientesAnticipos.Visible = Not HdnClienteAntCvePrePoliza.Value.ToEntero > 0
|
||||||
|
|
||||||
|
'IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||||
|
|
||||||
|
'LtIndicador_PerdidasVentas.Text = PerdidaAux.ToString.FormatoNumero
|
||||||
|
'LtIndicador_GanaciaVentas.Text = GanaciaAux.ToString.FormatoNumero
|
||||||
|
'LtIndicador_FinalVentas.Text = Final.ToString.FormatoNumero
|
||||||
|
'LblVentasPerdidaGanancia.Text = If(Final < 0, "Pérdida", "Ganancia")
|
||||||
|
|
||||||
|
LblTotalVentasAnt.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
|
|
||||||
|
UpIndicadoresVentas.Visible = True
|
||||||
|
Else
|
||||||
|
GvClientesAnt.DataSource = Nothing
|
||||||
|
Alert("Ocurrio un error al cargar las compras", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
GvClientesAnt.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaDatosAcreedores()
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 5, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||||
|
HdnAcreedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
BtnAcreedoresRemove.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnGeneraAcreedores.Visible = Not HdnAcreedorCvePrePoliza.Value.ToEntero > 0
|
||||||
|
GvAcreedores.DataSource = ObjBancos.DtResultados
|
||||||
|
LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
|
Else
|
||||||
|
GvAcreedoresAnt.DataSource = Nothing
|
||||||
|
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
GvAcreedores.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatosAcreedoresAnticipos()
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 6, UsuarioActual.CveEmpresa) Then
|
||||||
|
HdnAcreedorAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
BtnAcreedoresAntRemove.Visible = HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnGeneraAcreedoresAnt.Visible = Not HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
|
||||||
|
GvAcreedoresAnt.DataSource = ObjBancos.DtResultados
|
||||||
|
LblTotalAcreedoresAnt.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
|
Else
|
||||||
|
GvAcreedoresAnt.DataSource = Nothing
|
||||||
|
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
GvAcreedoresAnt.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatosCuentas()
|
Private Sub CargaDatosCuentas()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
LblTotalBancos.Text = "0.00"
|
LblTotalBancos.Text = "0.00"
|
||||||
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 4, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 7, UsuarioActual.CveEmpresa) Then
|
||||||
Dim DtTemp As DataTable = ObjBancos.DtResultados.Copy
|
Dim DtTemp As DataTable = ObjBancos.DtResultados.Copy
|
||||||
Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal
|
Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal
|
||||||
Dim TotAcumulado As Decimal = 0
|
Dim TotAcumulado As Decimal = 0
|
||||||
@@ -233,7 +338,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
GvCuentas.DataBind()
|
GvCuentas.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatosDeudores()
|
Private Sub CargaDatosDeudores()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
@@ -249,19 +354,6 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
GvDeudores.DataBind()
|
GvDeudores.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatosAcreedores()
|
|
||||||
Dim ObjBancos As New ClsBancos
|
|
||||||
LblTotalAcreedores.Text = "0.00"
|
|
||||||
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 6, UsuarioActual.CveEmpresa) Then
|
|
||||||
GvAcreedores.DataSource = ObjBancos.DtResultados
|
|
||||||
LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
|
||||||
Else
|
|
||||||
GvAcreedores.DataSource = Nothing
|
|
||||||
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
ObjBancos.Dispose()
|
|
||||||
GvAcreedores.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDatosFiliales()
|
Private Sub CargaDatosFiliales()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
@@ -305,6 +397,86 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
|
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
|
||||||
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
|
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
|
||||||
|
|
||||||
|
Total = LblTotal.ToDecimal
|
||||||
|
If Total < 0 Then
|
||||||
|
CveConceptoContable = 64
|
||||||
|
idCta = IdCtaGanancia
|
||||||
|
TipoMovto = True
|
||||||
|
Else
|
||||||
|
CveConceptoContable = 65
|
||||||
|
idCta = idCtaPerdida
|
||||||
|
TipoMovto = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||||
|
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Proveedores Anticipos", CveConceptoContable, "Fluctuación Proveedores Anticipos", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoCompras.SelectedValue.ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveBitacora <= 0 Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorRegistrar Then
|
||||||
|
'saco las cuentas de pérdida y ganancia
|
||||||
|
For Each gvr As GridViewRow In GvProveedores.Rows
|
||||||
|
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
|
'si es pérdida o ganancia
|
||||||
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString.ToEntero()
|
||||||
|
|
||||||
|
'movimiento de complementaria
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), gvr.DataKey("CveConceptoContable").ToEntero, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not Conta.UpdateTCValuacion(-1, gvr.DataKey("CveCompra").ToEntero, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorRegistrar Then
|
||||||
|
Conta.Commit()
|
||||||
|
BtnGeneraCompras.Visible = False
|
||||||
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
Conta.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnGeneraComprasAnt_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Total As Decimal = 0
|
||||||
|
Dim Conta As New ClsContabilidad
|
||||||
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoComprasAnt.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
Dim idCta As Integer = 0
|
||||||
|
|
||||||
|
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
||||||
|
Dim idCtaPerdida, IdCtaGanancia As Integer
|
||||||
|
|
||||||
|
Dim TipoMovto As Boolean = False
|
||||||
|
Dim CveConceptoContable As Integer = 0
|
||||||
|
Dim IdCtaComplementaria As Integer = 0
|
||||||
|
|
||||||
|
Dim ErrorRegistrar As Boolean = False
|
||||||
|
|
||||||
|
CveCuentaPerdida = 0 '55379
|
||||||
|
CveCuentaGanancia = 0 ' 55382
|
||||||
|
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
|
||||||
|
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
|
||||||
|
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
|
||||||
|
|
||||||
Total = LblTotal.ToDecimal
|
Total = LblTotal.ToDecimal
|
||||||
If Total > 0 Then
|
If Total > 0 Then
|
||||||
CveConceptoContable = 64
|
CveConceptoContable = 64
|
||||||
@@ -318,18 +490,18 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||||
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Compras", CveConceptoContable, "Fluctuación Compras", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoCompras.SelectedValue.ToEntero) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Compras Anticipos", CveConceptoContable, "Fluctuación Proveedores Anticipos", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoComprasAnt.SelectedValue.ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If CveBitacora <= 0 Then
|
If CveBitacora <= 0 Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
'saco las cuentas de pérdida y ganancia
|
'saco las cuentas de pérdida y ganancia
|
||||||
For Each gvr As GridViewRow In GvCompras.Rows
|
For Each gvr As GridViewRow In GvProveedoresAnt.Rows
|
||||||
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
'si es pérdida o ganancia
|
'si es pérdida o ganancia
|
||||||
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString.ToEntero()
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString.ToEntero()
|
||||||
@@ -344,20 +516,21 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
|
BtnGeneraComprasAnt.Visible = False
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -387,7 +560,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
''
|
''
|
||||||
|
|
||||||
Total = LblTotalVentas.Text.ToDecimal
|
Total = LblTotalVentas.Text.ToDecimal
|
||||||
If Total > 0 Then
|
If Total < 0 Then
|
||||||
CveConceptoContable = 64
|
CveConceptoContable = 64
|
||||||
CveCuenta = CveCuentaGanancia
|
CveCuenta = CveCuentaGanancia
|
||||||
TipoMovto = True
|
TipoMovto = True
|
||||||
@@ -431,6 +604,103 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
CveConconceptoCliente = 203
|
CveConconceptoCliente = 203
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'movimiento de complementaria
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not Conta.UpdateTCValuacion(gvr.DataKey("CveVenta").ToEntero, -1, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorRegistrar Then
|
||||||
|
Conta.Commit()
|
||||||
|
BtnGeneraVentas.Visible = False
|
||||||
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
Else
|
||||||
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
Conta.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnClientesAnticipos_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Total As Decimal = 0
|
||||||
|
|
||||||
|
Dim idCta As Integer = 0
|
||||||
|
Dim CveCuenta As Integer = 0
|
||||||
|
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
||||||
|
Dim idCtaPerdida, IdCtaGanancia As Integer
|
||||||
|
Dim TipoMovto As Boolean = False
|
||||||
|
Dim CveConceptoContable As Integer = 0
|
||||||
|
Dim IdCtaComplementaria As Integer = 0
|
||||||
|
Dim ErrorRegistrar As Boolean = False
|
||||||
|
|
||||||
|
CveCuentaPerdida = 0 '55379
|
||||||
|
CveCuentaGanancia = 0 ' 55382
|
||||||
|
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
|
||||||
|
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
|
||||||
|
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
|
||||||
|
|
||||||
|
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||||
|
''
|
||||||
|
|
||||||
|
Total = LblTotalVentasAnt.Text.ToDecimal
|
||||||
|
If Total < 0 Then
|
||||||
|
CveConceptoContable = 64
|
||||||
|
CveCuenta = CveCuentaGanancia
|
||||||
|
TipoMovto = True
|
||||||
|
idCta = IdCtaGanancia
|
||||||
|
Else
|
||||||
|
CveConceptoContable = 65
|
||||||
|
CveCuenta = CveCuentaPerdida
|
||||||
|
idCta = idCtaPerdida
|
||||||
|
TipoMovto = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Total = 0 Then
|
||||||
|
Alert("El Importe tiene que ser diferente a cero", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Conta As New ClsContabilidad
|
||||||
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoVentasAnt.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentasAnt.SelectedValue.ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 4, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveBitacora <= 0 Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveConconceptoCliente As Integer = 203
|
||||||
|
|
||||||
|
'saco las cuentas de pérdida y ganancia
|
||||||
|
For Each gvr As GridViewRow In GvClientesAnt.Rows
|
||||||
|
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
|
|
||||||
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
||||||
|
|
||||||
|
If (gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0) OrElse (gvr.DataKey("CveVenta").ToEntero > 0 AndAlso gvr.DataKey("TipoDocto") = "Ant") Then
|
||||||
|
CveConconceptoCliente = 226
|
||||||
|
Else
|
||||||
|
CveConconceptoCliente = 203
|
||||||
|
End If
|
||||||
|
|
||||||
'movimiento de complementaria
|
'movimiento de complementaria
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
@@ -444,19 +714,178 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
|
BtnClientesAnticipos.Visible = False
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
Conta.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "FLUCTUACION ACREEDORES"
|
||||||
|
|
||||||
|
Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs)
|
||||||
|
RegistraFluctuacionAcreedores()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RegistraFluctuacionAcreedores(Optional Anticipos As Boolean = False)
|
||||||
|
Dim Total As Decimal = 0
|
||||||
|
Dim Conta As New ClsContabilidad
|
||||||
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
Dim idCta As Integer = 0
|
||||||
|
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
||||||
|
Dim idCtaPerdida, IdCtaGanancia As Integer
|
||||||
|
Dim TipoMovto As Boolean = False
|
||||||
|
Dim CveConceptoContable As Integer = 0
|
||||||
|
Dim CveCuentaComplementaria As Integer = 55206
|
||||||
|
Dim IdCtaComplementaria As Integer = 1081
|
||||||
|
Dim ErrorRegistrar As Boolean = False
|
||||||
|
|
||||||
|
CveCuentaPerdida = 0 '55379
|
||||||
|
CveCuentaGanancia = 0 ' 55382
|
||||||
|
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
|
||||||
|
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
|
||||||
|
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
|
||||||
|
|
||||||
|
Total = LblTotalAcreedores.Text.ToDecimal
|
||||||
|
If Total < 0 Then
|
||||||
|
CveConceptoContable = 64
|
||||||
|
idCta = IdCtaGanancia
|
||||||
|
TipoMovto = True
|
||||||
|
Else
|
||||||
|
CveConceptoContable = 65
|
||||||
|
idCta = idCtaPerdida
|
||||||
|
TipoMovto = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||||
|
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 5, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveBitacora <= 0 Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'saco las cuentas de pérdida y ganancia
|
||||||
|
For Each gvr As GridViewRow In GvAcreedores.Rows
|
||||||
|
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
|
'si es pérdida o ganancia
|
||||||
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
||||||
|
|
||||||
|
'movimiento de complementaria
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not Conta.UpdateTCValuacion(-1, gvr.DataKey("CveCompra").ToEntero, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
If Not ErrorRegistrar Then
|
||||||
|
Conta.Commit()
|
||||||
|
BtnGeneraAcreedores.Visible = False
|
||||||
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnGeneraAcreedoresAnt_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Total As Decimal = 0
|
||||||
|
Dim Conta As New ClsContabilidad
|
||||||
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedoresAnt.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
Dim idCta As Integer = 0
|
||||||
|
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
||||||
|
Dim idCtaPerdida, IdCtaGanancia As Integer
|
||||||
|
Dim TipoMovto As Boolean = False
|
||||||
|
Dim CveConceptoContable As Integer = 0
|
||||||
|
Dim CveCuentaComplementaria As Integer = 55206
|
||||||
|
Dim IdCtaComplementaria As Integer = 1081
|
||||||
|
Dim ErrorRegistrar As Boolean = False
|
||||||
|
|
||||||
|
CveCuentaPerdida = 0 '55379
|
||||||
|
CveCuentaGanancia = 0 ' 55382
|
||||||
|
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
|
||||||
|
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
|
||||||
|
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
|
||||||
|
|
||||||
|
Total = LblTotalAcreedoresAnt.Text.ToDecimal
|
||||||
|
If Total > 0 Then
|
||||||
|
CveConceptoContable = 64
|
||||||
|
idCta = IdCtaGanancia
|
||||||
|
TipoMovto = True
|
||||||
|
Else
|
||||||
|
CveConceptoContable = 65
|
||||||
|
idCta = idCtaPerdida
|
||||||
|
TipoMovto = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||||
|
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores Anticipos ", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoAcreeedoresAnt.SelectedValue.ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 6, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveBitacora <= 0 Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'saco las cuentas de pérdida y ganancia
|
||||||
|
For Each gvr As GridViewRow In GvAcreedoresAnt.Rows
|
||||||
|
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
|
'si es pérdida o ganancia
|
||||||
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
||||||
|
|
||||||
|
'movimiento de complementaria
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not Conta.UpdateTCValuacion(-1, gvr.DataKey("CveCompra").ToEntero, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
If Not ErrorRegistrar Then
|
||||||
|
Conta.Commit()
|
||||||
|
BtnGeneraAcreedoresAnt.Visible = False
|
||||||
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Conta.RollBack()
|
||||||
|
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
Conta.Dispose()
|
||||||
|
Banco.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -482,7 +911,6 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
CveCuentaPerdida = 0 ' 55379
|
CveCuentaPerdida = 0 ' 55379
|
||||||
CveCuentaGanancia = 0 ' 55382
|
CveCuentaGanancia = 0 ' 55382
|
||||||
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
|
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
|
||||||
@@ -722,119 +1150,9 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "FLUCTUACION ACREEDORES"
|
|
||||||
|
|
||||||
Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
Dim Total As Decimal = 0
|
|
||||||
Dim Conta As New ClsContabilidad
|
|
||||||
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
|
||||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
Dim idCta As Integer = 0
|
|
||||||
Dim CveCuenta As Integer = 0
|
|
||||||
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
|
|
||||||
Dim idCtaPerdida, IdCtaGanancia As Integer
|
|
||||||
Dim TipoMovto As Boolean = False
|
|
||||||
Dim CveConceptoContable As Integer = 0
|
|
||||||
Dim CveCuentaComplementaria As Integer = 55206
|
|
||||||
Dim IdCtaComplementaria As Integer = 1081
|
|
||||||
Dim ErrorRegistrar As Boolean = False
|
|
||||||
|
|
||||||
CveCuentaPerdida = 0 '55379
|
|
||||||
CveCuentaGanancia = 0 ' 55382
|
|
||||||
idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227
|
|
||||||
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
|
|
||||||
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
|
|
||||||
|
|
||||||
|
|
||||||
Total = LblTotalAcreedores.Text.ToDecimal
|
|
||||||
If Total > 0 Then
|
|
||||||
CveConceptoContable = 64
|
|
||||||
CveCuenta = CveCuentaGanancia
|
|
||||||
idCta = IdCtaGanancia
|
|
||||||
TipoMovto = True
|
|
||||||
Else
|
|
||||||
CveConceptoContable = 65
|
|
||||||
CveCuenta = CveCuentaPerdida
|
|
||||||
idCta = idCtaPerdida
|
|
||||||
TipoMovto = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
|
||||||
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
|
||||||
ErrorRegistrar = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
If CveBitacora <= 0 Then
|
|
||||||
ErrorRegistrar = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
'saco las cuentas de pérdida y ganancia
|
|
||||||
For Each gvr As GridViewRow In GvAcreedores.Rows
|
|
||||||
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
|
||||||
'si es pérdida o ganancia
|
|
||||||
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
|
||||||
|
|
||||||
'movimiento de complementaria
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
|
||||||
ErrorRegistrar = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If Not Conta.UpdateCompraTCValuacion(gvr.DataKey("CveCompra").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
|
||||||
' ErrorRegistrar = True
|
|
||||||
' Exit For
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
|
||||||
Conta.Commit()
|
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
|
||||||
Else
|
|
||||||
Conta.RollBack()
|
|
||||||
End If
|
|
||||||
Conta.Dispose()
|
|
||||||
Banco.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region "GRIDVIEWS"
|
#Region "GRIDVIEWS"
|
||||||
|
|
||||||
Protected Sub GvCompras_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCompras.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
'TipoCambio = e.Row.DBCampo("TipoCambio").ToString.ToDouble
|
|
||||||
'e.Row.FCLabel("LbTipoCambioActual").Text = TipoCambioActual.ToString
|
|
||||||
'e.Row.FCLabel("LbTipoCambio").Text = If(TipoCambio > 0, TipoCambio.ToString, "No hay TipoCambio")
|
|
||||||
'e.Row.FCLabel("LbFluctuacion").Text = If(TipoCambio > 0, ((TipoCambio - TipoCambioActual) * e.Row.DBCampo("Saldo").ToString.ToDouble).ToString.FormatoNumero, "No aplica")
|
|
||||||
'If e.Row.FCLabel("LbFluctuacion").Text = "No aplica" Then
|
|
||||||
' e.Row.BackColor = Drawing.Color.LightSalmon
|
|
||||||
'ElseIf e.Row.FCLabel("LbFluctuacion").Text.ToDouble < 0 Then
|
|
||||||
' e.Row.BackColor = Drawing.Color.LightGoldenrodYellow
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'e.Row.FCHyperLink("HLProveedor").NavigateUrl = String.Format("/Compras/Proveedores.aspx?CveProveedor={0}", e.Row.DBCampo("CveProveedor").ToString.ToEntero)
|
|
||||||
|
|
||||||
'If Not e.Row.DBCampo("IdCtaContProveedores").ToString.ToEntero > 0 Then
|
|
||||||
' e.Row.FCHyperLink("HLProveedor").ForeColor = Drawing.Color.Red
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
'If e.Row.DBCampo("Fluctuacion").ToString.ToDouble < 0 Then
|
|
||||||
' e.Row.BackColor = Drawing.Color.LightGoldenrodYellow
|
|
||||||
'End If
|
|
||||||
'If e.Row.DBCampo("SinTipoCambio").ToString.ToEntero > 0 Then
|
|
||||||
' e.Row.BackColor = Drawing.Color.LightSalmon
|
|
||||||
'End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub GvCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCuentas.RowDataBound
|
Protected Sub GvCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCuentas.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
'TipoCambio = e.Row.DBCampo("TipoCambio").ToString.ToDouble
|
'TipoCambio = e.Row.DBCampo("TipoCambio").ToString.ToDouble
|
||||||
@@ -877,6 +1195,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorCvePrePoliza.Value.ToEntero, 1, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorCvePrePoliza.Value.ToEntero, 1, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
Banco.Commit()
|
Banco.Commit()
|
||||||
|
BtnProveedoresRemove.visible = False
|
||||||
Alert("Flucturación eliminada.")
|
Alert("Flucturación eliminada.")
|
||||||
Else
|
Else
|
||||||
Banco.RollBack()
|
Banco.RollBack()
|
||||||
@@ -884,4 +1203,77 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnProveedoresAntRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorAntCvePrePoliza.Value.ToEntero, 2, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
BtnProveedoresAntRemove.Visible = False
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnClientesRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnClienteCvePrePoliza.Value.ToEntero, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
BtnClientesRemove.Visible = False
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnClientesAntRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnClienteAntCvePrePoliza.Value.ToEntero, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
BtnClientesAntRemove.Visible = False
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAcreedoresRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnAcreedorCvePrePoliza.Value.ToEntero, 5, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
BtnAcreedoresRemove.Visible = False
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnAcreedoresAntRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnAcreedorAntCvePrePoliza.Value.ToEntero, 6, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
BtnAcreedoresAntRemove.Visible = False
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2194,7 +2194,7 @@ Partial Class Compras_Compras
|
|||||||
DdlRetISRConcepto.Items.Clear()
|
DdlRetISRConcepto.Items.Clear()
|
||||||
DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1"))
|
DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1"))
|
||||||
DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2"))
|
DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2"))
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 7, 11, 12, 122, 145) Then
|
||||||
DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3"))
|
DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -6917,7 +6917,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=TotalRealDevolucion * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, TotalRealDevolucion), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -474,6 +474,12 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
CargaCuentasContables()
|
CargaCuentasContables()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial") Then
|
||||||
|
|
||||||
|
BtnEliminar.Enabled = False
|
||||||
|
BtnEliminar.ToolTip = "No se puede eliminar al prepóliza, eliminarlos desde el módulo"
|
||||||
|
End If
|
||||||
|
|
||||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||||
|
|
||||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
@@ -2114,7 +2120,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Dim NombreArchivo As String
|
Dim NombreArchivo As String
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
Dim workbook As New ExcelFile()
|
Dim workbook As New ExcelFile()
|
||||||
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.ToString())
|
Dim worksheet = workbook.Worksheets.Add(DdlPlantilla2.SelectedItem.Text.Substring(1, 30))
|
||||||
|
|
||||||
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero()
|
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero()
|
||||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
|
||||||
|
|||||||
@@ -594,7 +594,6 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="TxtRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal><br />
|
<asp:Literal ID="TxtRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal><br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="280px" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -602,7 +601,6 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto") %>'></asp:Literal><br />
|
<asp:Literal ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto") %>'></asp:Literal><br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="400px" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
@@ -635,9 +633,8 @@
|
|||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<HeaderTemplate>TC</HeaderTemplate>
|
<HeaderTemplate>TC</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
|
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC", "{0:#.####}"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Cargo</HeaderTemplate>
|
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||||
@@ -666,14 +663,14 @@
|
|||||||
<asp:LinkButton ID="LnkGvPrePolizaEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
<asp:LinkButton ID="LnkGvPrePolizaEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" Width="80px" />
|
<ItemStyle Width="120px" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField >
|
<asp:TemplateField >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" Width="0px" />
|
<ItemStyle HorizontalAlign="Right" Width="5px" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -495,6 +495,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||||
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
|
|
||||||
|
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial") Then
|
||||||
|
|
||||||
|
BtnEliminar.Enabled = False
|
||||||
|
BtnEliminar.ToolTip = "No se puede eliminar al prepóliza, eliminarlos desde el módulo"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'DtMovimientos.DefaultView.Sort = "OrdenPP"
|
'DtMovimientos.DefaultView.Sort = "OrdenPP"
|
||||||
'DtMovimientos = DtMovimientos.DefaultView.ToTable
|
'DtMovimientos = DtMovimientos.DefaultView.ToTable
|
||||||
|
|||||||
@@ -3343,7 +3343,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
Dim PesoKg As Decimal = DrPS("PesoKg").ToString.ToDecimal
|
||||||
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
Dim SATClaveUnidadMedida As String = DrPS("SATClaveUnidadMedida").ToString.Trim
|
||||||
|
|
||||||
If CveSATPS > 0 And PesoKg > 0 And SATClaveUnidadMedida.Length > 0 Then
|
If CveSATPS > 0 AndAlso PesoKg > 0 AndAlso SATClaveUnidadMedida.Length > 0 Then
|
||||||
Respuesta = True
|
Respuesta = True
|
||||||
Else
|
Else
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
|
|||||||
@@ -9043,286 +9043,286 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
||||||
If Not Directory.Exists(DirectoriArchivoXML) Then
|
If Not Directory.Exists(DirectoriArchivoXML) Then
|
||||||
Directory.CreateDirectory(DirectoriArchivoXML)
|
Directory.CreateDirectory(DirectoriArchivoXML)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
Dim SeTimbro As Boolean = False
|
Dim SeTimbro As Boolean = False
|
||||||
Dim SeTimbroNC As Boolean = False
|
Dim SeTimbroNC As Boolean = False
|
||||||
Dim EstatusSMS = 0
|
Dim EstatusSMS = 0
|
||||||
|
|
||||||
Dim MsgCancelacionRefacturacion As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
Dim MsgCancelacionRefacturacion As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
||||||
|
|
||||||
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
|
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
|
||||||
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "RNC", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
|
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "RNC", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
|
||||||
|
|
||||||
Dim DebeTimbrar As Boolean = True
|
Dim DebeTimbrar As Boolean = True
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then
|
||||||
'si tiene anticipos seleccionados y el total es cero, que no se timbre(previo empresa72)
|
'si tiene anticipos seleccionados y el total es cero, que no se timbre(previo empresa72)
|
||||||
If LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0 Then
|
If LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0 Then
|
||||||
DebeTimbrar = False
|
DebeTimbrar = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
|
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
|
||||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "3" Then
|
If DdlTipoAmortizacionAnticipo.SelectedValue = "3" Then
|
||||||
DebeTimbrar = False
|
DebeTimbrar = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(335) Then
|
If UsuarioActual.TienePermisoProceso(335) Then
|
||||||
DebeTimbrar = False
|
DebeTimbrar = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DebeTimbrar AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
If DebeTimbrar AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
||||||
|
|
||||||
'FACTURA INGRESO/EGRESO
|
'FACTURA INGRESO/EGRESO
|
||||||
Dim FM As New Modelos.FemsaFactura
|
Dim FM As New Modelos.FemsaFactura
|
||||||
Dim TmpDT7Eleven As New DataTable
|
Dim TmpDT7Eleven As New DataTable
|
||||||
Dim TmpDTComplementosTimbrado As New DataTable
|
Dim TmpDTComplementosTimbrado As New DataTable
|
||||||
|
|
||||||
If AplicaFEMSA Then
|
If AplicaFEMSA Then
|
||||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjTimbrado As New Timbrado
|
Dim ObjTimbrado As New Timbrado
|
||||||
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
|
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
|
||||||
Dim FolioFiscalFactura As String = ObjTimbrado.UUID
|
Dim FolioFiscalFactura As String = ObjTimbrado.UUID
|
||||||
Dim MsgErrorTimbrado = ObjTimbrado.MensajeErrorCFDI
|
Dim MsgErrorTimbrado = ObjTimbrado.MensajeErrorCFDI
|
||||||
ObjTimbrado = Nothing
|
ObjTimbrado = Nothing
|
||||||
|
|
||||||
'NOTA DE CREDITO - REFACTURADA - CASO ESPECIAL, TIMBRADO E IMPRESION
|
'NOTA DE CREDITO - REFACTURADA - CASO ESPECIAL, TIMBRADO E IMPRESION
|
||||||
If DebeTimbrar AndAlso ListaNotasCreditoGeneradas.Count > 0 Then
|
If DebeTimbrar AndAlso ListaNotasCreditoGeneradas.Count > 0 Then
|
||||||
Try
|
Try
|
||||||
For Each NCGenerada In ListaNotasCreditoGeneradas
|
For Each NCGenerada In ListaNotasCreditoGeneradas
|
||||||
If NCGenerada.Timbre IsNot Nothing Then
|
If NCGenerada.Timbre IsNot Nothing Then
|
||||||
NCGenerada.Timbre.CFDIRelacionados.UUID.Clear()
|
NCGenerada.Timbre.CFDIRelacionados.UUID.Clear()
|
||||||
NCGenerada.Timbre.CFDIRelacionados.UUID.Add(FolioFiscalFactura)
|
NCGenerada.Timbre.CFDIRelacionados.UUID.Add(FolioFiscalFactura)
|
||||||
|
|
||||||
Dim ObjTimbradoNC As New Timbrado
|
Dim ObjTimbradoNC As New Timbrado
|
||||||
Dim TimbroNC = ObjTimbradoNC.TimbrarFactura(UsuarioActual, NCGenerada)
|
Dim TimbroNC = ObjTimbradoNC.TimbrarFactura(UsuarioActual, NCGenerada)
|
||||||
|
|
||||||
If Not TimbroNC Then
|
If Not TimbroNC Then
|
||||||
Alert(ObjTimbradoNC.MensajeErrorCFDI, TipoMensaje.MsgError)
|
Alert(ObjTimbradoNC.MensajeErrorCFDI, TipoMensaje.MsgError)
|
||||||
End If
|
|
||||||
ObjTimbradoNC = Nothing
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al timbrar la NC.", ex)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If SeTimbro AndAlso ObjFactura.TipoDocto.Contiene("Ing") Then
|
|
||||||
EstatusSMS = EnviarSMSTimbrado(ObjEventos)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not SeTimbro Then
|
|
||||||
Alert(MsgErrorTimbrado, TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CANCELAR FACTURA ANTERIOR
|
|
||||||
If SeTimbro AndAlso (Me.CveDevolucion > 0 AndAlso Me.NuevaFactura = 1) Then
|
|
||||||
If Me.ObjFacturaNC IsNot Nothing Then
|
|
||||||
Me.ObjFacturaNC.CveEstatusRefacturacion = 2 'MARCAR COMO REFACTURADA
|
|
||||||
MsgCancelacionRefacturacion = Me.ObjFacturaNC.CancelarPorRefacturacion(Me.ObjFacturaNC.CveMotivoCancelacion, Me.ObjFacturaNC.MotivoCancelacion, FolioFiscalFactura)
|
|
||||||
End If
|
End If
|
||||||
|
ObjTimbradoNC = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
Next
|
||||||
End If
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al timbrar la NC.", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICAR 100% AVANCE A IMPORTE Y CANTIDAD
|
If SeTimbro AndAlso ObjFactura.TipoDocto.Contiene("Ing") Then
|
||||||
If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso CveContrato > 0 Then
|
EstatusSMS = EnviarSMSTimbrado(ObjEventos)
|
||||||
If ObjContr.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
End If
|
||||||
|
|
||||||
If ObjContr.DtResultados.Rows.Count > 0 Then
|
If Not SeTimbro Then
|
||||||
|
Alert(MsgErrorTimbrado, TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'CANCELAR FACTURA ANTERIOR
|
||||||
'SI ES FLEXIBLE QUE NOTIFIQUE EL MONTO MAXIMO, SI NO LO ES QUE NOTIFIQUE EL PORCENTAJE ALCANZADO... FLEXIBLE = 2, NO FLEXIBLE = 1
|
If SeTimbro AndAlso (Me.CveDevolucion > 0 AndAlso Me.NuevaFactura = 1) Then
|
||||||
If ObjContr.DtResultados.Rows(0)("ModalidadDetalle").ToString() = "1" Then
|
If Me.ObjFacturaNC IsNot Nothing Then
|
||||||
Dim PorcentajeAvance As Double = ObjContr.DtResultados.Rows(0)("ContratoAvance").ToString().ToDouble
|
Me.ObjFacturaNC.CveEstatusRefacturacion = 2 'MARCAR COMO REFACTURADA
|
||||||
|
MsgCancelacionRefacturacion = Me.ObjFacturaNC.CancelarPorRefacturacion(Me.ObjFacturaNC.CveMotivoCancelacion, Me.ObjFacturaNC.MotivoCancelacion, FolioFiscalFactura)
|
||||||
If PorcentajeAvance >= 100 Then
|
|
||||||
EnviarNotificacionAvance(ObjContr.DtResultados.Rows(0)("NumeroContrato").ToString(), ObjContr.DtResultados.Rows(0)("DescripcionContrato").ToString(), ObjContr.DtResultados.Rows(0)("ContratoTipo").ToString(), ObjContr.DtResultados.Rows(0)("NombreComercial").ToString(), ObjContr.DtResultados.Rows(0)("CorreoVendedor").ToString())
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Dim MontoMaximo As Double = ObjContr.DtResultados.Rows(0)("ImporteMax").ToString().ToDouble
|
|
||||||
Dim Avance As Double = ObjContr.DtResultados.Rows(0)("Avance").ToString().ToDouble
|
|
||||||
|
|
||||||
Dim PorcentajeAvance As Double = (Avance / MontoMaximo) * 100
|
|
||||||
|
|
||||||
If PorcentajeAvance >= 100 And MontoMaximo > 0 Then
|
|
||||||
EnviarNotificacionAvance(ObjContr.DtResultados.Rows(0)("NumeroContrato").ToString(), ObjContr.DtResultados.Rows(0)("DescripcionContrato").ToString(), ObjContr.DtResultados.Rows(0)("ContratoTipo").ToString(), ObjContr.DtResultados.Rows(0)("NombreComercial").ToString(), ObjContr.DtResultados.Rows(0)("CorreoVendedor").ToString(), MontoMaximo)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'MENSAJE PRINCIPAL
|
End If
|
||||||
MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> se generó correctamente.<br/><br/>", ObjFactura.TipoDocumento, ObjFactura.SerieFolio))
|
|
||||||
|
'VERIFICAR 100% AVANCE A IMPORTE Y CANTIDAD
|
||||||
|
If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso CveContrato > 0 Then
|
||||||
|
If ObjContr.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
If ObjContr.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
|
||||||
' DESCARGA XML - SI SE TIMBRA MANDA CORREO CON FACTURA
|
'SI ES FLEXIBLE QUE NOTIFIQUE EL MONTO MAXIMO, SI NO LO ES QUE NOTIFIQUE EL PORCENTAJE ALCANZADO... FLEXIBLE = 2, NO FLEXIBLE = 1
|
||||||
If SeTimbro Then
|
If ObjContr.DtResultados.Rows(0)("ModalidadDetalle").ToString() = "1" Then
|
||||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
Dim PorcentajeAvance As Double = ObjContr.DtResultados.Rows(0)("ContratoAvance").ToString().ToDouble
|
||||||
If File.Exists(ArchivoXML) Then
|
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
If PorcentajeAvance >= 100 Then
|
||||||
|
EnviarNotificacionAvance(ObjContr.DtResultados.Rows(0)("NumeroContrato").ToString(), ObjContr.DtResultados.Rows(0)("DescripcionContrato").ToString(), ObjContr.DtResultados.Rows(0)("ContratoTipo").ToString(), ObjContr.DtResultados.Rows(0)("NombreComercial").ToString(), ObjContr.DtResultados.Rows(0)("CorreoVendedor").ToString())
|
||||||
End If
|
End If
|
||||||
GeneraPDFFactura(ChkEnviarFactura.Checked) 'MANDA CORREO
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
'DESCARGA PDF
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant", "Egs", "Dev", "Pd2") Then
|
|
||||||
'If Not ImprimeAlert Then
|
|
||||||
|
|
||||||
Dim ArchivoIngPyMe As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
|
||||||
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
|
||||||
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
|
||||||
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
|
|
||||||
|
|
||||||
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoIngPyMe.Exists Or ArchivoEgs.Exists Then
|
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
|
|
||||||
Else
|
|
||||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ERROR DE NO TIMBRADO
|
|
||||||
If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
|
||||||
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ERROR DE NO TIMBRADO NC
|
|
||||||
If Not IsNothing(ObjNC) AndAlso ObjNC.Count > 0 AndAlso Not SeTimbroNC Then
|
|
||||||
MensajeAlert.AppendFormat("<br/>La NC <b>#{0}</b> no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.", CType(ObjNC(0), Modelos.Factura).SerieFolio)
|
|
||||||
End If
|
|
||||||
|
|
||||||
'NOTIFICACION DE SMS
|
|
||||||
Select Case EstatusSMS
|
|
||||||
Case 1
|
|
||||||
MensajeAlert.AppendFormat("<br/><b>Notificación SMS:</b> enviado con éxito al cliente al celular: <b>{0}</b>", ObjFactura.Cliente.CobranzaTelefono)
|
|
||||||
Case 2
|
|
||||||
MensajeAlert.AppendFormat("<br/><b>Notificación SMS:</b> sin enviar. Ocurrió un error en el envío, por favor verifique la información del cliente.")
|
|
||||||
Case 3
|
|
||||||
MensajeAlert.AppendFormat("<br/><b>Notificación SMS:</b> sin enviar. No se pudo cargar el celular del cliente, por favor verifique la información del cliente.")
|
|
||||||
End Select
|
|
||||||
|
|
||||||
|
|
||||||
'AUTO DESCARGAR PDF
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 1) Then
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then
|
|
||||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'DESCARGAR PDF DE CICOVISA
|
|
||||||
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
|
|
||||||
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
|
||||||
' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Formato CICOVISA</a></li></ul><br/>", Encripta(String.Format("OP=CIC&CVEVENTA={0}", CveVenta)))
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
|
||||||
If Not CveEmpresaCRM > 0 Then
|
|
||||||
If CveVenta > 0 Then MensajeAlert = New StringBuilder
|
|
||||||
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
|
||||||
|
|
||||||
If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
|
||||||
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ArchivoCotizacion.Exists Then
|
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
|
|
||||||
Else
|
|
||||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
|
||||||
End If
|
|
||||||
|
|
||||||
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
|
|
||||||
End If
|
|
||||||
ElseIf DdlTipoComprobante.SelectedValue = "Rem" Then
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(81, 109) Then
|
|
||||||
EnviaPDFRemision(ChkEnviarFactura.Checked)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ENVIA CORREO CON DETALLE DEL CONTRATO
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("DPe", "Ped") Then
|
|
||||||
If Not String.IsNullOrEmpty(CorreoNotificacionPedDev) Then
|
|
||||||
EnviarCorreoDevPed()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'MOVIMIENTO DE ALMACEN
|
|
||||||
If ObjFactura.Inv_CveMovimiento > 0 Then
|
|
||||||
MensajeAlert.AppendFormat("<br/><br/><b><a target='_blank' class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">Movimiento de Almacén</a></b><br/>", ObjFactura.Inv_CveMovimiento)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
|
|
||||||
MensajeAlert.AppendFormat("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", ObjFacturaDevolucion.Folio)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If RBLPago.SelectedValue.ToEntero() = 2 And TxtCambio.Text.ToDecimal > 0 Then
|
|
||||||
MensajeAlert.AppendFormat("<br/><br/>Su cambio es de <b>${0}</b><br/>", TxtCambio.Text.ToDecimal.FormatoNumero(2))
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveVentaNCProntoPago > 0 Then
|
|
||||||
MensajeAlert.AppendFormat(String.Format("<br/>La nota de crédito <b>{0}</b> por descuento pronto pago se generó correctamente.<br/><br/>", SerieFolioNCProntoPago))
|
|
||||||
End If
|
|
||||||
|
|
||||||
If MsgCancelacionRefacturacion IsNot Nothing Then
|
|
||||||
If Not MsgCancelacionRefacturacion.HuboError Then
|
|
||||||
If MsgCancelacionRefacturacion.CveEstatus = 5 Then
|
|
||||||
MensajeAlert.AppendFormat("<br/>El folio <b>{0}</b> fue cancelado. <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={1}"">Descargar Acuse</a></b>", Me.ObjFacturaNC.SerieFolio, Encripta(String.Format("OP=CAN&CVEVTA={0}", Me.ObjFacturaNC.CveVenta)))
|
|
||||||
ElseIf MsgCancelacionRefacturacion.CveEstatus = 20 Then
|
|
||||||
MensajeAlert.AppendFormat("<br/>El folio <b>{0}</b> esta en proceso de cancelación. <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={1}"">Descargar Acuse</a></b>", Me.ObjFacturaNC.SerieFolio, Encripta(String.Format("OP=CAN&CVEVTA={0}", Me.ObjFacturaNC.CveVenta)))
|
|
||||||
End If
|
|
||||||
MensajeAlert.AppendFormat(" <a target='_self' class='Texto' href=""javascript:BtnEnviarMailCancelacion({0});"">Enviar Acuse</a>.<br/><br/>", Me.ObjFacturaNC.CveVenta)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'MUESTA ALERT OK
|
|
||||||
' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-.
|
|
||||||
'Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"))
|
|
||||||
'Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga)
|
|
||||||
|
|
||||||
Dim Liga As String = ""
|
|
||||||
Dim Liga2 As String = ""
|
|
||||||
|
|
||||||
If Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToEntero > 0 Then
|
|
||||||
Liga = $"document.location.href=""/Ventas/Ventas.aspx?CveCliente={Request("CveCliente")}"";"
|
|
||||||
Else
|
Else
|
||||||
Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"
|
Dim MontoMaximo As Double = ObjContr.DtResultados.Rows(0)("ImporteMax").ToString().ToDouble
|
||||||
|
Dim Avance As Double = ObjContr.DtResultados.Rows(0)("Avance").ToString().ToDouble
|
||||||
|
|
||||||
|
Dim PorcentajeAvance As Double = (Avance / MontoMaximo) * 100
|
||||||
|
|
||||||
|
If PorcentajeAvance >= 100 And MontoMaximo > 0 Then
|
||||||
|
EnviarNotificacionAvance(ObjContr.DtResultados.Rows(0)("NumeroContrato").ToString(), ObjContr.DtResultados.Rows(0)("DescripcionContrato").ToString(), ObjContr.DtResultados.Rows(0)("ContratoTipo").ToString(), ObjContr.DtResultados.Rows(0)("NombreComercial").ToString(), ObjContr.DtResultados.Rows(0)("CorreoVendedor").ToString(), MontoMaximo)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveEmpresaCRM > 0 Then
|
End If
|
||||||
Liga2 = $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";"
|
End If
|
||||||
Else
|
End If
|
||||||
Liga2 = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
|
||||||
End If
|
|
||||||
|
|
||||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
'MENSAJE PRINCIPAL
|
||||||
|
MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> se generó correctamente.<br/><br/>", ObjFactura.TipoDocumento, ObjFactura.SerieFolio))
|
||||||
|
|
||||||
MensajeAlert.Clear()
|
|
||||||
|
|
||||||
'LIMPIA CONDICIONES DE PAGO - CONTADO
|
' DESCARGA XML - SI SE TIMBRA MANDA CORREO CON FACTURA
|
||||||
RBLPago.SelectedValue = "1"
|
If SeTimbro Then
|
||||||
LimpiaEscondeContado()
|
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||||
BtnEmitirImprimir.Visible = False
|
If File.Exists(ArchivoXML) Then
|
||||||
ObjFactura = Nothing
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||||
|
End If
|
||||||
|
GeneraPDFFactura(ChkEnviarFactura.Checked) 'MANDA CORREO
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'DESCARGA PDF
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant", "Egs", "Dev", "Pd2") Then
|
||||||
|
'If Not ImprimeAlert Then
|
||||||
|
|
||||||
|
Dim ArchivoIngPyMe As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim ArchivoEgs As New System.IO.FileInfo(String.Format("{0}Formatos/NotaCredito.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
|
If ArchivoIng.Exists Or ArchivoRem.Exists Or ArchivoIngPyMe.Exists Or ArchivoEgs.Exists Then
|
||||||
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
|
||||||
|
Else
|
||||||
|
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'ERROR DE NO TIMBRADO
|
||||||
|
If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
||||||
|
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'ERROR DE NO TIMBRADO NC
|
||||||
|
If Not IsNothing(ObjNC) AndAlso ObjNC.Count > 0 AndAlso Not SeTimbroNC Then
|
||||||
|
MensajeAlert.AppendFormat("<br/>La NC <b>#{0}</b> no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.", CType(ObjNC(0), Modelos.Factura).SerieFolio)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'NOTIFICACION DE SMS
|
||||||
|
Select Case EstatusSMS
|
||||||
|
Case 1
|
||||||
|
MensajeAlert.AppendFormat("<br/><b>Notificación SMS:</b> enviado con éxito al cliente al celular: <b>{0}</b>", ObjFactura.Cliente.CobranzaTelefono)
|
||||||
|
Case 2
|
||||||
|
MensajeAlert.AppendFormat("<br/><b>Notificación SMS:</b> sin enviar. Ocurrió un error en el envío, por favor verifique la información del cliente.")
|
||||||
|
Case 3
|
||||||
|
MensajeAlert.AppendFormat("<br/><b>Notificación SMS:</b> sin enviar. No se pudo cargar el celular del cliente, por favor verifique la información del cliente.")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
'AUTO DESCARGAR PDF
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(72, 1) Then
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then
|
||||||
|
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'DESCARGAR PDF DE CICOVISA
|
||||||
|
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
|
||||||
|
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||||
|
' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Formato CICOVISA</a></li></ul><br/>", Encripta(String.Format("OP=CIC&CVEVENTA={0}", CveVenta)))
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
|
If Not CveEmpresaCRM > 0 Then
|
||||||
|
If CveVenta > 0 Then MensajeAlert = New StringBuilder
|
||||||
|
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
|
If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ArchivoCotizacion.Exists Then
|
||||||
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
|
||||||
Else
|
Else
|
||||||
ObjVentas.RollBack()
|
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||||
|
End If
|
||||||
|
|
||||||
|
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
|
||||||
|
End If
|
||||||
|
ElseIf DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(81, 109) Then
|
||||||
|
EnviaPDFRemision(ChkEnviarFactura.Checked)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'ENVIA CORREO CON DETALLE DEL CONTRATO
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("DPe", "Ped") Then
|
||||||
|
If Not String.IsNullOrEmpty(CorreoNotificacionPedDev) Then
|
||||||
|
EnviarCorreoDevPed()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'MOVIMIENTO DE ALMACEN
|
||||||
|
If ObjFactura.Inv_CveMovimiento > 0 Then
|
||||||
|
MensajeAlert.AppendFormat("<br/><br/><b><a target='_blank' class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">Movimiento de Almacén</a></b><br/>", ObjFactura.Inv_CveMovimiento)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
|
||||||
|
MensajeAlert.AppendFormat("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", ObjFacturaDevolucion.Folio)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RBLPago.SelectedValue.ToEntero() = 2 And TxtCambio.Text.ToDecimal > 0 Then
|
||||||
|
MensajeAlert.AppendFormat("<br/><br/>Su cambio es de <b>${0}</b><br/>", TxtCambio.Text.ToDecimal.FormatoNumero(2))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveVentaNCProntoPago > 0 Then
|
||||||
|
MensajeAlert.AppendFormat(String.Format("<br/>La nota de crédito <b>{0}</b> por descuento pronto pago se generó correctamente.<br/><br/>", SerieFolioNCProntoPago))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If MsgCancelacionRefacturacion IsNot Nothing Then
|
||||||
|
If Not MsgCancelacionRefacturacion.HuboError Then
|
||||||
|
If MsgCancelacionRefacturacion.CveEstatus = 5 Then
|
||||||
|
MensajeAlert.AppendFormat("<br/>El folio <b>{0}</b> fue cancelado. <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={1}"">Descargar Acuse</a></b>", Me.ObjFacturaNC.SerieFolio, Encripta(String.Format("OP=CAN&CVEVTA={0}", Me.ObjFacturaNC.CveVenta)))
|
||||||
|
ElseIf MsgCancelacionRefacturacion.CveEstatus = 20 Then
|
||||||
|
MensajeAlert.AppendFormat("<br/>El folio <b>{0}</b> esta en proceso de cancelación. <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={1}"">Descargar Acuse</a></b>", Me.ObjFacturaNC.SerieFolio, Encripta(String.Format("OP=CAN&CVEVTA={0}", Me.ObjFacturaNC.CveVenta)))
|
||||||
|
End If
|
||||||
|
MensajeAlert.AppendFormat(" <a target='_self' class='Texto' href=""javascript:BtnEnviarMailCancelacion({0});"">Enviar Acuse</a>.<br/><br/>", Me.ObjFacturaNC.CveVenta)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'MUESTA ALERT OK
|
||||||
|
' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-.
|
||||||
|
'Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"))
|
||||||
|
'Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga)
|
||||||
|
|
||||||
|
Dim Liga As String = ""
|
||||||
|
Dim Liga2 As String = ""
|
||||||
|
|
||||||
|
If Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToEntero > 0 Then
|
||||||
|
Liga = $"document.location.href=""/Ventas/Ventas.aspx?CveCliente={Request("CveCliente")}"";"
|
||||||
|
Else
|
||||||
|
Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveEmpresaCRM > 0 Then
|
||||||
|
Liga2 = $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";"
|
||||||
|
Else
|
||||||
|
Liga2 = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||||
|
|
||||||
|
MensajeAlert.Clear()
|
||||||
|
|
||||||
|
'LIMPIA CONDICIONES DE PAGO - CONTADO
|
||||||
|
RBLPago.SelectedValue = "1"
|
||||||
|
LimpiaEscondeContado()
|
||||||
|
BtnEmitirImprimir.Visible = False
|
||||||
|
ObjFactura = Nothing
|
||||||
|
|
||||||
|
Else
|
||||||
|
ObjVentas.RollBack()
|
||||||
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
||||||
|
|
||||||
For Each ErrorItem In ErrorList
|
For Each ErrorItem In ErrorList
|
||||||
|
|||||||
Reference in New Issue
Block a user