Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2677,6 +2677,45 @@ Public Class ClsVentas
|
||||
Return OnError
|
||||
End Function
|
||||
|
||||
Public Function GetFacturasCanceladasPendientesWS(RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
|
||||
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient()
|
||||
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
||||
If resp.Estado = 0 Then
|
||||
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
|
||||
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
|
||||
Dim theDataSet As DataSet = New DataSet()
|
||||
theDataSet.ReadXml(theReader)
|
||||
|
||||
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
||||
Dim sb = New StringBuilder()
|
||||
|
||||
For Each item As DataRow In theDataSet.Tables(0).Rows
|
||||
sb.AppendFormat("{0};", item("Uuid").ToString())
|
||||
Next
|
||||
|
||||
If GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
|
||||
retorno = True
|
||||
End If
|
||||
|
||||
Else
|
||||
If showalert Then
|
||||
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Alert("Error al obtener cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
Me.OnError("Error al obtener cancelaciones pendientes: ", ex, "")
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateVentaFacturas(CveFactura As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim OnError As Boolean = False
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ Namespace Modelos
|
||||
End If
|
||||
Timbre = New CFDITimbre
|
||||
End Sub
|
||||
Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "")
|
||||
Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "", Optional EsCancelacion As Boolean = False)
|
||||
Me.UsuarioActual = UsuarioActual
|
||||
Me.CveVenta = CveVenta
|
||||
Me.CveEmpresa = CveEmpresa
|
||||
@@ -393,7 +393,7 @@ Namespace Modelos
|
||||
Me.DtDetalle = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
IniciaValoresVentas()
|
||||
IniciaValoresVentas(EsCancelacion)
|
||||
If String.IsNullOrEmpty(DirectorioServidor) Then
|
||||
DirectorioServidor = HttpContext.Current.Server.MapPath("/")
|
||||
End If
|
||||
@@ -446,7 +446,7 @@ Namespace Modelos
|
||||
Me.IEPS = 0
|
||||
Me.CveAlmacenTraspasoOrigen = 0
|
||||
End Sub
|
||||
Private Sub IniciaValoresVentas()
|
||||
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
||||
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
||||
Me.DtAnticipos = New DataTable()
|
||||
Me.DtAntNCVinculadas = New DataTable()
|
||||
@@ -492,6 +492,10 @@ Namespace Modelos
|
||||
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
||||
EsNCAmortizacion = True
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
||||
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
@@ -2333,7 +2337,7 @@ Namespace Modelos
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs") AndAlso ValorMultiplicador = -1 Then
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant") AndAlso ValorMultiplicador = -1 Then
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||
@@ -2344,7 +2348,10 @@ Namespace Modelos
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString().ToEntero, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
|
||||
CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString().ToEntero, CveCliente:=ObjFactura.CveCliente,
|
||||
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
Else
|
||||
|
||||
304
Inicio.aspx
304
Inicio.aspx
@@ -605,62 +605,62 @@
|
||||
<div class="modal-body">
|
||||
<div align="right">
|
||||
<input type="text" id="TxtBusq" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusq','{0}')", GvVtaPUE.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusq','{0}')", GvVtaPUE.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusq','{0}')", GvVtaPUE.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvVtaPUE" runat="server" AutoGenerateColumns="False"
|
||||
DataKeysNames="CveVenta"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
DataKeysNames="CveVenta"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -674,6 +674,104 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="ModalMitoteresat" class="modal ADS fade " role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content modal-lg">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Ventas sin registrar en SIG</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div style="text-align: right">
|
||||
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=4">Ver más</asp:HyperLink>
|
||||
<input type="text" id="TxtBusquedaFolioSat" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFolioSat','{0}')", GvFoliosSAT.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFolioSat','{0}')", GvFoliosSAT.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvFoliosSAT" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron factura canceladas pendientes"
|
||||
DataKeyNames="FolioFiscal,RFC,Total"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreProveedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-plus'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Agregar la factura?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-remove'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelacar la factura ante el sat?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalMitotereCancelaPendiente" class="modal ADS fade " role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content modal-lg">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Cancelaciones por Atender</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div style="text-align: right">
|
||||
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepCancelacionesPorAtender.aspx">Ver más</asp:HyperLink>
|
||||
<input type="text" id="TxtBusquedaCancelaPendiente" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCancelaPendiente','{0}')", gvCancelaPendiente.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCancelaPendiente','{0}')", gvCancelaPendiente.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="gvCancelaPendiente" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron factura canceladas pendientes"
|
||||
DataKeyNames="FolioFiscal,RFC,Total"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreProveedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-plus'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Agregar la factura?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-remove'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelacar la factura ante el sat?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalComprasPUE" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -687,62 +785,62 @@
|
||||
<div class="modal-body">
|
||||
<div align="right">
|
||||
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvCompPUE" runat="server" AutoGenerateColumns="False"
|
||||
DataKeysNames="CveCompra"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
DataKeysNames="CveCompra"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="SerieFolio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Proveedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Proveedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("NombreComercial")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<div style="margin-right: 20px">
|
||||
<asp:Literal runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -767,13 +865,15 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div align="left">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
# Inconsistencias:
|
||||
<asp:Label ID="LblInconsistenciasNum" runat="server" Text="0" Font-Bold="true"></asp:Label>
|
||||
</div>
|
||||
<div align="right">
|
||||
<div class="col-md-6" style="text-align :right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIncons.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvIncons" runat="server" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
</asp:GridView>
|
||||
@@ -800,7 +900,15 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
# No Timbradas:
|
||||
<div class="row">
|
||||
<div class="col-md-6"># No Timbradas:</div>
|
||||
<div class="col-md-6" style="text-align :right">
|
||||
<input type="text" id="TxtBusquedaCentroCosto" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCentroCosto','{0}')", GvNoTimbradasCentroCosto.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCentroCosto','{0}')", GvNoTimbradasCentroCosto.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblNoTimbradas" runat="server" Text="0" Font-Bold="true"></asp:Label>
|
||||
<asp:GridView ID="GvNoTimbradasCentroCosto" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="false" runat="server" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
@@ -16,7 +16,29 @@ Partial Class Inicio
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'RESTRICCION AD
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
|
||||
Using objgral As New ClsGenerales
|
||||
objgral.RepConciliacionSatDetalleGET(UsuarioActual.CveEmpresa, "I", "", "", 10)
|
||||
If objgral.DtResultados.Rows.Count > 0 Then
|
||||
GvFoliosSAT.DataSource = objgral.DtResultados
|
||||
RegistraScript("$('#ModalMitoteresat').modal();", "mitoterosat")
|
||||
End If
|
||||
|
||||
End Using
|
||||
GvFoliosSAT.DataBind()
|
||||
End If
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
Using objventas As New ClsVentas
|
||||
If (objventas.GetFacturasCanceladasPendientesWS(UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa, False)) AndAlso objventas.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("$('#ModalMitotereCancelaPendiente').modal();", "mitoterosatCanceladasPendientesWS")
|
||||
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
'Exit Sub
|
||||
|
||||
'RESTRICCION AD
|
||||
If Not IsNothing(Request("ADCod")) Then
|
||||
'viene el msg encriptado, para sacar el modulo
|
||||
Dim Codigo As String = Decripta(Request("ADCod"))
|
||||
|
||||
@@ -655,13 +655,14 @@ function AbrirVentana(Pagina, Ancho, Alto, tmp, Titulo) {
|
||||
if (!(Alto)) { Alto = '601'; }
|
||||
$('#ajaxidmodal #myFrame').css({ width: Ancho, height: Alto });
|
||||
$('#ajaxidmodal ').css({ width: Ancho, height: Alto });
|
||||
$('#ajaxidmodal #myFrame').load(function() {
|
||||
$('#ajaxidmodal').removeClass("hidden");
|
||||
$("#ajax").modal();
|
||||
$("#ajax").modal();
|
||||
$('#ajaxidmodal').removeClass("hidden");
|
||||
$("#ajaxidmodal #myFrame").unbind("load");
|
||||
$('#ajaxidmodal #myFrame').load(function () {
|
||||
Metronic.unblockUI();
|
||||
});
|
||||
$('#ajaxidmodal #myFrame').prop('src', Pagina);
|
||||
$("#ajax").modal();
|
||||
//$("#ajax").modal();
|
||||
}
|
||||
|
||||
function CerrarVentana() {
|
||||
|
||||
@@ -838,7 +838,7 @@
|
||||
</div>
|
||||
<div id="DivRetenciones" runat="server">
|
||||
<div id="DivTipoRetenciones" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoRetencion" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<asp:DropDownList ID="DdlTipoRetencion" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Retención" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Arrendamiento" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Servicios Profesionales" Value="2"></asp:ListItem>
|
||||
|
||||
@@ -9940,23 +9940,6 @@ Partial Class Clientes
|
||||
Acum.Dispose()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Select Case DdlTipoRetencion.SelectedValue
|
||||
Case "1" 'Arrendamiento
|
||||
TxtRetIVA.Text = "10"
|
||||
TxtRetISR.Text = "10"
|
||||
Case "2" 'Servicios Profesionales
|
||||
TxtRetIVA.Text = "10"
|
||||
TxtRetISR.Text = "10"
|
||||
Case "3" 'Fletes
|
||||
TxtRetIVA.Text = "4"
|
||||
TxtRetISR.Text = "4"
|
||||
Case "4" 'Servicios
|
||||
TxtRetIVA.Text = "6"
|
||||
TxtRetISR.Text = "6"
|
||||
End Select
|
||||
UpFiscalContable.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
@@ -27,39 +27,49 @@ public partial class Ventas_RepCancelacionesPorAtender : ClsPaginas
|
||||
}
|
||||
private void CargarPendientes()
|
||||
{
|
||||
Cancelacion.CancelacionSoapClient objServicio = new Cancelacion.CancelacionSoapClient();
|
||||
Cancelacion.StructCancel resp = objServicio.ObtienePendientes(UsuarioActual.Empresa.RFC, "UserTest", "1234567890");
|
||||
if (resp.Estado == 0)
|
||||
|
||||
//Cancelacion.CancelacionSoapClient objServicio = new Cancelacion.CancelacionSoapClient();
|
||||
//Cancelacion.StructCancel resp = objServicio.ObtienePendientes(UsuarioActual.Empresa.RFC, "UserTest", "1234567890");
|
||||
//if (resp.Estado == 0)
|
||||
//{
|
||||
// string XmlPendientes = DecodeBase64(resp.Xml);
|
||||
// StringReader theReader = new StringReader(XmlPendientes);
|
||||
// DataSet theDataSet = new DataSet();
|
||||
// theDataSet.ReadXml(theReader);
|
||||
// if (theDataSet.Tables[0].Rows[0]["Uuid"].ToString() != "null")
|
||||
// {
|
||||
// var sb = new StringBuilder();
|
||||
// foreach (DataRow item in theDataSet.Tables[0].Rows)
|
||||
// {
|
||||
// sb.AppendFormat("{0};", item["Uuid"].ToString());
|
||||
// }
|
||||
// var ObjVentas = new ClsVentas();
|
||||
// if (ObjVentas.GetFacturasCanceladasPendientes(sb.ToString(), UsuarioActual.CveEmpresa))
|
||||
// {
|
||||
// GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
// }
|
||||
// ObjVentas.Dispose();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GvDatos.DataSource = null;
|
||||
// Alert("No se encontraron cancelaciones pendientes");
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// GvDatos.DataSource = null;
|
||||
// Alert("Error al obtener cancelaciones pendientes: " + resp.Descripcion, ModExtensiones.TipoMensaje.MsgError);
|
||||
//}
|
||||
using (ClsVentas ObjVentas = new ClsVentas())
|
||||
{
|
||||
string XmlPendientes = DecodeBase64(resp.Xml);
|
||||
StringReader theReader = new StringReader(XmlPendientes);
|
||||
DataSet theDataSet = new DataSet();
|
||||
theDataSet.ReadXml(theReader);
|
||||
if (theDataSet.Tables[0].Rows[0]["Uuid"].ToString() != "null")
|
||||
if (ObjVentas.GetFacturasCanceladasPendientesWS(UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (DataRow item in theDataSet.Tables[0].Rows)
|
||||
{
|
||||
sb.AppendFormat("{0};", item["Uuid"].ToString());
|
||||
}
|
||||
var ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.GetFacturasCanceladasPendientes(sb.ToString(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = null;
|
||||
Alert("No se encontraron cancelaciones pendientes");
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GvDatos.DataSource = null;
|
||||
Alert("Error al obtener cancelaciones pendientes: " + resp.Descripcion, ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
|
||||
GvDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
}
|
||||
@@ -153,9 +163,8 @@ public partial class Ventas_RepCancelacionesPorAtender : ClsPaginas
|
||||
private string DecodeBase64(string strXMLCodificado)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] decbuff = Convert.FromBase64String(strXMLCodificado);
|
||||
return System.Text.Encoding.UTF8.GetString(decbuff);
|
||||
{
|
||||
return System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(strXMLCodificado));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -1372,16 +1372,15 @@
|
||||
<td>
|
||||
<asp:Label ID="LblRetIVA" runat="server" BorderStyle="None" Text="0.00"></asp:Label> (%)
|
||||
</td>
|
||||
<%-- <td>
|
||||
<asp:DropDownList ID="DdlTipoRetencion" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoRetencion" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Retención" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Arrendamiento" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Servicios Profesionales" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fletes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Servicios" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>--%>
|
||||
<td></td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="TrRetISR" runat="server" align="right" style="display: none;">
|
||||
|
||||
@@ -4113,6 +4113,7 @@ Partial Class Ventas
|
||||
|
||||
'Sección Detalle
|
||||
DdlMoneda.Enabled = False
|
||||
DdlTipoRetencion.Enabled = False
|
||||
TxtFechaEjecucion.ReadOnly = True
|
||||
ImgCalendarFechaEje.Enabled = False
|
||||
'DdlSucursalEjecucion.Enabled = False
|
||||
@@ -4701,6 +4702,9 @@ Partial Class Ventas
|
||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||
|
||||
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
|
||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
|
||||
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
|
||||
If ObjCliente.RetieneIVAFletes Then
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
@@ -4739,8 +4743,6 @@ Partial Class Ventas
|
||||
End If
|
||||
ViewState("CargoUsado") = ObjCliente.CargoUsados
|
||||
|
||||
'DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
|
||||
|
||||
Dim dr As DataRow = Nothing
|
||||
dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal = 1 And Estatus = 'Activo' AND CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
If dr IsNot Nothing Then
|
||||
@@ -5924,6 +5926,20 @@ Partial Class Ventas
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal)
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero
|
||||
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
|
||||
@@ -7595,10 +7611,10 @@ Partial Class Ventas
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False)
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False)
|
||||
|
||||
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
|
||||
Else
|
||||
ObjFactura = New Modelos.Factura
|
||||
End If
|
||||
@@ -14229,6 +14245,20 @@ Partial Class Ventas
|
||||
Row("PorcentajeIVA") = DrPS("IVA")
|
||||
End If
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso DrPS("CveTipoPS").ToString().ToEntero() = 1 Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||
@@ -18447,7 +18477,8 @@ Partial Class Ventas
|
||||
CancelarRefacturada()
|
||||
End If
|
||||
|
||||
CreaObjetosVenta()
|
||||
CreaObjetosVenta(EsCancelacion:=True)
|
||||
|
||||
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveVenta > 0 Then
|
||||
@@ -18465,9 +18496,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
If ChkDevAlm.Checked Then
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
End If
|
||||
|
||||
resp = ObjFactura.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar)
|
||||
End If
|
||||
@@ -23871,10 +23899,12 @@ Partial Class Ventas
|
||||
CargaRNC()
|
||||
RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Dim DtUsados As DataTable = Nothing
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetGarantiasDetalle(ObjFactura.CveVenta) Then
|
||||
If ObjAcum.GetGarantiasPolizaVirtual(ObjFactura.CveVenta) Then
|
||||
DtUsados = ObjAcum.DtResultados.Copy()
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
@@ -23998,19 +24028,39 @@ Partial Class Ventas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
'Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' Dim PorcentajeRetencion As Decimal = 0
|
||||
' Select Case DdlTipoRetencion.SelectedValue
|
||||
' Case "1" 'Arrendamiento
|
||||
' PorcentajeRetencion = 10
|
||||
' Case "2" 'Servicios Profesionales
|
||||
' PorcentajeRetencion = 10
|
||||
' Case "3" 'Fletes
|
||||
' PorcentajeRetencion = 4
|
||||
' Case "4" 'Servicios
|
||||
' PorcentajeRetencion = 6
|
||||
' End Select
|
||||
#End Region
|
||||
|
||||
'End Sub
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso RowServicio("CveTipoPS").ToString().ToEntero() = 1 Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
|
||||
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
|
||||
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
||||
|
||||
Next
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||
If PorcentajeRetIVA > 0 Then
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
UpPS.Update()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user