Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1792,7 +1792,7 @@ Namespace Modelos
|
|||||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas, TipoDocto As String) As Boolean
|
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas, TipoDocto As String) As Boolean
|
||||||
Dim Resultado As Boolean = True
|
Dim Resultado As Boolean = True
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso TipoDocto.Contiene("Ing", "Ant") Then
|
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
||||||
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
||||||
|
|
||||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
||||||
|
|||||||
@@ -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>--%>
|
||||||
@@ -280,7 +281,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="LblVentasPerdidaGanancia" runat="server" Text=""></asp:Label></h4>
|
||||||
<div class="widget-thumb-wrap">
|
<div class="widget-thumb-wrap">
|
||||||
<i id="IImagenFinalVentas" runat="server" class=""></i>
|
<i id="IImagenFinalVentas" runat="server" class=""></i>
|
||||||
<div class="widget-thumb-body">
|
<div class="widget-thumb-body">
|
||||||
@@ -313,8 +314,9 @@
|
|||||||
<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" />
|
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia TC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N4}" />
|
||||||
<asp:BoundField DataField="Fluctuacion" 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" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<asp:Label ID="LblTotalVentas" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblTotalVentas" runat="server" Text=""></asp:Label>
|
||||||
@@ -363,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" />
|
||||||
@@ -385,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
|
||||||
|
|
||||||
@@ -117,6 +118,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
LtIndicador_PerdidasVentas.Text = PerdidaAux.ToString.FormatoNumero
|
LtIndicador_PerdidasVentas.Text = PerdidaAux.ToString.FormatoNumero
|
||||||
LtIndicador_GanaciaVentas.Text = GanaciaAux.ToString.FormatoNumero
|
LtIndicador_GanaciaVentas.Text = GanaciaAux.ToString.FormatoNumero
|
||||||
LtIndicador_FinalVentas.Text = Final.ToString.FormatoNumero
|
LtIndicador_FinalVentas.Text = Final.ToString.FormatoNumero
|
||||||
|
LblVentasPerdidaGanancia.Text = If(Final < 0, "Pérdida", "Ganancia")
|
||||||
|
|
||||||
LblTotalVentas.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
LblTotalVentas.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||||
|
|
||||||
@@ -249,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
|
||||||
@@ -266,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
|
||||||
@@ -274,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
|
||||||
@@ -307,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
|
||||||
@@ -326,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
|
||||||
@@ -335,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
|
||||||
@@ -343,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
|
||||||
@@ -431,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()
|
||||||
@@ -623,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
|
||||||
@@ -639,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
|
||||||
@@ -656,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()
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
||||||
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
'AGREGO PREPOLIZA IE BANCOS
|
'AGREGO PREPOLIZA IE BANCOS
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
|
||||||
MsgError = "Error al registrar detalle de concepto bancario"
|
MsgError = "Error al registrar detalle de concepto bancario"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -314,7 +314,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GVPendientes" runat="server" DataKeyNames="CveVenta" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="200" data-freezerows="1" GridLines="None">
|
<asp:GridView ID="GVPendientes" runat="server" DataKeyNames="CveVenta,NombreComercial" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="200" data-freezerows="1" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Serie-Folio" ItemStyle-Width="20%">
|
<asp:TemplateField HeaderText="Serie-Folio" ItemStyle-Width="20%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -1010,7 +1010,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
If DdlClientes.SelectedValue.ToEntero <= 0 Then
|
If DdlClientes.SelectedValue.ToEntero <= 0 Then
|
||||||
Alert("No se ha especificado el cliente", TipoMensaje.MsgError)
|
Alert("No se ha especificado el cliente", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -1934,6 +1933,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
If ObjVentas.GetVenta(CveRemisionRecibida, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.GetVenta(CveRemisionRecibida, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
EsDistribuidor = CBool(ObjVentas.DtResultados.Rows(0)("EsDistribuidor").ToString())
|
EsDistribuidor = CBool(ObjVentas.DtResultados.Rows(0)("EsDistribuidor").ToString())
|
||||||
CveCliente = ObjVentas.DtResultados.Rows(0)("CveCliente").ToString().ToEntero()
|
CveCliente = ObjVentas.DtResultados.Rows(0)("CveCliente").ToString().ToEntero()
|
||||||
|
|
||||||
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCliente = {0}", CveCliente))
|
||||||
|
DdlClientes.DataBind()
|
||||||
|
DdlClientes.SelectedValueExist(CveCliente)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI ES DISTRIBUIDOR VAMOS A GENERAR LA REMISION DE NOTA DE CREDITO
|
'SI ES DISTRIBUIDOR VAMOS A GENERAR LA REMISION DE NOTA DE CREDITO
|
||||||
@@ -1959,10 +1962,9 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
DivTotal.Visible = True
|
DivTotal.Visible = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
DivCliente.Visible = False
|
'DivCliente.Visible = False
|
||||||
'DivFactura.Visible = False
|
'DivFactura.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
||||||
DtUsados = ObjVentas.DtResultados.Copy()
|
DtUsados = ObjVentas.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
@@ -2646,7 +2648,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Dim ObjAcum As New ClsAcumuladores
|
Dim ObjAcum As New ClsAcumuladores
|
||||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100.0).FormatoNumero
|
||||||
|
|
||||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
|
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -568,8 +568,8 @@
|
|||||||
<label for="<%= DdlIEPSPorcentaje.ClientID.ToString()%>">IEPS Porcentaje:</label>
|
<label for="<%= DdlIEPSPorcentaje.ClientID.ToString()%>">IEPS Porcentaje:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright" title="Esta retención tendrá efecto en la facturación siempre y cuando el cliente al cual se facturará tenga activada la opción de Retiene 6% de iva por servicio">
|
||||||
<label>Es OutSourcing </label>
|
<label>Retiene 6% de IVA por Servicios</label>
|
||||||
<asp:CheckBox ID="ChkEsOutSourcing" CssClass="make-switchsd" data-size="small" runat="server" Checked="False" />
|
<asp:CheckBox ID="ChkEsOutSourcing" CssClass="make-switchsd" data-size="small" runat="server" Checked="False" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4701,7 +4701,12 @@ Partial Class Ventas
|
|||||||
LblTelefono.Text = ObjCliente.Telefono
|
LblTelefono.Text = ObjCliente.Telefono
|
||||||
LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5)
|
LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5)
|
||||||
LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5)
|
LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5)
|
||||||
If UsuarioActual.Empresa.MostrarRetISR AndAlso ObjCliente.RetISR > 0 Then TrRetISR.Style.Add("display", "none")
|
If UsuarioActual.Empresa.MostrarRetISR AndAlso ObjCliente.RetISR > 0 Then
|
||||||
|
' TrRetISR.Style.Add("display", "none")
|
||||||
|
TrRetISR.Visible = True
|
||||||
|
Else
|
||||||
|
TrRetISR.Visible = False
|
||||||
|
End If
|
||||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||||
|
|
||||||
@@ -5935,7 +5940,7 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||||
ClienteRetIVA = 0.0D
|
ClienteRetIVA = 0.0D
|
||||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||||
ClienteRetIVA = 0.1D
|
ClienteRetIVA = 0.106667D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||||
ClienteRetIVA = 0.04D
|
ClienteRetIVA = 0.04D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then
|
||||||
@@ -6908,7 +6913,8 @@ Partial Class Ventas
|
|||||||
'ENVIAR POLIZA VIRTUAL
|
'ENVIAR POLIZA VIRTUAL
|
||||||
If ErrorList.Count = 0 Then
|
If ErrorList.Count = 0 Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
|
||||||
GeneraPolizaVentaWS(ObjFactura)
|
Dim TipoPoliza As Integer = 1
|
||||||
|
GeneraPolizaVentaWS(ObjFactura, TipoPoliza)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -14255,7 +14261,7 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||||
ClienteRetIVA = 0.0D
|
ClienteRetIVA = 0.0D
|
||||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||||
ClienteRetIVA = 0.1D
|
ClienteRetIVA = 0.106667D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||||
ClienteRetIVA = 0.04D
|
ClienteRetIVA = 0.04D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(DrPS("EsOutSourcing").ToString()) Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(DrPS("EsOutSourcing").ToString()) Then
|
||||||
@@ -15472,7 +15478,7 @@ Partial Class Ventas
|
|||||||
If ConSalida AndAlso Not OcurrioError Then
|
If ConSalida AndAlso Not OcurrioError Then
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
|
OcurrioError = GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
@@ -15739,30 +15745,40 @@ Partial Class Ventas
|
|||||||
Try
|
Try
|
||||||
Dim CveMovimientoVirtual As Integer = -1
|
Dim CveMovimientoVirtual As Integer = -1
|
||||||
Dim CveAlmacenVirtual As Integer = -1
|
Dim CveAlmacenVirtual As Integer = -1
|
||||||
Dim CveConceptoMovimientoVirtual As Integer = 3
|
Dim CveConceptoMovimientoVirtual As Integer = 36
|
||||||
Dim DtPSVirtual As DataTable = Nothing
|
Dim DtPSVirtual As DataTable = Nothing
|
||||||
Dim DtTamanios As DataTable = Nothing
|
Dim DtTamanios As DataTable = Nothing
|
||||||
Dim CveMovimientoEntradaDev As Integer = -1
|
Dim CveMovimientoEntradaDev As Integer = -1
|
||||||
|
|
||||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND CveTipoAlmacen = 24 AND CveConcepto = 2 AND CveVenta > 0")
|
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 1 AND CveConcepto = 8)) AND CveVenta > 0")
|
||||||
|
|
||||||
|
If RowMovimiento IsNot Nothing Then
|
||||||
|
CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||||
|
CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||||
|
Else
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
|
||||||
CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
|
||||||
CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||||
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
|
||||||
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
||||||
|
'If ObjInventario.GetMovimientosDetalle(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||||
|
' DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||||
|
'Else
|
||||||
|
' OcurrioError = True
|
||||||
|
'End If
|
||||||
|
|
||||||
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||||
|
|
||||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/V")
|
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/V", CveMovimientoRelacionado:=CveMovimientoEntradaDev)
|
||||||
|
|
||||||
If CveMovimientoVirtual > 0 Then
|
If CveMovimientoVirtual > 0 Then
|
||||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||||
@@ -15787,7 +15803,7 @@ Partial Class Ventas
|
|||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Not OcurrioError
|
Return OcurrioError
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
Private Function SalidaAlmacenMateriales(ByRef ObjInventario As ClsInventarios, CveOS As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
Private Function SalidaAlmacenMateriales(ByRef ObjInventario As ClsInventarios, CveOS As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||||
@@ -23921,22 +23937,23 @@ Partial Class Ventas
|
|||||||
GvCodigosUnicos.DataBind()
|
GvCodigosUnicos.DataBind()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura, TipoPoliza As Integer)
|
||||||
|
'TipoPoliza: 01 Venta, 02 Ajuste, 03 Garantía
|
||||||
Try
|
Try
|
||||||
For Each Row As GridViewRow In GvCodigosUnicos.Rows
|
For Each Row As GridViewRow In GvCodigosUnicos.Rows
|
||||||
If Row.RowType = DataControlRowType.DataRow Then
|
If Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim obj As New Modelos.MPolizaVentaWS
|
Dim obj As New Modelos.MPolizaVentaWS
|
||||||
'DATOS DEL CLIENTE
|
'DATOS DEL CLIENTE
|
||||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||||
obj.customer_last_name1 = ""
|
obj.customer_last_name1 = "."
|
||||||
obj.customer_last_name2 = ""
|
obj.customer_last_name2 = ""
|
||||||
obj.customer_birthday = Nothing
|
obj.customer_birthday = Nothing
|
||||||
obj.customer_phone = ObjFactura.Cliente.Telefono
|
obj.customer_phone = ObjFactura.Cliente.Telefono
|
||||||
obj.customer_email = ObjFactura.Cliente.Mail
|
obj.customer_email = ObjFactura.Cliente.Mail
|
||||||
obj.customer_gender = "03" 'OTRO GENERO
|
obj.customer_gender = "03" 'OTRO GENERO
|
||||||
obj.customer_advertising = False
|
obj.customer_advertising = False
|
||||||
obj.customer_car_brand = "00"
|
obj.customer_car_brand = "01"
|
||||||
obj.customer_car_model = "00"
|
obj.customer_car_model = "01"
|
||||||
obj.customer_car_year = ObjFactura.Fecha.Year
|
obj.customer_car_year = ObjFactura.Fecha.Year
|
||||||
|
|
||||||
'DATOS DE VENTA
|
'DATOS DE VENTA
|
||||||
@@ -23946,12 +23963,12 @@ Partial Class Ventas
|
|||||||
obj.sale_type_service = "02" 'COMERCIAL
|
obj.sale_type_service = "02" 'COMERCIAL
|
||||||
obj.sale_total = ObjFactura.Total
|
obj.sale_total = ObjFactura.Total
|
||||||
obj.sale_discount = ObjFactura.Descuento
|
obj.sale_discount = ObjFactura.Descuento
|
||||||
obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta)
|
obj.sale_id = ObjFactura.CveVenta.ToString
|
||||||
|
|
||||||
'DATOS DEL PRODUCTO
|
'DATOS DEL PRODUCTO
|
||||||
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString()
|
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString()
|
||||||
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text 'se indique el código único de la batería. (SERIE LOTE)
|
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text 'se indique el código único de la batería. (SERIE LOTE)
|
||||||
obj.product_sale_type = "01 " 'VENTA
|
obj.product_sale_type = "0" & TipoPoliza 'VENTA
|
||||||
|
|
||||||
Dim FechaUsado As DateTime = Row.DataKey("FechaAjuste").ToString().ToDateTime()
|
Dim FechaUsado As DateTime = Row.DataKey("FechaAjuste").ToString().ToDateTime()
|
||||||
|
|
||||||
@@ -24052,7 +24069,7 @@ Partial Class Ventas
|
|||||||
For Each RowServicio As DataRow In TmpDT.Rows
|
For Each RowServicio As DataRow In TmpDT.Rows
|
||||||
Dim ClienteRetIVA = 0.0D
|
Dim ClienteRetIVA = 0.0D
|
||||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||||
ClienteRetIVA = 0.1D
|
ClienteRetIVA = 0.106667D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||||
ClienteRetIVA = 0.04D
|
ClienteRetIVA = 0.04D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
||||||
|
|||||||
Reference in New Issue
Block a user