This commit is contained in:
Antonio Gonzalez
2021-01-22 20:54:05 -07:00
14 changed files with 259 additions and 76 deletions

View File

@@ -380,7 +380,8 @@
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" /> <asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" /> <asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" /> <asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="CodigoLinea" HeaderText="Código Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" /> <asp:BoundField DataField="CodigoLinea" HeaderText="Código Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />

View File

@@ -4350,11 +4350,13 @@ Public Class ClsBancos
Return Retorno Return Retorno
End Function End Function
Public Function GetAcreedoresReporte(CveEmpresa As Integer) As Boolean Public Function GetAcreedoresReporte(CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_AcreedorReporte") DataAdapter("PA_Banc_AcreedorReporte")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -5288,11 +5288,11 @@ Public Class ClsPaginas
If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then
sw.Stop() sw.Stop()
If Not Page.IsPostBack Then 'If Not Page.IsPostBack Then
Using ObjUsuario As New ClsSisUsuarios ' Using ObjUsuario As New ClsSisUsuarios
ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds) ' ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.PathAndQuery.ToString(), sw.ElapsedMilliseconds)
End Using ' End Using
End If 'End If
End If End If
If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then
@@ -6834,13 +6834,6 @@ Public Class ClsPaginas
params.Add(New ReportParameter("Ref", TipoDocumentoRef)) params.Add(New ReportParameter("Ref", TipoDocumentoRef))
params.Add(New ReportParameter("AplicaPagare", AplicaPagare)) params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
'ALAN YEPIZ
If UsuarioActual.CveEmpresa.Contiene(123) Then
params.Add(New ReportParameter("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day)))
params.Add(New ReportParameter("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month)))
params.Add(New ReportParameter("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year)))
End If
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo) RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo) RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
Case "Cot" Case "Cot"

View File

@@ -2981,8 +2981,10 @@ Public Class Timbrado
comprobante.Conceptos(i).ClaveProdServ = concep.ClaveProdServ comprobante.Conceptos(i).ClaveProdServ = concep.ClaveProdServ
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
comprobante.Conceptos(i).Descuento = concep.Descuento If concep.Descuento > 0 Then
comprobante.Conceptos(i).DescuentoSpecified = True comprobante.Conceptos(i).Descuento = concep.Descuento
comprobante.Conceptos(i).DescuentoSpecified = True
End If
End If End If
If concep.Noidentificacion <> "" Then comprobante.Conceptos(i).NoIdentificacion = concep.Noidentificacion If concep.Noidentificacion <> "" Then comprobante.Conceptos(i).NoIdentificacion = concep.Noidentificacion
@@ -2996,33 +2998,39 @@ Public Class Timbrado
k = 0 k = 0
'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS 'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS
If Not ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("P", "N") AndAlso (Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0)) Then If Not ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("P", "N") AndAlso (Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0)) Then
comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestos()
comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {} If concep.Impuestos.Count > 0 Then
If concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count > 0 Then
comprobante.Conceptos(i).Impuestos.Retenciones = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count - 1) {} comprobante.Conceptos(i).Impuestos = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestos()
comprobante.Conceptos(i).Impuestos.Traslados = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion = "T").Count - 1) {}
If concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count > 0 Then
comprobante.Conceptos(i).Impuestos.Retenciones = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion(concep.Impuestos.FindAll(Function(p As CFDIConceptosImpuestos) p.TrasladooRetencion <> "T").Count - 1) {}
End If
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
If imp.TrasladooRetencion = "T" Then
comprobante.Conceptos(i).Impuestos.Traslados(j) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado()
comprobante.Conceptos(i).Impuestos.Traslados(j).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Traslados(j).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Traslados(j).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Traslados(j).ImporteSpecified = True
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuota = imp.TasaOCuota.FormatoNumero(6)
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuotaSpecified = True
j += 1
Else
comprobante.Conceptos(i).Impuestos.Retenciones(k) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion()
comprobante.Conceptos(i).Impuestos.Retenciones(k).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Retenciones(k).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Retenciones(k).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Retenciones(k).TasaOCuota = imp.TasaOCuota.ToString.ToDecimal
k += 1
End If
Next
End If End If
For Each imp As CFDIConceptosImpuestos In concep.Impuestos
If imp.TrasladooRetencion = "T" Then
comprobante.Conceptos(i).Impuestos.Traslados(j) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosTraslado()
comprobante.Conceptos(i).Impuestos.Traslados(j).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Traslados(j).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Traslados(j).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Traslados(j).ImporteSpecified = True
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuota = imp.TasaOCuota.FormatoNumero(6)
comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuotaSpecified = True
j += 1
Else
comprobante.Conceptos(i).Impuestos.Retenciones(k) = New Profact.TimbraCFDI33.ComprobanteConceptoImpuestosRetencion()
comprobante.Conceptos(i).Impuestos.Retenciones(k).Base = imp.Base
comprobante.Conceptos(i).Impuestos.Retenciones(k).Impuesto = imp.Impuesto
comprobante.Conceptos(i).Impuestos.Retenciones(k).TipoFactor = imp.TipoFactor
comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe
comprobante.Conceptos(i).Impuestos.Retenciones(k).TasaOCuota = imp.TasaOCuota.ToString.ToDecimal
k += 1
End If
Next
End If End If
i += 1 i += 1
Next Next

