Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3058,7 +3058,7 @@
|
||||
<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 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>
|
||||
<!-- Third, add the GalleryView Javascript and CSS files -->
|
||||
<script type="text/javascript" src="/Scripts/jquery.galleryview-3.0-dev.js"></script>
|
||||
|
||||
@@ -16,6 +16,7 @@ Public Class ClsFISConfiguracion
|
||||
Private SqlConexion As SqlConnection
|
||||
Private SqlAdapter As SqlDataAdapter
|
||||
Private SqlCommand As SqlCommand
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
|
||||
'Atributos de la clase
|
||||
@@ -23,6 +24,7 @@ Public Class ClsFISConfiguracion
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
Private EsTransaccionCompartida As Boolean = False
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -42,20 +44,38 @@ Public Class ClsFISConfiguracion
|
||||
|
||||
#End Region
|
||||
|
||||
Sub New()
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
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()
|
||||
|
||||
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
|
||||
#Region "Conexiones"
|
||||
|
||||
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
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -87,21 +107,14 @@ Public Class ClsFISConfiguracion
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesGet", SqlConexion)
|
||||
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
|
||||
DataAdapter("PA_Fis_CuentaContablesGet")
|
||||
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -117,16 +130,15 @@ Public Class ClsFISConfiguracion
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al consultar las Configuraciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
SqlAdapter.Dispose()
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesAdd", SqlConexion)
|
||||
SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
|
||||
DataAdapter("PA_Fis_CuentaContablesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@ActIVAAcreditable", SqlDbType.VarChar).Value = ActIVAAcreditable
|
||||
@@ -150,7 +162,7 @@ Public Class ClsFISConfiguracion
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar la Configuración.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
SqlAdapter.Dispose()
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
@@ -1627,7 +1627,7 @@ Public Class ClsPaginas
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
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()
|
||||
End If
|
||||
If CveEmpresa <> -1 Then
|
||||
@@ -3351,7 +3351,7 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTClasificacionPorcentaje") = value
|
||||
End Set
|
||||
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
|
||||
Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa)
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
@@ -3361,7 +3361,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
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)
|
||||
GlobalDTPaqueterias = Dv.ToTable
|
||||
|
||||
@@ -204,12 +204,12 @@ Partial Class Inventarios_RepEntregasForaneas
|
||||
DTEstatus = ObjInv.DtResultados
|
||||
DdlEstatusFiltro.DataSource = DTEstatus
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
|
||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias
|
||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
|
||||
DdlPaqueteria.DataBind()
|
||||
|
||||
DdlEstatusFiltro.DataBind()
|
||||
ObjInv.Dispose()
|
||||
|
||||
CargaSucursales()
|
||||
|
||||
@@ -334,7 +334,7 @@ Partial Class Inventarios_RepEntregasForaneas
|
||||
e.Row.FCDropDownList("DdlEstatus").DataBind()
|
||||
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").SelectedValueExist(e.Row.DBCampo("CvePaqueteria"))
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
TempDT.Columns.Add()
|
||||
End Sub
|
||||
Private Sub CargaPaqueterias()
|
||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias()
|
||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
|
||||
DdlPaqueteria.DataBind()
|
||||
DdlPaqueteria.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End Sub
|
||||
|
||||
@@ -27,7 +27,7 @@ Partial Class Ventas_Garantias
|
||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedores.DataBind()
|
||||
|
||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias
|
||||
DdlPaqueteria.DataSource = GlobalDTPaqueterias(UsuarioActual.CveEmpresa)
|
||||
DdlPaqueteria.DataBind()
|
||||
|
||||
|
||||
|
||||
@@ -2374,16 +2374,25 @@
|
||||
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
|
||||
</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">
|
||||
<asp:TextBox ID="TxtEstadoCliente" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox>
|
||||
<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>
|
||||
<label for="<%= TxtEstadoCliente.ClientID.ToString()%>">Estado:</label>
|
||||
<asp:DropDownList ID="DdlSATPais" runat="server" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSATPais_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<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 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: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>
|
||||
<label for="<%= TxtPaisCliente.ClientID.ToString()%>">País:</label>
|
||||
<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: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 id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
@@ -3665,8 +3674,8 @@
|
||||
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
|
||||
$('#<%= TxtCiudadCliente.ClientID %>').val('');
|
||||
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
|
||||
$('#<%= TxtEstadoCliente.ClientID %>').val('');
|
||||
$('#<%= TxtPaisCliente.ClientID %>').val('');
|
||||
$('#<%= DdlEstadoSAT.ClientID %>').val('');
|
||||
$('#<%= DdlSATPais.ClientID %>').val('');
|
||||
$('#<%= TxtCorreoCliente.ClientID %>').val('');
|
||||
|
||||
$('#divAgregarCliente').modal();
|
||||
|
||||
@@ -2298,6 +2298,19 @@ Partial Class PV
|
||||
If UsuarioActual.TienePermisoProceso(152) Then DdlSubProyectoDatos.Enabled = False
|
||||
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()
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim ObjFisConfiguracion As New ClsFISConfiguracion
|
||||
@@ -5505,6 +5518,7 @@ Partial Class PV
|
||||
DivFormaCliente.Visible = False
|
||||
TxtRFCCliente.Text = "XAXX010101000"
|
||||
UpAgregarCliente.Update()
|
||||
CargaEstados()
|
||||
|
||||
RegistraScript("showDivEC();")
|
||||
End Sub
|
||||
@@ -5527,8 +5541,6 @@ Partial Class PV
|
||||
RFVColoniaC.Visible = False
|
||||
RFVCiudadC.Visible = False
|
||||
RFVLocalidadC.Visible = False
|
||||
RFVEstadoC.Visible = False
|
||||
RFVPaisC.Visible = False
|
||||
TxtNombreCliente.Focus()
|
||||
|
||||
DdlMetodoCliente.SelectedValueExist(1)
|
||||
@@ -5538,7 +5550,7 @@ Partial Class PV
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
TxtCPCliente.Text = dr("CP").ToString
|
||||
TxtEstadoCliente.Text = dr("Estado").ToString
|
||||
'TxtEstadoCliente.Text = dr("Estado").ToString RMf FAlta
|
||||
TxtCiudadCliente.Text = dr("Municipio").ToString
|
||||
TxtLocalidadCliente.Text = dr("Localidad").ToString
|
||||
End If
|
||||
@@ -5570,8 +5582,6 @@ Partial Class PV
|
||||
RFVColoniaC.Visible = True
|
||||
RFVCiudadC.Visible = True
|
||||
RFVLocalidadC.Visible = True
|
||||
RFVEstadoC.Visible = True
|
||||
RFVPaisC.Visible = True
|
||||
|
||||
DdlMetodoCliente.SelectedValueExist(-1)
|
||||
DdlFormaCliente.SelectedValueExist(-1)
|
||||
@@ -5580,12 +5590,12 @@ Partial Class PV
|
||||
End Sub
|
||||
|
||||
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
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
|
||||
CvePreioLista = Dr("CvePrecioLista").ToString.ToEntero
|
||||
CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -5593,7 +5603,7 @@ Partial Class PV
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
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,
|
||||
UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero, DdlFormaCliente.SelectedValue.ToEntero) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -6403,14 +6403,14 @@
|
||||
<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="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>
|
||||
</div>
|
||||
<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:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10139,7 +10139,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
ImporteConcepto12 = importeMX.RoundSQL
|
||||
@@ -10148,10 +10148,10 @@ Partial Class Ventas
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
@@ -10810,7 +10810,7 @@ Partial Class Ventas
|
||||
|
||||
' End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"})
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
@@ -10829,7 +10829,7 @@ Partial Class Ventas
|
||||
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
|
||||
|
||||
@@ -10838,12 +10838,12 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
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()}"))
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'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()}"))
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
Else
|
||||
ViewState("SeGuardoPrePoliza") = True
|
||||
@@ -10912,7 +10912,7 @@ Partial Class Ventas
|
||||
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
|
||||
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
|
||||
|
||||
@@ -10921,10 +10921,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
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()}"))
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'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()}"))
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
ErrorPrepoliza = True
|
||||
@@ -11229,7 +11229,7 @@ Partial Class Ventas
|
||||
|
||||
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()
|
||||
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
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
@@ -11237,10 +11237,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
'BANCOS
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
@@ -11309,10 +11309,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
ErrorPrepoliza = True
|
||||
@@ -12546,7 +12546,7 @@ Partial Class Ventas
|
||||
|
||||
If CveMonedaVenta = 1 Then
|
||||
IdCtaContable = IdCtaContClientes
|
||||
CveCuenta = CveCuentaClientes
|
||||
'CveCuenta = CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = IdCtaContComplementaria
|
||||
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
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
''Conta SIG
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
ErrorConta = True
|
||||
@@ -12596,11 +12596,11 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
''Conta SIG
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
ErrorConta = True
|
||||
@@ -12645,7 +12645,7 @@ Partial Class Ventas
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
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
|
||||
|
||||
@@ -12656,10 +12656,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
Dim ImporteComplementaria As Decimal = 0
|
||||
If UsaComplementariaClientes = True AndAlso gvr.DataKey("CveMoneda").ToString().ToDecimal > 1 Then
|
||||
@@ -12888,10 +12888,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
ErrorConta = True
|
||||
@@ -13094,7 +13094,7 @@ Partial Class Ventas
|
||||
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString().ToEntero()
|
||||
End If
|
||||
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 IdCtaContable <= 0 Then
|
||||
@@ -13102,10 +13102,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
PrePolizaCorrecta = False
|
||||
@@ -13123,7 +13123,7 @@ Partial Class Ventas
|
||||
If ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
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
|
||||
@@ -13134,10 +13134,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 8, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||
PrePolizaCorrecta = False
|
||||
@@ -13160,15 +13160,15 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'ContaSIG
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
'Else
|
||||
' If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If ImporteMovimiento > 0 Then
|
||||
If IdCtaContable <= 0 Then
|
||||
@@ -13176,10 +13176,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If IdCtaContable <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 9, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||
PrePolizaCorrecta = False
|
||||
@@ -13211,7 +13211,7 @@ Partial Class Ventas
|
||||
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero()
|
||||
End If
|
||||
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
|
||||
'ContaContPAQ
|
||||
@@ -13220,11 +13220,11 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'ContaSIG
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
''ContaSIG
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
PrePolizaCorrecta = False
|
||||
@@ -13244,14 +13244,14 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
''Conta SIG
|
||||
'If CveCuentaRetIVA <> 0 Then
|
||||
' CveCuenta = CveCuentaRetIVA
|
||||
'Else
|
||||
' If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then
|
||||
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero()
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If ImporteMovimiento > 0 Then
|
||||
If IdCtaContable <= 0 Then
|
||||
@@ -13259,10 +13259,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 62, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||
PrePolizaCorrecta = False
|
||||
@@ -13284,15 +13284,15 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
'Else
|
||||
' If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero()
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If ImporteMovimiento > 0 Then
|
||||
If IdCtaContable <= 0 Then
|
||||
@@ -13300,10 +13300,10 @@ Partial Class Ventas
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString())
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 63, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then
|
||||
PrePolizaCorrecta = False
|
||||
@@ -18501,7 +18501,6 @@ Partial Class Ventas
|
||||
RFVColoniaC.Visible = False
|
||||
RFVCiudadC.Visible = False
|
||||
RFVLocalidadC.Visible = False
|
||||
RfvDdlEstadoSAT.Visible = False
|
||||
RFVSATPais.Visible = False
|
||||
|
||||
DdlMetodoCliente.SelectedValueExist(1)
|
||||
@@ -18534,7 +18533,6 @@ Partial Class Ventas
|
||||
RFVColoniaC.Visible = True
|
||||
RFVCiudadC.Visible = True
|
||||
RFVLocalidadC.Visible = True
|
||||
RfvDdlEstadoSAT.Visible = True
|
||||
RFVSATPais.Visible = True
|
||||
|
||||
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(),
|
||||
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,
|
||||
CorreoNot:=TxtCorreoNotificaciones.Text) Then
|
||||
CorreoNot:=TxtCorreoNotificaciones.Text, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
CargaVenta()
|
||||
BtnEditar.Text = "Editar"
|
||||
Alert("Actualizado correctamente")
|
||||
|
||||
Reference in New Issue
Block a user