This commit is contained in:
2024-06-26 06:40:49 -07:00
15 changed files with 796 additions and 431 deletions

View File

@@ -609,7 +609,8 @@ Public Class ClsMovimientos
'CveAplicaNC 'CveAplicaNC
Public Function GetCxPProveedor(CveProveedor As Integer, FechaI As String, FechaF As String, CveUsuarioProgramo As Integer, CveUsuarioRegistro As Integer, Public Function GetCxPProveedor(CveProveedor As Integer, FechaI As String, FechaF As String, CveUsuarioProgramo As Integer, CveUsuarioRegistro As Integer,
CveUsuarioResponsable As Integer, CveClasificacionProveedor As Integer, CveMoneda As Integer, CveEstatus As Integer, CveProveedorSucursal As Integer, CveAplicaNC As Integer, CveUsuarioResponsable As Integer, CveClasificacionProveedor As Integer, CveMoneda As Integer, CveEstatus As Integer, CveProveedorSucursal As Integer, CveAplicaNC As Integer,
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Opcion As Integer = 1,
Optional CveEmpresa As Integer = -1, Optional SaldoMayorA As Decimal = -999999999999, Optional SaldoMenorA As Decimal = 999999999999) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ProveedorCxP") DataAdapter("PA_Comp_ProveedorCxP")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -628,7 +629,10 @@ Public Class ClsMovimientos
.Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF .Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF
.Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion .Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion
.Add("@CveSubProyecto", SqlDbType.SmallInt).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.SmallInt).Value = CveSubProyecto
.Add("@Opcion", SqlDbType.SmallInt).Value = Opcion
.Add("@CveEmpresaOp", SqlDbType.SmallInt).Value = CveEmpresa
.Add("@SaldoMayorA", SqlDbType.Money).Value = SaldoMayorA
.Add("@SaldoMenorA", SqlDbType.Money).Value = SaldoMenorA
End With End With

View File

@@ -416,7 +416,7 @@ Partial Class Bancos_DepositosCaja
Next Next
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/> ", StrEncript, "Depósito Bancario") documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, "Depósito Bancario")
@@ -430,7 +430,11 @@ Partial Class Bancos_DepositosCaja
End If End If
If Not OcurrioError Then If Not OcurrioError Then
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza) documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/> ", NuevaCvePrePoliza)
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
Dim ParametrosPrePoliza As String = Encripta($"OP=PREPO&CvePrePoliza={NuevaCvePrePoliza}")
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/> ", ParametrosPrePoliza, "PrePoliza")
End If
End If End If
Catch ex As Exception Catch ex As Exception

View File

@@ -17096,7 +17096,7 @@ Partial Class Compras_Compras
Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal
'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then 'If UsuarioActual.Empresa.Funcionalidad(532).Contiene( "1","2") Then
' Dim ObjCon As New ClsContratos ' Dim ObjCon As New ClsContratos
' Dim CvePresupuesto As Integer = 0 ' Dim CvePresupuesto As Integer = 0
' Dim Autorizado As Double = 0 ' Dim Autorizado As Double = 0
@@ -20760,7 +20760,7 @@ Partial Class Compras_Compras
Dim respuesta As Boolean = False Dim respuesta As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
If Opcion = 1 Or OCVinculada Or DdlTipoComprobante.SelectedValue <> "Fac" Then If Opcion = 1 Or OCVinculada Or DdlTipoComprobante.SelectedValue <> "Fac" Then
Return True Return True

View File

@@ -253,14 +253,33 @@ public partial class Contabilidad_RepIVA : ClsPaginas
if (Archivo.Exists) if (Archivo.Exists)
{ {
Ruta = string.Format("{0}Formatos\\{1}", UsuarioActual.Empresa.Ruta, Formato); Ruta = string.Format("{0}Formatos\\{1}", UsuarioActual.Empresa.Ruta, Formato);
ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); //ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1)
{
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
else
{
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
}else }else
{ {
Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}"; Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}";
//ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1)
{
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
else
{
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); //ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
}
} }

View File

@@ -603,10 +603,20 @@ Partial Class Contratos_RepPresupuestos
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
params.Add(New ReportParameter("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}")) params.Add(New ReportParameter("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}"))
params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero()))
params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero()))
params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero())) params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero()))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
If UsuarioActual.Empresa.Funcionalidad(532) = "2" Then
Dim DrPresupuesto = DtPresupuestos.FiltroPrimero("Tipo = 0 AND CveAgrupador IS NULL")
Dim Comprometido = DrPresupuesto("Comprometido").ToString.ToDecimal
params.Add(New ReportParameter("Ejercido", Comprometido.ToString.FormatoNumero()))
Else
params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero()))
End If
params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532))) params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532)))

Binary file not shown.

Binary file not shown.

View File