View File

@@ -3450,9 +3450,16 @@ Partial Class Bancos_IE
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC) Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
Dim CveCuentaIVAxAcreditarDevDinC = 0 Dim CveCuentaIVAxAcreditarDevDinC = 0
Dim CveCuentaIVAAcreditableDevDinC = 0 Dim CveCuentaIVAAcreditableDevDinC = 0
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Dim IdCtaIVAXAcreditarDevDinC As Integer
Dim IdCtaIVAAcreditableDevDinC As Integer
If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Else
MsgError = "Sin Registros de porcentaje impuesto"
End If
Dim IVADevMN As Decimal = 0 Dim IVADevMN As Decimal = 0
Dim IEPSDevMN As Decimal = 0 Dim IEPSDevMN As Decimal = 0
@@ -4508,7 +4515,8 @@ Partial Class Bancos_IE
End If End If
If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IDPoliza > 0, IDPoliza, -1), ObjConta:=ObjAC) Then
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Error al contabilizar poliza" MensajeError = "Error al contabilizar poliza"
End If End If

View File

@@ -385,6 +385,93 @@
<ajax:TabPanel ID="TabReporte" runat="server" HeaderText="Reporte"> <ajax:TabPanel ID="TabReporte" runat="server" HeaderText="Reporte">
<ContentTemplate> <ContentTemplate>
<div id="PFiltroReporte" class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style="">
<div class="tools">
<asp:Button ID="BtnConsultarReporte" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultarReporte_Click" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row text-size-12">
<div class="col-md-1"><span>Fecha Inicio:</span></div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<%--width: 120px !important;--%>
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="METxtFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="LnkTxtFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
<asp:CompareValidator ID="CVTxtFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GpoReporte"></asp:CompareValidator>
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="margin-left: 20px"><span>Fecha Fin:</span></div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<%--width: 120px !important;--%>
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="METxtFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="LnkTxtFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
<asp:CompareValidator ID="CVTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GpoReporte"></asp:CompareValidator>
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<ajax:ValidatorCalloutExtender ID="VCECVTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
</div>
</div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:UpdatePanel ID="UpReporte" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpReporte" runat="server" UpdateMode="Conditional">

View File

