comit general
This commit is contained in:
@@ -369,9 +369,12 @@ Public Class ClsGenerales
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function GetGralPaqueteriasGuiasTipo() As Boolean
|
Public Function GetGralPaqueteriasGuiasTipo(Optional CveEmpresa As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Gral_PaqueteriasGuiasTipoGet")
|
DataAdapter("PA_Gral_PaqueteriasGuiasTipoGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
@@ -381,6 +384,54 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function AddGralPaqueteriasGuiasTipo(PaqueteriaGuiaTipo As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Gral_PaqueteriasGuiasTipoAdd")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@PaqueteriaGuiaTipo", SqlDbType.VarChar).Value = PaqueteriaGuiaTipo
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RemoveGralPaqueteriasGuiasTipo(CvePaqueteriaGuiaTipo As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Gral_PaqueteriasGuiasTipoDelete")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePaqueteriaGuiaTipo", SqlDbType.Int).Value = CvePaqueteriaGuiaTipo
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateGralPaqueteriasGuiasTipo(CvePaqueteriaGuiaTipo As Integer, PaqueteriaGuiaTipo As String) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Gral_PaqueteriasGuiasTipoUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePaqueteriaGuiaTipo", SqlDbType.Int).Value = CvePaqueteriaGuiaTipo
|
||||||
|
.Add("@PaqueteriaGuiaTipo", SqlDbType.VarChar).Value = PaqueteriaGuiaTipo
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "P L A N T I L L A S C O N T R A T O S"
|
#Region "P L A N T I L L A S C O N T R A T O S"
|
||||||
|
|||||||
@@ -3957,6 +3957,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Compras/RepReqOCCompraInv.aspx".ToUpper(), 689)
|
PaginaDict.Add("/Compras/RepReqOCCompraInv.aspx".ToUpper(), 689)
|
||||||
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
|
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
|
||||||
PaginaDict.Add("/Compras/RepDocumentacionProveedor.aspx".ToUpper(), 1206)
|
PaginaDict.Add("/Compras/RepDocumentacionProveedor.aspx".ToUpper(), 1206)
|
||||||
|
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -449,7 +449,6 @@ Namespace Modelos
|
|||||||
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
|
||||||
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
||||||
Me.DtAnticipos = New DataTable()
|
Me.DtAnticipos = New DataTable()
|
||||||
Me.DtAntNCVinculadas = New DataTable()
|
|
||||||
Me.DtPagos = New DataTable()
|
Me.DtPagos = New DataTable()
|
||||||
Me.DtRemisiones = New DataTable()
|
Me.DtRemisiones = New DataTable()
|
||||||
Me.DtInventario = New DataTable()
|
Me.DtInventario = New DataTable()
|
||||||
@@ -483,7 +482,7 @@ Namespace Modelos
|
|||||||
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
||||||
'carga as notas de credito vinculadas
|
'carga as notas de credito vinculadas
|
||||||
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
||||||
Me.DtAntNCVinculadas = ObjVentas.DtResultados.Copy()
|
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -493,7 +492,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
If TipoDocto.Contiene("Ant") AndAlso EsCancelacion Then
|
||||||
EsNCAmortizacion = True
|
Me.EsNCAmortizacion = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
||||||
@@ -2418,9 +2417,18 @@ Namespace Modelos
|
|||||||
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = ObjFactura.CveVenta
|
||||||
|
Dim CveVentaAmortizacion As Integer = row2("CveVenta").ToString().ToEntero
|
||||||
|
|
||||||
|
'SI ES FACTURA EN 0 Y TIENE ANTICIPOS
|
||||||
|
If (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing")) AndAlso row2("TipoDocto").ToString() = "Ant" Then
|
||||||
|
CveVenta = row2("CveVenta").ToString().ToEntero
|
||||||
|
CveVentaAmortizacion = ObjFactura.CveVenta
|
||||||
|
End If
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
|
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,
|
CveVenta:=CveVenta, CveVentaAmortizacion:=CveVentaAmortizacion, CveCliente:=ObjFactura.CveCliente,
|
||||||
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
||||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -5213,8 +5221,7 @@ Namespace Modelos
|
|||||||
Public Property DtDeduccion As Data.DataTable
|
Public Property DtDeduccion As Data.DataTable
|
||||||
Public Property DtFirmas As Data.DataTable
|
Public Property DtFirmas As Data.DataTable
|
||||||
Public Property DtDesgloseImpuestos As Data.DataTable
|
Public Property DtDesgloseImpuestos As Data.DataTable
|
||||||
Public Property DtDocumentosRelacionados As Data.DataTable
|
Public Property DtDocumentosRelacionados As Data.DataTable
|
||||||
Public Property DtAntNCVinculadas As Data.DataTable
|
|
||||||
Public Property DtNCVinculadas As Data.DataTable
|
Public Property DtNCVinculadas As Data.DataTable
|
||||||
|
|
||||||
Public Property DtAnticipos As Data.DataTable
|
Public Property DtAnticipos As Data.DataTable
|
||||||
|
|||||||
98
Compras/CatPaqueteriasGuiasTipo.aspx
Normal file
98
Compras/CatPaqueteriasGuiasTipo.aspx
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<%@ Page Title="Compras - Catálogo de Paquetería" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatPaqueteriasGuiasTipo.aspx.vb" Inherits="Comp_CatPaqueteriasGuiasTipo" %>
|
||||||
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Catálogo de Paqueterías
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton runat="server" ID="BtnAgregarPaqueteria" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePaqueteriaGuiaTipo,PaqueteriaGuiaTipo" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;width:100%" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText ="Paqueteria Guia Tipo">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlMotivoBaja" runat="server" Text='<%# Eval("PaqueteriaGuiaTipo", " {0}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<EditItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtMotivoBaja" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("PaqueteriaGuiaTipo") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVMotivoBaja" runat="server" ControlToValidate="TxtMotivoBaja" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de Baja''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCMotivoBaja" runat="server" HighlightCssClass="vco" TargetControlID="RFVMotivoBaja" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</EditItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Fecha">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Editar">
|
||||||
|
<EditItemTemplate>
|
||||||
|
<center>
|
||||||
|
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||||
|
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||||
|
</center>
|
||||||
|
</EditItemTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgE" OnClick="GvDatos_RowEditing" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Eliminar">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
<div id="DivAgregarTiposD" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Motivos de baja</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPaqueteria" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtPaqueteria" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Paqueteria''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
<label for="MotivoTxt">Paqueteria Guía Tipo: </label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnAgregarTiposDModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||||
|
<asp:Button ID="BtnEditarTiposDModal" runat="server" class="btn btn-success" Text="Confirmar" ValidationGroup="GrpTiposD" />
|
||||||
|
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
82
Compras/CatPaqueteriasGuiasTipo.aspx.vb
Normal file
82
Compras/CatPaqueteriasGuiasTipo.aspx.vb
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports System.Linq
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class Comp_CatPaqueteriasGuiasTipo
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property CvePaqueteriaGuiaTipo() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("CvePaqueteriaGuiaTipo")), -1, CInt(ViewState("CvePaqueteriaGuiaTipo")))
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
ViewState("CvePaqueteriaGuiaTipo") = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub CargaDatos()
|
||||||
|
Dim ObjGenerales As New ClsGenerales
|
||||||
|
If ObjGenerales.GetGralPaqueteriasGuiasTipo(UsuarioActual.CveEmpresa) Then
|
||||||
|
GvDatos.DataSource = ObjGenerales.DtResultados
|
||||||
|
End If
|
||||||
|
ObjGenerales.Dispose()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAgregarPaqueteria_Click(sender As Object, e As EventArgs) Handles BtnAgregarPaqueteria.Click
|
||||||
|
BtnEditarTiposDModal.Visible = False
|
||||||
|
BtnAgregarTiposDModal.Visible = True
|
||||||
|
UpModalTiposD.Update()
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAgregarTiposDModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTiposDModal.Click
|
||||||
|
Dim ObjGeneral As New ClsGenerales
|
||||||
|
If ObjGeneral.AddGralPaqueteriasGuiasTipo(TxtPaqueteria.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
|
||||||
|
CargaDatos()
|
||||||
|
UpDatos.Update()
|
||||||
|
Alert("Agregado Correctamente")
|
||||||
|
End If
|
||||||
|
ObjGeneral.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||||
|
Dim ObjGeneral As New ClsGenerales
|
||||||
|
If ObjGeneral.RemoveGralPaqueteriasGuiasTipo(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||||
|
CargaDatos()
|
||||||
|
UpDatos.Update()
|
||||||
|
Alert("Eliminado con exito")
|
||||||
|
End If
|
||||||
|
ObjGeneral.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub GvDatos_RowEditing(sender As Object, e As EventArgs)
|
||||||
|
BtnEditarTiposDModal.Visible = True
|
||||||
|
BtnAgregarTiposDModal.Visible = False
|
||||||
|
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||||
|
TxtPaqueteria.Text = GvRow.DataKey("PaqueteriaGuiaTipo")
|
||||||
|
CvePaqueteriaGuiaTipo = GvRow.DataKey("CvePaqueteriaGuiaTipo")
|
||||||
|
|
||||||
|
UpModalTiposD.Update()
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnEditarTiposDModal_Click(sender As Object, e As EventArgs) Handles BtnEditarTiposDModal.Click
|
||||||
|
Dim ObjGeneral As New ClsGenerales
|
||||||
|
If ObjGeneral.UpdateGralPaqueteriasGuiasTipo(CvePaqueteriaGuiaTipo, TxtPaqueteria.Text) Then
|
||||||
|
CargaDatos()
|
||||||
|
UpDatos.Update()
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
|
||||||
|
Alert("Actualizado con exito")
|
||||||
|
End If
|
||||||
|
ObjGeneral.Dispose()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -46,6 +46,46 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCornerCell>
|
</TablixCornerCell>
|
||||||
|
<TablixCornerCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox6">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Tipo Almacén</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
<Color>White</Color>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>DimGray</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<BackgroundColor>Gray</BackgroundColor>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>1pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCornerCell>
|
||||||
</TablixCornerRow>
|
</TablixCornerRow>
|
||||||
</TablixCornerRows>
|
</TablixCornerRows>
|
||||||
</TablixCorner>
|
</TablixCorner>
|
||||||
@@ -57,9 +97,6 @@
|
|||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>3.17009cm</Width>
|
<Width>3.17009cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
|
||||||
<Width>6.13624cm</Width>
|
|
||||||
</TablixColumn>
|
|
||||||
</TablixColumns>
|
</TablixColumns>
|
||||||
<TablixRows>
|
<TablixRows>
|
||||||
<TablixRow>
|
<TablixRow>
|
||||||
@@ -135,41 +172,6 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="TipoAlmacen">
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>=Fields!TipoAlmacen.Value</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>7.5pt</FontSize>
|
|
||||||
<Format>#,0.00;(#,0.00)</Format>
|
|
||||||
<Color>=IIF(Fields!Almacen.Value = "Total","White","Black")</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Left</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>TipoAlmacen</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Style>None</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>=IIF(Fields!Almacen.Value="Total","#67809F","White")</BackgroundColor>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>1pt</PaddingTop>
|
|
||||||
<PaddingBottom>1pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixCell>
|
|
||||||
</TablixCells>
|
</TablixCells>
|
||||||
</TablixRow>
|
</TablixRow>
|
||||||
</TablixRows>
|
</TablixRows>
|
||||||
@@ -256,46 +258,6 @@
|
|||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixHeader>
|
</TablixHeader>
|
||||||
</TablixMember>
|
</TablixMember>
|
||||||
<TablixMember>
|
|
||||||
<TablixHeader>
|
|
||||||
<Size>0.3751cm</Size>
|
|
||||||
<CellContents>
|
|
||||||
<Textbox Name="Textbox42">
|
|
||||||
<CanGrow>true</CanGrow>
|
|
||||||
<KeepTogether>true</KeepTogether>
|
|
||||||
<Paragraphs>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Tipo Almacén</Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>9pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
<Color>White</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
</Paragraphs>
|
|
||||||
<rd:DefaultName>Textbox42</rd:DefaultName>
|
|
||||||
<Style>
|
|
||||||
<Border>
|
|
||||||
<Color>DimGray</Color>
|
|
||||||
<Style>Solid</Style>
|
|
||||||
</Border>
|
|
||||||
<BackgroundColor>Gray</BackgroundColor>
|
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
|
||||||
<PaddingRight>2pt</PaddingRight>
|
|
||||||
<PaddingTop>2pt</PaddingTop>
|
|
||||||
<PaddingBottom>1pt</PaddingBottom>
|
|
||||||
</Style>
|
|
||||||
</Textbox>
|
|
||||||
</CellContents>
|
|
||||||
</TablixHeader>
|
|
||||||
</TablixMember>
|
|
||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixColumnHierarchy>
|
</TablixColumnHierarchy>
|
||||||
<TablixRowHierarchy>
|
<TablixRowHierarchy>
|
||||||
@@ -344,6 +306,44 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixHeader>
|
</TablixHeader>
|
||||||
|
<TablixMembers>
|
||||||
|
<TablixMember>
|
||||||
|
<TablixHeader>
|
||||||
|
<Size>6.13624cm</Size>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="TipoAlmacen1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!TipoAlmacen.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>7.5pt</FontSize>
|
||||||
|
<Color>=IIF(Fields!Almacen.Value = "Total","White","Black")</Color>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>TipoAlmacen1</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<BackgroundColor>=IIF(Fields!Almacen.Value="Total","#67809F","White")</BackgroundColor>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>1pt</PaddingTop>
|
||||||
|
<PaddingBottom>1pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixHeader>
|
||||||
|
</TablixMember>
|
||||||
|
</TablixMembers>
|
||||||
</TablixMember>
|
</TablixMember>
|
||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixRowHierarchy>
|
</TablixRowHierarchy>
|
||||||
@@ -371,11 +371,13 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Filtros</rd:DefaultName>
|
<rd:DefaultName>Filtros</rd:DefaultName>
|
||||||
<Top>0.17638cm</Top>
|
<Top>0.20788cm</Top>
|
||||||
<Height>0.6cm</Height>
|
<Height>0.6cm</Height>
|
||||||
<Width>18.70841cm</Width>
|
<Width>18.70841cm</Width>
|
||||||
<ZIndex>1</ZIndex>
|
<ZIndex>1</ZIndex>
|
||||||
@@ -676,6 +678,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
<Line Name="Line1">
|
<Line Name="Line1">
|
||||||
|
<Top>0cm</Top>
|
||||||
<Height>0cm</Height>
|
<Height>0cm</Height>
|
||||||
<Width>19.26933cm</Width>
|
<Width>19.26933cm</Width>
|
||||||
<ZIndex>5</ZIndex>
|
<ZIndex>5</ZIndex>
|
||||||
|
|||||||
@@ -161,6 +161,11 @@
|
|||||||
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
|
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Tipo Almacén">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Existencia" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="Existencia" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LtlExist" runat="server" Text='<%# Eval("Existencia", "{0:#,###.##}")%>'></asp:Label>
|
<asp:Label ID="LtlExist" runat="server" Text='<%# Eval("Existencia", "{0:#,###.##}")%>'></asp:Label>
|
||||||
@@ -171,11 +176,6 @@
|
|||||||
<asp:Label ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:#,##0.00}")%>'></asp:Label>
|
<asp:Label ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:#,##0.00}")%>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Tipo Almacén">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -85,10 +85,10 @@ Partial Class Inventarios_RepAlmacen
|
|||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
Dim StrFiltro As New StringBuilder
|
Dim StrFiltro As New StringBuilder
|
||||||
If TxtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", TxtFechaI.Text.ToDate.ToShortDateString)
|
If TxtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", TxtFechaI.Text.ToDate.ToShortDateString) Else StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: Sin Considerar")
|
||||||
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", TxtFechaF.Text.ToDate.ToShortDateString)
|
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Fin </b>: {0}", TxtFechaF.Text.ToDate.ToShortDateString) Else StrFiltro.AppendFormat(" <b>Fecha Fin </b>: Sin Considerar")
|
||||||
If DdlTipoAlmacen.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Tipo Almacen</b>: {0}", DdlTipoAlmacen.GetSelectedText)
|
If DdlTipoAlmacen.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Tipo Almacen</b>: {0}", DdlTipoAlmacen.GetSelectedText) Else StrFiltro.AppendFormat(" <b>Tipo Almacen</b>: Todos")
|
||||||
If DdlModalidadFiltro.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Modalidad</b>: {0}", DdlModalidadFiltro.SelectedItem)
|
If DdlModalidadFiltro.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Modalidad</b>: {0}", DdlModalidadFiltro.SelectedItem) Else StrFiltro.AppendFormat(" <b>Modalidad</b>: Todas")
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
|||||||
@@ -1579,161 +1579,165 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1)
|
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1)
|
||||||
|
|
||||||
Dim ObjCliente As New ClsClientes()
|
Dim ObjCliente As New ClsClientes()
|
||||||
|
Try
|
||||||
|
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus, TipoCliente:=-1) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
TxtCodigo.Text = ObjCliente.Codigo
|
||||||
|
|
||||||
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus, TipoCliente:=-1) Then
|
LblCliente.Text = String.Format("<a Class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente={0}"">{1}</a>", CveCliente, ObjCliente.Nombre)
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
ViewState("NombreCliente") = ObjCliente.Nombre
|
||||||
TxtCodigo.Text = ObjCliente.Codigo
|
LtlCliente.Text = ObjCliente.Nombre
|
||||||
|
ChkEnviarFactura.Checked = ObjCliente.EnviarFactura
|
||||||
LblCliente.Text = String.Format("<a Class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente={0}"">{1}</a>", CveCliente, ObjCliente.Nombre)
|
ViewState("Mail") = If(DdlTipoComprobante.SelectedValue = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail)
|
||||||
ViewState("NombreCliente") = ObjCliente.Nombre
|
ViewState("MailCC") = ObjCliente.NotificarA
|
||||||
LtlCliente.Text = ObjCliente.Nombre
|
LblDireccion.Text = ObjCliente.Direccion
|
||||||
ChkEnviarFactura.Checked = ObjCliente.EnviarFactura
|
LblColonia.Text = ObjCliente.Colonia
|
||||||
ViewState("Mail") = If(DdlTipoComprobante.SelectedValue = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail)
|
LblCiudad.Text = ObjCliente.Ciudad
|
||||||
ViewState("MailCC") = ObjCliente.NotificarA
|
LblEstado.Text = ObjCliente.Estado
|
||||||
LblDireccion.Text = ObjCliente.Direccion
|
LblCP.Text = ObjCliente.CP
|
||||||
LblColonia.Text = ObjCliente.Colonia
|
LblRFC.Text = ObjCliente.RFC
|
||||||
LblCiudad.Text = ObjCliente.Ciudad
|
LblTelefono.Text = ObjCliente.Telefono
|
||||||
LblEstado.Text = ObjCliente.Estado
|
LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5)
|
||||||
LblCP.Text = ObjCliente.CP
|
LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5)
|
||||||
LblRFC.Text = ObjCliente.RFC
|
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||||
LblTelefono.Text = ObjCliente.Telefono
|
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||||
LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5)
|
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
|
||||||
LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5)
|
If ObjCliente.RetieneIVAFletes Then
|
||||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
TrRetIVA.Style.Add("display", "")
|
||||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
UsuarioActual.Empresa.MostrarRetIVA = True
|
||||||
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
|
|
||||||
If ObjCliente.RetieneIVAFletes Then
|
|
||||||
TrRetIVA.Style.Add("display", "")
|
|
||||||
UsuarioActual.Empresa.MostrarRetIVA = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
ViewState("Vendedor") = ObjCliente.Vendedor
|
|
||||||
ViewState("CtaContable") = ObjCliente.CuentaContable
|
|
||||||
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
|
|
||||||
ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
|
|
||||||
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
|
|
||||||
ViewState("IdCtaContAnticipos") = ObjCliente.IdCtaContAnticipos
|
|
||||||
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
|
|
||||||
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
|
||||||
ViewState("CodCliente") = ObjCliente.Codigo
|
|
||||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
|
||||||
|
|
||||||
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
|
||||||
TrEsDistribuidor.Visible = True
|
|
||||||
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
|
|
||||||
Else
|
|
||||||
TrEsDistribuidor.Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
ViewState("CliNoExt") = ObjCliente.NoExt
|
|
||||||
ViewState("CliNoInt") = ObjCliente.NoInt
|
|
||||||
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
|
||||||
ViewState("CliPais") = ObjCliente.Pais
|
|
||||||
|
|
||||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
|
||||||
EnviarCorreoCliente = ObjCliente.EnviarFactura
|
|
||||||
ChkEnviarFactura.Visible = True
|
|
||||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
|
||||||
LblEnviarMail.Visible = True
|
|
||||||
|
|
||||||
Dim dr As DataRow = Nothing
|
|
||||||
dr = GlobalDTSubProyectos(-1).FiltroPrimero("Estatus = 'Activo' AND CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
If dr IsNot Nothing Then
|
|
||||||
ViewState("MatCalle") = dr("Calle")
|
|
||||||
ViewState("MatNoExt") = dr("NoExt")
|
|
||||||
ViewState("MatNoInt") = dr("NoInt")
|
|
||||||
ViewState("MatColonia") = dr("Colonia")
|
|
||||||
ViewState("MatLocalidad") = dr("Localidad")
|
|
||||||
ViewState("MatMunicipio") = dr("Municipio")
|
|
||||||
ViewState("MatEstado") = dr("Estado")
|
|
||||||
ViewState("MatPais") = dr("Pais")
|
|
||||||
ViewState("MatCP") = dr("CP")
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveVenta <= 0 Then
|
|
||||||
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
|
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
|
|
||||||
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
|
|
||||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
|
|
||||||
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
|
||||||
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
|
||||||
|
|
||||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
|
|
||||||
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
|
||||||
End If
|
|
||||||
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
|
||||||
|
|
||||||
|
|
||||||
If ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero > 0 Then
|
|
||||||
DdlVendedor.SelectedValueExist(ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
|
||||||
DdlVendedor.Enabled = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
EstatusCliente = ObjCliente.Estatus
|
|
||||||
|
|
||||||
If Not EstatusCliente Then
|
|
||||||
BtnEmitirImprimir.Enabled = False
|
|
||||||
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
|
|
||||||
Else
|
|
||||||
BtnEmitirImprimir.Enabled = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpFacturar.Update()
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaInventarios Then
|
|
||||||
RblTipo.Items.Remove(RblTipo.Items.FindByValue("1"))
|
|
||||||
RblTipo.Items.Remove(RblTipo.Items.FindByValue("2"))
|
|
||||||
End If
|
|
||||||
UpnTools.Update()
|
|
||||||
|
|
||||||
|
|
||||||
If Not CveVenta > 0 Then
|
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
|
||||||
If UsuarioActual.TienePermisoProceso(152) Then
|
|
||||||
DdlSubProyectoDatos.SelectedValueExist(UsuarioActual.CveSubProyecto)
|
|
||||||
DdlSubProyectoDatos.Enabled = False
|
|
||||||
Else
|
|
||||||
DdlSubProyectoDatos.SelectedValueExist(ObjCliente.CveSubProyecto)
|
|
||||||
End If
|
|
||||||
'RECARGA LOS VALORES DE LA SUCURSAL
|
|
||||||
CambiaSucursal()
|
|
||||||
UpParametros.Update()
|
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjCliente.GetSucursales(CveCliente) Then
|
ViewState("Vendedor") = ObjCliente.Vendedor
|
||||||
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
|
ViewState("CtaContable") = ObjCliente.CuentaContable
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
|
||||||
trsucursalciente.Visible = True
|
ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
|
||||||
|
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
|
||||||
|
ViewState("IdCtaContAnticipos") = ObjCliente.IdCtaContAnticipos
|
||||||
|
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
|
||||||
|
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
||||||
|
ViewState("CodCliente") = ObjCliente.Codigo
|
||||||
|
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||||
|
|
||||||
|
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
||||||
|
TrEsDistribuidor.Visible = True
|
||||||
|
If Not String.IsNullOrEmpty(ObjCliente.Vendedor) Then
|
||||||
|
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TrEsDistribuidor.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
ViewState("CliNoExt") = ObjCliente.NoExt
|
||||||
|
ViewState("CliNoInt") = ObjCliente.NoInt
|
||||||
|
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
||||||
|
ViewState("CliPais") = ObjCliente.Pais
|
||||||
|
|
||||||
|
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||||
|
EnviarCorreoCliente = ObjCliente.EnviarFactura
|
||||||
|
ChkEnviarFactura.Visible = True
|
||||||
|
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||||
|
LblEnviarMail.Visible = True
|
||||||
|
|
||||||
|
Dim dr As DataRow = Nothing
|
||||||
|
dr = GlobalDTSubProyectos(-1).FiltroPrimero("Estatus = 'Activo' AND CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
If dr IsNot Nothing Then
|
||||||
|
ViewState("MatCalle") = dr("Calle")
|
||||||
|
ViewState("MatNoExt") = dr("NoExt")
|
||||||
|
ViewState("MatNoInt") = dr("NoInt")
|
||||||
|
ViewState("MatColonia") = dr("Colonia")
|
||||||
|
ViewState("MatLocalidad") = dr("Localidad")
|
||||||
|
ViewState("MatMunicipio") = dr("Municipio")
|
||||||
|
ViewState("MatEstado") = dr("Estado")
|
||||||
|
ViewState("MatPais") = dr("Pais")
|
||||||
|
ViewState("MatCP") = dr("CP")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveVenta <= 0 Then
|
||||||
|
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
|
||||||
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
|
||||||
|
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
|
||||||
|
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
|
||||||
|
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||||
|
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
||||||
|
|
||||||
|
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
|
||||||
|
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||||
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||||
|
End If
|
||||||
|
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||||
|
|
||||||
|
|
||||||
|
If ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero > 0 Then
|
||||||
|
DdlVendedor.SelectedValueExist(ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||||
|
DdlVendedor.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
EstatusCliente = ObjCliente.Estatus
|
||||||
|
|
||||||
|
If Not EstatusCliente Then
|
||||||
|
BtnEmitirImprimir.Enabled = False
|
||||||
|
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
BtnEmitirImprimir.Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpFacturar.Update()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.UsaInventarios Then
|
||||||
|
RblTipo.Items.Remove(RblTipo.Items.FindByValue("1"))
|
||||||
|
RblTipo.Items.Remove(RblTipo.Items.FindByValue("2"))
|
||||||
|
End If
|
||||||
|
UpnTools.Update()
|
||||||
|
|
||||||
|
|
||||||
|
If Not CveVenta > 0 Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
If UsuarioActual.TienePermisoProceso(152) Then
|
||||||
|
DdlSubProyectoDatos.SelectedValueExist(UsuarioActual.CveSubProyecto)
|
||||||
|
DdlSubProyectoDatos.Enabled = False
|
||||||
|
Else
|
||||||
|
DdlSubProyectoDatos.SelectedValueExist(ObjCliente.CveSubProyecto)
|
||||||
|
End If
|
||||||
|
'RECARGA LOS VALORES DE LA SUCURSAL
|
||||||
|
CambiaSucursal()
|
||||||
|
UpParametros.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjCliente.GetSucursales(CveCliente) Then
|
||||||
|
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
|
||||||
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
trsucursalciente.Visible = True
|
||||||
|
Else
|
||||||
|
trsucursalciente.Visible = False
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
trsucursalciente.Visible = False
|
trsucursalciente.Visible = False
|
||||||
|
DdlSucursalCliente.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
DdlSucursalCliente.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
LbAgregar.Enabled = True
|
||||||
|
UpEstatus.Update()
|
||||||
|
UpPS.Update()
|
||||||
|
UpParametros.Update()
|
||||||
|
UPCondicionesPago.Update()
|
||||||
|
UpComplementos.Update()
|
||||||
|
|
||||||
|
CargarAlmacenes()
|
||||||
|
CargaFacturasAjuste()
|
||||||
Else
|
Else
|
||||||
trsucursalciente.Visible = False
|
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
||||||
DdlSucursalCliente.DataSource = Nothing
|
|
||||||
End If
|
End If
|
||||||
DdlSucursalCliente.DataBind()
|
|
||||||
|
|
||||||
|
|
||||||
LbAgregar.Enabled = True
|
|
||||||
UpEstatus.Update()
|
|
||||||
UpPS.Update()
|
|
||||||
UpParametros.Update()
|
|
||||||
UPCondicionesPago.Update()
|
|
||||||
UpComplementos.Update()
|
|
||||||
|
|
||||||
CargarAlmacenes()
|
|
||||||
CargaFacturasAjuste()
|
|
||||||
Else
|
|
||||||
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
|
||||||
End If
|
End If
|
||||||
End If
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al asignar el cliente", ex)
|
||||||
|
End Try
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -107,19 +107,23 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Importe Venta" DataField="ImporteVenta" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe Venta" DataField="ImporteVenta" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%--<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />--%>
|
|
||||||
<asp:BoundField HeaderText="Nivel" DataField="Nivel" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Nivel" DataField="Nivel" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
|
||||||
<%--<asp:BoundField HeaderText="Tipo Comision" DataField="TipoComisionTexto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />--%>
|
|
||||||
<asp:BoundField HeaderText="Comisión %" DataField="Comision" DataFormatString="{0:###,###,##0.00}%" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Comisión %" DataField="Comision" DataFormatString="{0:###,###,##0.00}%" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Utilidad" DataField="Importe" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Utilidad" DataField="UtilidadVenta" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Ajuste" DataField="ImporteAjuste" Visible="false" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Ajuste" DataField="ImporteAjuste" Visible="false" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%--<asp:BoundField HeaderText="Importe Venta" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField HeaderText="Utilidad" DataField="Utilidad" DataFormatString="{0:N2}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />--%>
|
|
||||||
<asp:BoundField HeaderText="Comisión $" DataField="ComisionGanancia" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Comisión $" DataField="ComisionGanancia" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Importe Cobrado" DataField="Cobrado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe Cobrado" DataField="Cobrado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Comisión Cobrada $" DataField="ComisionCobrada" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="% Cobro" DataField="PorcentajePagado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Pendiente x Cobrar" DataField="Pendiente" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Pendiente x Cobrar" DataField="ImportePorCobrar" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Total al Dia" DataField="PendienteXDia" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Pago" DataField="Pago" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="Importe Venta Acumulado" DataField="ImporteVentaAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Comisión Acumulada $" DataField="ComisionGananciaAcumulada" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="% Cobro Acumulado" DataField="PorcentajePagadoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Importe Cobrado Acumulado" DataField="CobradoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Pago Acumulado" DataField="PagoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--<asp:BoundField HeaderText="Importe Pago" DataField="ImportePagoAcumulado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||||
|
<asp:BoundField HeaderText="Pendiente Pago" DataField="PendientePago" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -6515,14 +6515,26 @@
|
|||||||
}
|
}
|
||||||
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
||||||
var Importe = 0;
|
var Importe = 0;
|
||||||
if (TxtImporte.value != '') {
|
|
||||||
Importe = parseFloat(TxtImporte.value);
|
if (TxtImporte.value.includes('.')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (TxtImporte.value.includes(',')) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Importe > Saldo) {
|
var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$");
|
||||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
|
||||||
} else {
|
if (regex.test(TxtImporte.value)) {
|
||||||
TxtImporte.value = FormatoNumero(Importe, 2);;
|
if (TxtImporte.value != '') {
|
||||||
|
Importe = parseFloat(TxtImporte.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Importe > Saldo) {
|
||||||
|
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||||
|
} else {
|
||||||
|
TxtImporte.value = FormatoNumero(Importe, 2);;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6771,19 +6771,25 @@ Partial Class Ventas
|
|||||||
|
|
||||||
TieneAnticipo = True
|
TieneAnticipo = True
|
||||||
CveAnticipoPadre = row2.DataKey("CveVenta").ToEntero
|
CveAnticipoPadre = row2.DataKey("CveVenta").ToEntero
|
||||||
ObjFactura.CveVentaRelacion = CveAnticipoPadre 'relaciona al anticipo
|
|
||||||
CveAnticipo = CveAnticipoPadre
|
CveAnticipo = CveAnticipoPadre
|
||||||
|
|
||||||
ObjFactura.ImporteRelacion = row2.FCTextBox($"TxtAnticipo{actualindex}").Text.ToDecimal
|
'CUANDO ES REFACTURACION DEBE RELACIONAR CON LA FACTURA REFACTURADA
|
||||||
FolioFiscalRelacionado = row2.DataKey("FolioFiscal")
|
If NuevaFactura <> 1 Then
|
||||||
ObjFactura.CveVentaPadre = row2.DataKey("CveVenta").ToEntero
|
ObjFactura.CveVentaRelacion = CveAnticipoPadre 'relaciona al anticipo
|
||||||
|
ObjFactura.ImporteRelacion = row2.FCTextBox($"TxtAnticipo{actualindex}").Text.ToDecimal
|
||||||
|
FolioFiscalRelacionado = row2.DataKey("FolioFiscal")
|
||||||
|
ObjFactura.CveVentaPadre = row2.DataKey("CveVenta").ToEntero
|
||||||
|
Else
|
||||||
|
ObjFactura.CveVentaRelacion = CveDevolucion
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
actualindex = actualindex + 1
|
actualindex = actualindex + 1
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim EsNCAmortizacion As Boolean = False
|
Dim EsNCAmortizacion As Boolean = False
|
||||||
If DdlTipoComprobante.SelectedValue = "Egs" AndAlso ChkAplicaNCAnticipo.Checked Then
|
If ObjFactura.TipoDocto = "Egs" AndAlso ChkAplicaNCAnticipo.Checked Then
|
||||||
EsNCAmortizacion = True
|
EsNCAmortizacion = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -6847,7 +6853,14 @@ Partial Class Ventas
|
|||||||
' cambiar la condicion para saber si hay seleccionado
|
' cambiar la condicion para saber si hay seleccionado
|
||||||
If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse NCDescuento Then
|
If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse NCDescuento Then
|
||||||
Try
|
Try
|
||||||
CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveAnticipoPadre, NCDescuento:=NCDescuento)
|
Dim CveVentaRelacionada As Integer = -1
|
||||||
|
If NuevaFactura = 1 Then
|
||||||
|
CveVentaRelacionada = ObjFactura.CveVenta
|
||||||
|
Else
|
||||||
|
CveVentaRelacionada = CveAnticipoPadre
|
||||||
|
End If
|
||||||
|
|
||||||
|
CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento)
|
||||||
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing,
|
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing,
|
||||||
Nothing, NCDescuento:=NCDescuento) Then
|
Nothing, NCDescuento:=NCDescuento) Then
|
||||||
Obj2.Add(ObjFacturaDevolucion)
|
Obj2.Add(ObjFacturaDevolucion)
|
||||||
@@ -7431,8 +7444,8 @@ Partial Class Ventas
|
|||||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
If gvr.RowType = DataControlRowType.DataRow Then
|
||||||
Dim Orden As Integer = 80
|
Dim Orden As Integer = 80
|
||||||
If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble > 0 Then
|
If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal > 0 Then
|
||||||
DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR)
|
DR("ImpuestoLocal") = gvr.DataKey("ImpuestoLocal").ToString : DR("Importe") = gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal.RoundSQL(2) : DR("Orden") = Orden : DR("Porcentaje") = gvr.DataKey("Porcentaje").ToString : DR("TipoImpuesto") = gvr.DataKey("TipoImpuesto").ToString : DR("IdCtaContable") = gvr.DataKey("IdCtaContable").ToString.ToEntero : TmpDTImpuestos.Rows.Add(DR)
|
||||||
DR = TmpDTImpuestos.NewRow()
|
DR = TmpDTImpuestos.NewRow()
|
||||||
Orden = Orden + 1
|
Orden = Orden + 1
|
||||||
End If
|
End If
|
||||||
@@ -7524,13 +7537,16 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtVentasNC Is Nothing Then InicializaDTVentasNC()
|
'SI NO ES REFACTURACION
|
||||||
Dim Drt = DtVentasNC.NewRow
|
If NuevaFactura <> 1 Then
|
||||||
Drt("CveVenta") = ObjFactura.CveVenta
|
If DtVentasNC Is Nothing Then InicializaDTVentasNC()
|
||||||
Drt("Importe") = 0
|
Dim Drt = DtVentasNC.NewRow
|
||||||
Drt("FolioFiscal") = ObjFactura.FolioFiscal
|
Drt("CveVenta") = ObjFactura.CveVenta
|
||||||
DtVentasNC.Rows.Add(Drt)
|
Drt("Importe") = 0
|
||||||
DtVentasNC.AcceptChanges()
|
Drt("FolioFiscal") = ObjFactura.FolioFiscal
|
||||||
|
DtVentasNC.Rows.Add(Drt)
|
||||||
|
DtVentasNC.AcceptChanges()
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -7648,7 +7664,14 @@ Partial Class Ventas
|
|||||||
factura.RetIVA = TotalRetIVA
|
factura.RetIVA = TotalRetIVA
|
||||||
factura.RetISR = TotalRetISR
|
factura.RetISR = TotalRetISR
|
||||||
factura.Total = Total
|
factura.Total = Total
|
||||||
factura.CveVentaPadre = CveVentaP
|
|
||||||
|
'SI ES REFACTURACION DEBE RELACIONAR CON LA VENTA NUEVA
|
||||||
|
If NuevaFactura = 1 Then
|
||||||
|
factura.CveVentaPadre = ObjFactura.CveVenta
|
||||||
|
Else
|
||||||
|
factura.CveVentaPadre = CveVentaP
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||||
DtVentasNC.Rows(0)("Importe") = Total
|
DtVentasNC.Rows(0)("Importe") = Total
|
||||||
@@ -8243,7 +8266,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows
|
For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows
|
||||||
If DrImpuestosLocales("Importe").ToString.ToDecimal > 0 Then
|
If DrImpuestosLocales("Importe").ToString.ToDecimal > 0 Then
|
||||||
Dim ret As New CFDIRetencionesLocales With {.TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal, .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString, .Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))}
|
Dim ret As New CFDIRetencionesLocales With
|
||||||
|
{
|
||||||
|
.TasaRetencion = DrImpuestosLocales("Porcentaje").ToString.ToDecimal,
|
||||||
|
.ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString,
|
||||||
|
.Importe = DrImpuestosLocales("Importe").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2)
|
||||||
|
}
|
||||||
ObjFactura.Timbre.RetencionesLocales.Add(ret)
|
ObjFactura.Timbre.RetencionesLocales.Add(ret)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -18406,39 +18434,44 @@ Partial Class Ventas
|
|||||||
'Else
|
'Else
|
||||||
|
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs", "RNC") Then
|
||||||
Dim sb As New StringBuilder()
|
|
||||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
|
||||||
|
|
||||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
'SI ES PRODUCCION VERIFICA EL ESTATUS ANTE EL SAT
|
||||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
If UsuarioActual.Empresa.FacturaProduccion AndAlso Not FolioFiscal.Contains("test") Then
|
||||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
Dim sb As New StringBuilder()
|
||||||
If Vigencia IsNot Nothing Then
|
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
|
||||||
Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia)
|
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||||
Exit Sub
|
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||||
End If
|
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
If Vigencia IsNot Nothing Then
|
||||||
If Not String.IsNullOrEmpty(FolioFiscal) Then
|
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||||
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
|
Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
sb.Append("<b>No encontrado</b> <br/>")
|
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||||
|
If Not String.IsNullOrEmpty(FolioFiscal) Then
|
||||||
|
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
sb.Append("<b>No encontrado</b> <br/>")
|
||||||
|
Else
|
||||||
|
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
sb.Append("<b>No encontrado</b> <br/>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
sb.Append("Está seguro de cancelar el documento?.")
|
||||||
|
|
||||||
|
LblCancelarDocumento.Text = sb.ToString()
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
||||||
|
UpCancelarDocumento.Update()
|
||||||
Else
|
Else
|
||||||
sb.Append("<b>No encontrado</b> <br/>")
|
CancelarDocumento()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sb.Append("Está seguro de cancelar el documento?.")
|
|
||||||
|
|
||||||
LblCancelarDocumento.Text = sb.ToString()
|
|
||||||
|
|
||||||
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
|
||||||
UpCancelarDocumento.Update()
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
CancelarDocumento()
|
CancelarDocumento()
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
||||||
</StartupServices>
|
</StartupServices>
|
||||||
</VisualWebDeveloper>
|
</VisualWebDeveloper>
|
||||||
Reference in New Issue
Block a user