This commit is contained in:
Antonio Gonzalez
2020-07-02 09:24:31 -07:00
10 changed files with 185 additions and 156 deletions

View File

@@ -3058,7 +3058,7 @@
<script type="text/javascript" src="/Scripts/jquery.timers-1.2.js"></script> <script type="text/javascript" src="/Scripts/jquery.timers-1.2.js"></script>
<script type="text/javascript" src="/Scripts/jquery.easing.1.3.js"></script> <script type="text/javascript" src="/Scripts/jquery.easing.1.3.js"></script>
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script> <script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places"></script> <script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"></script>
<script src="/GPS/AF/JS/AF.js"></script> <script src="/GPS/AF/JS/AF.js"></script>
<!-- Third, add the GalleryView Javascript and CSS files --> <!-- Third, add the GalleryView Javascript and CSS files -->
<script type="text/javascript" src="/Scripts/jquery.galleryview-3.0-dev.js"></script> <script type="text/javascript" src="/Scripts/jquery.galleryview-3.0-dev.js"></script>

View File

@@ -16,6 +16,7 @@ Public Class ClsFISConfiguracion
Private SqlConexion As SqlConnection Private SqlConexion As SqlConnection
Private SqlAdapter As SqlDataAdapter Private SqlAdapter As SqlDataAdapter
Private SqlCommand As SqlCommand Private SqlCommand As SqlCommand
Private SqlTransacc As SqlTransaction
Private Data As DataTable Private Data As DataTable
'Atributos de la clase 'Atributos de la clase
@@ -23,6 +24,7 @@ Public Class ClsFISConfiguracion
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIONES ABIERTAS 'REGISTRAR CONEXIONES ABIERTAS
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -42,20 +44,38 @@ Public Class ClsFISConfiguracion
#End Region #End Region
Sub New() Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString If TransaccionCompartida Is Nothing Then
Try SqlConexion = New SqlConnection
SqlConexion.Open() SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Catch ex As Exception Try
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) SqlConexion.Open()
End Try Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
Else
SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If
SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd() ConexionAdd()
End Sub
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand
.Parameters.Clear()
.CommandText = pStrSQL
.CommandType = TipoComando
End With
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable
End Sub End Sub
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -87,21 +107,14 @@ Public Class ClsFISConfiguracion
End If End If
End Sub End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand
.Parameters.Clear()
.CommandText = StrSQL
.CommandType = TipoComando
End With
Data = New DataTable
End Sub
#End Region #End Region
Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Data = New DataTable
SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesGet", SqlConexion) DataAdapter("PA_Fis_CuentaContablesGet")
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -117,16 +130,15 @@ Public Class ClsFISConfiguracion
Catch ex As SqlException Catch ex As SqlException
OnError("Ocurrió un error al consultar las Configuraciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al consultar las Configuraciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
SqlAdapter.Dispose()
Return Retorno Return Retorno
End Function End Function
Public Function AddConfiguracion(ActIVAAcreditable As Integer, ActIVAxAcreditar As Integer, PasIVAPagar As Integer, PasIVAxPagar As Integer, Public Function AddConfiguracion(ActIVAAcreditable As Integer, ActIVAxAcreditar As Integer, PasIVAPagar As Integer, PasIVAxPagar As Integer,
EROtrosIngresos As Integer, ERDSV As Integer, CveEmpresa As Integer) As Boolean EROtrosIngresos As Integer, ERDSV As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Data = New DataTable
SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesAdd", SqlConexion) DataAdapter("PA_Fis_CuentaContablesAdd")
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@ActIVAAcreditable", SqlDbType.VarChar).Value = ActIVAAcreditable .Add("@ActIVAAcreditable", SqlDbType.VarChar).Value = ActIVAAcreditable
@@ -150,7 +162,7 @@ Public Class ClsFISConfiguracion
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al Guardar la Configuración.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al Guardar la Configuración.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
SqlAdapter.Dispose()
Return Retorno Return Retorno
End Function End Function

View File

@@ -1627,7 +1627,7 @@ Public Class ClsPaginas
'sino existe, recarga los datos 'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
Dim ObjVendedores As New ClsVtaVendedores Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(-1) Then Application(AppNombre) = ObjVendedores.DtResultados If ObjVendedores.GetVendedores(CveEmpresa) Then Application(AppNombre) = ObjVendedores.DtResultados
ObjVendedores.Dispose() ObjVendedores.Dispose()
End If End If
If CveEmpresa <> -1 Then If CveEmpresa <> -1 Then
@@ -3351,7 +3351,7 @@ Public Class ClsPaginas
Application("GlobalDTClasificacionPorcentaje") = value Application("GlobalDTClasificacionPorcentaje") = value
End Set End Set
End Property End Property
Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaquteria As Integer = -1) As DataTable Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaqueteria As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa) Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa)
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
@@ -3361,7 +3361,7 @@ Public Class ClsPaginas
End If End If
Dim Str As StringBuilder = New StringBuilder() Dim Str As StringBuilder = New StringBuilder()
If TipoPaquteria <> -1 Then Str.AppendFormat("TipoPaqueteria = {0}", TipoPaquteria) If TipoPaqueteria <> -1 Then Str.AppendFormat("TipoPaqueteria = {0}", TipoPaqueteria)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTPaqueterias = Dv.ToTable GlobalDTPaqueterias = Dv.ToTable