@@ -931,14 +931,29 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
#region"REPORTE" #region"REPORTE"
protected void CargaReporte() protected void CargaReporte()
{ {
DateTime FInicio = MinFecha;
DateTime FFin = MaxFecha;
if(TxtFechaInicio.Text.Length == 10)
{
FInicio = TxtFechaInicio.Text.ToDate();
}
if(TxtFechaFin.Text.Length == 10)
{
FFin = TxtFechaFin.Text.ToDate();
}
ClsBancos bancos = new ClsBancos(); ClsBancos bancos = new ClsBancos();
if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa)) if (bancos.GetAcreedoresReporte(UsuarioActual.CveEmpresa, FInicio, FFin))
{ {
GvReporte.DataSource = bancos.DtResultados; GvReporte.DataSource = bancos.DtResultados;
GvReporte.DataBind(); GvReporte.DataBind();
} }
bancos.Dispose(); bancos.Dispose();
UpReporte.Update(); UpReporte.Update();
} }
protected void GvReporte_RowDataBound(object sender, GridViewRowEventArgs e) protected void GvReporte_RowDataBound(object sender, GridViewRowEventArgs e)
{ {
@@ -970,4 +985,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
UpDatos.Update(); UpDatos.Update();
UpMovAcreedor.Update(); UpMovAcreedor.Update();
} }
protected void BtnConsultarReporte_Click(object sender, EventArgs e)
{
CargaReporte();
}
} }

View File

@@ -4053,7 +4053,7 @@ Partial Class Compras_Compras
'Verifica funcionalidad 702 "Require orden de compra para factura de compra" 'Verifica funcionalidad 702 "Require orden de compra para factura de compra"
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then If UsuarioActual.Empresa.Funcionalidad(128) <> "" Then
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
If Not CompraEstaVinculadaOC Then If Not CompraEstaVinculadaOC Then
Alert("Debe de vincular una orden de compra para registrar la factura") Alert("Debe de vincular una orden de compra para registrar la factura")

View File

@@ -910,7 +910,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then If Archivo.Exists Then
HttpContext.Current.Response.Clear() HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent() HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf") HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name).ToLower = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name)) HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString()) HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path) HttpContext.Current.Response.TransmitFile(Path)

View File