@@ -25,6 +25,10 @@
<DataField>Autorizado</DataField> <DataField>Autorizado</DataField>
<rd:TypeName>System.Double</rd:TypeName> <rd:TypeName>System.Double</rd:TypeName>
</Field> </Field>
<Field Name="Comprometido">
<DataField>Comprometido</DataField>
<rd:TypeName>System.Double</rd:TypeName>
</Field>
<Field Name="Ejercido"> <Field Name="Ejercido">
<DataField>Ejercido</DataField> <DataField>Ejercido</DataField>
<rd:TypeName>System.Double</rd:TypeName> <rd:TypeName>System.Double</rd:TypeName>
@@ -245,7 +249,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>= IIF( Parameters!PresupuestoRestrictivo.Value = "2", IIF(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value),IIF(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value))</Value> <Value>= IIF( Parameters!PresupuestoRestrictivo.Value = "2", iif(CDec(Fields!Comprometido.Value)=0,"-",Fields!Comprometido.Value), iif(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value))</Value>
<Style> <Style>
<Format>#,0.00</Format> <Format>#,0.00</Format>
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color> <Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>

View File

@@ -147,7 +147,7 @@
<ajax:TabContainer runat="server" ID="Tabs"> <ajax:TabContainer runat="server" ID="Tabs">
<ajax:TabPanel ID="TabIXC" runat="server" HeaderText="IXC" ClientIDMode="Static" OnClientClick="" > <ajax:TabPanel ID="TabIXC" runat="server" HeaderText="IXC" ClientIDMode="Static" OnClientClick="onClickTabs">
<ContentTemplate> <ContentTemplate>
@@ -195,7 +195,7 @@
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TabNCEXC" runat="server" HeaderText="NC-EXC" ClientIDMode="Static"> <ajax:TabPanel ID="TabNCEXC" runat="server" HeaderText="NC-EXC" ClientIDMode="Static" OnClientClick="onClickTabs">
<ContentTemplate> <ContentTemplate>
@@ -245,7 +245,7 @@
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TabVentas" runat="server" HeaderText="Ventas" ClientIDMode="Static"> <ajax:TabPanel ID="TabVentas" runat="server" HeaderText="Ventas" ClientIDMode="Static" OnClientClick="onClickTabs">
<ContentTemplate> <ContentTemplate>
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left"> <div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
@@ -315,7 +315,7 @@
Moneda Moneda
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda" ) %>'></asp:Literal> <asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -351,10 +351,99 @@
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TabCompras" runat="server" HeaderText="Compras" ClientIDMode="Static"> <ajax:TabPanel ID="TabCompras" runat="server" HeaderText="Compras" ClientIDMode="Static" OnClientClick="onClickTabs" >
<ContentTemplate> <ContentTemplate>
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
<div class="col-md-6">
<input type="text" id="TxtBusquedaCompras" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCompras','{0}')", GvCxP.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCompras','{0}')", GvCxP.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<div class="row">
<div class="col-md-6">
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Total,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,CveProveedor,TipoCambio,TipoCambioOriginal, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion,NoDeducible"
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<Columns>
<%-- 0 --%>
<asp:TemplateField>
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="Chk" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<%-- 1 --%>
<asp:TemplateField ItemStyle-Width="115px" ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>Factura</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
Tipo<br>
Docto
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlTipoDocto" runat="server" Text='<%# Eval("TipoDocto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>Proveedor</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlRazonsocial" runat="server" Text='<%# Eval("RazonSocial") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 5 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Fecha Compra</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 5 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>Moneda</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 8 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>Monto Compra</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<%-- 10 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
@@ -406,13 +495,19 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<div style="display:none"> <div style="display:none">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button runat="server" ID="BtnonClickTabs" OnClick="BtnonClickTabs_Click" ClientIDMode="Static" /> <asp:Button runat="server" ID="BtnonClickTabs" OnClick="BtnonClickTabs_Click" ClientIDMode="Static" />
</ContentTemplate>
</asp:UpdatePanel>
</div> </div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script> <script>
function onClickTabs() {
function onClickTabs(sender, args) {
$('#BtnonClickTabs').click(); $('#BtnonClickTabs').click();
} }
</script> </script>

View File