View File

@@ -204,12 +204,12 @@ Partial Class Inventarios_RepEntregasForaneas
DTEstatus = ObjInv.DtResultados DTEstatus = ObjInv.DtResultados
DdlEstatusFiltro.DataSource = DTEstatus DdlEstatusFiltro.DataSource = DTEstatus
End If End If
ObjInv.Dispose()
DdlPaqueteria.DataSource = GlobalDTPaqueterias DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
DdlPaqueteria.DataBind() DdlPaqueteria.DataBind()
DdlEstatusFiltro.DataBind() DdlEstatusFiltro.DataBind()
ObjInv.Dispose()
CargaSucursales() CargaSucursales()
@@ -334,7 +334,7 @@ Partial Class Inventarios_RepEntregasForaneas
e.Row.FCDropDownList("DdlEstatus").DataBind() e.Row.FCDropDownList("DdlEstatus").DataBind()
e.Row.FCDropDownList("DdlEstatus").SelectedValueExist(e.Row.DBCampo("CveEntregaForaneaEstatus")) e.Row.FCDropDownList("DdlEstatus").SelectedValueExist(e.Row.DBCampo("CveEntregaForaneaEstatus"))
e.Row.FCDropDownList("DdlPaqueteria").DataSource = GlobalDTPaqueterias e.Row.FCDropDownList("DdlPaqueteria").DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlPaqueteria").DataBind() e.Row.FCDropDownList("DdlPaqueteria").DataBind()
e.Row.FCDropDownList("DdlPaqueteria").SelectedValueExist(e.Row.DBCampo("CvePaqueteria")) e.Row.FCDropDownList("DdlPaqueteria").SelectedValueExist(e.Row.DBCampo("CvePaqueteria"))

View File

@@ -85,7 +85,7 @@ Partial Class Inventarios_TrasladoSolicitud
TempDT.Columns.Add() TempDT.Columns.Add()
End Sub End Sub
Private Sub CargaPaqueterias() Private Sub CargaPaqueterias()
DdlPaqueteria.DataSource = GlobalDTPaqueterias() DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
DdlPaqueteria.DataBind() DdlPaqueteria.DataBind()
DdlPaqueteria.Items.Insert(0, New ListItem("-", "-1")) DdlPaqueteria.Items.Insert(0, New ListItem("-", "-1"))
End Sub End Sub

View File

@@ -27,7 +27,7 @@ Partial Class Ventas_Garantias
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind() DdlProveedores.DataBind()
DdlPaqueteria.DataSource = GlobalDTPaqueterias DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
DdlPaqueteria.DataBind() DdlPaqueteria.DataBind()

View File