@@ -542,7 +542,7 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub End Sub
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21) Then If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21, 18, 60) Then
CargaProveedores() CargaProveedores()
DdlProveedores.Visible = True DdlProveedores.Visible = True
DdlCompras.Visible = True DdlCompras.Visible = True
@@ -557,7 +557,7 @@ Partial Class ContabilidadC_RegPrePoliza
Else Else
DdlPersonal.Visible = False DdlPersonal.Visible = False
End If End If
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
CargaClientes() CargaClientes()
DdlClientes.Visible = True DdlClientes.Visible = True
DdlVentas.Visible = True DdlVentas.Visible = True
@@ -594,11 +594,21 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub End Sub
Private Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.SelectedIndexChanged Private Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.SelectedIndexChanged
CargaCompras(DdlProveedores.SelectedValue.ToEntero) If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
CargaNotasCreditoCompras(DdlProveedores.SelectedValue.ToEntero, DdlCompras)
Else
CargaCompras(DdlProveedores.SelectedValue.ToEntero)
End If
End Sub End Sub
Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientes.selectedindexchange Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientes.selectedindexchange
CargaVentas(DdlClientes.SelectedValue.ToEntero) If DdlConceptosContables.SelectedValue.ToEntero.Contiene(12, 91) Then
CargaVentas(DdlClientes.SelectedValue.ToEntero)
Else
CargaVentas(DdlClientes.SelectedValue.ToEntero)
End If
End Sub End Sub
Private Sub CargaSubProyectos() Private Sub CargaSubProyectos()
@@ -646,6 +656,24 @@ Partial Class ContabilidadC_RegPrePoliza
End If End If
End Sub End Sub
Private Sub CargaNotasCreditoCompras(CveProveedor As Integer, ddl As DropDownList)
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
Dim ObjCompras As New ClsCompras
ddl.ClearSelection()
If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, "NC", "-1", "-1", "-1", "-1", "-1", "-1", "-1", "-1", CveProveedor:=CveProveedor, TopSelect:=1000) Then
ddl.DataSource = ObjCompras.DtResultados '.FiltraParametros("Saldo <> 0")
ddl.DataBind()
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
Else
ddl.DataSource = Nothing
ddl.DataBind()
ddl.Items.Insert(0, New ListItem(" - ", "-1"))
End If
ObjCompras.Dispose()
End If
End Sub
Private Sub CargaClientes() Private Sub CargaClientes()
DdlClientes.setEsWebService(True) DdlClientes.setEsWebService(True)
DdlClientes.Attributes.Add("data-metodo", "getcliente") DdlClientes.Attributes.Add("data-metodo", "getcliente")
@@ -676,6 +704,22 @@ Partial Class ContabilidadC_RegPrePoliza
ObjVentas.Dispose() ObjVentas.Dispose()
End Sub End Sub
Private Sub CargaNotasCreditoVentas(CveCliente As Integer)
Dim ObjVentas As New ClsVentas
DdlVentas.ClearSelection()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
DdlVentas.DataBind()
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
Else
DdlVentas.DataSource = Nothing
DdlVentas.DataBind()
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
End If
ObjVentas.Dispose()
End Sub
Private Sub CargaPersonal() Private Sub CargaPersonal()
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlPersonal.DataBind() DdlPersonal.DataBind()
@@ -904,15 +948,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim PorcentajeImpuesto As Decimal = 0 Dim PorcentajeImpuesto As Decimal = 0
'Registra movimieno bancario
If CveConcepto = 30 Then
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
CveIEInsertado = CveIE
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
FolioIE = ObjIE.Folio
End If
End If
Dim CveProveedor As Integer = -1 Dim CveProveedor As Integer = -1
@@ -945,7 +981,18 @@ Partial Class ContabilidadC_RegPrePoliza
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
Else Else
If CveConcepto = 30 Then If CveConcepto = 30 Then
'Registra movimieno bancario
If CveConcepto = 30 Then
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
CveIEInsertado = CveIE
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
FolioIE = ObjIE.Folio
End If
End If
CveIE = CveIEInsertado CveIE = CveIEInsertado
Else Else
CveIE = -1 CveIE = -1
End If End If
@@ -993,7 +1040,7 @@ Partial Class ContabilidadC_RegPrePoliza
'MENSAJE PRINCIPAL 'MENSAJE PRINCIPAL
MensajeAlert.AppendFormat("<br/><br/>Folio de Póliza: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) MensajeAlert.AppendFormat("<br/><br/>Folio de Póliza: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
MensajeAlert.AppendFormat("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio) MensajeAlert.AppendFormat("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion) 'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion)
Else Else
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico") Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
@@ -1671,7 +1718,12 @@ Partial Class ContabilidadC_RegPrePoliza
Protected Sub DdlProveedores_SelectedIndexChanged1(sender As Object, e As EventArgs) Protected Sub DdlProveedores_SelectedIndexChanged1(sender As Object, e As EventArgs)
Dim ddl As DropDownList = CType(sender, DropDownList) Dim ddl As DropDownList = CType(sender, DropDownList)
Dim ddl2 As DropDownList = DirectCast(ddl.BindingContainer, GridViewRow).FCDropDownList("DdlCompras") Dim ddl2 As DropDownList = DirectCast(ddl.BindingContainer, GridViewRow).FCDropDownList("DdlCompras")
CargaCompras2(ddl.SelectedValue.ToEntero, ddl2) If DdlConceptosContables.SelectedValue.ToEntero.Contiene(18, 60) Then
CargaNotasCreditoCompras(ddl.SelectedValue.ToEntero, ddl2)
Else
CargaCompras2(ddl.SelectedValue.ToEntero, ddl2)
End If
End Sub End Sub
Private Sub CargaCompras2(CveProveedor As Integer, ddl As DropDownList) Private Sub CargaCompras2(CveProveedor As Integer, ddl As DropDownList)

View File

@@ -514,7 +514,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Else Else
DdlPersonal.Visible = False DdlPersonal.Visible = False
End If End If
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then If DdlConceptosContables.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
CargaClientes() CargaClientes()
DdlClientes.Visible = True DdlClientes.Visible = True
DdlVentas.Visible = True DdlVentas.Visible = True
@@ -542,7 +542,11 @@ Partial Class ContabilidadC_RegPrePolizaS
End Sub End Sub
Private Sub CargaCuentasContables() Private Sub CargaCuentasContables()
DdlCtaContable.DataSource = Session("DtCuentas") Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
DdlCtaContable.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
DdlCtaContable.DataBind() DdlCtaContable.DataBind()
DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0")) DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub End Sub
@@ -1059,7 +1063,12 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlTipoGastoE.Items.Insert(0, New ListItem("Sin Asignar", "0")) DdlTipoGastoE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub End Sub
Private Sub CargaCtaContableE() Private Sub CargaCtaContableE()
DdlCtaContableE.DataSource = Session("DtCuentas") Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
DdlCtaContableE.DataSource = ObjConta.DtResultados
End If
ObjConta.Dispose()
DdlCtaContableE.DataBind() DdlCtaContableE.DataBind()
DdlCtaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) DdlCtaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub End Sub
@@ -1086,7 +1095,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Else Else
DdlClasificacionesE.Visible = False DdlClasificacionesE.Visible = False
End If End If
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39) Then If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(1, 2, 203, 207, 13, 61, 8, 9, 62, 63, 38, 39, 12, 91) Then
CargaClientesE() CargaClientesE()
DdlClientesE.Visible = True DdlClientesE.Visible = True
DdlVentasE.Visible = True DdlVentasE.Visible = True