@@ -36,6 +36,15 @@ Partial Public Class General_SaldosMenores
End Set End Set
End Property End Property
Private Property DtDatosCompras As DataTable
Get
Return DirectCast(ViewState("DtDatosCompras"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtDatosCompras") = value
End Set
End Property
Private Property Tipo As Integer Private Property Tipo As Integer
Get Get
Return DirectCast(ViewState("Tipo"), Integer) Return DirectCast(ViewState("Tipo"), Integer)
@@ -45,32 +54,32 @@ Partial Public Class General_SaldosMenores
End Set End Set
End Property End Property
Private Property CveMoneda As Integer 'Private Property CveMoneda As Integer
Get ' Get
Return DirectCast(ViewState("CveMoneda"), Integer) ' Return DirectCast(ViewState("CveMoneda"), Integer)
End Get ' End Get
Set(value As Integer) ' Set(value As Integer)
ViewState("CveMoneda") = value ' ViewState("CveMoneda") = value
End Set ' End Set
End Property 'End Property
Private Property TCEspecifico As Double 'Private Property TCEspecifico As Double
Get ' Get
Return DirectCast(ViewState("TCEspecifico"), Double) ' Return DirectCast(ViewState("TCEspecifico"), Double)
End Get ' End Get
Set(value As Double) ' Set(value As Double)
ViewState("TCEspecifico") = value ' ViewState("TCEspecifico") = value
End Set ' End Set
End Property 'End Property
Private Property TipoCambio As Integer 'Private Property TipoCambio As Integer
Get ' Get
Return DirectCast(ViewState("TipoCambio"), Integer) ' Return DirectCast(ViewState("TipoCambio"), Integer)
End Get ' End Get
Set(value As Integer) ' Set(value As Integer)
ViewState("TipoCambio") = value ' ViewState("TipoCambio") = value
End Set ' End Set
End Property 'End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -79,7 +88,23 @@ Partial Public Class General_SaldosMenores
End If End If
End Sub End Sub
Protected Sub BtnonClickTabs_Click(sender As Object, e As EventArgs) Protected Sub BtnonClickTabs_Click(sender As Object, e As EventArgs)
Consultar() 'Consultar()
GvDatosIXC.DataSource = Nothing
GvCxC.DataSource = Nothing
GvCxP.DataSource = Nothing
GvDatosIXC.DataBind()
GvCxC.DataBind()
GvCxP.DataBind()
DvSaldar.Visible = False
Upsaldar.Update()
UpDatos.Update()
UpDatosNCEXC.Update()
UPVentas.Update()
UPCompras.Update()
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) Handles BtnConsultar.Click
Consultar() Consultar()
@@ -92,6 +117,7 @@ Partial Public Class General_SaldosMenores
DtDatosIXC = New DataTable DtDatosIXC = New DataTable
DtDatosNCEXC = New DataTable DtDatosNCEXC = New DataTable
DtDatosVentas = New DataTable DtDatosVentas = New DataTable
DtDatosCompras = New DataTable
DvSubProyectoSaldar1.Visible = False DvSubProyectoSaldar1.Visible = False
DvSubProyectoSaldar2.Visible = False DvSubProyectoSaldar2.Visible = False
@@ -117,12 +143,153 @@ Partial Public Class General_SaldosMenores
End If End If
End If End If
If Tabs.ActiveTab Is TabCompras Then
CargaDatosCompras()
If DtDatosCompras.Rows.Count > 0 Then
DvSaldar.Visible = True
End If
End If
Upsaldar.Update() Upsaldar.Update()
End Sub End Sub
Protected Sub BtnSaldar_Click(sender As Object, e As EventArgs) Protected Sub BtnSaldar_Click(sender As Object, e As EventArgs)
If Tabs.ActiveTab Is TabIXC Then If Tabs.ActiveTab Is TabIXC Then
SaldarIXC()
End If
If Tabs.ActiveTab Is TabVentas Then
SaldarVentas()
End If
If Tabs.ActiveTab Is TabCompras Then
SaldarCompras()
End If
Upsaldar.Update()
End Sub
Protected Sub CargaSucursales()
DdlSubProyectoSaldar.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
DdlSubProyectoSaldar.DataBind()
End Sub
#Region "I X C"
Protected Sub InicializaDatos()
txtFechaI.Text = $"01/01/{Now.Year}"
txtFechaF.Text = DateTime.Today.ToString()
TxtFecha.Text = DateTime.Today.ToString()
TxtSaldoMayorA.Text = "0"
TxtSaldoMenorA.Text = "1000"
CargaSucursales()
'
Tipo = -1
End Sub
Protected Sub CargaDatosIXC()
Dim FechaICorte As DateTime = MinFecha
Dim FechaFCorte As DateTime = MaxFecha
Dim ObjVenta As New ClsVentas()
Dim CveCliente As Integer = -1
If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, -1, FechaICorte, FechaFCorte, -1, -1,
SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
GvDatosIXC.DataSource = ObjVenta.DtResultados
DtDatosIXC = ObjVenta.DtResultados
End If
ObjVenta.Dispose()
GvDatosIXC.DataBind()
UpDatos.Update()
End Sub
Protected Sub GvDatosIXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosIXC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
Dim Liga As String = ""
If e.Row.DataKey("Tipo").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales3"
e.Row.Cells(2).Text = e.Row.DBCampo("Moneda").ToString()
ElseIf e.Row.DataKey("CveCliente").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales2"
Select Case e.Row.DataKey("Tipo").ToEntero()
Case 1
e.Row.Cells(2).Text = "Anticipos"
Case 2
e.Row.Cells(2).Text = "NC X Aplicar"
Case 3
e.Row.Cells(2).Text = "Ingresos X Comprobar"
End Select
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() < 1 AndAlso e.Row.DataKey("CveIE").ToEntero() < 1 Then
e.Row.CssClass = "Totales"
e.Row.Cells(2).Text = e.Row.DataKey("NombreComercial")
e.Row.Cells(7).Text = ""
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() > 0 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
'If DdlTipo.SelectedValue.ToEntero() = 1 Then
' e.Row.Cells(4).Text = "$" & e.Row.DataKey("SubTotal").FormatoNumero()
'ElseIf DdlTipo.SelectedValue.ToEntero() = 2 Then
' e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero()
'End If
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVenta")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
ElseIf e.Row.DataKey("CveIE").ToEntero() > 0 AndAlso e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero()
Liga = $"/Bancos/IE.aspx?&CveIE={e.Row.DataKey("CveIE")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
Else
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolioAmortizacion")
e.Row.Cells(3).Text = e.Row.DataKey("FechaAmortizacion").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(5).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(6).Text = "$" & e.Row.DataKey("SaldoAcumulativo").FormatoNumero()
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVentaAmortizacion")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
End If
If (e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse e.Row.DataKey("CveIE").ToEntero() > 0) AndAlso (e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then
e.Row.FCCheckBox("Chk").Visible = True
End If
End If
End Sub
Protected Sub SaldarIXC()
Dim ObjConta As New ClsContabilidad() Dim ObjConta As New ClsContabilidad()
ObjConta.IniciaTransacSQL() ObjConta.IniciaTransacSQL()
Dim CvePrePoliza As Integer = 0, CveVenta As Integer = -1, CveIE As Integer = -1 Dim CvePrePoliza As Integer = 0, CveVenta As Integer = -1, CveIE As Integer = -1
@@ -131,7 +298,7 @@ Partial Public Class General_SaldosMenores
Dim ImporteTotalGasto As Decimal = 0 Dim ImporteTotalGasto As Decimal = 0
Dim MsgError As String = "" Dim MsgError As String = ""
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) CvePrePoliza = ObjConta.AddPrePolizas("SaldosMenores/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3)
Dim tMovto As Boolean = True Dim tMovto As Boolean = True
Dim tConceptoSaldar As Integer = 78 Dim tConceptoSaldar As Integer = 78
@@ -206,12 +373,150 @@ Partial Public Class General_SaldosMenores
CargaDatosIXC() CargaDatosIXC()
ObjConta.Dispose() ObjConta.Dispose()
End Sub
#End Region
#Region "N C E X C"
'/Compras/RepAnt-NC-EXCDetalle.aspx
Protected Sub CargaDatosNCEXC()
Dim FechaICorte As DateTime = MinFecha
Dim FechaFCorte As DateTime = MaxFecha
Dim ObjVenta As New ClsVentas()
Dim CveCliente As Integer = -1
If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, -1, FechaICorte, FechaFCorte, -1, -1,
SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
GvDatosNCEXC.DataSource = ObjVenta.DtResultados
DtDatosNCEXC = ObjVenta.DtResultados
End If
ObjVenta.Dispose()
GvDatosIXC.DataBind()
UpDatos.Update()
End Sub
Protected Sub GvDatosNCEXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosNCEXC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
Dim Liga As String = ""
If e.Row.DataKey("Tipo").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales3"
e.Row.Cells(2).Text = e.Row.DBCampo("Moneda").ToString()
ElseIf e.Row.DataKey("CveCliente").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales2"
Select Case e.Row.DataKey("Tipo").ToEntero()
Case 1
e.Row.Cells(2).Text = "Anticipos"
Case 2
e.Row.Cells(2).Text = "NC X Aplicar"
Case 3
e.Row.Cells(2).Text = "Ingresos X Comprobar"
End Select
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() < 1 AndAlso e.Row.DataKey("CveIE").ToEntero() < 1 Then
e.Row.CssClass = "Totales"
e.Row.Cells(2).Text = e.Row.DataKey("NombreComercial")
e.Row.Cells(7).Text = ""
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() > 0 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVenta")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
ElseIf e.Row.DataKey("CveIE").ToEntero() > 0 AndAlso e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero()
Liga = $"/Bancos/IE.aspx?&CveIE={e.Row.DataKey("CveIE")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
Else
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolioAmortizacion")
e.Row.Cells(3).Text = e.Row.DataKey("FechaAmortizacion").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(5).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(6).Text = "$" & e.Row.DataKey("SaldoAcumulativo").FormatoNumero()
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVentaAmortizacion")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
End If End If
If Tabs.ActiveTab Is TabVentas Then If (e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse e.Row.DataKey("CveIE").ToEntero() > 0) AndAlso (e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then
e.Row.FCCheckBox("Chk").Visible = True
End If
End If
End Sub
#End Region
#Region "V E N T A S"
Protected Sub CargaDatosVentas()
Dim Mov As New ClsMovimientos
Dim FechaI As String = txtFechaI.Text
Dim FechaF As String = txtFechaF.Text
Dim FechaCorte As Date = NowADS().AddYears(1).ToShortDateString.ToString.ToDate
Dim SumDescuentoProntoPago As Double = 0.0
If Mov.GetCxCClienteDetalle(-1, FechaI, FechaF, -1, -1, UsuarioActual.CveEmpresa, -1, FechaCorte:=FechaCorte, Opcion:=2, SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
DtDatosVentas = Mov.DtResultados
'Dim TmpCxCAux As DataTable
'TmpCxCAux = Mov.DtResultados.FiltraParametros($"Saldo > {TxtSaldoMayorA.Text.ToDecimal} AND Saldo < {TxtSaldoMenorA.Text.ToDecimal} ", "Fecha,SerieFolio").AsEnumerable().Take(51).CopyToDataTable()
SumDescuentoProntoPago = DtDatosVentas.SUM("DescuentoProntoPago")
GvCxC.DataSource = DtDatosVentas
End If
Mov.Dispose()
GvCxC.DataBind()
If SumDescuentoProntoPago > 0.0 Then
GvCxC.Columns(14).Visible = True 'MOSTRAR DESCUENTO PRONTO PAGO
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
GvCxC.Columns(15).Visible = True 'HABILITAR NC
End If
End If
UPVentas.Update()
End Sub
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("CveVenta").ToEntero <= 0 Then
e.Row.BackColor = Drawing.Color.LightGray
e.Row.FCCheckBox("Chk").Visible = False
End If
End If
End Sub
Protected Sub SaldarVentas()
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL() ObjConta.IniciaTransacSQL()
Dim CvePrePoliza As Integer = 0 Dim CvePrePoliza As Integer = 0
@@ -231,7 +536,7 @@ Partial Public Class General_SaldosMenores
End If End If
End If End If
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ClientesAbonar/SaldarI", 47, 0, 0, 1, TxtFecha.Text.ToDate, TxtFecha.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("SaldosMenores/SaldarI", 47, 0, 0, 1, TxtFecha.Text.ToDate, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each gr As GridViewRow In GvCxC.Rows For Each gr As GridViewRow In GvCxC.Rows
@@ -362,289 +667,190 @@ Partial Public Class General_SaldosMenores
ObjConta.Dispose() ObjConta.Dispose()
End If
TxtFecha.Text = DateTime.Today.ToString()
Upsaldar.Update()
End Sub End Sub
#Region "I X C"
Protected Sub InicializaDatos()
txtFechaI.Text = $"01/01/{Now.Year}"
txtFechaF.Text = DateTime.Today.ToString()
TxtFecha.Text = DateTime.Today.ToString()
TxtSaldoMayorA.Text = "0"
TxtSaldoMenorA.Text = "1000"
CargaSucursales()
Dim CveCliente As Integer = If(Request("CveCliente") Is Nothing, -1, Request("CveCliente").ToString().ToEntero())
CveMoneda = If(Request("CveMoneda") Is Nothing, -1, Request("CveMoneda").ToString().ToEntero())
txtFechaI.Text = If(Request("FechaI") Is Nothing, NowADS().ToString(), Request("FechaI").ToString())
txtFechaF.Text = If(Request("FechaF") Is Nothing, NowADS().ToString(), Request("FechaF").ToString())
TipoCambio = If(Request("TipoCambio") Is Nothing, 1, Request("TipoCambio").ToString().ToEntero())
TCEspecifico = If(Request("TCEspecifico") Is Nothing, -1, Request("TCEspecifico").ToString().ToDouble())
'RblTipoCambio.SelectedValue = TipoCambio.ToString()
'LiEspecifico.InnerText = TCEspecifico.FormatoNumero()
Dim FechaICorte As DateTime
FechaICorte = If(Request("FechaICorte") Is Nothing, DateTime.MinValue, Request("FechaICorte").ToString().ToDate())
Tipo = -1
End Sub
Protected Sub CargaSucursales()
DdlSubProyectoSaldar.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
DdlSubProyectoSaldar.DataBind()
End Sub
Protected Sub CargaDatosIXC()
Dim FechaICorte As DateTime = MinFecha
Dim FechaFCorte As DateTime = MaxFecha
Dim ObjVenta As New ClsVentas()
Dim CveCliente As Integer = -1
If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico,
SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
GvDatosIXC.DataSource = ObjVenta.DtResultados
DtDatosIXC = ObjVenta.DtResultados
End If
ObjVenta.Dispose()
GvDatosIXC.DataBind()
UpDatos.Update()
End Sub
Protected Sub GvDatosIXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosIXC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
Dim Liga As String = ""
If e.Row.DataKey("Tipo").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales3"
e.Row.Cells(2).Text = e.Row.DBCampo("Moneda").ToString()
ElseIf e.Row.DataKey("CveCliente").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales2"
Select Case e.Row.DataKey("Tipo").ToEntero()
Case 1
e.Row.Cells(2).Text = "Anticipos"
Case 2
e.Row.Cells(2).Text = "NC X Aplicar"
Case 3
e.Row.Cells(2).Text = "Ingresos X Comprobar"
End Select
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() < 1 AndAlso e.Row.DataKey("CveIE").ToEntero() < 1 Then
e.Row.CssClass = "Totales"
e.Row.Cells(2).Text = e.Row.DataKey("NombreComercial")
e.Row.Cells(7).Text = ""
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() > 0 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
'If DdlTipo.SelectedValue.ToEntero() = 1 Then
' e.Row.Cells(4).Text = "$" & e.Row.DataKey("SubTotal").FormatoNumero()
'ElseIf DdlTipo.SelectedValue.ToEntero() = 2 Then
' e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero()
'End If
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVenta")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
ElseIf e.Row.DataKey("CveIE").ToEntero() > 0 AndAlso e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero()
Liga = $"/Bancos/IE.aspx?&CveIE={e.Row.DataKey("CveIE")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
Else
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolioAmortizacion")
e.Row.Cells(3).Text = e.Row.DataKey("FechaAmortizacion").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(5).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(6).Text = "$" & e.Row.DataKey("SaldoAcumulativo").FormatoNumero()
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVentaAmortizacion")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
End If
If (e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse e.Row.DataKey("CveIE").ToEntero() > 0) AndAlso (e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then
e.Row.FCCheckBox("Chk").Visible = True
End If
End If
End Sub
#End Region #End Region
#Region "N C E X C" #Region "C O M P R A S"
'/Compras/RepAnt-NC-EXCDetalle.aspx
Protected Sub CargaDatosNCEXC()
Dim FechaICorte As DateTime = MinFecha
Dim FechaFCorte As DateTime = MaxFecha
Dim ObjVenta As New ClsVentas()
Dim CveCliente As Integer = -1
If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico,
SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
GvDatosNCEXC.DataSource = ObjVenta.DtResultados
DtDatosNCEXC = ObjVenta.DtResultados
End If
ObjVenta.Dispose()
GvDatosIXC.DataBind()
UpDatos.Update()
End Sub Protected Sub CargaDatosCompras()
Protected Sub GvDatosNCEXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosNCEXC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto"
Dim Liga As String = ""
If e.Row.DataKey("Tipo").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales3"
e.Row.Cells(2).Text = e.Row.DBCampo("Moneda").ToString()
ElseIf e.Row.DataKey("CveCliente").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales2"
Select Case e.Row.DataKey("Tipo").ToEntero()
Case 1
e.Row.Cells(2).Text = "Anticipos"
Case 2
e.Row.Cells(2).Text = "NC X Aplicar"
Case 3
e.Row.Cells(2).Text = "Ingresos X Comprobar"
End Select
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() < 1 AndAlso e.Row.DataKey("CveIE").ToEntero() < 1 Then
e.Row.CssClass = "Totales"
e.Row.Cells(2).Text = e.Row.DataKey("NombreComercial")
e.Row.Cells(7).Text = ""
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() > 0 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVenta")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
ElseIf e.Row.DataKey("CveIE").ToEntero() > 0 AndAlso e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 Then
e.Row.CssClass = "SubTotales"
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero()
Liga = $"/Bancos/IE.aspx?&CveIE={e.Row.DataKey("CveIE")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
Else
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolioAmortizacion")
e.Row.Cells(3).Text = e.Row.DataKey("FechaAmortizacion").ToDate().ToShortDateString()
e.Row.Cells(4).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(5).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
e.Row.Cells(6).Text = "$" & e.Row.DataKey("SaldoAcumulativo").FormatoNumero()
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVentaAmortizacion")}"
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
End If
If (e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse e.Row.DataKey("CveIE").ToEntero() > 0) AndAlso (e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then
e.Row.FCCheckBox("Chk").Visible = True
End If
End If
End Sub
#End Region
#Region "V E N T A S"
'/Compras/RepAnt-NC-EXCDetalle.aspx
Protected Sub CargaDatosVentas()
Dim Mov As New ClsMovimientos Dim Mov As New ClsMovimientos
Dim FechaI As String = txtFechaI.Text Dim FechaI As String = txtFechaI.Text
Dim FechaF As String = txtFechaF.Text Dim FechaF As String = txtFechaF.Text
Dim FechaCorte As Date = NowADS().AddYears(1).ToShortDateString.ToString.ToDate
Dim SumDescuentoProntoPago As Double = 0.0
If Mov.GetCxCClienteDetalle(-1, FechaI, FechaF, -1, -1, UsuarioActual.CveEmpresa, -1, FechaCorte:=FechaCorte, Opcion:=2, SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
DtDatosVentas = Mov.DtResultados
'Dim TmpCxCAux As DataTable
'TmpCxCAux = Mov.DtResultados.FiltraParametros($"Saldo > {TxtSaldoMayorA.Text.ToDecimal} AND Saldo < {TxtSaldoMenorA.Text.ToDecimal} ", "Fecha,SerieFolio").AsEnumerable().Take(51).CopyToDataTable()
SumDescuentoProntoPago = DtDatosVentas.SUM("DescuentoProntoPago")
GvCxC.DataSource = DtDatosVentas
If Mov.GetCxPProveedor(-1, FechaI, FechaF, -1, -1, -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", CveSubProyecto:=-1, Opcion:=2, CveEmpresa:=UsuarioActual.CveEmpresa, SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
DtDatosCompras = Mov.DtResultados
GvCxP.DataSource = DtDatosCompras
DtDatosCompras.Columns.Add("Movimiento")
If DtDatosCompras.Rows.Count > 0 Then
DtDatosCompras.Rows(0)("Movimiento") = "FACTURA DE ACREEDOR"
End If
End If End If
Mov.Dispose() Mov.Dispose()
GvCxC.DataBind() GvCxP.DataBind()
UPCompras.Update()
If SumDescuentoProntoPago > 0.0 Then
GvCxC.Columns(14).Visible = True 'MOSTRAR DESCUENTO PRONTO PAGO
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
GvCxC.Columns(15).Visible = True 'HABILITAR NC
End If
End If
UPVentas.Update()
End Sub End Sub
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound Protected Sub GvCxP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("CveVenta").ToEntero <= 0 Then
e.Row.BackColor = Drawing.Color.LightGray 'e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo")))
If e.Row.DataKey("CveCompra").ToEntero = 0 Then
e.Row.FCCheckBox("Chk").Visible = False e.Row.FCCheckBox("Chk").Visible = False
e.Row.BackColor = Drawing.Color.LightGray
End If End If
End If End If
End Sub End Sub
Protected Sub SaldarCompras()
Dim ObjConta As New ClsContabilidad
ObjConta.IniciaTransacSQL()
Dim CvePrePoliza As Integer = 0
Dim MsgError As String = ""
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
Dim EsContabilizable As Boolean = If(UsuarioActual.CveEmpresa.Contiene(13, 83), False, True)
CvePrePoliza = ObjConta.AddPrePolizas("SaldosMenores/SaldarE", 98, 0, 0, 1, TxtFecha.Text.ToDate, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each gr As GridViewRow In GvCxP.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal 'gr.DataKey("Saldo").ToDecimal
Dim TCCompra As Decimal = gr.DataKey("TipoCambio").ToDecimal
Dim TCPago As Decimal = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
Dim CveConceptoContablePago As Integer = 17
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor
If CveMoneda <> 1 Then
Select Case CveConceptoContablePago
Case 17
CveConceptoContablePago = 312
Case 308
CveConceptoContablePago = 309
Case Else
End Select
End If
Dim CveConceptoContableComplementaria As Integer = 206
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
Dim ConceptoPartida As String = String.Format("Saldar compra {0}", gr.DataKey("SerieFolio").ToString)
If CveMoneda > 1 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, Saldo, CveConceptoContablePago, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, ImporteME:=If(CveMoneda > 1, Saldo, 0), Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, (Saldo * TCCompra - Saldo).RoundSQL, CveConceptoContableComplementaria, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteME:=Saldo, TipoCambio:=TCCompra, Contabilizable:=EsContabilizable) Then
MsgError = "No se pudo insertar la póliza"
End If
Else
TCPago = 1
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, If(CveMoneda = 1, Saldo, Saldo * TCCompra), CveConceptoContablePago, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteME:=If(CveMoneda > 1, Saldo, 0), TipoCambio:=TCCompra, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
Dim PorcentajePago As Decimal = Saldo / gr.DataKey("TotalOriginal").ToDecimal
If MsgError = "" AndAlso gr.DataKey("IVA").ToDecimal > 0 Then
Dim PorcentajeImpuesto As Decimal = gr.DataKey("PorcentajeIVA").ToDecimal
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), 14, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Saldo = Saldo - IVA
End If
If MsgError = "" AndAlso gr.DataKey("IEPS").ToDecimal > 0 Then
Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, If(CveMoneda = 1, IEPS, IEPS * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), 25, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Saldo = Saldo - IEPS
End If
' se manda al ot ingresos, los impuestos por acreditar
If MsgError = "" Then
Dim tcvecon As Integer = 78
Dim tTipoMovto As Boolean = True
If Saldo < 0 Then
tcvecon = 211
tTipoMovto = False
End If
If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovto, Saldo, (Saldo * TCPago).RoundSQL, tcvecon, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
'fluctuación.
If CveMoneda > 1 Then
Dim ImporteFluctuacion As Decimal = 0
ImporteFluctuacion = Saldo * (TCPago - TCCompra)
If CveSubProyecto <= 0 Then MsgError = "No se pudo obtener el sub proyecto o centro de costo"
If TCCompra > TCPago Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Math.Abs(ImporteFluctuacion), 64, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Math.Abs(ImporteFluctuacion), 65, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra, TipoCambioPago:=TCPago, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
End If
End If
Next
If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then
If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If
End If
End If
If MsgError = "" Then
ObjConta.Commit()
CargaDatosCompras()
RegistraScript("$('#ModalSaldarCuentaSinPagar').modal('hide')")
Dim Msg As New StringBuilder
Msg.Append("Los movimientos se saldaron correctamente.</br>")
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
Msg.AppendFormat("<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>&nbsp;&nbsp; ", CvePrePoliza)
End If
Alert(Msg.ToString)
Else
ObjConta.RollBack()
Alert(MsgError, TipoMensaje.MsgError)
End If
ObjConta.Dispose()
End Sub
#End Region #End Region
End Class End Class

View File

@@ -3553,7 +3553,7 @@ Partial Class OC_OC
End If End If
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
If Not GeneraPrePolizaPresupuesto(objOrdenCompra.CveOrdenCompra, objOrdenCompra.IniciaTransacSQL) Then If Not GeneraPrePolizaPresupuesto(objOrdenCompra.CveOrdenCompra, objOrdenCompra.IniciaTransacSQL) Then
HuboError = True HuboError = True
@@ -3717,7 +3717,7 @@ Partial Class OC_OC
TieneError = True TieneError = True
End If End If
If (UsuarioActual.Empresa.Funcionalidad(532) = "1") Then If (UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2")) Then
GeneraPrePolizaPresupuesto(CveOrdenCompra, objOrdenCompra.IniciaTransacSQL, True) GeneraPrePolizaPresupuesto(CveOrdenCompra, objOrdenCompra.IniciaTransacSQL, True)
End If End If
@@ -4190,7 +4190,7 @@ Partial Class OC_OC
Proyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedItem.Text Proyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedItem.Text
End If End If
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
Dim ObjCon As New ClsContratos Dim ObjCon As New ClsContratos
Dim CvePresupuesto As Integer = 0 Dim CvePresupuesto As Integer = 0
Dim Autorizado As Decimal = 0 Dim Autorizado As Decimal = 0
@@ -9090,7 +9090,7 @@ Partial Class OC_OC
Dim respuesta As Boolean = False Dim respuesta As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
Dim ObjCon As New ClsContratos Dim ObjCon As New ClsContratos
Dim CvePresupuesto As Integer = 0 Dim CvePresupuesto As Integer = 0
@@ -9202,7 +9202,7 @@ Partial Class OC_OC
Dim Respuesta As Boolean = True Dim Respuesta As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
Dim CveMonedaPresupuesto As Integer = DdlMoneda.SelectedValue.ToEntero Dim CveMonedaPresupuesto As Integer = DdlMoneda.SelectedValue.ToEntero
Dim TC As Decimal = If(CveMonedaPresupuesto = 1, 1, GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal) Dim TC As Decimal = If(CveMonedaPresupuesto = 1, 1, GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal)

View File

@@ -179,7 +179,6 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDocto_SelectedIndexChanged"> <asp:DropDownList ID="DdlTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDocto_SelectedIndexChanged">
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem> <asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Nota de crédito"></asp:ListItem>
<asp:ListItem Value="Rem" Text="Remisión"></asp:ListItem> <asp:ListItem Value="Rem" Text="Remisión"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label> <label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>

View File

@@ -230,6 +230,7 @@ Partial Class Ventas_FacturacionGlobal
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01D Then If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01D Then
Alert($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}]", TipoMensaje.MsgError) Alert($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}]", TipoMensaje.MsgError)
GuardaLog($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}] Remisiones: " + SbRemisiones.ToString())
Exit Sub Exit Sub
End If End If

View File

@@ -8588,7 +8588,6 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true"> <asp:DropDownList ID="DdlTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem> <asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
<asp:ListItem Value="Egs" Text="Nota de crédito"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label> <label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
</div> </div>

View File

@@ -9712,8 +9712,17 @@ Partial Class Ventas
End If End If
Me.CveAutorizacion = -1 Me.CveAutorizacion = -1
Dim PermiteAutorizacion As Boolean = False
If DdlTipoComprobante.SelectedValue.Contiene("Ing") Then
PermiteAutorizacion = True
End If
If DdlTipoComprobante.SelectedValue.Contiene("Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
PermiteAutorizacion = True
End If
'SI ES A CREDITO DEBE VERIFICAR SI TIENE AUTORIZACIONES 'SI ES A CREDITO DEBE VERIFICAR SI TIENE AUTORIZACIONES
If UsuarioActual.Empresa.Funcionalidad(595) = "2" AndAlso CveCliente > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") AndAlso RBLPago.SelectedValue = "1" Then If UsuarioActual.Empresa.Funcionalidad(595) = "2" AndAlso CveCliente > 0 AndAlso PermiteAutorizacion AndAlso RBLPago.SelectedValue = "1" Then
Dim TipoDocumentoAutorizacion As String = "" Dim TipoDocumentoAutorizacion As String = ""
Dim ImporteAutorizacion As Decimal = 0 Dim ImporteAutorizacion As Decimal = 0
Dim TipoAutorizacion As Integer = 0 Dim TipoAutorizacion As Integer = 0
@@ -31896,6 +31905,11 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
If Not UsuarioActual.TienePermisoProceso(60) Then
Alert("El usuario no tiene permiso para facturar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'MARCA LAS SELECCIONADAS 'MARCA LAS SELECCIONADAS
VerificaCotizaciones(DtCotizaciones) VerificaCotizaciones(DtCotizaciones)
@@ -32423,6 +32437,11 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
If Not UsuarioActual.TienePermisoProceso(60) Then
Alert("El usuario no tiene permiso para facturar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'Checa las facturas selecionadas 'Checa las facturas selecionadas
If Not VerificaRemisiones(DTRemisiones) Then If Not VerificaRemisiones(DTRemisiones) Then
Alert("La cantidad/total debe ser mayor que 0", TipoMensaje.MsgAdvertencia) Alert("La cantidad/total debe ser mayor que 0", TipoMensaje.MsgAdvertencia)
@@ -33000,6 +33019,11 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
If Not UsuarioActual.TienePermisoProceso(60) Then
Alert("El usuario no tiene permiso para facturar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'MARCA LAS SELECCIONADAS 'MARCA LAS SELECCIONADAS
VerificaPedidos2(DtPedidos2) VerificaPedidos2(DtPedidos2)
Dim DTSeleccionadas As DataTable = DtPedidos2.FiltraParametros("Aplicado = True") Dim DTSeleccionadas As DataTable = DtPedidos2.FiltraParametros("Aplicado = True")