@@ -2374,16 +2374,25 @@
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label> <label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
</div> </div>
</div> </div>
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;"> <div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtEstadoCliente" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox> <asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
<asp:RequiredFieldValidator ID="RFVEstadoC" runat="server" ControlToValidate="TxtEstadoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<label for="<%= TxtEstadoCliente.ClientID.ToString()%>">Estado:</label> <asp:ListItem Value="MEX" Text="México" Selected="True"></asp:ListItem>
<asp:ListItem Value="USA" Text="USA"></asp:ListItem>
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtPaisCliente" CssClass="form-control " Text="Mexico" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox> <asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
<asp:RequiredFieldValidator ID="RFVPaisC" runat="server" ControlToValidate="TxtPaisCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<label for="<%= TxtPaisCliente.ClientID.ToString()%>">País:</label> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
</div> </div>
</div> </div>
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;"> <div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
@@ -3665,8 +3674,8 @@
$('#<%= TxtTelefonoCliente.ClientID %>').val(''); $('#<%= TxtTelefonoCliente.ClientID %>').val('');
$('#<%= TxtCiudadCliente.ClientID %>').val(''); $('#<%= TxtCiudadCliente.ClientID %>').val('');
$('#<%= TxtLocalidadCliente.ClientID %>').val(''); $('#<%= TxtLocalidadCliente.ClientID %>').val('');
$('#<%= TxtEstadoCliente.ClientID %>').val(''); $('#<%= DdlEstadoSAT.ClientID %>').val('');
$('#<%= TxtPaisCliente.ClientID %>').val(''); $('#<%= DdlSATPais.ClientID %>').val('');
$('#<%= TxtCorreoCliente.ClientID %>').val(''); $('#<%= TxtCorreoCliente.ClientID %>').val('');
$('#divAgregarCliente').modal(); $('#divAgregarCliente').modal();

View File

@@ -2298,6 +2298,19 @@ Partial Class PV
If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyectoDatos.Enabled = False If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyectoDatos.Enabled = False
End Sub End Sub
Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX")
DdlEstadoSAT.Items.Clear()
DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais)
DdlEstadoSAT.DataBind()
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaEstados(DdlSATPais.SelectedValue)
End Sub
Private Sub CargaEmpresa() Private Sub CargaEmpresa()
If UsuarioActual.Empresa.UsaContabilidad Then If UsuarioActual.Empresa.UsaContabilidad Then
Dim ObjFisConfiguracion As New ClsFISConfiguracion Dim ObjFisConfiguracion As New ClsFISConfiguracion
@@ -5505,6 +5518,7 @@ Partial Class PV
DivFormaCliente.Visible = False DivFormaCliente.Visible = False
TxtRFCCliente.Text = "XAXX010101000" TxtRFCCliente.Text = "XAXX010101000"
UpAgregarCliente.Update() UpAgregarCliente.Update()
CargaEstados()
RegistraScript("showDivEC();") RegistraScript("showDivEC();")
End Sub End Sub
@@ -5527,8 +5541,6 @@ Partial Class PV
RFVColoniaC.Visible = False RFVColoniaC.Visible = False
RFVCiudadC.Visible = False RFVCiudadC.Visible = False
RFVLocalidadC.Visible = False RFVLocalidadC.Visible = False
RFVEstadoC.Visible = False
RFVPaisC.Visible = False
TxtNombreCliente.Focus() TxtNombreCliente.Focus()
DdlMetodoCliente.SelectedValueExist(1) DdlMetodoCliente.SelectedValueExist(1)
@@ -5538,7 +5550,7 @@ Partial Class PV
If dr IsNot Nothing Then If dr IsNot Nothing Then
TxtCPCliente.Text = dr("CP").ToString TxtCPCliente.Text = dr("CP").ToString
TxtEstadoCliente.Text = dr("Estado").ToString 'TxtEstadoCliente.Text = dr("Estado").ToString RMf FAlta
TxtCiudadCliente.Text = dr("Municipio").ToString TxtCiudadCliente.Text = dr("Municipio").ToString
TxtLocalidadCliente.Text = dr("Localidad").ToString TxtLocalidadCliente.Text = dr("Localidad").ToString
End If End If
@@ -5570,8 +5582,6 @@ Partial Class PV
RFVColoniaC.Visible = True RFVColoniaC.Visible = True
RFVCiudadC.Visible = True RFVCiudadC.Visible = True
RFVLocalidadC.Visible = True RFVLocalidadC.Visible = True
RFVEstadoC.Visible = True
RFVPaisC.Visible = True
DdlMetodoCliente.SelectedValueExist(-1) DdlMetodoCliente.SelectedValueExist(-1)
DdlFormaCliente.SelectedValueExist(-1) DdlFormaCliente.SelectedValueExist(-1)
@@ -5580,12 +5590,12 @@ Partial Class PV
End Sub End Sub
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
Dim CvePreioLista As Integer = -1 Dim CvePrecioLista As Integer = -1
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0) Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
CvePreioLista = Dr("CvePrecioLista").ToString.ToEntero CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
End If End If
End If End If
End If End If
@@ -5593,7 +5603,7 @@ Partial Class PV
Dim ObjCliente As New ClsClientes Dim ObjCliente As New ClsClientes
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim,
TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero, TxtRFCCliente.Text.Trim,
TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero, DdlFormaCliente.SelectedValue.ToEntero) Then UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero, DdlFormaCliente.SelectedValue.ToEntero) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then If ObjCliente.DtResultados.Rows.Count > 0 Then