View File

@@ -147,10 +147,10 @@ public partial class Contabilidad_RepIVA : ClsPaginas
} }
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0) if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
{ {
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2); Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2);
if (dif > 1) if (Math.Abs(dif) > 1)
{ {
e.Row.ForeColor = System.Drawing.Color.Red; e.Row.ForeColor = System.Drawing.Color.Red;
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err"; e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";

View File

@@ -938,11 +938,11 @@ Partial Class Inventarios_RecepcionAlmacen
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
If CveTipoCompra = 9 Then If CveTipoCompra = 9 Then ' apoyo logistico
CargaAlmacenes(-1, "27", CveTipoCompra) CargaAlmacenes(-1, "27", CveTipoCompra)
ElseIf CveTipoCompra = 10 Then ElseIf CveTipoCompra = 10 Then
CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra) CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra)
ElseIf TipoMovimiento = 3 Then ElseIf TipoMovimiento = 3 Then 'devolucion al proveedor
CargaAlmacenes(-1, "21,2", CveTipoCompra) CargaAlmacenes(-1, "21,2", CveTipoCompra)
Else Else
CargaAlmacenes(-1) CargaAlmacenes(-1)
@@ -967,11 +967,14 @@ Partial Class Inventarios_RecepcionAlmacen
CargaSoloUsados = True CargaSoloUsados = True
SumarImporteUsados = True SumarImporteUsados = True
DtRecepcion = ObjInventario.DtResultados.Copy() DtRecepcion = ObjInventario.DtResultados.Copy()
If UsuarioActual.CveRol = 1 Then If TipoMovimiento <> 3 Then 'sino es devolucion/NC
CargaAlmacenes(-1, "22", CveTipoCompra) If UsuarioActual.CveRol = 1 Then
Else CargaAlmacenes(-1, "22", CveTipoCompra)
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra) Else
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
End If
End If End If
Else Else
DtRecepcion = ObjInventario.DtResultados.Copy() DtRecepcion = ObjInventario.DtResultados.Copy()

View File

@@ -244,7 +244,7 @@ Partial Class ProductosyServicios
End If End If
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then If UsuarioActual.CveEmpresa.Contiene(72, 80) And CvePS = -1 Then
'DivDatos.Attributes("class") = "col-md-12" 'DivDatos.Attributes("class") = "col-md-12"
TxtPS.Enabled = False TxtPS.Enabled = False
DivDdlTipo.Visible = True DivDdlTipo.Visible = True