eFacturas agregar facturas, compras rnc grtid seleccion, contatos trasnportes
This commit is contained in:
@@ -48,6 +48,8 @@ Public Class CalendarEvent
|
||||
Public Property CveVenta As Integer
|
||||
Public Property SerieFolioVenta As String
|
||||
Public Property CveActivoFijo As Integer
|
||||
Public Property CveTipoAF As Integer
|
||||
|
||||
Public Property AFCodigo As String
|
||||
Public Property CveMovimiento As Integer
|
||||
Public Property MovimientoFolio As String
|
||||
|
||||
@@ -1776,6 +1776,39 @@ Public Class ClsCompras
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddBitacoraFactura(ByVal Serie As String, ByVal Folio As String, ByVal RFCDe As String, ByVal Observacion As String, ByVal Estatus As Integer, ByVal CveUsuario As Integer, ByVal CveEmpresa As Integer, ByVal Correo As String, ByVal Proveedor As String, ByVal Importe As Decimal, ByVal TipoDeComprobante As String) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
DataAdapter("PA_Comp_FacturasBitacoraAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Folio", SqlDbType.VarChar).Value = Folio
|
||||
.Add("@RFCDE", SqlDbType.VarChar).Value = If(RFCDe Is Nothing, "", RFCDe)
|
||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@Proveedor", SqlDbType.VarChar).Value = Proveedor
|
||||
.Add("@Importe", SqlDbType.Decimal).Value = Importe
|
||||
.Add("@TipoDeComprobante", SqlDbType.VarChar).Value = TipoDeComprobante
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar Guardar la bitácora.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
'Public Function AddFactura(Serie As String, Folio As String, FechaFactura As DateTime, NombreProveedor As String, RFCDe As String, SubTotal As Double,
|
||||
'IVA As Double, Total As Double, UUID As String, RFCPara As String, XML As String, PDF As String,
|
||||
'VersionCFD As String, Descuento As Double, Moneda As String, TipodeComprobante As String, TipoCambio As Double, FueValidado As Integer,
|
||||
|
||||
@@ -7776,7 +7776,7 @@ Public Class ClsPaginas
|
||||
|
||||
If CveSubProyectoEntrega > 0 Then
|
||||
|
||||
Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(-1, CveSubProyectoEntrega)
|
||||
Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(-1, CveSubProyectoEntrega, UsuarioActual.CveEmpresa)
|
||||
|
||||
params.Add(New ReportParameter("SubProyectoEntrega", DTSubProyectoEntrega(0)("SubProyecto").ToString))
|
||||
|
||||
|
||||
@@ -518,7 +518,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.Dolares = dr("Importe").ToString.ToDecimal
|
||||
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
|
||||
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.CveTipoAF = dr("CveTipoAF").ToString.ToEntero
|
||||
cevent.backgroundColor = dr("BackgroundColor").ToString
|
||||
cevent.CantidadPasajeros = dr("CantidadPasajeros").ToString
|
||||
cevent.NumeroContrato = dr("NumeroContrato").ToString
|
||||
@@ -581,6 +582,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
|
||||
cevent.NombreComercial = dr("NombreComercial").ToString
|
||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
|
||||
|
||||
@@ -607,6 +609,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
|
||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.allDay = False
|
||||
|
||||
|
||||
@@ -543,7 +543,7 @@
|
||||
<div class="form-group proveedoreespes" runat="server" id="DvDdlRemisionNotaCredito" visible="false" >
|
||||
<span class="whitoutcol proveedoreespes">Remisión Nota de Crédito</span>
|
||||
<div class="whitoutcol whitoutcol">
|
||||
<asp:DropDownList ID="DdlRemisionNotaCredito" runat="server" DataTextField="SerieFolio" DataValueField="CveCompra" CssClass="form-control input-sm input-small select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlRemisionNotaCredito_SelectedIndexChanged">
|
||||
<asp:DropDownList ID="DdlRemisionNotaCredito" runat="server" DataTextField="SerieFolio" DataValueField="CveCompra" CssClass="form-control input-sm input-small select2me" AutoPostBack="true" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:Button ID="Button3" runat="server" Text="Resta" CssClass="default" OnClick="BtnFolioGarantiaRestantes_Click" />--%>
|
||||
@@ -875,6 +875,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="min-height:200px">
|
||||
|
||||
<asp:UpdatePanel ID="UPPAnticiposSel" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -954,6 +955,48 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpGVRemisionesNotaDeCredito" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GVRemisionesNotaDeCredito" runat="server" CssClass="table table-striped table-hover ScrollAD" Width="100%" AutoGenerateColumns="False" Visible="false"
|
||||
DataKeyNames="Tipo,CveCompra,Fecha,TipoDocto,SerieFolio,CveIE,Original,Abonado,Saldo,CveProveedor,RazonSocial,Descripcion,CveMoneda,Moneda,Abreviatura,Referencia,CvePersonal,TipoCambio,CveSubProyecto,CveTipoConcepto" ClientIDMode="Static" EmptyDataText="" data-height="200"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplFactura" runat="server" CssClass="Texto" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Mon</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1192,17 +1192,7 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ImporteRNCSaldar As Decimal
|
||||
Get
|
||||
If ViewState("ImporteRNCSaldar") Is Nothing Then
|
||||
ViewState("ImporteRNCSaldar") = 0D
|
||||
End If
|
||||
Return ViewState("ImporteRNCSaldar").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("ImporteRNCSaldar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTRemisionesNotaDeCredito As DataTable
|
||||
Get
|
||||
@@ -1220,53 +1210,10 @@ Partial Class Compras_Compras
|
||||
End Property
|
||||
|
||||
|
||||
Private Property SerieFolioProntoPago As String
|
||||
Get
|
||||
If ViewState("SerieFolioProntoPago") Is Nothing Then
|
||||
ViewState("SerieFolioProntoPago") = ""
|
||||
End If
|
||||
Return ViewState("SerieFolioProntoPago").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("SerieFolioProntoPago") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoCambioProntoPago As Decimal
|
||||
Get
|
||||
If ViewState("TipoCambioProntoPago") Is Nothing Then
|
||||
ViewState("TipoCambioProntoPago") = 0D
|
||||
End If
|
||||
Return ViewState("TipoCambioProntoPago").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("TipoCambioProntoPago") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaProntoPago As Date
|
||||
Get
|
||||
If ViewState("FechaProntoPago") Is Nothing Then
|
||||
ViewState("FechaProntoPago") = MinFecha
|
||||
End If
|
||||
Return ViewState("FechaProntoPago").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaProntoPago") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveMonedaProntoPago As Integer
|
||||
Get
|
||||
If ViewState("CveMonedaProntoPago") Is Nothing Then
|
||||
ViewState("CveMonedaProntoPago") = 0D
|
||||
End If
|
||||
Return ViewState("CveMonedaProntoPago").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveMonedaProntoPago") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
'ImporteRNCSaldar = 0
|
||||
'SerieFolioProntoPago = ""
|
||||
@@ -1687,10 +1634,22 @@ Partial Class Compras_Compras
|
||||
DdlTipoComprobante.Items.Add(New ListItem("Devolución", "DEV"))
|
||||
DdlTipoComprobante.SelectedValueExist("DEV")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 AndAlso DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
|
||||
|
||||
|
||||
ConfiguraseleccionRemisionNotaCredito()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'SE OCUPAN AFUERA DEL POSTBACK ??
|
||||
cargaddlVinculacionServcios()
|
||||
'SE OCUPAN AFUERA DEL POSTBACK ??
|
||||
cargaddlVinculacionServcios()
|
||||
If UsuarioActual.TienePermisoProceso(117) Then
|
||||
|
||||
HplAddClasificacion.Visible = False
|
||||
@@ -1719,6 +1678,56 @@ Partial Class Compras_Compras
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ConfiguraseleccionRemisionNotaCredito()
|
||||
|
||||
Dim AutoSelRNC As Boolean = False
|
||||
DdlTipoComprobante_SelectedIndexChanged(Nothing, Nothing)
|
||||
DdlTipoCompra.SelectedValueExist(15)
|
||||
DdlTipoCompra_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
|
||||
For Each gvRow As GridViewRow In GvFacturaNC.Rows
|
||||
If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
Dim SerieFolioFacura As String = ObtenerUltimaParte(gvRow.DataKey("SerieFolio"))
|
||||
Dim seleccion As String = ""
|
||||
|
||||
For Each item As ListItem In DdlRemisionNotaCredito.Items
|
||||
Dim serieFolioItem As String = ObtenerUltimaParte(item.Text)
|
||||
If SerieFolioFacura = serieFolioItem Then
|
||||
'seleccion = item.Value
|
||||
AutoSelRNC = True
|
||||
DdlRemisionNotaCredito.SelectedValueExist(item.Value)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If AutoSelRNC Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If AutoSelRNC Then
|
||||
'DdlRemisionNotaCredito_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
HLAplicaNCFact.Visible = True
|
||||
UpPS.Update()
|
||||
UpEstatus.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function ObtenerUltimaParte(SerieFolioFactura As String) As String
|
||||
Dim posicionUltimoGuion As Integer = SerieFolioFactura.LastIndexOf("-")
|
||||
If posicionUltimoGuion <> -1 Then
|
||||
Return SerieFolioFactura.Substring(posicionUltimoGuion + 1)
|
||||
Else
|
||||
Return SerieFolioFactura
|
||||
End If
|
||||
End Function
|
||||
|
||||
#Region "C A R G A S"
|
||||
|
||||
Private Sub MostrarOcultarColumnaIEPS()
|
||||
@@ -7046,26 +7055,44 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then
|
||||
|
||||
If DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 AndAlso ImporteRNCSaldar > 0 Then
|
||||
|
||||
If Not ErrorPrepoliza Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteRNCSaldar, ImporteRNCSaldar, 373, Referencia, Concepto, CveCompra:=DdlRemisionNotaCredito.SelectedValue.ToEntero, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
For Each gvRow As GridViewRow In GVRemisionesNotaDeCredito.Rows
|
||||
|
||||
If gvRow.FCCheckBox("Chk").Checked Then
|
||||
|
||||
Dim ImporteRNCSaldar As Decimal = gvRow.DataKey("Saldo").ToDecimal
|
||||
Dim CveCompraRNC As Integer = gvRow.DataKey("CveCompra").ToEntero
|
||||
|
||||
If Not ErrorPrepoliza Then
|
||||
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteRNCSaldar, ImporteRNCSaldar, ConPrePNC.CveConcepto, Referencia, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteRNCSaldar, ImporteRNCSaldar, 373, Referencia, Concepto, CveCompra:=CveCompraRNC, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ErrorPrepoliza Then
|
||||
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteRNCSaldar, ImporteRNCSaldar, ConPrePNC.CveConcepto, Referencia, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If ErrorPrepoliza Then
|
||||
ErrorMovtosCxP = True
|
||||
@@ -15688,7 +15715,7 @@ Partial Class Compras_Compras
|
||||
Protected Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargarFacturas()
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
CargaDdlRemisionNotaCredito()
|
||||
CargaGVRemisionNotaCredito()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -16222,7 +16249,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Next
|
||||
|
||||
UpINV.Update()
|
||||
UpInv.Update()
|
||||
UpSerie.Update()
|
||||
TxtSerieLote.Focus()
|
||||
RegistraScript(String.Format("$('#DivSerie').on('shown.bs.modal', function () {{$('#DivSerie').focus(); $('#{0}').trigger(jQuery.Event('keypress', {{which: 13}})); }});$('#DivSerie').modal('show'); ", TxtSerieLote.ClientID))
|
||||
@@ -18649,7 +18676,7 @@ Partial Class Compras_Compras
|
||||
GvInvMov.Visible = True
|
||||
|
||||
ObjVentas.Dispose()
|
||||
UpINV.Update()
|
||||
UpInv.Update()
|
||||
End Sub
|
||||
Private Sub GvInvMov_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInvMov.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -19719,7 +19746,7 @@ Partial Class Compras_Compras
|
||||
If DdlTipoCompra.SelectedValue = "15" Then 'Remisión de nota de crédito
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
CargaDdlRemisionNotaCredito()
|
||||
CargaGVRemisionNotaCredito()
|
||||
'bloquear la vinculación a la compra
|
||||
HLAplicaNCFact.Visible = False
|
||||
Else
|
||||
@@ -21140,51 +21167,49 @@ Partial Class Compras_Compras
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDdlRemisionNotaCredito()
|
||||
Private Sub CargaGVRemisionNotaCredito()
|
||||
DvDdlRemisionNotaCredito.Visible = True
|
||||
DTRemisionesNotaDeCredito = New DataTable
|
||||
|
||||
GVRemisionesNotaDeCredito.DataSource = Nothing
|
||||
GVRemisionesNotaDeCredito.Visible = False
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2) Then
|
||||
DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados
|
||||
'DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados
|
||||
DTRemisionesNotaDeCredito = ObjCompras.DtResultados
|
||||
GVRemisionesNotaDeCredito.DataSource = DTRemisionesNotaDeCredito
|
||||
GVRemisionesNotaDeCredito.Visible = True
|
||||
End If
|
||||
|
||||
ObjCompras.Dispose()
|
||||
|
||||
DdlRemisionNotaCredito.DataBind()
|
||||
DdlRemisionNotaCredito.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
GVRemisionesNotaDeCredito.DataBind()
|
||||
|
||||
'DdlRemisionNotaCredito.DataBind()
|
||||
'DdlRemisionNotaCredito.Items.Insert(0, New ListItem("-", "-1"))
|
||||
UpPS.Update()
|
||||
UpEstatus.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlRemisionNotaCredito_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
'Protected Sub DdlRemisionNotaCredito_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
ImporteRNCSaldar = 0
|
||||
SerieFolioProntoPago = ""
|
||||
TipoCambioProntoPago = 1
|
||||
FechaProntoPago = MinFecha
|
||||
CveMonedaProntoPago = 1
|
||||
' ImporteRNCSaldar = 0
|
||||
' SerieFolioProntoPago = ""
|
||||
' TipoCambioProntoPago = 1
|
||||
' FechaProntoPago = MinFecha
|
||||
' CveMonedaProntoPago = 1
|
||||
|
||||
If DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 Then
|
||||
ImporteRNCSaldar = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
|
||||
SerieFolioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("SerieFolio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ")
|
||||
TipoCambioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("TipoCambio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
|
||||
FechaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Fecha", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToString.ToDate
|
||||
CveMonedaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("CveMoneda", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToEntero
|
||||
End If
|
||||
|
||||
''Alert(ImporteRNCSaldar.ToString)
|
||||
'CompraPago.SerieFolio = Gvr.DataKey("SerieFolio")
|
||||
'CompraPago.TC = Gvr.DataKey("TipoCambio").ToDecimal
|
||||
'CompraPago.Fecha = Gvr.DataKey("Fecha").ToDate
|
||||
'CompraPago.CveMoneda = Gvr.DataKey("CveMoneda").ToEntero
|
||||
|
||||
'CompraPago.Total = Gvr.DataKey("Total").ToDecimal
|
||||
'CompraPago.CveTipoConceptoProveedor = CveTipoConcepto
|
||||
' If DdlRemisionNotaCredito.SelectedValue.ToEntero > 0 Then
|
||||
' ImporteRNCSaldar = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Saldo", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
|
||||
' SerieFolioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("SerieFolio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ")
|
||||
' TipoCambioProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("TipoCambio", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToDecimal
|
||||
' FechaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("Fecha", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToString.ToDate
|
||||
' CveMonedaProntoPago = DTRemisionesNotaDeCredito.FiltroPrimeroValor("CveMoneda", $" CveCompra = {DdlRemisionNotaCredito.SelectedValue.ToEntero} ").ToEntero
|
||||
' End If
|
||||
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1513,6 +1513,11 @@ Partial Class Compras_eFacturas
|
||||
DTLOG.Columns.Add("Proveedor", GetType(String))
|
||||
DTLOG.Columns.Add("Importe", GetType(Decimal))
|
||||
DTLOG.Columns.Add("Motivo", GetType(String))
|
||||
DTLOG.Columns.Add("RFCde", GetType(String))
|
||||
DTLOG.Columns.Add("Estatus", GetType(Integer))
|
||||
DTLOG.Columns.Add("Tipo", GetType(String))
|
||||
|
||||
|
||||
'Serie Folio Fecha Proveedor Importe Motivo
|
||||
|
||||
Dim sw As New Diagnostics.Stopwatch
|
||||
@@ -1667,6 +1672,10 @@ Partial Class Compras_eFacturas
|
||||
rowLog("Proveedor") = ""
|
||||
rowLog("Importe") = 0
|
||||
rowLog("Motivo") = ""
|
||||
rowLog("RFCde") = ""
|
||||
rowLog("Estatus") = 0
|
||||
rowLog("Tipo") = ""
|
||||
|
||||
|
||||
Dim fInfoXML As New FileInfo(filePathXML)
|
||||
|
||||
@@ -1884,10 +1893,13 @@ Partial Class Compras_eFacturas
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
||||
|
||||
RegistraScript("$('#ModalBitacoraEfacturas').modal()")
|
||||
CargaDatosBitacora()
|
||||
|
||||
|
||||
mesajeFaturasSubidas(DTLOG)
|
||||
|
||||
|
||||
CargaDatosBitacora()
|
||||
|
||||
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
||||
End Sub
|
||||
|
||||
@@ -1900,6 +1912,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
Dim conta As Integer = 1
|
||||
Str.Append("Se procesó la información con la siguiente información:<br/> <table width='900px'><tr class='Titulos'><td>Serie</td><td>Folio</td><td width='100px'>Fecha</td><td width='250px'>Proveedor</td><td>Importe</td><td width='250px'>Motivo</td></tr>")
|
||||
Dim objCompra As New ClsCompras
|
||||
|
||||
For Each dr As DataRow In DTLOG.Rows
|
||||
|
||||
@@ -1909,13 +1922,18 @@ Partial Class Compras_eFacturas
|
||||
Str.AppendFormat("<td style='width:80px'>{0}</td>", dr("Folio"))
|
||||
Str.AppendFormat("<td style='width:400px'>{0}</td>", If(dr("Fecha").ToString <> "", dr("Fecha").ToString.ToDate.ToShortDateString, ""))
|
||||
Str.AppendFormat("<td style='width:80px'>{0}</td>", dr("Proveedor"))
|
||||
Str.AppendFormat("<td style='width:40px'>{0}</td>", dr("Importe").ToString.ToDouble.FormatoNumero)
|
||||
Str.AppendFormat("<td style='width:40px'>{0}</td>", dr("Importe").ToString.ToDecimal.FormatoNumero)
|
||||
Str.AppendFormat("<td style='width:40px'>{0}</td>", dr("Motivo"))
|
||||
Str.Append("</tr>")
|
||||
conta += 1
|
||||
|
||||
objCompra.AddBitacoraFactura(dr("Serie").ToString, dr("Folio").ToString, dr("RFCde").ToString, dr("Motivo").ToString, dr("Estatus").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "Modulo eFacturas",
|
||||
dr("Proveedor").ToString, dr("Importe").ToString.ToDecimal, dr("Tipo").ToString)
|
||||
Next
|
||||
|
||||
'RFCde,Estatus,Tipo
|
||||
|
||||
objCompra.Dispose()
|
||||
|
||||
If DTLOG.Rows.Count > 0 Then 'si las facturas no recividas son matores a cero se muestra el mensaje
|
||||
Alert(Str.ToString, TipoMensaje.MsgInformacion)
|
||||
@@ -7950,6 +7968,12 @@ Namespace ADS.eFacturas
|
||||
rowLog("Importe") = Fact.Total
|
||||
rowLog("Motivo") = ""
|
||||
|
||||
rowLog("RFCde") = Fact.EmisorRFC
|
||||
rowLog("Estatus") = 0
|
||||
rowLog("Tipo") = Fact.TipoComprobante
|
||||
|
||||
|
||||
|
||||
If Registrar Then
|
||||
|
||||
If Fact.ReceptorRFC = RFCEmpresa Then
|
||||
@@ -7963,6 +7987,8 @@ Namespace ADS.eFacturas
|
||||
|
||||
If Fact.RespuestaInsert >= 0 Then
|
||||
|
||||
rowLog("Estatus") = 1
|
||||
|
||||
Dim Destino As String = $"{DirectorioEmpresa}\Compras\"
|
||||
|
||||
Try
|
||||
|
||||
@@ -255,14 +255,14 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
Ruta = string.Format("{0}Formatos\\{1}", UsuarioActual.Empresa.Ruta, Formato);
|
||||
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1 && !Ruta.Contains( "RepIVAAcreditable.rpt"))
|
||||
{
|
||||
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);
|
||||
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
|
||||
|
||||
Binary file not shown.
@@ -4241,7 +4241,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CartaPorteVersion.Value</Value>
|
||||
<Value>=IIF(Parameters!RFC.Value = "BBD021220APA", "3.1", Parameters!CartaPorteVersion.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
|
||||
@@ -154,6 +154,7 @@ Partial Class RepContratoDetalle
|
||||
TxtImporte.Text = Math.Round(Importe, 2).ToString
|
||||
TxtAnticipo.Text = Math.Round(Anticipo, 2).ToString
|
||||
CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero
|
||||
|
||||
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||
BtnDescargar.Visible = True
|
||||
@@ -161,6 +162,7 @@ Partial Class RepContratoDetalle
|
||||
BtnDescargar.Visible = False
|
||||
A1.Visible = True
|
||||
End If
|
||||
|
||||
'Boletos Vendidos
|
||||
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
||||
TabBoletos.Visible = True
|
||||
@@ -215,7 +217,11 @@ Partial Class RepContratoDetalle
|
||||
|
||||
|
||||
ViewState("extencion") = FileExtension
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", $"{CveContrato.ToString}.{ FileExtension}")
|
||||
|
||||
If File.Exists(ViewState("FUrl").ToString) Then
|
||||
File.Delete(ViewState("FUrl").ToString)
|
||||
End If
|
||||
|
||||
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
||||
TxtArchivo.Text = tempArray(1)
|
||||
@@ -260,14 +266,19 @@ Partial Class RepContratoDetalle
|
||||
Dim ArchivoUpdate As String = "-1"
|
||||
|
||||
If Session("FileExtension").ToString <> "" Then
|
||||
ArchivoUpdate = "." & Session("FileExtension").ToString
|
||||
|
||||
'ArchivoUpdate = $"{CveContrato.ToString}.{ Session("FileExtension")}"
|
||||
ArchivoUpdate = $".{Session("FileExtension").ToString}"
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Try
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservacion.Text) Then
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "",
|
||||
LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
|
||||
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservacion.Text) Then
|
||||
Alert("Contrato actualizado correctamente")
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
@@ -340,7 +351,7 @@ Partial Class RepContratoDetalle
|
||||
Dim FileExtension As String = "-1"
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(Descripcion, FileExtension, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||
Alert("Evento agregado a bitácora correctamente", TipoMensaje.MsgInformacion)
|
||||
'Alert("Evento agregado a bitácora correctamente", TipoMensaje.MsgInformacion)
|
||||
|
||||
End If
|
||||
ObjEventoBitacora.Dispose()
|
||||
|
||||
@@ -146,6 +146,12 @@
|
||||
<%-- Listado de Contratos --%>
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, CveContratosEstatus, CveAF">
|
||||
|
||||
@@ -119,7 +119,7 @@ Partial Class ListadoContratos
|
||||
TxtObservaciones.Text = ""
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTipoAF.SelectedValue = ""
|
||||
DdlTipoAF.SelectedValueExist(-1)
|
||||
TxtImporte.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
TxtCantidadPasajeros.Text = ""
|
||||
|
||||
@@ -199,6 +199,12 @@
|
||||
<%-- Contratos --%>
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid"
|
||||
GridLines="None"
|
||||
@@ -748,6 +754,9 @@
|
||||
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
|
||||
$('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo);
|
||||
$('#<%=HdnCveContrato.ClientID%>').val(event.id);
|
||||
$('#<%=DdlTipoAF.ClientID%>').val(event.CveTipoAF);
|
||||
|
||||
|
||||
|
||||
if (event.NombreComercial !== null) {
|
||||
$('#HidModClienteNombre').val('');
|
||||
|
||||
Reference in New Issue
Block a user