View File

@@ -6403,14 +6403,14 @@
<asp:ListItem Value="CAN" Text="Canada"></asp:ListItem> <asp:ListItem Value="CAN" Text="Canada"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVSATPais" runat="server" InitialValue="-1" ControlToValidate="DdlSATPais" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pais''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label> <label for="<%= DdlSATPais.ClientID.ToString()%>">Pais:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me"> <asp:DropDownList ID="DdlEstadoSAT" DataTextField="NombreEstado" DataValueField="CveSATEstado" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvDdlEstadoSAT" runat="server" InitialValue="-1" ControlToValidate="DdlEstadoSAT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label> <label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
</div> </div>
</div> </div>

View File

@@ -10139,7 +10139,7 @@ Partial Class Ventas
End If End If
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera 'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
End If End If
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
ImporteConcepto12 = importeMX.RoundSQL ImporteConcepto12 = importeMX.RoundSQL
@@ -10148,10 +10148,10 @@ Partial Class Ventas
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
@@ -10810,7 +10810,7 @@ Partial Class Ventas
' End If ' End If
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"}) DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
If DT.Rows.Count > 0 Then If DT.Rows.Count > 0 Then
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
@@ -10829,7 +10829,7 @@ Partial Class Ventas
End If End If
CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() 'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
@@ -10838,12 +10838,12 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
ViewState("SeGuardoPrePoliza") = True ViewState("SeGuardoPrePoliza") = True
@@ -10912,7 +10912,7 @@ Partial Class Ventas
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142 If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
End If End If
CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() ' CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
@@ -10921,10 +10921,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
ErrorPrepoliza = True ErrorPrepoliza = True
@@ -11229,7 +11229,7 @@ Partial Class Ventas
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows.Count = 1 Then If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows.Count = 1 Then
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContable").ToString().ToEntero() IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContable").ToString().ToEntero()
CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContableSIG").ToString().ToEntero() ' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContableSIG").ToString().ToEntero()
End If End If
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -11237,10 +11237,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero()) ' CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
'BANCOS 'BANCOS
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
@@ -11309,10 +11309,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
@@ -12546,7 +12546,7 @@ Partial Class Ventas
If CveMonedaVenta = 1 Then If CveMonedaVenta = 1 Then
IdCtaContable = IdCtaContClientes IdCtaContable = IdCtaContClientes
CveCuenta = CveCuentaClientes 'CveCuenta = CveCuentaClientes
Else Else
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
CveCuenta = 0 'If(ObjFactura.Cliente IsNot Nothing AndAlso ObjFactura.Cliente.CveCuentaComplementaria > 0, ObjFactura.Cliente.CveCuentaComplementaria, -1) CveCuenta = 0 'If(ObjFactura.Cliente IsNot Nothing AndAlso ObjFactura.Cliente.CveCuentaComplementaria > 0, ObjFactura.Cliente.CveCuentaComplementaria, -1)
@@ -12557,11 +12557,11 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'Conta SIG ''Conta SIG
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
ErrorConta = True ErrorConta = True
@@ -12596,11 +12596,11 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'Conta SIG ''Conta SIG
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambioPago, ImporteME:=If(tipoCambioPago = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambioPago, ImporteME:=If(tipoCambioPago = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
ErrorConta = True ErrorConta = True
@@ -12645,7 +12645,7 @@ Partial Class Ventas
If ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then If ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString().ToEntero() IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString().ToEntero()
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString().ToEntero() 'CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString().ToEntero()
End If End If
End If End If
@@ -12656,10 +12656,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
Dim ImporteComplementaria As Decimal = 0 Dim ImporteComplementaria As Decimal = 0
If UsaComplementariaClientes = True AndAlso gvr.DataKey("CveMoneda").ToString().ToDecimal > 1 Then If UsaComplementariaClientes = True AndAlso gvr.DataKey("CveMoneda").ToString().ToDecimal > 1 Then
@@ -12888,10 +12888,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral) Then If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral) Then
ErrorConta = True ErrorConta = True
@@ -13094,7 +13094,7 @@ Partial Class Ventas
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString().ToEntero() CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString().ToEntero()
End If End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar) ' CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -13102,10 +13102,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
PrePolizaCorrecta = False PrePolizaCorrecta = False
@@ -13123,7 +13123,7 @@ Partial Class Ventas
If ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then If ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero() IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero()
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero() 'CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
End If End If
End If End If
End If End If
@@ -13134,10 +13134,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 8, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 8, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
PrePolizaCorrecta = False PrePolizaCorrecta = False
@@ -13160,15 +13160,15 @@ Partial Class Ventas
End If End If
'ContaSIG 'ContaSIG
If CveCuentaRetISR <> 0 Then 'If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR ' CveCuenta = CveCuentaRetISR
Else 'Else
If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then ' If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then ' If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero() ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
End If ' End If
End If ' End If
End If 'End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -13176,10 +13176,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If IdCtaContable <= 0 Then 'If IdCtaContable <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 9, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 9, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
PrePolizaCorrecta = False PrePolizaCorrecta = False
@@ -13211,7 +13211,7 @@ Partial Class Ventas
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero() CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero()
End If End If
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado) 'CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
'ContaContPAQ 'ContaContPAQ
@@ -13220,11 +13220,11 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'ContaSIG ''ContaSIG
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
PrePolizaCorrecta = False PrePolizaCorrecta = False
@@ -13244,14 +13244,14 @@ Partial Class Ventas
End If End If
End If End If
'Conta SIG ''Conta SIG
If CveCuentaRetIVA <> 0 Then 'If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA ' CveCuenta = CveCuentaRetIVA
Else 'Else
If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then ' If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero() ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
End If ' End If
End If 'End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -13259,10 +13259,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 62, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 62, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
PrePolizaCorrecta = False PrePolizaCorrecta = False
@@ -13284,15 +13284,15 @@ Partial Class Ventas
End If End If
End If End If
If CveCuentaRetISR <> 0 Then 'If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR ' CveCuenta = CveCuentaRetISR
Else 'Else
If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then ' If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then ' If ObjConta.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero() ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
End If ' End If
End If ' End If
End If 'End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -13300,10 +13300,10 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If CveCuenta <= 0 Then 'If CveCuenta <= 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString()) ' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString())
CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 63, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 63, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
PrePolizaCorrecta = False PrePolizaCorrecta = False
@@ -18501,7 +18501,6 @@ Partial Class Ventas
RFVColoniaC.Visible = False RFVColoniaC.Visible = False
RFVCiudadC.Visible = False RFVCiudadC.Visible = False
RFVLocalidadC.Visible = False RFVLocalidadC.Visible = False
RfvDdlEstadoSAT.Visible = False
RFVSATPais.Visible = False RFVSATPais.Visible = False
DdlMetodoCliente.SelectedValueExist(1) DdlMetodoCliente.SelectedValueExist(1)
@@ -18534,7 +18533,6 @@ Partial Class Ventas
RFVColoniaC.Visible = True RFVColoniaC.Visible = True
RFVCiudadC.Visible = True RFVCiudadC.Visible = True
RFVLocalidadC.Visible = True RFVLocalidadC.Visible = True
RfvDdlEstadoSAT.Visible = True
RFVSATPais.Visible = True RFVSATPais.Visible = True
DdlMetodoCliente.SelectedValueExist(-1) DdlMetodoCliente.SelectedValueExist(-1)
@@ -26013,7 +26011,7 @@ Partial Class Ventas
If ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(), If ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(),
TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, DdlMetodoPago33.SelectedValue.ToEntero, DdlFormaPago33.SelectedValue.ToEntero, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, DdlMetodoPago33.SelectedValue.ToEntero, DdlFormaPago33.SelectedValue.ToEntero,
TipoDocto:=DdlTipoComprobante.SelectedValue, OrdenCompra:=TxtOrdenCompra.Text, PedidoContrato:=TxtPedidoContrato.Text, ObsAlm:=TxtObsAlmacen.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, TipoDocto:=DdlTipoComprobante.SelectedValue, OrdenCompra:=TxtOrdenCompra.Text, PedidoContrato:=TxtPedidoContrato.Text, ObsAlm:=TxtObsAlmacen.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero,
CorreoNot:=TxtCorreoNotificaciones.Text) Then CorreoNot:=TxtCorreoNotificaciones.Text, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
CargaVenta() CargaVenta()
BtnEditar.Text = "Editar" BtnEditar.Text = "Editar"
Alert("Actualizado correctamente") Alert("Actualizado correctamente")