- cmabios fluctuaci[on
- cxc, guarde sesion sucursal
This commit is contained in:
@@ -202,7 +202,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
<div class="widget-thumb text-uppercase bordered">
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
<h4 class="widget-thumb-heading">PÉRDIDA O GANANCIA</h4>
|
<h4 class="widget-thumb-heading"><asp:Label ID="LblComprasPerdidaGanancia" runat="server" Text=""></asp:Label></h4>
|
||||||
<div class="widget-thumb-wrap">
|
<div class="widget-thumb-wrap">
|
||||||
<i id="IImagenResultado" runat="server" class=""></i>
|
<i id="IImagenResultado" runat="server" class=""></i>
|
||||||
<div class="widget-thumb-body">
|
<div class="widget-thumb-body">
|
||||||
@@ -227,15 +227,16 @@
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GvCompras" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvCompras" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,FluctuacionTotal,GananciaPerdida"
|
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,FluctuacionTotal,PerdidaGanancia"
|
||||||
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" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
<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 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="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" />
|
||||||
<asp:BoundField HeaderText="Perdida o Ganancia" DataField="GananciaPerdida" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Perdida o Ganancia" DataField="PerdidaGanancia" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<%--<asp:Label ID="LblTotalCompras" runat="server" Text=""></asp:Label>--%>
|
<%--<asp:Label ID="LblTotalCompras" runat="server" Text=""></asp:Label>--%>
|
||||||
@@ -313,7 +314,7 @@
|
|||||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N4}" />
|
<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="FluctuacionPesos" HeaderText="Fluctuacion Pesos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="PerdidaGanancia" HeaderText="Acción" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="PerdidaGanancia" HeaderText="Acción" ItemStyle-HorizontalAlign="Left" />
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -364,6 +365,7 @@
|
|||||||
<asp:BoundField HeaderText="Deudor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
<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: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 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="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="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" />
|
<asp:BoundField HeaderText="Fluctuación" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -386,8 +388,10 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
<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 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="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 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>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<asp:Label ID="LblTotalAcreedores" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblTotalAcreedores" runat="server" Text=""></asp:Label>
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then
|
||||||
GvCompras.DataSource = ObjBancos.DtResultados
|
GvCompras.DataSource = ObjBancos.DtResultados
|
||||||
'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("GananciaPerdida = 'PERDIDA' AND TipoRow = 2")
|
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0 ")
|
||||||
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("GananciaPerdida = 'GANANCIA' AND TipoRow = 2")
|
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")
|
||||||
@@ -84,6 +84,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
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
|
||||||
|
LblComprasPerdidaGanancia.Text = If(Final > 0, "Ganancia", "Pérdida")
|
||||||
|
|
||||||
LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
Else
|
Else
|
||||||
@@ -107,8 +108,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
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", "Fluctuacion < 0").Abs
|
||||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion")
|
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion", "Fluctuacion > 0")
|
||||||
|
|
||||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||||
|
|
||||||
@@ -250,10 +251,12 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
CveConceptoContable = 64
|
CveConceptoContable = 64
|
||||||
CveCuenta = CveCuentaGanancia
|
CveCuenta = CveCuentaGanancia
|
||||||
idCta = IdCtaGanancia
|
idCta = IdCtaGanancia
|
||||||
|
TipoMovto = True
|
||||||
Else
|
Else
|
||||||
CveConceptoContable = 65
|
CveConceptoContable = 65
|
||||||
CveCuenta = CveCuentaPerdida
|
CveCuenta = CveCuentaPerdida
|
||||||
idCta = idCtaPerdida
|
idCta = idCtaPerdida
|
||||||
|
TipoMovto = False
|
||||||
End If
|
End If
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
@@ -267,7 +270,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
|
|
||||||
'movimiento de complementaria
|
'movimiento de complementaria
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), 201, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 201, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -275,7 +278,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
Alert("La Fluctuación se ha generado", 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()
|
||||||
End If
|
End If
|
||||||
@@ -308,7 +312,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
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 = 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
|
||||||
@@ -327,7 +331,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
'saco las cuentas de pérdida y ganancia
|
'saco las cuentas de pérdida y ganancia
|
||||||
For Each gvr As GridViewRow In GvVentas.Rows
|
For Each gvr As GridViewRow In GvVentas.Rows
|
||||||
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
Total = -gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
|
|
||||||
If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then
|
If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then
|
||||||
CveConconceptoCliente = 226
|
CveConconceptoCliente = 226
|
||||||
@@ -336,7 +340,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'movimiento de complementaria
|
'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, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, 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, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -344,7 +348,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
Alert("La Fluctuación se ha generado", 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()
|
||||||
End If
|
End If
|
||||||
@@ -432,7 +437,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
If Not ErrorRegistrar And SeContabilizo Then
|
If Not ErrorRegistrar And SeContabilizo Then
|
||||||
|
|
||||||
Conta.Commit()
|
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)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
CargaDatosCuentas()
|
CargaDatosCuentas()
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
@@ -624,8 +629,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Dim idCtaPerdida, IdCtaGanancia As Integer
|
Dim idCtaPerdida, IdCtaGanancia As Integer
|
||||||
Dim TipoMovto As Boolean = False
|
Dim TipoMovto As Boolean = False
|
||||||
Dim CveConceptoContable As Integer = 0
|
Dim CveConceptoContable As Integer = 0
|
||||||
Dim CveCuentaComplementaria As Integer = 0
|
Dim CveCuentaComplementaria As Integer = 55206
|
||||||
Dim IdCtaComplementaria As Integer = 0
|
Dim IdCtaComplementaria As Integer = 1081
|
||||||
Dim ErrorRegistrar As Boolean = False
|
Dim ErrorRegistrar As Boolean = False
|
||||||
|
|
||||||
CveCuentaPerdida = 0 '55379
|
CveCuentaPerdida = 0 '55379
|
||||||
@@ -640,10 +645,12 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
CveConceptoContable = 64
|
CveConceptoContable = 64
|
||||||
CveCuenta = CveCuentaGanancia
|
CveCuenta = CveCuentaGanancia
|
||||||
idCta = IdCtaGanancia
|
idCta = IdCtaGanancia
|
||||||
|
TipoMovto = True
|
||||||
Else
|
Else
|
||||||
CveConceptoContable = 65
|
CveConceptoContable = 65
|
||||||
CveCuenta = CveCuentaPerdida
|
CveCuenta = CveCuentaPerdida
|
||||||
idCta = idCtaPerdida
|
idCta = idCtaPerdida
|
||||||
|
TipoMovto = False
|
||||||
End If
|
End If
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
@@ -657,7 +664,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
|
|
||||||
'movimiento de complementaria
|
'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, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
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
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Partial Class Bancos_RepCxCCliente
|
|||||||
'DdlSubProyecto.SelectedValueExist(UsuarioActual.CveSucursal.ToString)
|
'DdlSubProyecto.SelectedValueExist(UsuarioActual.CveSucursal.ToString)
|
||||||
'[IPP] 8 Enero 2018 - Se quito por que sera reemplazado al cargar solo los subproyectos del usuario
|
'[IPP] 8 Enero 2018 - Se quito por que sera reemplazado al cargar solo los subproyectos del usuario
|
||||||
'If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyecto.Enabled = False
|
'If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyecto.Enabled = False
|
||||||
|
If UsuarioActual.Sesion("CobroCliente-Sucursal").ToString <> "" Then DdlSubProyecto.SelectedValueExist(UsuarioActual.Sesion("CobroCliente-Sucursal").ToString.Trim)
|
||||||
|
|
||||||
|
|
||||||
InicializaPersonalizarColumnas()
|
InicializaPersonalizarColumnas()
|
||||||
@@ -57,6 +58,7 @@ Partial Class Bancos_RepCxCCliente
|
|||||||
If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||||
GvCxC.DataSource = Mov.DtResultados
|
GvCxC.DataSource = Mov.DtResultados
|
||||||
End If
|
End If
|
||||||
|
UsuarioActual.Sesion("CobroCliente-Sucursal") = DdlSubProyecto.SelectedValue
|
||||||
|
|
||||||
Mov.Dispose()
|
Mov.Dispose()
|
||||||
GvCxC.DataBind()
|
GvCxC.DataBind()
|
||||||
|
|||||||
@@ -89,11 +89,17 @@ Partial Class Inventarios_Default
|
|||||||
|
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
LtPs.Text = $"Producto: <b>{dr("PSCodigo").ToString}</b>"
|
LtPs.Text = $"Producto: <b>{dr("PSCodigo").ToString}</b>"
|
||||||
|
Dim CvePrecioLista As Integer = -1
|
||||||
|
If Not UsuarioActual.Empresa.Funcionalidad(404).ToString = "1" Then 'sino manneja precios de lista
|
||||||
|
CvePrecioLista = -2
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjVta As New ClsVentas
|
Dim ObjVta As New ClsVentas
|
||||||
Dim objPS As New ClsProductosServicios
|
Dim objPS As New ClsProductosServicios
|
||||||
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||||
If ObjVta.DtResultados.Rows.Count > 0 Then
|
If ObjVta.DtResultados.Rows.Count > 0 Then
|
||||||
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, ObjVta.DtResultados.Rows(0)("CvePrecioLista").ToString.ToEntero, -1, DDlPS.SelectedValue.ToEntero) Then
|
If CvePrecioLista = -1 Then CvePrecioLista = ObjVta.DtResultados.Rows(0)("CvePrecioLista").ToString.ToEntero
|
||||||
|
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, -1, DDlPS.SelectedValue.ToEntero) Then
|
||||||
If objPS.DtResultados.Rows.Count > 0 Then
|
If objPS.DtResultados.Rows.Count > 0 Then
|
||||||
LtPrecioPS.Text = $"Precio de venta: <b>$: {objPS.DtResultados.Rows(0)("PrecioLista").ToString.FormatoNumero} {dr("Abreviatura").ToString}</b>"
|
LtPrecioPS.Text = $"Precio de venta: <b>$: {objPS.DtResultados.Rows(0)("PrecioLista").ToString.FormatoNumero} {dr("Abreviatura").ToString}</b>"
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -2152,7 +2152,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ObjConta.Commit()
|
ObjConta.Commit()
|
||||||
CargaDatos(CveMonedaFiltro)
|
CargaDatos(CveMonedaFiltro)
|
||||||
RegistraScript("$('#ModalSaldarCuentaIncobrable').modal('hide')")
|
RegistraScript("$('#ModalSaldarCuentaIncobrable').modal('hide')")
|
||||||
Alert("Los movimientos se saldaron correctamente.")
|
Alert(String.Format("Los movimientos se saldaron correctamente. <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjConta.RollBack()
|
ObjConta.RollBack()
|
||||||
Alert(MsgError, TipoMensaje.MsgError)
|
Alert(MsgError, TipoMensaje.MsgError)
|
||||||
|
|||||||
Reference in New Issue
Block a user